X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;f=src%2Fapps%2FPswGen%2FStorage%2Fmodule.h;h=e0839b391ee3183f0c2c9b914b1763f8f03a0c58;hb=13dedf19c628b9967e4c4106ab0fd967f1df0b90;hp=7f53b268d23718b04d65d828a79ce9fbdf998337;hpb=9244d12b8b40402d057dad296cd1c2b20e22930c;p=evaf
diff --git a/src/apps/PswGen/Storage/module.h b/src/apps/PswGen/Storage/module.h
index 7f53b26..e0839b3 100644
--- a/src/apps/PswGen/Storage/module.h
+++ b/src/apps/PswGen/Storage/module.h
@@ -21,6 +21,7 @@
# define __PSWGEN_STORAGE_MODULE_H
#include "istorage.h"
+#include "version.h"
#include
@@ -28,8 +29,8 @@
#include
#include
#include
-#include
+class QSqlDatabase;
namespace eVaf {
namespace PswGen {
@@ -49,6 +50,7 @@ class Module : public Plugins::iPlugin
{
Q_OBJECT
Q_INTERFACES(eVaf::Plugins::iPlugin)
+ Q_PLUGIN_METADATA(IID VER_MODULE_NAME_STR)
public:
@@ -124,9 +126,6 @@ private: // Members
/// Name of the database file without path
static char const * const DbName;
- /// Database connection
- QSqlDatabase mDb;
-
/// List of name/data pairs
QMap > mData;
@@ -137,7 +136,7 @@ private: // Methods
* Creates database tables if necessary
* @return True if ok; false if failed
*/
- bool createTables();
+ bool createTables(QSqlDatabase & db);
/**
* Upgrades database tables if necessary
@@ -147,13 +146,13 @@ private: // Methods
* performs the upgrade without a loss of data if possible.
* Returns false if upgrade is not possible or fails.
*/
- bool upgradeTables();
+ bool upgradeTables(QSqlDatabase & db);
/**
* Loads data from the database
* @return True if ok; false if failed
*/
- bool loadData();
+ bool loadData(QSqlDatabase & db);
};