diff options
-rw-r--r-- | src/gui/gui.pro | 3 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 14 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 18 | ||||
-rw-r--r-- | src/gui/kernel/symbian.pri | 2 | ||||
-rw-r--r-- | src/gui/kernel/window_owning_control.h | 57 |
5 files changed, 5 insertions, 89 deletions
diff --git a/src/gui/gui.pro b/src/gui/gui.pro index ad74e47..9fe09c8 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -4,6 +4,9 @@ QT = core DEFINES += QT_BUILD_GUI_LIB QT_NO_USING_NAMESPACE win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x65000000 +# These enable debugging of window management for Symbian. +#DEFINES += DEBUG_QSYMBIANCONTROL DEBUG_QWIDGET + !win32:!embedded:!mac:!symbian:CONFIG += x11 unix:QMAKE_PKGCONFIG_REQUIRES = QtCore diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index f142053..2035bb0 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -70,13 +70,10 @@ #include "private/qstylesheetstyle_p.h" -#ifdef _DEBUG -#define DEBUG_QSYMBIANCONTROL +#ifdef DEBUG_QSYMBIANCONTROL #include <QDebug> #endif -#include "window_owning_control.h" - QT_BEGIN_NAMESPACE #if defined(QT_DEBUG) @@ -324,7 +321,6 @@ void QSymbianControl::ConstructL(bool topLevel, bool desktop) { if (!desktop) { -#ifdef QWIDGET_OWNS_WINDOW if (topLevel or !qwidget->parentWidget()) CreateWindowL(S60->windowGroup()); else @@ -336,19 +332,11 @@ void QSymbianControl::ConstructL(bool topLevel, bool desktop) * this, then we need to take care of re-parenting when a window * is created for a widget between this one and the root window. */ - #ifdef QWIDGET_IMMEDIATE_WINDOW_PARENT CreateWindowL(qwidget->parentWidget()->winId()); - #else - CreateWindowL(qwidget->parentWidget()->effectiveWinId()); - #endif // QWIDGET_IMMEDIATE_WINDOW_PARENT // Necessary in order to be able to track the activation status of // the control's window qwidget->d_func()->createTLExtra(); -#else - if (topLevel) - CreateWindowL(S60->windowGroup()); -#endif // QWIDGET_OWNS_WINDOW #ifdef DEBUG_QSYMBIANCONTROL qDebug() << "QSymbianControl::ConstructL [" << this diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 28ce90e..998606f 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -56,13 +56,10 @@ #include <aknappui.h> #endif -#ifdef _DEBUG -#define DEBUG_QWIDGET +#ifdef DEBUG_QWIDGET #include <QDebug> #endif -#include "window_owning_control.h" - QT_BEGIN_NAMESPACE extern bool qt_nograb(); @@ -614,11 +611,6 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de } QT_TRAP_THROWING(control->ControlEnv()->AppUi()->AddToStackL(control, ECoeStackPriorityDefault, stackingFlags)); -#ifndef QWIDGET_OWNS_WINDOW - WId parentw = parentWidget->effectiveWinId(); - QT_TRAP_THROWING(control->SetContainerWindowL(*parentw)); -#endif - q->setAttribute(Qt::WA_WState_Created); int x, y, w, h; data.crect.getRect(&x, &y, &w, &h); @@ -653,11 +645,7 @@ void QWidgetPrivate::show_sys() return; } -#ifdef QWIDGET_OWNS_WINDOW if (q->internalWinId()) { -#else - if (q->isWindow() && q->internalWinId()) { -#endif WId id = q->internalWinId(); if (!extra->topextra->activated) { @@ -700,11 +688,7 @@ void QWidgetPrivate::hide_sys() deactivateWidgetCleanup(); WId id = q->internalWinId(); -#ifdef QWIDGET_OWNS_WINDOW if (id) { -#else - if (q->isWindow() && id) { -#endif #ifdef DEBUG_QWIDGET qDebug() << "QWidgetPrivate::show_sys [" << this << "]" diff --git a/src/gui/kernel/symbian.pri b/src/gui/kernel/symbian.pri index 87d8492..d267a53 100644 --- a/src/gui/kernel/symbian.pri +++ b/src/gui/kernel/symbian.pri @@ -1,5 +1,3 @@ symbian { - HEADERS += window_owning_control.h - contains(QT_CONFIG, s60): LIBS+= $$QMAKE_LIBS_S60 } diff --git a/src/gui/kernel/window_owning_control.h b/src/gui/kernel/window_owning_control.h deleted file mode 100644 index af192f3..0000000 --- a/src/gui/kernel/window_owning_control.h +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef WINDOW_OWNING_CONTROL_H -#define WINDOW_OWNING_CONTROL_H - -// If this is defined, then calling QWidget::winId causes a native window to -// be created for the associated control -#define QWIDGET_OWNS_WINDOW - -// If QWIDGET_OWNS_WINDOW is defined, defining this macro means that the -// parent window for the newly created window is the parent widget's winId. -// This in turn means that calling QWidget::winId causes native windows to -// be created for all ancestors of the target widget. -// If this macro is undefined, the parent window is the parent widget's -// effectiveWinId. -#define QWIDGET_IMMEDIATE_WINDOW_PARENT - -#endif // WINDOW_OWNING_CONTROL_H |