]> vaikene.ee Git - evaf/blobdiff - src/apps/PswGen/Storage/module.cpp
Added the name attribute to the eVaf::PswGen::Storage::Data class.
[evaf] / src / apps / PswGen / Storage / module.cpp
index ab591b7a20d073fa96b0d474a5b058a15043b0e8..b062b305453975aaef87fee517f455a9efe6d6c0 100644 (file)
@@ -23,7 +23,7 @@
 #include <Common/Globals>
 #include <Common/iLogger>
 #include <Common/iRegistry>
-#include <Common/iEnv>
+#include <Common/iApp>
 
 #include <QtCore>
 #include <QtSql/QtSql>
@@ -108,7 +108,7 @@ bool StorageImpl::init()
     if (!QSqlDatabase::contains(DbConnectionName)) {
         // No database connection yet
         mDb = QSqlDatabase::addDatabase("QSQLITE", DbConnectionName);
-        mDb.setDatabaseName(Common::iEnv::instance()->dataRootDir() + DbName);
+        mDb.setDatabaseName(Common::iApp::instance()->dataRootDir() + DbName);
         if (!mDb.open()) {
             QSqlError err = mDb.lastError();
             EVAF_ERROR("Failed to open database : %s", qPrintable(err.text()));
@@ -231,7 +231,7 @@ bool StorageImpl::loadData()
 
     while (q.next()) {
         QString name = q.value(0).toString();
-        QExplicitlySharedDataPointer<Storage::Data> data(new Storage::Data(q.value(1).toInt(), uint(q.value(2).toInt())));
+        QExplicitlySharedDataPointer<Storage::Data> data(new Storage::Data(name, q.value(1).toInt(), uint(q.value(2).toInt())));
         mData.insert(name, data);
     }