From fdb821a7ea5273f5f0c9088e9c01f018db380c69 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Thu, 27 Aug 2009 15:20:20 +0100 Subject: Removed qobject_cast as per suggestion from Jason Barron --- src/gui/kernel/qapplication_s60.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 854fa07..c0f574f 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -316,14 +316,11 @@ QSymbianControl::QSymbianControl(QWidget *w) void QSymbianControl::ConstructL(bool topLevel, bool desktop) { if (!desktop) - { - // We cannot assume that parentless widgets are top-level - QWidget *const parent = qobject_cast(qwidget->parent()); - - if (topLevel or !parent) + { + if (topLevel or !parentWidget()) CreateWindowL(S60->windowGroup()); else - CreateWindowL(parent->winId()); + CreateWindowL(parentWidget()->winId()); SetFocusing(true); m_longTapDetector = QLongTapTimer::NewL(this); -- cgit v0.12