diff options
author | hjk <hjk121@nokiamail.com> | 2013-02-06 11:41:15 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2013-02-06 11:43:54 +0100 |
commit | 930a2e160c77b141b3d504d898d201eb9adc505a (patch) | |
tree | 2de504748667f54ad34d1e1b0c920e2d073982f6 /src/plugins/projectexplorer | |
parent | 281eb3d414d10918c16bdfcff1b74efc88ce58a1 (diff) | |
download | qt-creator-930a2e160c77b141b3d504d898d201eb9adc505a.tar.gz |
TaskHandler: Use named property to store handler in action
Change-Id: Ia946bcca0a1143b00d8a4ab2a71b2bd0f894aad8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r-- | src/plugins/projectexplorer/taskwindow.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp index aa8acaf5e9..4889dc8347 100644 --- a/src/plugins/projectexplorer/taskwindow.cpp +++ b/src/plugins/projectexplorer/taskwindow.cpp @@ -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 *>()); + QTC_CHECK(handler); + return handler; } void TaskWindow::delayedInitialization() @@ -328,7 +331,7 @@ void TaskWindow::delayedInitialization() QAction *action = h->createAction(this); QTC_ASSERT(action, continue); - action->setData(qVariantFromValue(qobject_cast<QObject*>(h))); + action->setProperty("ITaskHandler", qVariantFromValue(qobject_cast<QObject*>(h))); connect(action, SIGNAL(triggered()), this, SLOT(actionTriggered())); d->m_actions << action; |