Commit 350ea984 authored by Tomaz Canabrava's avatar Tomaz Canabrava

Do not dynamic_cast QObject, use qobject_cast, it's faster.

qobject_cast doesn't use RTTI to figure out the type, it uses
an internally stored relationship, wich is much faster than
RTTI. I grepped the code for dynamic_cast and there are lots
besides this one, so I'll later try to figure out wich ones
are QObject inheritances and change acordingly.
Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent 6fcdb317
......@@ -399,7 +399,7 @@ void MainWindow::_hideAllDockWidgets(void)
void MainWindow::_showDockWidgetAction(bool show)
{
QAction* action = dynamic_cast<QAction*>(QObject::sender());
QAction* action = qobject_cast<QAction*>(QObject::sender());
Q_ASSERT(action);
_showDockWidget(action->text(), show);
}
......
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