Add generation of empty data for first run experience
This commit is contained in:
parent
4cef87e506
commit
f868166756
2 changed files with 10 additions and 2 deletions
|
|
@ -34,8 +34,6 @@ apparatus::apparatus() {
|
||||||
}
|
}
|
||||||
|
|
||||||
apparatus::~apparatus() {
|
apparatus::~apparatus() {
|
||||||
this->shutdown();
|
|
||||||
|
|
||||||
if (this->_bin_file) {
|
if (this->_bin_file) {
|
||||||
this->_bin_file->flush();
|
this->_bin_file->flush();
|
||||||
this->_bin_file->close();
|
this->_bin_file->close();
|
||||||
|
|
@ -56,6 +54,13 @@ bool apparatus::isFirstRun() {
|
||||||
return QFile(apparatus::filename).exists();
|
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() {
|
const auth_system& apparatus::get_auth_subsystem() {
|
||||||
return this->_auth_system;
|
return this->_auth_system;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,9 @@ public:
|
||||||
~apparatus();
|
~apparatus();
|
||||||
|
|
||||||
bool isFirstRun();
|
bool isFirstRun();
|
||||||
|
void generate_empty_data();
|
||||||
|
const auth_system& get_auth_subsystem();
|
||||||
|
const object_system& get_object_subsystem();
|
||||||
|
|
||||||
static apparatus& instance();
|
static apparatus& instance();
|
||||||
static void init();
|
static void init();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue