[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kgpg] core: move implementation of getBeautifiedFingerprint() from KgpgKey to KGpgKeyNode
From: Rolf Eike Beer <kde () opensource ! sf-tec ! de>
Date: 2014-05-31 18:12:41
Message-ID: E1Wqnlp-0000PA-NW () scm ! kde ! org
[Download RAW message or body]
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 KGpgKeyNode
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 <kde@opensource.sf-tec.de>
+/* Copyright 2008,2009,2010,2012,2013,2014 Rolf Eike Beer <kde@opensource.sf-tec.de>
*
* 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 = QLatin1Char(' ');
+ QString fingervalue = m_key->fingerprint();
+ int len = fingervalue.length();
+ if ((len > 0) && (len % 4 == 0))
+ for (int n = 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 =d->gpgkeyfingerprint;
- uint len = fingervalue.length();
- if ((len > 0) && (len % 4 == 0))
- for (uint n = 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;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic