From 517cb4efd0f752f46bf5a2ec9783cf3e031de643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Wed, 12 Dec 2012 15:24:26 +0100 Subject: [PATCH] Add full name to the list, if both name and last name are defined --- src/plugins/PIM/PIM_handler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/PIM/PIM_handler.cpp b/src/plugins/PIM/PIM_handler.cpp index 11fcb120d..86b4a2cda 100644 --- a/src/plugins/PIM/PIM_handler.cpp +++ b/src/plugins/PIM/PIM_handler.cpp @@ -114,6 +114,12 @@ void PIM_Handler::populateWebViewMenu(QMenu* menu, WebView* view, const QWebHitT QMenu* pimMenu = new QMenu(tr("Insert Personal Information")); pimMenu->setIcon(QIcon(":/PIM/data/PIM.png")); + + if (!m_allInfo[PI_FirstName].isEmpty() && !m_allInfo[PI_LastName].isEmpty()) { + const QString fullname = m_allInfo[PI_FirstName] + " " + m_allInfo[PI_LastName]; + QAction* action = pimMenu->addAction(fullname, this, SLOT(pimInsert())); + action->setData(fullname); + } for (int i = 0; i < PI_Max; ++i) { const QString &info = m_allInfo[PI_Type(i)];