Commit 930a2e16 authored by hjk's avatar hjk Committed by Tobias Hunger
Browse files

TaskHandler: Use named property to store handler in action

Change-Id: Ia946bcca0a1143b00d8a4ab2a71b2bd0f894aad8
Reviewed-by: default avatarTobias Hunger <>
parent 281eb3d4
......@@ -310,7 +310,10 @@ TaskWindow::~TaskWindow()
static ITaskHandler *handler(QAction *action)
return qobject_cast<ITaskHandler *>(action->data().value<QObject *>());
QVariant prop = action->property("ITaskHandler");
ITaskHandler *handler = qobject_cast<ITaskHandler *>(prop.value<QObject *>());
return handler;
void TaskWindow::delayedInitialization()
......@@ -328,7 +331,7 @@ void TaskWindow::delayedInitialization()
QAction *action = h->createAction(this);
QTC_ASSERT(action, continue);
action->setProperty("ITaskHandler", qVariantFromValue(qobject_cast<QObject*>(h)));
connect(action, SIGNAL(triggered()), this, SLOT(actionTriggered()));
d->m_actions << action;
Supports Markdown
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