Commit d02ad5d6 authored by Tomaz Canabrava's avatar Tomaz Canabrava

Do not use the text() of the Action to show a DockWidget

The text can be translated, the text can have accelerator-special
key, so the text is unrealiable. the only thing reliable is the data,
wich stores a pointer to a fixed , unmutable, string.
Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent 86898dd9
...@@ -402,7 +402,7 @@ void MainWindow::_showDockWidgetAction(bool show) ...@@ -402,7 +402,7 @@ void MainWindow::_showDockWidgetAction(bool show)
{ {
QAction* action = qobject_cast<QAction*>(QObject::sender()); QAction* action = qobject_cast<QAction*>(QObject::sender());
Q_ASSERT(action); Q_ASSERT(action);
_showDockWidget(action->text(), show); _showDockWidget(action->data().toString(), show);
} }
#endif #endif
......
Markdown is supported
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