[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/kleopatra/models
From: Marc Mutz <mutz () kde ! org>
Date: 2010-11-11 15:06:00
Message-ID: 20101111150600.931BBAC8A1 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1195586 by mutz:
AbstractKeyListModel: add FingerprintRole to return the fingerprint
The problem with the old approach of using Columns::Fingerprint was that we
had to create a new QModelIndex, and that we actually don't really want a
Fingerprint column anymore.
M +2 -0 keylistmodel.cpp
M +2 -0 keylistmodelinterface.h
--- trunk/KDE/kdepim/kleopatra/models/keylistmodel.cpp #1195585:1195586
@@ -320,6 +320,8 @@
return returnIfValid( KeyFilterManager::instance()->bgColor( key ) );
else if ( role == Qt::ForegroundRole )
return returnIfValid( KeyFilterManager::instance()->fgColor( key ) );
+ else if ( role == FingerprintRole )
+ return QString::fromLatin1( key.primaryFingerprint() );
return QVariant();
}
--- trunk/KDE/kdepim/kleopatra/models/keylistmodelinterface.h #1195585:1195586
@@ -48,6 +48,8 @@
public:
virtual ~KeyListModelInterface() {}
+ static const int FingerprintRole = 0xF1;
+
enum Columns {
PrettyName,
PrettyEMail,
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic