diff options
| author | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-10-13 11:29:13 +0000 |
|---|---|---|
| committer | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-10-13 11:29:13 +0000 |
| commit | 6235d0d99e59cc901019fa22201316e0c8a682c3 (patch) | |
| tree | 0a86cc2c39df4e29e86b913b34bc58ff572cb881 | |
| parent | 147b3241bde44240de2ea14623a44c6f4207e353 (diff) | |
| download | pica-pica-6235d0d99e59cc901019fa22201316e0c8a682c3.tar.gz pica-pica-6235d0d99e59cc901019fa22201316e0c8a682c3.zip | |
show pica id of new created account; bugfix - insert type value when adding new contact
git-svn-id: svn://localhost/project_picapica/trunk@279 fb96df88-216d-11de-830c-f3023f12d8ac
| -rw-r--r-- | pica-client/accountswindow.cpp | 7 | ||||
| -rw-r--r-- | pica-client/contacts.cpp | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/pica-client/accountswindow.cpp b/pica-client/accountswindow.cpp index b5c6806..b89200f 100644 --- a/pica-client/accountswindow.cpp +++ b/pica-client/accountswindow.cpp @@ -166,6 +166,13 @@ void AccountsWindow::CreateAccount(QString CertFilename, QString PkeyFilename, b mbx.setText(accounts.GetLastError()); mbx.exec(); } + else + { + QMessageBox mbx; + mbx.setTextFormat(Qt::RichText); + mbx.setText(tr("New account<br> Pica Pica ID: <b>%1</b><br> is created.").arg(id.toBase64().constData())); + mbx.exec(); + } LoadAccounts(); } diff --git a/pica-client/contacts.cpp b/pica-client/contacts.cpp index 657ab12..0ae0338 100644 --- a/pica-client/contacts.cpp +++ b/pica-client/contacts.cpp @@ -59,9 +59,10 @@ void Contacts::Add(QByteArray id, ContactType type) if (!Exists(id)) { - query.prepare("insert into contacts (id, name, cert_pem, account_id) values (:id, NULL, NULL, :account_id)"); + query.prepare("insert into contacts (id, name, cert_pem, account_id, type) values (:id, NULL, NULL, :account_id, :type)"); query.bindValue(":id",id); query.bindValue(":account_id",account_id_); + query.bindValue(":type", type); query.exec(); } else |
