mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 02:25:34 -04:00
merge of branch v0.6-idclean 7180
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7187 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7815efb16f
commit
0f29d28b1b
397 changed files with 6503 additions and 5702 deletions
|
@ -45,9 +45,9 @@ StartDialog::StartDialog(QWidget *parent)
|
|||
/* get all available pgp private certificates....
|
||||
* mark last one as default.
|
||||
*/
|
||||
std::list<std::string> accountIds;
|
||||
std::list<std::string>::iterator it;
|
||||
std::string preferedId;
|
||||
std::list<RsPeerId> accountIds;
|
||||
std::list<RsPeerId>::iterator it;
|
||||
RsPeerId preferedId;
|
||||
RsAccounts::GetPreferredAccountId(preferedId);
|
||||
int pidx = -1;
|
||||
int i;
|
||||
|
@ -56,10 +56,11 @@ StartDialog::StartDialog(QWidget *parent)
|
|||
{
|
||||
for(it = accountIds.begin(), i = 0; it != accountIds.end(); it++, i++)
|
||||
{
|
||||
const QVariant & userData = QVariant(QString::fromStdString(*it));
|
||||
std::string gpgid, name, email, location;
|
||||
const QVariant & userData = QVariant(QString::fromStdString((*it).toStdString()));
|
||||
RsPgpId gpgid ;
|
||||
std::string name, email, location;
|
||||
RsAccounts::GetAccountDetails(*it, gpgid, name, email, location);
|
||||
QString accountName = QString::fromUtf8(name.c_str()) + " (" + QString::fromStdString(gpgid).right(8) + ") - " + QString::fromUtf8(location.c_str());
|
||||
QString accountName = QString::fromUtf8(name.c_str()) + " (" + QString::fromStdString(gpgid.toStdString()).right(8) + ") - " + QString::fromUtf8(location.c_str());
|
||||
ui.loadName->addItem(accountName, userData);
|
||||
|
||||
if (preferedId == *it)
|
||||
|
@ -84,8 +85,6 @@ void StartDialog::closeEvent (QCloseEvent * event)
|
|||
|
||||
void StartDialog::loadPerson()
|
||||
{
|
||||
std::string accountId = "";
|
||||
|
||||
int pgpidx = ui.loadName->currentIndex();
|
||||
if (pgpidx < 0)
|
||||
{
|
||||
|
@ -95,7 +94,7 @@ void StartDialog::loadPerson()
|
|||
}
|
||||
|
||||
QVariant data = ui.loadName->itemData(pgpidx);
|
||||
accountId = (data.toString()).toStdString();
|
||||
RsPeerId accountId = RsPeerId((data.toString()).toStdString());
|
||||
|
||||
if (Rshare::loadCertificate(accountId, ui.autologin_checkbox->isChecked())) {
|
||||
accept();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue