From fe7749bee62380dac4d5dea00b2f5b20db344cbb Mon Sep 17 00:00:00 2001 From: me_desk Date: Sun, 1 Sep 2013 12:34:15 +0000 Subject: 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 --- pica-client/askpassword.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pica-client/askpassword.cpp') diff --git a/pica-client/askpassword.cpp b/pica-client/askpassword.cpp index 05c0c83..e3c0696 100644 --- a/pica-client/askpassword.cpp +++ b/pica-client/askpassword.cpp @@ -2,6 +2,7 @@ #include "globals.h" #include #include +#include "accounts.h" QMutex AskPassword::passwd_mutex; QMap AskPassword::idpasswd; @@ -44,9 +45,9 @@ void AskPassword::password_dialog() { bool ok; QString title = QObject::tr("Enter private key passphrase"); - QString text = QObject::tr(QString("Passphrase for (%1)").arg(QByteArray((const char*)account_id, PICA_ID_SIZE).toBase64().constData()).toUtf8().constData()); + QString text = QObject::tr(QString("Passphrase for (%1)").arg(Accounts::GetCurrentAccount().id.toBase64().constData()).toUtf8().constData()); QString psw = QInputDialog::getText((QWidget*)mainwindow,title,text,QLineEdit::Password,QString(),&ok); if (ok) - idpasswd[QByteArray((const char*)account_id, PICA_ID_SIZE)] = psw; + idpasswd[Accounts::GetCurrentAccount().id] = psw; } -- cgit v1.2.1