From a71a1b189f00eda87aaf3d4c19936e377b5061dd Mon Sep 17 00:00:00 2001 From: ubbo Date: Sat, 31 Mar 2012 16:57:01 +0000 Subject: fix some issues with utf8 strings in keys git-svn-id: http://cpunk.de/svn/src/gpg4usb/branches/0.3.2@871 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- gpgcontext.cpp | 4 ++-- keydetailsdialog.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gpgcontext.cpp b/gpgcontext.cpp index 7aaf35b..4ee6cdd 100644 --- a/gpgcontext.cpp +++ b/gpgcontext.cpp @@ -254,8 +254,8 @@ GpgKeyList GpgContext::listKeys() gpgkey.revoked = (key->revoked != 0); if (key->uids) { - gpgkey.name = key->uids->name; - gpgkey.email = key->uids->email; + gpgkey.name = QString::fromUtf8(key->uids->name); + gpgkey.email = QString::fromUtf8(key->uids->email); } keys.append(gpgkey); gpgme_key_unref(key); diff --git a/keydetailsdialog.cpp b/keydetailsdialog.cpp index aeaa69c..dd0723f 100644 --- a/keydetailsdialog.cpp +++ b/keydetailsdialog.cpp @@ -34,12 +34,12 @@ KeyDetailsDialog::KeyDetailsDialog(GpgME::GpgContext* ctx, gpgme_key_t key, QWid buttonBox = new QDialogButtonBox(QDialogButtonBox::Close); connect(buttonBox, SIGNAL(rejected()), this, SLOT(close())); - nameVarLabel = new QLabel(key->uids->name); + nameVarLabel = new QLabel(QString::fromUtf8(key->uids->name)); nameVarLabel->setTextInteractionFlags(Qt::TextSelectableByMouse); - emailVarLabel = new QLabel(key->uids->email); + emailVarLabel = new QLabel(QString::fromUtf8(key->uids->email)); emailVarLabel->setTextInteractionFlags(Qt::TextSelectableByMouse); - commentVarLabel = new QLabel(key->uids->comment); + commentVarLabel = new QLabel(QString::fromUtf8(key->uids->comment)); commentVarLabel->setTextInteractionFlags(Qt::TextSelectableByMouse); keyidVarLabel = new QLabel(key->subkeys->keyid); keyidVarLabel->setTextInteractionFlags(Qt::TextSelectableByMouse); -- cgit v1.2.3