summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-03-29 13:58:36 +0200
committerMontel Laurent <[email protected]>2016-03-29 13:58:45 +0200
commit1570f1934f91b13e7bad16593f3ff709b75dfd97 (patch)
treea9414fef39e3a625508ac68d9b6ae451c512c765
parent0f7348013441497b01257ae8466c236e10e69d57 (diff)
Clean up
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/viewerpluginexternalscriptinterface.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/messageviewerplugins/externalscriptplugin/viewerpluginexternalscriptinterface.cpp b/plugins/messageviewerplugins/externalscriptplugin/viewerpluginexternalscriptinterface.cpp
index 699aba5..96a946b 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/viewerpluginexternalscriptinterface.cpp
+++ b/plugins/messageviewerplugins/externalscriptplugin/viewerpluginexternalscriptinterface.cpp
@@ -30,7 +30,6 @@ using namespace MessageViewer;
ViewerPluginExternalscriptInterface::ViewerPluginExternalscriptInterface(KActionCollection *ac, QWidget *parent)
: ViewerPluginInterface(parent)
{
- //TODO
createAction(ac);
}
@@ -59,14 +58,14 @@ void ViewerPluginExternalscriptInterface::createAction(KActionCollection *ac)
if (ac) {
const QVector<ViewerPluginExternalScriptInfo> infos = ViewerPluginExternalScriptManager::self()->scriptInfos();
Q_FOREACH (ViewerPluginExternalScriptInfo info, infos) {
- QAction *act = new QAction(QIcon::fromTheme(QStringLiteral("task-new")), i18n("Create Todo"), this);
+ QAction *act = new QAction(info.name(), this);
act->setIconText(info.name());
const QString &description = info.description();
if (!description.isEmpty()) {
addHelpTextAction(act, description);
}
- //TODO create uniq value for kactioncollection
- ac->addAction(QStringLiteral("create_todo"), act);
+ ac->addAction(QStringLiteral("externalscript_%1").arg(info.name()), act);
+ //TODO add info.
//connect(act, &QAction::triggered, this, &ViewerPluginCreateTodoInterface::slotActivatePlugin);
mAction.append(act);
}