X-Git-Url: https://vaikene.ee/gitweb/gitweb.cgi?p=evaf;a=blobdiff_plain;f=src%2Fapps%2FPswGen%2FStorage%2Fmodule.h;fp=src%2Fapps%2FPswGen%2FStorage%2Fmodule.h;h=e0839b391ee3183f0c2c9b914b1763f8f03a0c58;hp=49c7e6a2f02a836198aee8c2b73cb1002ff86e71;hb=af2feaab777210b8fbd9190904df3dd187acf0cd;hpb=4a845c9a4d543528ab0284835c84c3f4e0bf7b25 diff --git a/src/apps/PswGen/Storage/module.h b/src/apps/PswGen/Storage/module.h index 49c7e6a..e0839b3 100644 --- a/src/apps/PswGen/Storage/module.h +++ b/src/apps/PswGen/Storage/module.h @@ -29,8 +29,8 @@ #include #include #include -#include +class QSqlDatabase; namespace eVaf { namespace PswGen { @@ -126,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; @@ -139,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 @@ -149,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); };