mirror of
https://github.com/KDE/konsole.git
synced 2026-06-18 10:49:12 -04:00
Prefer qobject_cast to dynamic_cast when appropriate
This commit is contained in:
@@ -755,7 +755,7 @@ static const KXmlGuiWindow* findWindow(const QObject* object)
|
||||
{
|
||||
// Walk up the QObject hierarchy to find a KXmlGuiWindow.
|
||||
while (object != NULL) {
|
||||
const KXmlGuiWindow* window = dynamic_cast<const KXmlGuiWindow*>(object);
|
||||
const KXmlGuiWindow* window = qobject_cast<const KXmlGuiWindow*>(object);
|
||||
if (window != NULL) {
|
||||
return(window);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user