Git commit fe7998ea538e0c396137b3deeab6c2cf7e9ab1e4 by Rolf Eike Beer. Committed on 31/05/2014 at 18:02. Pushed by dakon into branch 'master'. move implementation of getBeautifiedFingerprint() from KgpgKey to KGpgKeyNo= de M +8 -2 core/KGpgKeyNode.cpp M +0 -10 core/kgpgkey.cpp M +0 -1 core/kgpgkey.h http://commits.kde.org/kgpg/fe7998ea538e0c396137b3deeab6c2cf7e9ab1e4 diff --git a/core/KGpgKeyNode.cpp b/core/KGpgKeyNode.cpp index 34f7056..10671a0 100644 --- a/core/KGpgKeyNode.cpp +++ b/core/KGpgKeyNode.cpp @@ -1,4 +1,4 @@ -/* Copyright 2008,2009,2010,2012,2013 Rolf Eike Beer +/* Copyright 2008,2009,2010,2012,2013,2014 Rolf Eike Beer * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -136,7 +136,13 @@ KGpgKeyNode::getKeyNode(void) const QString KGpgKeyNode::getBeautifiedFingerprint() const { - return m_key->fingerprintBeautified(); + static const QChar space =3D QLatin1Char(' '); + QString fingervalue =3D m_key->fingerprint(); + int len =3D fingervalue.length(); + if ((len > 0) && (len % 4 =3D=3D 0)) + for (int n =3D 0; 4 * (n + 1) < len; n++) + fingervalue.insert(5 * n + 4, space); + return fingervalue; } = QString diff --git a/core/kgpgkey.cpp b/core/kgpgkey.cpp index 13a0dd8..729d14d 100644 --- a/core/kgpgkey.cpp +++ b/core/kgpgkey.cpp @@ -260,16 +260,6 @@ const QString &KgpgKey::fingerprint() const return d->gpgkeyfingerprint; } = -QString KgpgKey::fingerprintBeautified() const -{ - QString fingervalue =3Dd->gpgkeyfingerprint; - uint len =3D fingervalue.length(); - if ((len > 0) && (len % 4 =3D=3D 0)) - for (uint n =3D 0; 4 * (n + 1) < len; ++n) - fingervalue.insert(5 * n + 4, QLatin1Char( ' ' )); - return fingervalue; -} - uint KgpgKey::size() const { return d->gpgkeysize; diff --git a/core/kgpgkey.h b/core/kgpgkey.h index 4da684a..719bc4c 100644 --- a/core/kgpgkey.h +++ b/core/kgpgkey.h @@ -267,7 +267,6 @@ public: QString email() const; QString comment() const; const QString &fingerprint() const; - QString fingerprintBeautified() const; uint size() const; uint encryptionSize() const; gpgme_validity_t ownerTrust() const;