Add generation of empty data for first run experience

This commit is contained in:
Andrew nuark G 2020-12-16 00:38:31 +07:00
parent 4cef87e506
commit f868166756
2 changed files with 10 additions and 2 deletions

View file

@ -34,8 +34,6 @@ apparatus::apparatus() {
}
apparatus::~apparatus() {
this->shutdown();
if (this->_bin_file) {
this->_bin_file->flush();
this->_bin_file->close();
@ -56,6 +54,13 @@ bool apparatus::isFirstRun() {
return QFile(apparatus::filename).exists();
}
void apparatus::generate_empty_data() {
this->open_writing_stream();
this->writeGIDS();
this->serialize_data();
this->close_stream();
}
const auth_system& apparatus::get_auth_subsystem() {
return this->_auth_system;
}