Prefer qobject_cast to dynamic_cast when appropriate

This commit is contained in:
Jekyll Wu
2012-03-16 13:37:15 +08:00
parent d99cf71a62
commit 7179de8f3d
4 changed files with 9 additions and 10 deletions

View File

@@ -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);
}