diff options
author | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-27 14:20:20 (GMT) |
---|---|---|
committer | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-28 12:30:44 (GMT) |
commit | fdb821a7ea5273f5f0c9088e9c01f018db380c69 (patch) | |
tree | c2a4053599e3fee0d712a3941defdc7993acf064 /src/gui | |
parent | e649b8ea97ca730559d19c7b11b210c2c89f64fa (diff) | |
download | Qt-fdb821a7ea5273f5f0c9088e9c01f018db380c69.zip Qt-fdb821a7ea5273f5f0c9088e9c01f018db380c69.tar.gz Qt-fdb821a7ea5273f5f0c9088e9c01f018db380c69.tar.bz2 |
Removed qobject_cast as per suggestion from Jason Barron
Diffstat (limited to 'src/gui')
-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); |