diff options
| author | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-09-01 12:34:15 +0000 |
|---|---|---|
| committer | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-09-01 12:34:15 +0000 |
| commit | fe7749bee62380dac4d5dea00b2f5b20db344cbb (patch) | |
| tree | e46ee11712b0444eee5874328567c050f6498d0b /pica-client/askpassword.cpp | |
| parent | d970ad6a4ac7e077390d8fdac0a4fc576b24dc5c (diff) | |
| download | pica-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/askpassword.cpp')
| -rw-r--r-- | pica-client/askpassword.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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 <string.h> #include <QInputDialog> +#include "accounts.h" QMutex AskPassword::passwd_mutex; QMap<QByteArray,QString> 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; } |
