X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;ds=sidebyside;f=src%2Fapps%2FPswGen%2FStorage%2Fmodule.cpp;h=09efe2e6b23730ee5ee76960890b2e53a8dcd64e;hb=4a845c9a4d543528ab0284835c84c3f4e0bf7b25;hp=12fda4213118132b30768af23720beb78cfbd5bd;hpb=9244d12b8b40402d057dad296cd1c2b20e22930c;p=evaf
diff --git a/src/apps/PswGen/Storage/module.cpp b/src/apps/PswGen/Storage/module.cpp
index 12fda42..09efe2e 100644
--- a/src/apps/PswGen/Storage/module.cpp
+++ b/src/apps/PswGen/Storage/module.cpp
@@ -18,7 +18,6 @@
*/
#include "module.h"
-#include "version.h"
#include
#include
@@ -29,7 +28,6 @@
#include
VER_EXPORT_VERSION_INFO()
-Q_EXPORT_PLUGIN2(VER_MODULE_NAME_STR, eVaf::PswGen::Storage::Module)
using namespace eVaf;
using namespace eVaf::PswGen;
@@ -137,6 +135,7 @@ bool StorageImpl::init()
void StorageImpl::done()
{
mData.clear();
+ mDb.close();
EVAF_INFO("%s finalized", qPrintable(objectName()));
}
@@ -170,10 +169,10 @@ bool StorageImpl::save(QString const & name, QExplicitlySharedDataPointerreset();
@@ -253,14 +252,14 @@ bool StorageImpl::loadData()
return false;
}
+ beginResetModel();
while (q.next()) {
QString name = q.value(0).toString();
QExplicitlySharedDataPointer data(
new Storage::Data(name, q.value(1).toString(), q.value(2).toInt(), uint(q.value(3).toInt())));
mData.insert(name, data);
}
-
- reset();
+ endResetModel();
return true;
}