diff options
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 9 |
1 files 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 *>(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); |