summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2010-06-30 14:00:11 (GMT)
committermread <qt-info@nokia.com>2010-07-01 08:34:47 (GMT)
commitfabf804b147892abb0e8aeb49d1753359ea5e56e (patch)
treeea9d514be08bc64e2848b0a7d1e87f8eaf0a0709 /src/gui/kernel
parentcb2b4a12ac17adf56074d3630efe4feb50ae0e2b (diff)
downloadQt-fabf804b147892abb0e8aeb49d1753359ea5e56e.zip
Qt-fabf804b147892abb0e8aeb49d1753359ea5e56e.tar.gz
Qt-fabf804b147892abb0e8aeb49d1753359ea5e56e.tar.bz2
Avkon removal configured with -no-s60
Avkon dependencies can be configured out with the -no-s60 configure flag, conversely Qt on Symbian will use Avkon if -s60 is configured. These changes are intended to keep or introduce binary compatibility between the s60 and no-s60 configurations. To do this, it has been necessary to introduce stub equivalents of the CAknAppUi related classes into the no-s60 configuration, and override all Avkon framework virtual functions in the QS60Main... classes. Other than that, these changes are mostly just correcting the use of the Q_WS_S60 flag so that it only refers to Avkon dependencies. Reviewed-by: Sami Merila
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/kernel.pri11
-rw-r--r--src/gui/kernel/qapplication.cpp4
-rw-r--r--src/gui/kernel/qapplication.h8
-rw-r--r--src/gui/kernel/qapplication_s60.cpp15
-rw-r--r--src/gui/kernel/qt_s60_p.h10
-rw-r--r--src/gui/kernel/qwidget.cpp2
-rw-r--r--src/gui/kernel/qwidget_s60.cpp3
7 files changed, 32 insertions, 21 deletions
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 6fd45ad..f9c84c1 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -120,18 +120,21 @@ symbian {
kernel/qkeymapper_s60.cpp\
kernel/qclipboard_s60.cpp\
kernel/qdnd_s60.cpp \
- kernel/qsound_s60.cpp \
- kernel/qsoftkeymanager_s60.cpp
+ kernel/qsound_s60.cpp
HEADERS += \
kernel/qt_s60_p.h \
- kernel/qeventdispatcher_s60_p.h \
- kernel/qsoftkeymanager_s60_p.h
+ kernel/qeventdispatcher_s60_p.h
LIBS += -lbafl -lestor
INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
INCLUDEPATH += ../3rdparty/s60
+
+ contains(QT_CONFIG, s60) {
+ SOURCES += kernel/qsoftkeymanager_s60.cpp
+ HEADERS += kernel/qsoftkeymanager_s60_p.h
+ }
}
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 1680ef4..893de03 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -2771,7 +2771,7 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave) {
qt_win_set_cursor(cursorWidget, true);
#elif defined(Q_WS_X11)
qt_x11_enforce_cursor(cursorWidget, true);
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
qt_symbian_set_cursor(cursorWidget, true);
#endif
}
@@ -5338,7 +5338,7 @@ QInputContext *QApplication::inputContext() const
qic = QInputContextFactory::create(QLatin1String("xim"), that);
that->d_func()->inputContext = qic;
}
-#elif defined(Q_OS_SYMBIAN)
+#elif defined(Q_WS_SYMBIAN)
if (!d->inputContext) {
QApplication *that = const_cast<QApplication *>(this);
const QStringList keys = QInputContextFactory::keys();
diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h
index cb1d063..d31d9e5 100644
--- a/src/gui/kernel/qapplication.h
+++ b/src/gui/kernel/qapplication.h
@@ -61,7 +61,7 @@
QT_BEGIN_HEADER
-#if defined(Q_WS_S60)
+#if defined(Q_OS_SYMBIAN)
class CApaApplication;
#endif
@@ -118,7 +118,7 @@ class Q_GUI_EXPORT QApplication : public QCoreApplication
public:
enum Type { Tty, GuiClient, GuiServer };
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
typedef CApaApplication * (*QS60MainApplicationFactory)();
#endif
@@ -130,7 +130,7 @@ public:
QApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0, int = QT_VERSION);
QApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0, int = QT_VERSION);
#endif
-#if defined(Q_WS_S60)
+#if defined(Q_OS_SYMBIAN)
QApplication(QApplication::QS60MainApplicationFactory factory, int &argc, char **argv, int = QT_VERSION);
#endif
#endif
@@ -366,7 +366,7 @@ public:
QApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0);
QApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0);
#endif
-#if defined(Q_WS_S60) || defined(qdoc)
+#if defined(Q_OS_SYMBIAN) || defined(qdoc)
QApplication(QApplication::QS60MainApplicationFactory factory, int &argc, char **argv);
#endif
#endif
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index a7c7310..0d65811 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -69,14 +69,17 @@
#include "apgwgnam.h" // For CApaWindowGroupName
#include <mdaaudiotoneplayer.h> // For CMdaAudioToneUtility
+#if defined(Q_OS_SYMBIAN)
+# include <private/qs60mainapplication_p.h>
+# include <centralrepository.h>
+# include "qs60mainappui.h"
+# include "qinputcontext.h"
+#endif
+
#if defined(Q_WS_S60)
# if !defined(QT_NO_IM)
-# include "qinputcontext.h"
# include <private/qcoefepinputcontext_p.h>
# endif
-# include <private/qs60mainapplication_p.h>
-# include <centralrepository.h>
-# include "qs60mainappui.h"
#endif
#include "private/qstylesheetstyle_p.h"
@@ -894,7 +897,7 @@ TKeyResponse QSymbianControl::sendKeyEvent(QWidget *widget, QKeyEvent *keyEvent)
if (qic && qic->filterEvent(keyEvent))
return EKeyWasConsumed;
}
-#endif // !defined(QT_NO_IM) && defined(Q_WS_S60)
+#endif // !defined(QT_NO_IM) && defined(Q_OS_SYMBIAN)
if (widget && qt_sendSpontaneousEvent(widget, keyEvent))
if (keyEvent->isAccepted())
@@ -1974,10 +1977,10 @@ int QApplicationPrivate::symbianHandleCommand(const QSymbianEvent *symbianEvent)
ret = 1;
break;
default:
+#ifdef Q_WS_S60
bool handled = QSoftKeyManager::handleCommand(command);
if (handled)
ret = 1;
-#ifdef Q_WS_S60
else
ret = QMenuBarPrivate::symbianCommands(command);
#endif
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 204e38c..d8ef67d 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -155,7 +155,9 @@ public:
static inline CAknTitlePane* titlePane();
static inline CAknContextPane* contextPane();
static inline CEikButtonGroupContainer* buttonGroupContainer();
+#endif
+#ifdef Q_OS_SYMBIAN
TTrapHandler *s60InstalledTrapHandler;
#endif
};
@@ -208,7 +210,7 @@ protected: // from MAknFadedComponent
TInt CountFadedComponents() {return 1;}
CCoeControl* FadedComponent(TInt /*aIndex*/) {return this;}
#else
- #warning No fallback implementation for QSymbianControl::FadeBehindPopup
+ // #warning No fallback implementation for QSymbianControl::FadeBehindPopup
void FadeBehindPopup(bool /*fade*/){ }
#endif
@@ -277,9 +279,9 @@ inline QS60Data::QS60Data()
avkonComponentsSupportTransparency(0),
menuBeingConstructed(0),
memoryLimitForHwRendering(0),
- s60ApplicationFactory(0),
-#ifdef Q_WS_S60
- s60InstalledTrapHandler(0)
+ s60ApplicationFactory(0)
+#ifdef Q_OS_SYMBIAN
+ ,s60InstalledTrapHandler(0)
#endif
{
}
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index dd568cd..233df15 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -10695,7 +10695,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
break;
case Qt::WA_AcceptTouchEvents:
-#if defined(Q_WS_WIN) || defined(Q_WS_MAC) || defined(Q_WS_S60)
+#if defined(Q_WS_WIN) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN)
if (on)
d->registerTouchWindow();
#endif
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 3f351d9..2818d88 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -54,6 +54,7 @@
#ifdef Q_WS_S60
#include <aknappui.h>
+#include <eikbtgpc.h>
#endif
// This is necessary in order to be able to perform delayed invokation on slots
@@ -1082,12 +1083,14 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
Qt::WindowStates oldstate = windowState();
const TBool isFullscreen = newstate & Qt::WindowFullScreen;
+#ifdef Q_WS_S60
const TBool cbaRequested = windowFlags() & Qt::WindowSoftkeysVisibleHint;
const TBool cbaVisible = CEikButtonGroupContainer::Current() ? true : false;
const TBool softkeyVisibilityChange = isFullscreen && (cbaRequested != cbaVisible);
if (oldstate == newstate && !softkeyVisibilityChange)
return;
+#endif // Q_WS_S60
if (isWindow()) {
createWinId();