Commit 84ab9456 authored by Rolf Eike Beer's avatar Rolf Eike Beer
Browse files

Improve printing of uid name and comment

svn path=/branches/work/kgpg2/; revision=762049
parent a88798fa
......@@ -1945,13 +1945,11 @@ void KeysManager::delsignkey()
QString parentMail;
signID = nd->getId();
parentMail = parent->getName() + " (" + parent->getEmail() + ')';
signMail = nd->getName() + " (" + nd->getEmail() + ')';
parentMail = parent->getNameComment();
signMail = nd->getNameComment();
parentMail = parent->getName();
if (!parent->getEmail().isEmpty())
parentMail += " <" + parent->getEmail() + ">";
signMail = keysList2->currentItem()->text(0);
if (!nd->getEmail().isEmpty())
signMail += " <" + nd->getEmail() + ">";
......
......@@ -24,6 +24,15 @@ KGpgNode::~KGpgNode()
m_parent->deleteChild(this);
}
QString
KGpgNode::getNameComment() const
{
if (getComment().isEmpty())
return getName();
else
return i18nc("Name of uid (comment)", "%1 (%2)", getName(), getComment());
}
KGpgExpandableNode::KGpgExpandableNode(KGpgExpandableNode *parent)
: KGpgNode(parent)
{
......
......@@ -57,6 +57,7 @@ public:
{ return QString(); }
virtual QString getComment() const
{ return QString(); }
virtual QString getNameComment() const;
KGpgExpandableNode *getParentKeyNode() const
{ return m_parent; }
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment