[rkward-cvs] SF.net SVN: rkward:[4135] trunk/rkward/rkward/windows/rktoplevelwindowgui. cpp
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Wed Dec 21 09:48:08 UTC 2011
Revision: 4135
http://rkward.svn.sourceforge.net/rkward/?rev=4135&view=rev
Author: tfry
Date: 2011-12-21 09:48:08 +0000 (Wed, 21 Dec 2011)
Log Message:
-----------
What the ...? When changing the shortcut via right-click, the action would lose its data() -> crash when used.
It does not lose its properties, so use that mechanism, instead.
Modified Paths:
--------------
trunk/rkward/rkward/windows/rktoplevelwindowgui.cpp
Modified: trunk/rkward/rkward/windows/rktoplevelwindowgui.cpp
===================================================================
--- trunk/rkward/rkward/windows/rktoplevelwindowgui.cpp 2011-12-20 20:39:19 UTC (rev 4134)
+++ trunk/rkward/rkward/windows/rktoplevelwindowgui.cpp 2011-12-21 09:48:08 UTC (rev 4135)
@@ -87,7 +87,7 @@
action->setText (i18n ("Show/Hide %1", rep.window->shortCaption ()));
action->setIcon (rep.window->windowIcon ());
action->setShortcut (rep.default_shortcut);
- action->setData (rep.id);
+ action->setProperty ("rk_toolwindow_id", rep.id);
}
action = actionCollection ()->addAction ("window_activate_docview", this, SLOT(activateDocumentView()));
action->setText (i18n ("Activate Document view"));
@@ -203,7 +203,7 @@
QAction *act = dynamic_cast<QAction*> (sender ());
RK_ASSERT (act);
- RKMDIWindow *win = RKToolWindowList::findToolWindowById (act->data ().toString ());
+ RKMDIWindow *win = RKToolWindowList::findToolWindowById (act->property ("rk_toolwindow_id").toString ());
RK_ASSERT (win);
toggleToolView (win);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list