cleanups
This commit is contained in:
parent
9cdbf422ff
commit
5a9373ae0d
@ -21,7 +21,6 @@
|
|||||||
#include "signing.h"
|
#include "signing.h"
|
||||||
#include "signing_p.h"
|
#include "signing_p.h"
|
||||||
|
|
||||||
#define _FILE_OFFSET_BITS 64
|
|
||||||
#include <gpgme.h>
|
#include <gpgme.h>
|
||||||
#include <gpgme++/gpgmefw.h>
|
#include <gpgme++/gpgmefw.h>
|
||||||
#include <gpgme++/global.h>
|
#include <gpgme++/global.h>
|
||||||
@ -64,7 +63,7 @@ SigningPrivate::SigningPrivate(Signing *auth, const QString &keystorePath = 0)
|
|||||||
|
|
||||||
m_keystorePath = keystorePath;
|
m_keystorePath = keystorePath;
|
||||||
|
|
||||||
if (m_keystorePath.isEmpty() || m_keystorePath.isNull()) {
|
if (m_keystorePath.isEmpty()) {
|
||||||
// From the gpgme doc: if the homeDirectory() is null, it means we are using the standard dir,
|
// From the gpgme doc: if the homeDirectory() is null, it means we are using the standard dir,
|
||||||
// that is "/home/$USER/.gnupg/ ; so let's retrieve it.
|
// that is "/home/$USER/.gnupg/ ; so let's retrieve it.
|
||||||
KUser user;
|
KUser user;
|
||||||
@ -105,7 +104,7 @@ void SigningPrivate::importKdeKeysToKeystore()
|
|||||||
}
|
}
|
||||||
QString path(KStandardDirs::locate("appdata", "plasmakeys/"));
|
QString path(KStandardDirs::locate("appdata", "plasmakeys/"));
|
||||||
QDir dir(path);
|
QDir dir(path);
|
||||||
if (!dir.exists() || path.isEmpty() || path.isNull()) {
|
if (!dir.exists() || path.isEmpty()) {
|
||||||
kDebug() << "Directory with KDE keys not found: aborting";
|
kDebug() << "Directory with KDE keys not found: aborting";
|
||||||
keys[UltimatelyTrusted] = tmp;
|
keys[UltimatelyTrusted] = tmp;
|
||||||
return;
|
return;
|
||||||
@ -586,8 +585,9 @@ QStringList Signing::keysByTrustLevel(TrustLevel trustLevel) const
|
|||||||
TrustLevel Signing::trustLevelOf(const QString &keyID) const
|
TrustLevel Signing::trustLevelOf(const QString &keyID) const
|
||||||
{
|
{
|
||||||
|
|
||||||
if (keyID.isEmpty() || keyID.isNull())
|
if (keyID.isEmpty()) {
|
||||||
return Plasma::UnverifiableTrust;
|
return Plasma::UnverifiableTrust;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = (int)Plasma::UnverifiableTrust; i <= (int)Plasma::UltimatelyTrusted; ++i) {
|
for (int i = (int)Plasma::UnverifiableTrust; i <= (int)Plasma::UltimatelyTrusted; ++i) {
|
||||||
QList< QByteArray > tmp = d->keys[(Plasma::TrustLevel)i];
|
QList< QByteArray > tmp = d->keys[(Plasma::TrustLevel)i];
|
||||||
@ -646,8 +646,9 @@ QString Signing::keyStorePath() const
|
|||||||
|
|
||||||
QString Signing::descriptiveString(const QString &keyID) const
|
QString Signing::descriptiveString(const QString &keyID) const
|
||||||
{
|
{
|
||||||
if (keyID.isNull() || keyID.isEmpty())
|
if (keyID.isEmpty()) {
|
||||||
return QString();
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
return d->descriptiveString(keyID);
|
return d->descriptiveString(keyID);
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,6 @@ class SigningPrivate;
|
|||||||
*
|
*
|
||||||
* @endcode
|
* @endcode
|
||||||
*
|
*
|
||||||
* @since 4.6
|
|
||||||
* @author Diego '[Po]lentino' Casella <polentino911@gmail.com>
|
* @author Diego '[Po]lentino' Casella <polentino911@gmail.com>
|
||||||
*/
|
*/
|
||||||
class PLASMA_EXPORT Signing : public QObject
|
class PLASMA_EXPORT Signing : public QObject
|
||||||
|
Loading…
Reference in New Issue
Block a user