summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authorGareth Stockwell <gareth.stockwell@sosco.com>2009-08-27 12:45:45 (GMT)
committerGareth Stockwell <gareth.stockwell@sosco.com>2009-08-28 12:30:29 (GMT)
commit1a551b57e5c9738ba81200dae6aa33ac8b6d2b96 (patch)
tree934239564cf595a916f674dc461dbb1b70184dd4 /src/gui/kernel/qapplication_s60.cpp
parent559ef5cafeb39766a7481a37168e37e9cb315bb5 (diff)
downloadQt-1a551b57e5c9738ba81200dae6aa33ac8b6d2b96.zip
Qt-1a551b57e5c9738ba81200dae6aa33ac8b6d2b96.tar.gz
Qt-1a551b57e5c9738ba81200dae6aa33ac8b6d2b96.tar.bz2
Made non-toplevel widgets window-owning
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 44ac380..3a7fc4b 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -317,9 +317,14 @@ void QSymbianControl::ConstructL(bool topLevel, bool desktop)
{
if (!desktop)
{
- if (topLevel)
+ // We cannot assume that parentless widgets are top-level
+ QWidget *const parent = qobject_cast<QWidget *>(qwidget->parent());
+
+ if (topLevel or parent)
CreateWindowL(S60->windowGroup());
-
+ else
+ CreateWindowL(parent->winId());
+
SetFocusing(true);
m_longTapDetector = QLongTapTimer::NewL(this);
}