From 0ef7c1d7471ce20fe54729c27858db864aedee91 Mon Sep 17 00:00:00 2001 From: me_desk Date: Fri, 30 Aug 2013 13:34:02 +0000 Subject: updated pica-client to make it handle new id format. quint32 type for id is replaced with QByteArray in most places. Implemented verification callbacks in client and node that allow self-signed certificates git-svn-id: svn://localhost/project_picapica/trunk@266 fb96df88-216d-11de-830c-f3023f12d8ac --- pica-client/accountswindow.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'pica-client/accountswindow.cpp') diff --git a/pica-client/accountswindow.cpp b/pica-client/accountswindow.cpp index 4ad1c75..d83bf31 100644 --- a/pica-client/accountswindow.cpp +++ b/pica-client/accountswindow.cpp @@ -9,6 +9,7 @@ #include "openssltool.h" #include #include +#include AccountsWindow::AccountsWindow(QWidget *parent) : QMainWindow(parent), @@ -66,7 +67,7 @@ void AccountsWindow::LoadAccounts() else { for (int i=0;iaddItem(QString("(%1) %2").arg(L[i].id).arg(L[i].name),L[i].id); + cb_accounts->addItem(QString("(%1) %2").arg(L[i].id.toBase64().constData()).arg(L[i].name),L[i].id); bt_login->setEnabled(true); } @@ -75,13 +76,12 @@ void AccountsWindow::LoadAccounts() void AccountsWindow::login_click() { - account_id = (cb_accounts->itemData(cb_accounts->currentIndex())).toUInt(); - + memcpy(account_id,(cb_accounts->itemData(cb_accounts->currentIndex())).toByteArray().constData(), PICA_ID_SIZE); int L_index; for (int i=0;iitemData(cb_accounts->currentIndex())).toUInt(); + QByteArray id = (cb_accounts->itemData(cb_accounts->currentIndex())).toByteArray(); if (QMessageBox::No== - QMessageBox::question(this,tr("Deleting account"),tr("Are you sure you want to delete account %1 ?").arg(id),QMessageBox::Yes,QMessageBox::No)) + QMessageBox::question(this,tr("Deleting account"),tr("Are you sure you want to delete account %1 ?").arg(id.toBase64().constData()),QMessageBox::Yes,QMessageBox::No)) return; //TODO ask user if he wants to wipe certificate and private key too -- cgit v1.2.1