summaryrefslogtreecommitdiffstats
path: root/pica-client/accounts.cpp
diff options
context:
space:
mode:
authorme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2013-09-01 12:34:15 +0000
committerme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2013-09-01 12:34:15 +0000
commitfe7749bee62380dac4d5dea00b2f5b20db344cbb (patch)
treee46ee11712b0444eee5874328567c050f6498d0b /pica-client/accounts.cpp
parentd970ad6a4ac7e077390d8fdac0a4fc576b24dc5c (diff)
downloadpica-pica-fe7749bee62380dac4d5dea00b2f5b20db344cbb.tar.gz
pica-pica-fe7749bee62380dac4d5dea00b2f5b20db344cbb.zip
global variable account_id is replaced with static members Accounts::AccountRecord & Accounts::GetCurrentAccount() and SetCurrentAccount()
git-svn-id: svn://localhost/project_picapica/trunk@268 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'pica-client/accounts.cpp')
-rw-r--r--pica-client/accounts.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/pica-client/accounts.cpp b/pica-client/accounts.cpp
index 4b70b47..a1cfdd0 100644
--- a/pica-client/accounts.cpp
+++ b/pica-client/accounts.cpp
@@ -1,6 +1,18 @@
#include "accounts.h"
#include <QFile>
+Accounts::AccountRecord Accounts::current_account;
+
+Accounts::AccountRecord & Accounts::GetCurrentAccount()
+{
+ return Accounts::current_account;
+}
+
+void Accounts::SetCurrentAccount(Accounts::AccountRecord &rec)
+{
+ Accounts::current_account = rec;
+}
+
Accounts::Accounts(QString storage)
{
dbconn=QSqlDatabase::addDatabase("QSQLITE");