summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-07-15 09:29:16 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-07-15 09:35:21 (GMT)
commitcd4c5a65b9d91fd84408205c3d20554122037730 (patch)
tree3495b44cf34e129c3156224fb2353949221203ee
parentfde7966c1b6122ed904d30e1f6e83eb8cd3a80b2 (diff)
downloadQt-cd4c5a65b9d91fd84408205c3d20554122037730.zip
Qt-cd4c5a65b9d91fd84408205c3d20554122037730.tar.gz
Qt-cd4c5a65b9d91fd84408205c3d20554122037730.tar.bz2
Make S60 integration optional.
This is more a cleanup of the usage of Q_WS_S60 vs. Q_OS_SYMBIAN than anything else. One of the side effects of this work was that it was relatively little work to get QtGui compiling when Q_WS_S60 is not defined. Based on this we introduce two new configure options that control S60 integration. Currently the -no-s60 option will not work entirely because the 's60main' module has not yet been refactored and still has a dependancy on the S60 libraries. Reviewed-by: axis <qt-info@nokia.com>
-rwxr-xr-xconfigure.exebin860160 -> 1129472 bytes
-rw-r--r--mkspecs/common/symbian/symbian.conf6
-rw-r--r--src/corelib/global/qglobal.cpp14
-rw-r--r--src/corelib/global/qglobal.h15
-rw-r--r--src/corelib/global/qnamespace.h2
-rw-r--r--src/corelib/kernel/qcore_symbian_p.cpp5
-rw-r--r--src/gui/dialogs/qdialog.cpp15
-rw-r--r--src/gui/dialogs/qfiledialog.cpp2
-rw-r--r--src/gui/gui.pro3
-rw-r--r--src/gui/image/qpixmapdatafactory.cpp4
-rw-r--r--src/gui/inputmethod/inputmethod.pri2
-rw-r--r--src/gui/kernel/qapplication.cpp10
-rw-r--r--src/gui/kernel/qapplication.h4
-rw-r--r--src/gui/kernel/qapplication_p.h4
-rw-r--r--src/gui/kernel/qapplication_s60.cpp21
-rw-r--r--src/gui/kernel/qkeymapper_p.h2
-rw-r--r--src/gui/kernel/qt_s60_p.h9
-rw-r--r--src/gui/kernel/qwidget.cpp16
-rw-r--r--src/gui/kernel/qwidget.h2
-rw-r--r--src/gui/kernel/qwidget_p.h8
-rw-r--r--src/gui/kernel/qwidget_s60.cpp70
-rw-r--r--src/gui/kernel/qwindowdefs.h4
-rw-r--r--src/gui/kernel/symbian.pri3
-rw-r--r--src/gui/painting/qgraphicssystem.cpp4
-rw-r--r--src/gui/painting/qgraphicssystemfactory.cpp2
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp12
-rw-r--r--src/gui/painting/qregion.h4
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp2
-rw-r--r--src/gui/styles/styles.pri2
-rw-r--r--src/gui/text/qabstractfontengine_p.h2
-rw-r--r--src/gui/text/qfont.cpp8
-rw-r--r--src/gui/text/qfontdatabase.cpp42
-rw-r--r--src/gui/text/qfontdatabase.h2
-rw-r--r--src/gui/text/qfontengine.cpp2
-rw-r--r--src/gui/text/qfontengine_ft_p.h2
-rw-r--r--src/gui/text/qfontengine_p.h8
-rw-r--r--src/gui/util/qdesktopservices.cpp2
-rw-r--r--src/gui/util/qdesktopservices_s60.cpp22
-rw-r--r--src/gui/util/util.pri5
-rw-r--r--src/gui/widgets/qmenu.cpp2
-rw-r--r--src/gui/widgets/qmenu.h4
-rw-r--r--src/gui/widgets/qmenu_p.h10
-rw-r--r--src/gui/widgets/qmenu_symbian.cpp12
-rw-r--r--src/gui/widgets/qmenubar.cpp16
-rw-r--r--src/gui/widgets/qmenubar_p.h8
-rw-r--r--src/plugins/s60/src/qdesktopservices_3_2.cpp9
-rw-r--r--tools/configure/configureapp.cpp32
47 files changed, 270 insertions, 165 deletions
diff --git a/configure.exe b/configure.exe
index 988524b..35ad705 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 436f134..4f3e1d2 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -62,18 +62,16 @@ QMAKE_LFLAGS_DLL = -shared
QMAKE_LINK_OBJECT_MAX = 10
QMAKE_LINK_OBJECT_SCRIPT= object_script
-QMAKE_DESKTOPSERVICES_LIBS = -lsendas2 -lplatformenv -lcommonui -letext -lapmime
-QMAKE_STATUSPANE_LIBS = -lavkon -leikcoctl
-
QMAKE_LIBS = -llibc -llibm -leuser -llibdl
QMAKE_LIBS_CORE = $$QMAKE_LIBS -llibpthread -lefsrv
-QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lhal -lgdi -lws32 -lapgrfx -lcone -leikcore $$QMAKE_DESKTOPSERVICES_LIBS $$QMAKE_STATUSPANE_LIBS -lmediaclientaudio
+QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lhal -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio
QMAKE_LIBS_NETWORK =
QMAKE_LIBS_EGL = -llibEGL
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_OPENVG = -llibOpenVG
QMAKE_LIBS_COMPAT =
QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib
+QMAKE_LIBS_S60 = -lavkon -leikcoctl
!isEmpty(QMAKE_SH) {
QMAKE_COPY = cp
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 351c556..76ffb6a 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1819,9 +1819,6 @@ QSysInfo::S60Version QSysInfo::s60Version()
return cachedS60Version = SV_S60_Unknown;
# endif
}
-# else
-# error Qt does not support non-S60 Symbian versions yet.
-# endif // ifdef Q_WS_S60
QSysInfo::SymVersion QSysInfo::symbianVersion()
{
switch (s60Version()) {
@@ -1835,6 +1832,17 @@ QSysInfo::SymVersion QSysInfo::symbianVersion()
return SV_Unknown;
}
}
+#else
+QSysInfo::S60Version QSysInfo::s60Version()
+{
+ return SV_S60_None;
+}
+
+QSysInfo::SymVersion QSysInfo::symbianVersion()
+{
+ return SV_Unknown;
+}
+# endif // ifdef Q_WS_S60
#endif // ifdef Q_OS_SYMBIAN
/*!
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 9e5715a..e6508a8 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -822,7 +822,9 @@ namespace QT_NAMESPACE {}
# define Q_WS_MAC32
# endif
# elif defined(Q_OS_SYMBIAN)
-# define Q_WS_S60
+# if (defined(__SERIES60_31__) || defined(__S60_32__) || defined(__S60_50__)) && !defined(QT_NO_S60)
+# define Q_WS_S60
+# endif
# elif !defined(Q_WS_QWS)
# define Q_WS_X11
# endif
@@ -1472,15 +1474,14 @@ public:
SV_9_4 = 0x0004
};
static SymVersion symbianVersion();
-# ifdef Q_WS_S60
enum S60Version {
- SV_S60_Unknown = 0x0000,
- SV_S60_3_1 = 0x0001,
- SV_S60_3_2 = 0x0002,
- SV_S60_5_0 = 0x0004
+ SV_S60_None = 0x0000,
+ SV_S60_Unknown = 0x0001,
+ SV_S60_3_1 = 0x0002,
+ SV_S60_3_2 = 0x0004,
+ SV_S60_5_0 = 0x0008
};
static S60Version s60Version();
-# endif
#endif
};
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index c3c2653..fdd7eee 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1523,7 +1523,7 @@ public:
typedef unsigned long HANDLE;
#elif defined(Q_WS_QWS)
typedef void * HANDLE;
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
typedef unsigned long int HANDLE; // equivalent to TUint32
#endif
typedef WindowFlags WFlags;
diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp
index 101ed44..a3a85b0 100644
--- a/src/corelib/kernel/qcore_symbian_p.cpp
+++ b/src/corelib/kernel/qcore_symbian_p.cpp
@@ -131,7 +131,9 @@ public:
}
private:
- void init() {
+ void init()
+ {
+#ifdef Q_WS_S60
_LIT(KLibName_3_1, "qts60plugin_3_1.dll");
_LIT(KLibName_3_2, "qts60plugin_3_2.dll");
_LIT(KLibName_5_0, "qts60plugin_5_0.dll");
@@ -156,6 +158,7 @@ private:
TUidType libUid(KDynamicLibraryUid, KSharedLibraryUid, TUid::Uid(uidValue));
lib.Load(libName, libUid);
+#endif
}
RLibrary lib;
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index c7ea5f0..42755dc 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -64,11 +64,9 @@ extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp
extern bool qt_wince_is_smartphone(); //is defined in qguifunctions_wce.cpp
#elif defined(Q_WS_X11)
# include "../kernel/qt_x11_p.h"
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
# include "qfiledialog.h"
-#endif
-#if defined(Q_OS_SYMBIAN)
-#include "qmenubar.h"
+# include "qmenubar.h"
#endif
#ifndef SPI_GETSNAPTODEFBUTTON
# define SPI_GETSNAPTODEFBUTTON 95
@@ -500,16 +498,13 @@ int QDialog::exec()
if (!findChild<QMenuBar *>())
menuBar = new QMenuBar(this);
#endif
-#endif
-
-#if !defined(Q_WS_S60)
- show();
-#else
+
if (qobject_cast<QFileDialog *>(this))
showFullScreen();
else
+#endif // Q_OS_SYMBIAN
+
show();
-#endif
#ifdef Q_WS_MAC
d->mac_nativeDialogModalHelp();
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index ee12412..f1382fe 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -58,7 +58,7 @@
#include <qdebug.h>
#include <qapplication.h>
#include <qstylepainter.h>
-#if !defined(Q_WS_WINCE) && !defined(Q_WS_S60)
+#if !defined(Q_WS_WINCE) && !defined(Q_OS_SYMBIAN)
#include "ui_qfiledialog.h"
#else
#define Q_EMBEDDED_SMALLSCREEN
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 8abde44..fdf4808 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -17,6 +17,7 @@ x11:include(kernel/x11.pri)
mac:include(kernel/mac.pri)
win32:include(kernel/win.pri)
embedded:include(embedded/embedded.pri)
+symbian:include(kernel/symbian.pri)
#modules
include(animation/animation.pri)
@@ -50,4 +51,4 @@ DEFINES += Q_INTERNAL_QAPP_SRC
symbian:TARGET.UID3=0x2001B2DD
# ro-section in gui can exceed default allocated space, so more rw-section little further
-symbian-sbsv2: MMP_RULES += "LINKEROPTION armcc --rw-base 0x800000" \ No newline at end of file
+symbian-sbsv2: MMP_RULES += "LINKEROPTION armcc --rw-base 0x800000"
diff --git a/src/gui/image/qpixmapdatafactory.cpp b/src/gui/image/qpixmapdatafactory.cpp
index 181ca90..852e875 100644
--- a/src/gui/image/qpixmapdatafactory.cpp
+++ b/src/gui/image/qpixmapdatafactory.cpp
@@ -47,7 +47,7 @@
#ifdef Q_WS_X11
# include <private/qpixmap_x11_p.h>
#endif
-#if defined(Q_WS_WIN) || defined(Q_WS_S60)
+#if defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN)
# include <private/qpixmap_raster_p.h>
#endif
#ifdef Q_WS_MAC
@@ -75,7 +75,7 @@ QPixmapData* QSimplePixmapDataFactory::create(QPixmapData::PixelType type)
#if defined(Q_WS_X11)
return new QX11PixmapData(type);
-#elif defined(Q_WS_WIN) || defined(Q_WS_S60)
+#elif defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN)
return new QRasterPixmapData(type);
#elif defined(Q_WS_MAC)
return new QMacPixmapData(type);
diff --git a/src/gui/inputmethod/inputmethod.pri b/src/gui/inputmethod/inputmethod.pri
index f688364..6d9f748 100644
--- a/src/gui/inputmethod/inputmethod.pri
+++ b/src/gui/inputmethod/inputmethod.pri
@@ -23,7 +23,7 @@ mac:!embedded {
HEADERS += inputmethod/qmacinputcontext_p.h
SOURCES += inputmethod/qmacinputcontext_mac.cpp
}
-symbian {
+symbian:contains(QT_CONFIG, s60) {
HEADERS += inputmethod/qcoefepinputcontext_p.h
SOURCES += inputmethod/qcoefepinputcontext_s60.cpp
LIBS += -lfepbase
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index e61b17e..2f1ab0e 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -448,7 +448,7 @@ bool Q_GUI_EXPORT qt_tab_all_widgets = true;
bool qt_in_tab_key_event = false;
int qt_antialiasing_threshold = -1;
static int drag_time = 500;
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
// The screens are a bit too small to for your thumb when using only 4 pixels drag distance.
static int drag_distance = 8;
#else
@@ -469,7 +469,7 @@ bool QApplicationPrivate::auto_sip_on_mouse_focus = false;
bool QApplicationPrivate::inSizeMove = false;
#endif
#ifdef QT_KEYPAD_NAVIGATION
-# if defined(Q_WS_S60)
+# if defined(Q_OS_SYMBIAN)
bool QApplicationPrivate::keypadNavigation = true;
# else
bool QApplicationPrivate::keypadNavigation = false;
@@ -1963,7 +1963,9 @@ QString desktopstyle;
#elif defined(Q_WS_X11) && defined(Q_OS_SOLARIS)
desktopstyle = QLatin1String("CDE"); // default style for X11 on Solaris
#elif defined(Q_WS_S60)
- desktopstyle = QLatin1String("S60");
+ desktopstyle = QLatin1String("S60"); // default style for Symbian with S60
+#elif defined(Q_OS_SYMBIAN)
+ desktopstyle = QLatin1String("Windows"); // default style for Symbian without S60
#elif defined(Q_WS_X11) && defined(Q_OS_IRIX)
desktopstyle = QLatin1String("SGI"); // default style for X11 on IRIX
#elif defined(Q_WS_QWS)
@@ -5098,7 +5100,7 @@ uint QApplicationPrivate::currentPlatform(){
platform |= KB_Gnome;
if (X11->desktopEnvironment == DE_CDE)
platform |= KB_CDE;
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
platform = KB_S60;
#endif
return platform;
diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h
index cd391a9..4b447b5 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 TWsEvent;
#endif
@@ -232,7 +232,7 @@ public:
virtual int x11ClientMessage(QWidget*, XEvent*, bool passive_only);
int x11ProcessEvent(XEvent*);
#endif
-#if defined(Q_WS_S60)
+#if defined(Q_OS_SYMBIAN)
int s60ProcessEvent(TWsEvent *event);
virtual bool s60EventFilter(TWsEvent *aEvent);
void symbianHandleCommand(int command);
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index b46ecd6..e9e8d45 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -438,7 +438,7 @@ public:
static bool sendMouseEvent(QWidget *receiver, QMouseEvent *event, QWidget *alienWidget,
QWidget *native, QWidget **buttonDown, QPointer<QWidget> &lastMouseReceiver,
bool spontaneous = true);
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
static TUint resolveS60ScanCode(TInt scanCode, TUint keysym);
#endif
#if defined(Q_WS_WIN) || defined(Q_WS_X11)
@@ -496,7 +496,7 @@ private:
QMap<const QScreen*, QRect> maxWindowRects;
#endif
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
static QHash<TInt, TUint> scanCodeCache;
#endif
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index caa7075..d47747f 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -63,10 +63,10 @@
#include "apgwgnam.h" // For CApaWindowGroupName
#include <MdaAudioTonePlayer.h> // For CMdaAudioToneUtility
-#ifndef QT_NO_IM
+#if !defined(QT_NO_IM) && defined(Q_WS_S60)
#include "qinputcontext.h"
#include <private/qcoefepinputcontext_p.h>
-#endif // QT_NO_IM
+#endif // !defined(QT_NO_IM) && defined(Q_WS_S60)
#include "private/qstylesheetstyle_p.h"
@@ -542,13 +542,13 @@ void QSymbianControl::sendInputEvent(QWidget *widget, QInputEvent *inputEvent)
TKeyResponse QSymbianControl::sendKeyEvent(QWidget *widget, QKeyEvent *keyEvent)
{
-#ifndef QT_NO_IM
+#if !defined(QT_NO_IM) && defined(Q_WS_S60)
if (widget && widget->isEnabled() && widget->testAttribute(Qt::WA_InputMethodEnabled)) {
QInputContext *qic = widget->inputContext();
if(qic && qic->filterEvent(keyEvent))
return EKeyWasConsumed;
}
-#endif // QT_NO_IM
+#endif // !defined(QT_NO_IM) && defined(Q_WS_S60)
if (widget && qt_sendSpontaneousEvent(widget, keyEvent))
if (keyEvent->isAccepted())
@@ -557,7 +557,7 @@ TKeyResponse QSymbianControl::sendKeyEvent(QWidget *widget, QKeyEvent *keyEvent)
return EKeyWasNotConsumed;
}
-#ifndef QT_NO_IM
+#if !defined(QT_NO_IM) && defined(Q_WS_S60)
TCoeInputCapabilities QSymbianControl::InputCapabilities() const
{
QWidget *w = 0;
@@ -672,6 +672,7 @@ void QSymbianControl::HandleResourceChange(int resourceType)
case KUidValueCoeFontChangeEvent:
// font change event
break;
+#ifdef Q_WS_S60
case KEikDynamicLayoutVariantSwitch:
{
if (qwidget->isFullScreen()) {
@@ -682,6 +683,7 @@ void QSymbianControl::HandleResourceChange(int resourceType)
}
break;
}
+#endif
default:
break;
}
@@ -962,7 +964,7 @@ int QApplication::s60ProcessEvent(TWsEvent *event)
CCoeControl* control = reinterpret_cast<CCoeControl*>(event->Handle());
const bool controlInMap = QWidgetPrivate::mapper && QWidgetPrivate::mapper->contains(control);
switch (event->Type()) {
-#ifndef QT_NO_IM
+#if !defined(QT_NO_IM) && defined(Q_WS_S60)
case EEventKey:
case EEventKeyUp:
case EEventKeyDown:
@@ -1053,7 +1055,9 @@ void QApplication::symbianHandleCommand(int command)
{
switch (command) {
case EEikCmdExit:
+#ifdef Q_WS_S60
case EAknSoftkeyExit:
+#endif
exit();
break;
default:
@@ -1065,8 +1069,10 @@ void QApplication::symbianHandleCommand(int command)
Q_ASSERT(index < softKeys.count());
softKeys.at(index)->activate(QAction::Trigger);
}
+#ifdef Q_WS_S60
else
QMenuBarPrivate::symbianCommands(command);
+#endif
break;
}
}
@@ -1074,6 +1080,7 @@ void QApplication::symbianHandleCommand(int command)
void QApplication::symbianResourceChange(int type)
{
switch (type) {
+#ifdef Q_WS_S60
case KEikDynamicLayoutVariantSwitch:
{
if (S60)
@@ -1102,7 +1109,7 @@ void QApplication::symbianResourceChange(int type)
s60Style->handleSkinChange();
break;
#endif
-
+#endif // Q_WS_S60
default:
break;
}
diff --git a/src/gui/kernel/qkeymapper_p.h b/src/gui/kernel/qkeymapper_p.h
index 486d403..ba1fcfe 100644
--- a/src/gui/kernel/qkeymapper_p.h
+++ b/src/gui/kernel/qkeymapper_p.h
@@ -204,7 +204,7 @@ public:
UInt32 keyboard_dead;
KeyboardLayoutItem *keyLayout[256];
#elif defined(Q_WS_QWS)
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
private:
QHash<TUint, int> s60ToQtKeyMap;
void fillKeyMap();
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 2d47a14..bcbe48f 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -65,11 +65,14 @@
#include <coecntrl.h>
#include <eikenv.h>
#include <eikappui.h>
+
+#ifdef Q_WS_S60
#include <aknutils.h> // AknLayoutUtils
#include <avkon.hrh> // EEikStatusPaneUidTitle
#include <akntitle.h> // CAknTitlePane
#include <akncontext.h> // CAknContextPane
#include <eikspane.h> // CEikStatusPane
+#endif
QT_BEGIN_NAMESPACE
@@ -102,11 +105,13 @@ public:
static inline RWindowGroup& windowGroup();
static inline CWsScreenDevice* screenDevice();
static inline CCoeAppUi* appUi();
+#ifdef Q_WS_S60
static inline CEikStatusPane* statusPane();
static inline CCoeControl* statusPaneSubPane(TInt aPaneId);
static inline CAknTitlePane* titlePane();
static inline CAknContextPane* contextPane();
static inline CEikButtonGroupContainer* buttonGroupContainer();
+#endif
};
class QAbstractLongTapObserver
@@ -129,7 +134,7 @@ public:
void HandleResourceChange(int resourceType);
void HandlePointerEventL(const TPointerEvent& aPointerEvent);
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
-#ifndef QT_NO_IM
+#if !defined(QT_NO_IM) && defined(Q_WS_S60)
TCoeInputCapabilities InputCapabilities() const;
#endif
TTypeUid::Ptr MopSupplyObject(TTypeUid id);
@@ -195,6 +200,7 @@ inline CCoeAppUi* QS60Data::appUi()
return CCoeEnv::Static()-> AppUi();
}
+#ifdef Q_WS_S60
inline CEikStatusPane* QS60Data::statusPane()
{
return CEikonEnv::Static()->AppUiFactory()->StatusPane();
@@ -230,6 +236,7 @@ inline CEikButtonGroupContainer* QS60Data::buttonGroupContainer()
{
return CEikonEnv::Static()->AppUiFactory()->Cba();
}
+#endif // Q_WS_S60
static inline QFont qt_TFontSpec2QFontL(const TFontSpec &fontSpec)
{
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index e4c7aa8..4c2fe9d 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -99,7 +99,7 @@
#endif
#include <private/qpaintengine_raster_p.h>
-#if defined(Q_WS_S60)
+#if defined(Q_OS_SYMBIAN)
#include "private/qt_s60_p.h"
#endif
@@ -1996,7 +1996,7 @@ void QWidgetPrivate::setOpaque(bool opaque)
#ifdef Q_WS_WIN
winUpdateIsOpaque();
#endif
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
s60UpdateIsOpaque();
#endif
}
@@ -2012,7 +2012,7 @@ void QWidgetPrivate::updateIsTranslucent()
#ifdef Q_WS_WIN
winUpdateIsOpaque();
#endif
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
s60UpdateIsOpaque();
#endif
}
@@ -4888,12 +4888,12 @@ void QWidget::render(QPainter *painter, const QPoint &targetOffset,
d->extra->inRenderWithPainter = false;
}
-#if !defined(Q_WS_S60)
+#if !defined(Q_OS_SYMBIAN)
void QWidgetPrivate::setSoftKeys_sys(const QList<QAction*> &softkeys)
{
Q_UNUSED(softkeys)
}
-#endif // !defined(Q_WS_S60)
+#endif // !defined(Q_OS_SYMBIAN)
bool QWidgetPrivate::isAboutToShow() const
{
@@ -6790,7 +6790,7 @@ void QWidgetPrivate::show_helper()
// On Windows, show the popup now so that our own focus handling
// stores the correct old focus widget even if it's stolen in the
// showevent
-#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 (!isEmbedded && q->windowType() == Qt::Popup)
qApp->d_func()->openPopup(q);
#endif
@@ -6807,7 +6807,7 @@ void QWidgetPrivate::show_helper()
show_sys();
-#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 (!isEmbedded && q->windowType() == Qt::Popup)
qApp->d_func()->openPopup(q);
#endif
@@ -10430,7 +10430,7 @@ void QWidget::setShortcutAutoRepeat(int id, bool enable)
*/
void QWidget::updateMicroFocus()
{
-#if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_S60))
+#if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN))
Q_D(QWidget);
// and optimisation to update input context only it has already been created.
if (d->ic || qApp->d_func()->inputContext) {
diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h
index 344b878..2008723 100644
--- a/src/gui/kernel/qwidget.h
+++ b/src/gui/kernel/qwidget.h
@@ -761,7 +761,7 @@ private:
friend bool isWidgetOpaque(const QWidget *);
friend class QGLWidgetPrivate;
#endif
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
friend class QSymbianControl;
friend class QS60WindowSurface;
#endif
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 8569e75..84a15ed 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -80,11 +80,9 @@
#include "QtGui/qscreen_qws.h"
#endif
-#if defined(Q_WS_S60)
+#if defined(Q_OS_SYMBIAN)
class RDrawableWindow;
class CCoeControl;
-class CAknTitlePane;
-class CAknContextPane;
// The following 2 defines may only be needed for s60. To be seen.
const int SOFTKEYSTART=5000;
const int SOFTKEYEND=5004;
@@ -172,7 +170,7 @@ struct QTLWExtra {
#ifndef QT_NO_QWS_MANAGER
QWSManager *qwsManager;
#endif
-#elif defined(Q_WS_S60) // <--------------------------------------------------------- SYMBIAN
+#elif defined(Q_OS_SYMBIAN) // <--------------------------------------------------------- SYMBIAN
uint activated : 1; // RWindowBase::Activated has been called
RDrawableWindow *rwindow;
#endif
@@ -663,7 +661,7 @@ public:
void updateCursor() const;
#endif
QScreen* getScreen() const;
-#elif defined(Q_WS_S60) // <--------------------------------------------------------- SYMBIAN
+#elif defined(Q_OS_SYMBIAN) // <--------------------------------------------------------- SYMBIAN
static QWidget *mouseGrabber;
static QWidget *keyboardGrabber;
void s60UpdateIsOpaque();
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index bb81e06..8582207 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -52,7 +52,9 @@
#include <qinputcontext.h>
+#ifdef Q_WS_S60
#include <aknappui.h>
+#endif
QT_BEGIN_NAMESPACE
@@ -79,6 +81,7 @@ static bool isEqual(const QList<QAction*>& a, const QList<QAction*>& b)
void QWidgetPrivate::setSoftKeys_sys(const QList<QAction*> &softkeys)
{
+#ifdef Q_WS_S60
Q_Q(QWidget);
if (QApplication::focusWidget() && q!=QApplication::focusWidget()) {
QList<QAction *> old = QApplication::focusWidget()->softKeys();
@@ -142,6 +145,9 @@ void QWidgetPrivate::setSoftKeys_sys(const QList<QAction*> &softkeys)
nativeContainer->SetCommandL(2, EAknSoftkeyExit, qt_QString2TPtrC(QObject::tr("Exit")));
nativeContainer->DrawDeferred(); // 3.1 needs an extra invitation
+#else
+ Q_UNUSED(softkeys)
+#endif
}
void QWidgetPrivate::setWSGeometry(bool /* dontShow */, const QRect & /* rect */)
@@ -433,6 +439,7 @@ void QWidgetPrivate::handleSymbianDeferredFocusChanged()
if (control->IsFocused()) {
QApplication::setActiveWindow(q);
+#ifdef Q_WS_S60
// If widget is fullscreen, hide status pane and button container
// otherwise show them.
CEikStatusPane* statusPane = S60->statusPane();
@@ -442,6 +449,7 @@ void QWidgetPrivate::handleSymbianDeferredFocusChanged()
statusPane->MakeVisible(!isFullscreen);
if (buttonGroup && (buttonGroup->IsVisible() == isFullscreen))
buttonGroup->MakeVisible(!isFullscreen);
+#endif
} else {
QApplication::setActiveWindow(0);
}
@@ -658,6 +666,7 @@ CFbsBitmap* qt_pixmapToNativeBitmapL(QPixmap pixmap, bool invert)
void QWidgetPrivate::setWindowIcon_sys(bool forceReset)
{
+#ifdef Q_WS_S60
Q_Q(QWidget);
if (!q->testAttribute(Qt::WA_WState_Created) || !q->isWindow() )
@@ -671,41 +680,48 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset)
TRect cPaneRect;
TBool found = AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EContextPane, cPaneRect );
CAknContextPane* contextPane = S60->contextPane();
- if( found && contextPane ) { // We have context pane with valid metrics
- QIcon icon = q->windowIcon();
- if (!icon.isNull()) {
- // Valid icon -> set it as an context pane picture
- QSize size = icon.actualSize(QSize(cPaneRect.Size().iWidth, cPaneRect.Size().iHeight));
- QPixmap pm = icon.pixmap(size);
- QBitmap mask = pm.mask();
- if (mask.isNull()) {
- mask = QBitmap(pm.size());
- mask.fill(Qt::color1);
- }
-
- // Convert to CFbsBitmp
- // TODO: When QPixmap is adapted to use native CFbsBitmap,
- // it could be set directly to context pane
- CFbsBitmap* nBitmap = qt_pixmapToNativeBitmapL(pm, false);
- CFbsBitmap* nMask = qt_pixmapToNativeBitmapL(mask, true);
-
- contextPane->SetPicture(nBitmap,nMask);
- } else {
- // Icon set to null -> set context pane picture to default
- contextPane->SetPictureToDefaultL();
- }
+ if (found && contextPane) { // We have context pane with valid metrics
+ QIcon icon = q->windowIcon();
+ if (!icon.isNull()) {
+ // Valid icon -> set it as an context pane picture
+ QSize size = icon.actualSize(QSize(cPaneRect.Size().iWidth, cPaneRect.Size().iHeight));
+ QPixmap pm = icon.pixmap(size);
+ QBitmap mask = pm.mask();
+ if (mask.isNull()) {
+ mask = QBitmap(pm.size());
+ mask.fill(Qt::color1);
+ }
+
+ // Convert to CFbsBitmp
+ // TODO: When QPixmap is adapted to use native CFbsBitmap,
+ // it could be set directly to context pane
+ CFbsBitmap* nBitmap = qt_pixmapToNativeBitmapL(pm, false);
+ CFbsBitmap* nMask = qt_pixmapToNativeBitmapL(mask, true);
+
+ contextPane->SetPicture(nBitmap,nMask);
+ } else {
+ // Icon set to null -> set context pane picture to default
+ contextPane->SetPictureToDefaultL();
+ }
}
+#else
+ Q_UNUSED(forceReset)
+#endif
}
void QWidgetPrivate::setWindowTitle_sys(const QString &caption)
{
+#ifdef Q_WS_S60
Q_Q(QWidget);
- if(q->isWindow()) {
+ if (q->isWindow()) {
Q_ASSERT(q->testAttribute(Qt::WA_WState_Created));
CAknTitlePane* titlePane = S60->titlePane();
if(titlePane)
titlePane->SetTextL(qt_QString2TPtrC(caption));
}
+#else
+ Q_UNUSED(caption)
+#endif
}
void QWidgetPrivate::setWindowIconText_sys(const QString & /*iconText */)
@@ -939,24 +955,30 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
}
}
if ((oldstate & Qt::WindowFullScreen) != (newstate & Qt::WindowFullScreen)) {
+#ifdef Q_WS_S60
CEikStatusPane* statusPane = S60->statusPane();
CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer();
+#endif
if (newstate & Qt::WindowFullScreen) {
const QRect normalGeometry = geometry();
const QRect r = top->normalGeometry;
setGeometry(qApp->desktop()->screenGeometry(this));
+#ifdef Q_WS_S60
if (statusPane)
statusPane->MakeVisible(false);
if (buttonGroup)
buttonGroup->MakeVisible(false);
+#endif
top->normalGeometry = r;
if (top->normalGeometry.width() < 0)
top->normalGeometry = normalGeometry;
} else {
+#ifdef Q_WS_S60
if (statusPane)
statusPane->MakeVisible(true);
if (buttonGroup)
buttonGroup->MakeVisible(true);
+#endif
if (newstate & Qt::WindowMaximized) {
const QRect r = top->normalGeometry;
setGeometry(qApp->desktop()->availableGeometry(this));
diff --git a/src/gui/kernel/qwindowdefs.h b/src/gui/kernel/qwindowdefs.h
index 06581c0..b1f4d1a 100644
--- a/src/gui/kernel/qwindowdefs.h
+++ b/src/gui/kernel/qwindowdefs.h
@@ -131,10 +131,10 @@ QT_END_HEADER
#endif // Q_WS_QWS
-#if defined(Q_WS_S60)
+#if defined(Q_OS_SYMBIAN)
class CCoeControl;
typedef CCoeControl * WId;
-#endif // Q_WS_S60
+#endif // Q_OS_SYMBIAN
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
diff --git a/src/gui/kernel/symbian.pri b/src/gui/kernel/symbian.pri
new file mode 100644
index 0000000..d267a53
--- /dev/null
+++ b/src/gui/kernel/symbian.pri
@@ -0,0 +1,3 @@
+symbian {
+ contains(QT_CONFIG, s60): LIBS+= $$QMAKE_LIBS_S60
+}
diff --git a/src/gui/painting/qgraphicssystem.cpp b/src/gui/painting/qgraphicssystem.cpp
index 9bb5fff..d4c7a65 100644
--- a/src/gui/painting/qgraphicssystem.cpp
+++ b/src/gui/painting/qgraphicssystem.cpp
@@ -44,7 +44,7 @@
#ifdef Q_WS_X11
# include <private/qpixmap_x11_p.h>
#endif
-#if defined(Q_WS_WIN) || defined(Q_WS_S60)
+#if defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN)
# include <private/qpixmap_raster_p.h>
#endif
#ifdef Q_WS_MAC
@@ -64,7 +64,7 @@ QPixmapData *QGraphicsSystem::createDefaultPixmapData(QPixmapData::PixelType typ
#endif
#if defined(Q_WS_X11)
return new QX11PixmapData(type);
-#elif defined(Q_WS_WIN) || defined(Q_WS_S60)
+#elif defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN)
return new QRasterPixmapData(type);
#elif defined(Q_WS_MAC)
return new QMacPixmapData(type);
diff --git a/src/gui/painting/qgraphicssystemfactory.cpp b/src/gui/painting/qgraphicssystemfactory.cpp
index f0a6586..bf186e6 100644
--- a/src/gui/painting/qgraphicssystemfactory.cpp
+++ b/src/gui/painting/qgraphicssystemfactory.cpp
@@ -68,7 +68,7 @@ QGraphicsSystem *QGraphicsSystemFactory::create(const QString& key)
if (system.isEmpty()) {
system = QLatin1String("openvg");
}
-#elif defined (QT_GRAPHICSSYSTEM_RASTER) && !defined(Q_WS_WIN) && !defined(Q_WS_S60)
+#elif defined (QT_GRAPHICSSYSTEM_RASTER) && !defined(Q_WS_WIN) && !defined(Q_OS_SYMBIAN)
if (system.isEmpty()) {
system = QLatin1String("raster");
}
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 66a43aa..c5e342c 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -91,7 +91,7 @@
# include <private/qfontengine_qpf_p.h>
# endif
# include <private/qabstractfontengine_p.h>
-#elif defined(Q_WS_S60) && defined(QT_NO_FREETYPE)
+#elif defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)
# include <private/qfontengine_s60_p.h>
#endif
@@ -3231,7 +3231,7 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
ensurePen();
ensureState();
-#if defined (Q_WS_WIN) || defined(Q_WS_MAC) || (defined(Q_WS_S60) && defined(QT_NO_FREETYPE))
+#if defined (Q_WS_WIN) || defined(Q_WS_MAC) || (defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE))
bool drawCached = true;
@@ -3264,7 +3264,7 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
return;
}
-#else // Q_WS_WIN || Q_WS_MAC || Q_WS_S60 && QT_NO_FREETYPE
+#else // Q_WS_WIN || Q_WS_MAC || Q_OS_SYMBIAN && QT_NO_FREETYPE
QFontEngine *fontEngine = ti.fontEngine;
@@ -3284,7 +3284,7 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
}
#endif // Q_WS_QWS
-#if (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_S60)) && !defined(QT_NO_FREETYPE)
+#if (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)) && !defined(QT_NO_FREETYPE)
#if defined(Q_WS_QWS) && !defined(QT_NO_QWS_QPF2)
if (fontEngine->type() == QFontEngine::QPF2) {
@@ -4235,13 +4235,13 @@ int QCustomRasterPaintDevice::bytesPerLine() const
return (width() * depth() + 7) / 8;
}
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
void QRasterBuffer::prepareBuffer(int /* width */, int /* height */)
{
}
-#endif // Q_WS_S60
+#endif // Q_OS_SYMBIAN
/*!
\class QCustomRasterPaintDevice
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index edddcf4..61a0623 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -59,7 +59,7 @@ QT_MODULE(Gui)
template <class T> class QVector;
class QVariant;
-#if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_OS_WINCE) || defined(Q_WS_S60)
+#if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
struct QRegionPrivate;
#endif
@@ -199,7 +199,7 @@ private:
#elif defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA)
mutable RgnHandle unused; // Here for binary compatability reasons. ### Qt 5 remove.
#endif
-#if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_OS_WINCE) || defined(Q_WS_S60)
+#if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
QRegionPrivate *qt_rgn;
#endif
};
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
index 2747df1..fadf6a6 100644
--- a/src/gui/painting/qwindowsurface_raster.cpp
+++ b/src/gui/painting/qwindowsurface_raster.cpp
@@ -295,7 +295,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
#endif
#endif
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
Q_UNUSED(widget);
Q_UNUSED(rgn);
Q_UNUSED(offset);
diff --git a/src/gui/styles/styles.pri b/src/gui/styles/styles.pri
index fcc9125..277be76 100644
--- a/src/gui/styles/styles.pri
+++ b/src/gui/styles/styles.pri
@@ -161,7 +161,7 @@ contains( styles, windowsmobile ) {
DEFINES += QT_NO_STYLE_WINDOWSMOBILE
}
-contains( styles, s60 ) {
+contains( styles, s60 ):contains(QT_CONFIG, s60) {
HEADERS += \
styles/qs60style.h \
styles/qs60style_p.h
diff --git a/src/gui/text/qabstractfontengine_p.h b/src/gui/text/qabstractfontengine_p.h
index 0d141c4..4401173 100644
--- a/src/gui/text/qabstractfontengine_p.h
+++ b/src/gui/text/qabstractfontengine_p.h
@@ -91,7 +91,7 @@ public:
virtual Type type() const { return Proxy; }
virtual const char *name() const { return "proxy engine"; }
-#if !defined(Q_WS_X11) && !defined(Q_WS_WIN) && !defined(Q_WS_MAC) && !defined(Q_WS_S60)
+#if !defined(Q_WS_X11) && !defined(Q_WS_WIN) && !defined(Q_WS_MAC) && !defined(Q_OS_SYMBIAN)
virtual void draw(QPaintEngine *, qreal, qreal, const QTextItemInt &);
#endif
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 280c8d2..a575199 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -72,7 +72,7 @@
#include "qfontengine_qpf_p.h"
#endif
#endif
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
#include "qt_s60_p.h"
#endif
@@ -172,7 +172,7 @@ Q_GUI_EXPORT int qt_defaultDpiX()
if (!subScreens.isEmpty())
screen = subScreens.at(0);
dpi = qRound(screen->width() / (screen->physicalWidth() / qreal(25.4)));
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
dpi = S60->defaultDpiX;
#endif // Q_WS_X11
@@ -200,7 +200,7 @@ Q_GUI_EXPORT int qt_defaultDpiY()
if (!subScreens.isEmpty())
screen = subScreens.at(0);
dpi = qRound(screen->height() / (screen->physicalHeight() / qreal(25.4)));
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
dpi = S60->defaultDpiY;
#endif // Q_WS_X11
@@ -793,7 +793,7 @@ QFont::QFont(const QString &family, int pointSize, int weight, bool italic)
resolve_mask = QFont::FamilyResolved;
if (pointSize <= 0) {
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
pointSize = 7;
#else
pointSize = 12;
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index a90d826..844c3f9 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -56,7 +56,7 @@
#include <stdlib.h>
#include <limits.h>
-#if (defined(Q_WS_QWS) || defined(Q_WS_S60)) && !defined(QT_NO_FREETYPE)
+#if (defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)) && !defined(QT_NO_FREETYPE)
# include <ft2build.h>
# include FT_TRUETYPE_TABLES_H
#endif
@@ -148,10 +148,10 @@ struct QtFontSize
QtFontEncoding *encodingID(int id, uint xpoint = 0, uint xres = 0,
uint yres = 0, uint avgwidth = 0, bool add = false);
#endif // Q_WS_X11
-#if defined(Q_WS_QWS) || defined(Q_WS_S60)
+#if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
QByteArray fileName;
int fileIndex;
-#endif // defined(Q_WS_QWS) || defined(Q_WS_S60)
+#endif // defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
};
@@ -225,12 +225,12 @@ struct QtFontStyle
delete [] weightName;
delete [] setwidthName;
#endif
-#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_S60)
+#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
while (count--) {
#ifdef Q_WS_X11
free(pixelSizes[count].encodings);
#endif
-#if defined(Q_WS_QWS) || defined(Q_WS_S60)
+#if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
pixelSizes[count].fileName.~QByteArray();
#endif
}
@@ -248,7 +248,7 @@ struct QtFontStyle
const char *weightName;
const char *setwidthName;
#endif // Q_WS_X11
-#if defined(Q_WS_QWS) || defined(Q_WS_S60)
+#if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
bool antialiased;
#endif
@@ -289,7 +289,7 @@ QtFontSize *QtFontStyle::pixelSize(unsigned short size, bool add)
pixelSizes[count].count = 0;
pixelSizes[count].encodings = 0;
#endif
-#if defined(Q_WS_QWS) || defined(Q_WS_S60)
+#if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
new (&pixelSizes[count].fileName) QByteArray;
pixelSizes[count].fileIndex = 0;
#endif
@@ -375,7 +375,7 @@ struct QtFontFamily
fixedPitchComputed(false),
#endif
name(n), count(0), foundries(0)
-#if defined(Q_WS_QWS) || defined(Q_WS_S60) && !defined(QT_NO_FREETYPE)
+#if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) && !defined(QT_NO_FREETYPE)
, bogusWritingSystems(false)
#endif
{
@@ -405,7 +405,7 @@ struct QtFontFamily
#endif
QString name;
-#if defined(Q_WS_X11) || defined(Q_WS_S60) && !defined(QT_NO_FREETYPE)
+#if defined(Q_WS_X11) || defined(Q_OS_SYMBIAN) && !defined(QT_NO_FREETYPE)
QByteArray fontFilename;
int fontFileIndex;
#endif
@@ -415,7 +415,7 @@ struct QtFontFamily
int count;
QtFontFoundry **foundries;
-#if defined(Q_WS_QWS) || defined(Q_WS_S60) && !defined(QT_NO_FREETYPE)
+#if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) && !defined(QT_NO_FREETYPE)
bool bogusWritingSystems;
QStringList fallbackFamilies;
#endif
@@ -462,7 +462,7 @@ QtFontFoundry *QtFontFamily::foundry(const QString &f, bool create)
// ### copied to tools/makeqpf/qpf2.cpp
-#if (defined(Q_WS_QWS) && !defined(QT_NO_FREETYPE)) || defined(Q_WS_WIN) || defined(Q_WS_S60) || (defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA))
+#if (defined(Q_WS_QWS) && !defined(QT_NO_FREETYPE)) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) || (defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA))
// see the Unicode subset bitfields in the MSDN docs
static int requiredUnicodeBits[QFontDatabase::WritingSystemsCount][2] = {
// Any,
@@ -583,7 +583,7 @@ static QList<QFontDatabase::WritingSystem> determineWritingSystemsFromTrueTypeBi
}
#endif
-#if defined(Q_WS_S60) && defined(QT_NO_FREETYPE)
+#if defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)
// class with virtual destructor, derived in qfontdatabase_s60.cpp
class QFontDatabaseS60Store
{
@@ -600,7 +600,7 @@ public:
#if defined(Q_WS_QWS)
, stream(0)
#endif
-#if defined(Q_WS_S60) && defined(QT_NO_FREETYPE)
+#if defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)
, s60Store(0)
#endif
{ }
@@ -614,7 +614,7 @@ public:
::free(families);
families = 0;
count = 0;
-#if defined(Q_WS_S60) && defined(QT_NO_FREETYPE)
+#if defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)
if (s60Store) {
delete s60Store;
s60Store = 0;
@@ -649,7 +649,7 @@ public:
bool loadFromCache(const QString &fontPath);
void addQPF2File(const QByteArray &file);
#endif // Q_WS_QWS
-#if defined(Q_WS_QWS) || defined(Q_WS_S60) && !defined(QT_NO_FREETYPE)
+#if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) && !defined(QT_NO_FREETYPE)
void addFont(const QString &familyname, const char *foundryname, int weight,
bool italic, int pixelSize, const QByteArray &file, int fileIndex,
bool antialiased,
@@ -661,7 +661,7 @@ public:
#if defined(Q_WS_QWS)
QDataStream *stream;
QStringList fallbackFamilies;
-#elif defined(Q_WS_S60) && defined(QT_NO_FREETYPE)
+#elif defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)
const QFontDatabaseS60Store *s60Store;
#endif
};
@@ -712,7 +712,7 @@ QtFontFamily *QFontDatabasePrivate::family(const QString &f, bool create)
return families[pos];
}
-#if defined(Q_WS_QWS) || defined(Q_WS_S60) && !defined(QT_NO_FREETYPE)
+#if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) && !defined(QT_NO_FREETYPE)
void QFontDatabasePrivate::addFont(const QString &familyname, const char *foundryname, int weight, bool italic, int pixelSize,
const QByteArray &file, int fileIndex, bool antialiased,
const QList<QFontDatabase::WritingSystem> &writingSystems)
@@ -751,14 +751,14 @@ void QFontDatabasePrivate::addFont(const QString &familyname, const char *foundr
for (int i = 0; i < writingSystems.count(); ++i)
*stream << quint8(writingSystems.at(i));
}
-#else // ..in case of defined(Q_WS_S60) && !defined(QT_NO_FREETYPE)
+#else // ..in case of defined(Q_OS_SYMBIAN) && !defined(QT_NO_FREETYPE)
f->fontFilename = file;
f->fontFileIndex = fileIndex;
#endif
}
#endif
-#if (defined(Q_WS_QWS) || defined(Q_WS_S60)) && !defined(QT_NO_FREETYPE)
+#if (defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)) && !defined(QT_NO_FREETYPE)
QStringList QFontDatabasePrivate::addTTFile(const QByteArray &file, const QByteArray &fontData)
{
QStringList families;
@@ -973,7 +973,7 @@ static void initFontDef(const QtFontDesc &desc, const QFontDef &request, QFontDe
#endif
#endif
-#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_S60)
+#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN)
static void getEngineData(const QFontPrivate *d, const QFontCache::Key &key)
{
// look for the requested font in the engine data cache
@@ -1034,7 +1034,7 @@ QT_BEGIN_INCLUDE_NAMESPACE
# include "qfontdatabase_win.cpp"
#elif defined(Q_WS_QWS)
# include "qfontdatabase_qws.cpp"
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
# include "qfontdatabase_s60.cpp"
#endif
QT_END_INCLUDE_NAMESPACE
diff --git a/src/gui/text/qfontdatabase.h b/src/gui/text/qfontdatabase.h
index 271c8d0..e0a7c41 100644
--- a/src/gui/text/qfontdatabase.h
+++ b/src/gui/text/qfontdatabase.h
@@ -151,7 +151,7 @@ public:
private:
static void createDatabase();
static void parseFontName(const QString &name, QString &foundry, QString &family);
-#if defined(Q_WS_QWS) || defined(Q_WS_S60)
+#if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
static QFontEngine *findFont(int script, const QFontPrivate *fp, const QFontDef &request);
#endif
static void load(const QFontPrivate *d, int script);
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 198882b..730137e 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -814,7 +814,7 @@ QFontEngineGlyphCache *QFontEngine::glyphCache(QFontEngineGlyphCache::Type key,
return 0;
}
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_S60)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
static inline QFixed kerning(int left, int right, const QFontEngine::KernPair *pairs, int numPairs)
{
uint left_right = (left << 16) + right;
diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h
index 3862552..aa1cd0a 100644
--- a/src/gui/text/qfontengine_ft_p.h
+++ b/src/gui/text/qfontengine_ft_p.h
@@ -256,7 +256,7 @@ public:
QGlyphSet *loadTransformedGlyphSet(const QTransform &matrix);
bool loadGlyphs(QGlyphSet *gs, glyph_t *glyphs, int num_glyphs, GlyphFormat format = Format_Render);
-#if defined(Q_WS_QWS) || defined(Q_WS_S60)
+#if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
virtual void draw(QPaintEngine * /*p*/, qreal /*x*/, qreal /*y*/, const QTextItemInt & /*si*/) {}
#endif
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index 5cd5acc..2b27d41 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -167,7 +167,7 @@ public:
virtual void recalcAdvances(QGlyphLayout *, QTextEngine::ShaperFlags) const {}
virtual void doKerning(QGlyphLayout *, QTextEngine::ShaperFlags) const;
-#if !defined(Q_WS_X11) && !defined(Q_WS_WIN) && !defined(Q_WS_MAC) && !defined(Q_WS_S60)
+#if !defined(Q_WS_X11) && !defined(Q_WS_WIN) && !defined(Q_WS_MAC) && !defined(Q_OS_SYMBIAN)
virtual void draw(QPaintEngine *p, qreal x, qreal y, const QTextItemInt &si) = 0;
#endif
virtual void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs,
@@ -234,7 +234,7 @@ public:
bool symbol;
mutable HB_FontRec hbFont;
mutable HB_Face hbFace;
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_S60)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
struct KernPair {
uint left_right;
QFixed adjust;
@@ -328,7 +328,7 @@ public:
virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags flags) const;
virtual void recalcAdvances(QGlyphLayout *, QTextEngine::ShaperFlags) const;
-#if !defined(Q_WS_X11) && !defined(Q_WS_WIN) && !defined(Q_WS_MAC) && !defined(Q_WS_S60)
+#if !defined(Q_WS_X11) && !defined(Q_WS_WIN) && !defined(Q_WS_MAC) && !defined(Q_OS_SYMBIAN)
void draw(QPaintEngine *p, qreal x, qreal y, const QTextItemInt &si);
#endif
virtual void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags);
@@ -625,7 +625,7 @@ QT_END_NAMESPACE
# include "private/qfontengine_win_p.h"
#endif
-#if defined(Q_WS_S60) && !defined(QT_NO_FREETYPE)
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_FREETYPE)
# include "private/qfontengine_ft_p.h"
#endif
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp
index 2722f83..eb2d92e 100644
--- a/src/gui/util/qdesktopservices.cpp
+++ b/src/gui/util/qdesktopservices.cpp
@@ -53,7 +53,7 @@
#include "qdesktopservices_win.cpp"
#elif defined(Q_WS_MAC)
#include "qdesktopservices_mac.cpp"
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
#include "qdesktopservices_s60.cpp"
#endif
diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp
index 3588ec9..77cf254 100644
--- a/src/gui/util/qdesktopservices_s60.cpp
+++ b/src/gui/util/qdesktopservices_s60.cpp
@@ -56,9 +56,14 @@
#include <apgtask.h> // TApaTaskList, TApaTask
#include <rsendas.h> // RSendAs
#include <rsendasmessage.h> // RSendAsMessage
-#include <pathinfo.h> // PathInfo
-#ifdef USE_DOCUMENTHANDLER
-#include <documenthandler.h> // CDocumentHandler
+
+#ifdef Q_WS_S60
+# include <pathinfo.h> // PathInfo
+# ifdef USE_DOCUMENTHANDLER
+# include <documenthandler.h> // CDocumentHandler
+# endif
+#elif defined(USE_DOCUMENTHANDLER)
+# error CDocumentHandler requires support for S60
#endif
QT_BEGIN_NAMESPACE
@@ -200,6 +205,7 @@ static TDriveUnit writableExeDrive()
static TPtrC writableDataRoot()
{
TDriveUnit drive = exeDrive();
+#ifdef Q_WS_S60
switch( drive.operator TInt() ){
case EDriveC:
return PathInfo::PhoneMemoryRootPath();
@@ -217,6 +223,10 @@ static TPtrC writableDataRoot()
return PathInfo::PhoneMemoryRootPath();
break;
}
+#else
+#warning No fallback implementation of writableDataRoot()
+ return 0;
+#endif
}
static void openDocumentL(const TDesC& aUrl)
@@ -330,15 +340,21 @@ QString QDesktopServices::storageLocation(StandardLocation type)
break;
case MusicLocation:
path.Append(writableDataRoot());
+#ifdef Q_WS_S60
path.Append(PathInfo::SoundsPath());
+#endif
break;
case MoviesLocation:
path.Append(writableDataRoot());
+#ifdef Q_WS_S60
path.Append(PathInfo::VideosPath());
+#endif
break;
case PicturesLocation:
path.Append(writableDataRoot());
+#ifdef Q_WS_S60
path.Append(PathInfo::ImagesPath());
+#endif
break;
case TempLocation:
path.Append(writableExeDrive().Name());
diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri
index e628229..cdbb7cc 100644
--- a/src/gui/util/util.pri
+++ b/src/gui/util/util.pri
@@ -38,3 +38,8 @@ embedded {
!embedded:!x11:mac {
OBJECTIVE_SOURCES += util/qsystemtrayicon_mac.mm
}
+
+symbian {
+ LIBS += -lsendas2 -letext -lapmime
+ contains(QT_CONFIG, s60): LIBS += -lplatformenv -lcommonui
+}
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index 079a3b5..43dc33a 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -2855,7 +2855,7 @@ void QMenu::actionEvent(QActionEvent *e)
d->wce_menu->syncAction(e->action());
#endif
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
if (!d->symbian_menu)
d->symbian_menu = new QMenuPrivate::QSymbianMenuPrivate;
if (e->type() == QEvent::ActionAdded)
diff --git a/src/gui/widgets/qmenu.h b/src/gui/widgets/qmenu.h
index 117e272..41890c4 100644
--- a/src/gui/widgets/qmenu.h
+++ b/src/gui/widgets/qmenu.h
@@ -52,7 +52,7 @@
#endif
QT_BEGIN_HEADER
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
class CEikMenuPane;
#endif
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
IMPORT_C void qt_symbian_show_toplevel(CEikMenuPane* menuPane);
IMPORT_C void qt_symbian_show_submenu(CEikMenuPane* menuPane, int id);
#endif
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index b9bb544..d9ad422 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -61,7 +61,7 @@
#include "QtCore/qbasictimer.h"
#include "private/qwidget_p.h"
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
class CEikMenuPane;
#endif
QT_BEGIN_NAMESPACE
@@ -123,7 +123,7 @@ struct QWceMenuAction {
QWceMenuAction() : menuHandle(0), command(0) {}
};
#endif
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
struct QSymbianMenuAction {
uint command;
int parent;
@@ -147,7 +147,7 @@ public:
#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR)
,wce_menu(0)
#endif
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
,symbian_menu(0)
#endif
#ifdef QT3_SUPPORT
@@ -163,7 +163,7 @@ public:
#if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR)
delete wce_menu;
#endif
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
delete symbian_menu;
#endif
@@ -336,7 +336,7 @@ public:
HMENU wceMenu(bool create = false);
QAction* wceCommands(uint command);
#endif
-#if defined(Q_OS_SYMBIAN)
+#if defined(Q_WS_S60)
struct QSymbianMenuPrivate {
QList<QSymbianMenuAction*> actionItems;
QSymbianMenuPrivate();
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp
index 69ce981..76057e7 100644
--- a/src/gui/widgets/qmenu_symbian.cpp
+++ b/src/gui/widgets/qmenu_symbian.cpp
@@ -44,17 +44,21 @@
#include "qstyle.h"
#include "qdebug.h"
#include "qwidgetaction.h"
-#include <eikmenub.h>
-#include <eikmenup.h>
#include <private/qapplication_p.h>
#include <private/qmenu_p.h>
#include <private/qmenubar_p.h>
#include <qt_s60_p.h>
+#include <QtCore/qlibrary.h>
+
+#ifdef Q_WS_S60
+#include <eikmenub.h>
+#include <eikmenup.h>
#include <eikaufty.h>
#include <eikbtgpc.h>
-#include <QtCore/qlibrary.h>
#include <avkon.rsg>
-#ifndef QT_NO_MENUBAR
+#endif
+
+#if !defined(QT_NO_MENUBAR) && defined(Q_WS_S60)
QT_BEGIN_NAMESPACE
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index 638e4a6..4607fc3 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -741,7 +741,7 @@ void QMenuBarPrivate::init()
q->hide();
}
#endif
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
symbianCreateMenuBar(q->parentWidget());
if(symbian_menubar)
q->hide();
@@ -817,7 +817,7 @@ QMenuBar::~QMenuBar()
if (qt_wince_is_mobile())
d->wceDestroyMenuBar();
#endif
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
Q_D(QMenuBar);
d->symbianDestroyMenuBar();
#endif
@@ -1069,7 +1069,7 @@ void QMenuBar::setVisible(bool visible)
if (isNativeMenuBar())
return;
#endif
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
Q_D(QMenuBar);
if(d->symbian_menubar)
return;
@@ -1286,7 +1286,7 @@ void QMenuBar::actionEvent(QActionEvent *e)
nativeMenuBar->syncAction(e->action());
}
#endif
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
if(d->symbian_menubar) {
if(e->type() == QEvent::ActionAdded)
d->symbian_menubar->addAction(e->action(), d->symbian_menubar->findAction(e->before()));
@@ -1383,7 +1383,7 @@ void QMenuBarPrivate::handleReparent()
if (qt_wince_is_mobile() && wce_menubar)
wce_menubar->rebuild();
#endif
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
if (symbian_menubar)
symbian_menubar->rebuild();
#endif
@@ -1622,7 +1622,7 @@ QRect QMenuBar::actionGeometry(QAction *act) const
QSize QMenuBar::minimumSizeHint() const
{
Q_D(const QMenuBar);
-#if defined(Q_WS_MAC) || defined(Q_WS_WINCE) || defined(Q_OS_SYMBIAN)
+#if defined(Q_WS_MAC) || defined(Q_WS_WINCE) || defined(Q_WS_S60)
const bool as_gui_menubar = !isNativeMenuBar();
#else
const bool as_gui_menubar = true;
@@ -1677,7 +1677,7 @@ QSize QMenuBar::minimumSizeHint() const
QSize QMenuBar::sizeHint() const
{
Q_D(const QMenuBar);
-#if defined(Q_WS_MAC) || defined(Q_WS_WINCE) || defined(Q_OS_SYMBIAN)
+#if defined(Q_WS_MAC) || defined(Q_WS_WINCE) || defined(Q_WS_S60)
const bool as_gui_menubar = !isNativeMenuBar();
#else
const bool as_gui_menubar = true;
@@ -1735,7 +1735,7 @@ QSize QMenuBar::sizeHint() const
int QMenuBar::heightForWidth(int) const
{
Q_D(const QMenuBar);
-#if defined(Q_WS_MAC) || defined(Q_WS_WINCE) || defined(Q_OS_SYMBIAN)
+#if defined(Q_WS_MAC) || defined(Q_WS_WINCE) || defined(Q_WS_S60)
const bool as_gui_menubar = !isNativeMenuBar();
#else
const bool as_gui_menubar = true;
diff --git a/src/gui/widgets/qmenubar_p.h b/src/gui/widgets/qmenubar_p.h
index a51a6cc..004562f 100644
--- a/src/gui/widgets/qmenubar_p.h
+++ b/src/gui/widgets/qmenubar_p.h
@@ -62,7 +62,7 @@
#endif
#ifndef QT_NO_MENUBAR
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
class CCoeControl;
class CEikMenuBar;
#endif
@@ -89,7 +89,7 @@ public:
#ifdef Q_WS_WINCE
, wce_menubar(0), wceClassicMenu(false)
#endif
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
, symbian_menubar(0)
#endif
@@ -102,7 +102,7 @@ public:
#ifdef Q_WS_WINCE
delete wce_menubar;
#endif
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
delete symbian_menubar;
#endif
}
@@ -239,7 +239,7 @@ public:
void wceRefresh();
bool wceEmitSignals(QList<QWceMenuAction*> actions, uint command);
#endif
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
void symbianCreateMenuBar(QWidget *);
void symbianDestroyMenuBar();
struct QSymbianMenuBarPrivate {
diff --git a/src/plugins/s60/src/qdesktopservices_3_2.cpp b/src/plugins/s60/src/qdesktopservices_3_2.cpp
index 7695f00..cbdc810 100644
--- a/src/plugins/s60/src/qdesktopservices_3_2.cpp
+++ b/src/plugins/s60/src/qdesktopservices_3_2.cpp
@@ -43,6 +43,7 @@
#include <qstring.h>
#include <qdir.h>
+#ifdef Q_WS_S60
#include <e32base.h> // CBase -> Required by cdirectorylocalizer.h
#include <cdirectorylocalizer.h> // CDirectoryLocalizer
@@ -66,4 +67,12 @@ EXPORT_C QString localizedDirectoryName(QString& rawPath)
return ret;
}
+#else
+
+EXPORT_C QString localizedDirectoryName(QString& /* rawPath */)
+{
+ qWarning("QDesktopServices::displayName() not implemented for this platform version");
+ return QString();
+}
+#endif
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 75d3d1c..2041715 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -319,6 +319,7 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "IPV6" ] = "yes"; // Always, dynamicly loaded
dictionary[ "OPENSSL" ] = "auto";
dictionary[ "DBUS" ] = "auto";
+ dictionary[ "S60" ] = "yes";
dictionary[ "STYLE_WINDOWS" ] = "yes";
dictionary[ "STYLE_WINDOWSXP" ] = "auto";
@@ -805,6 +806,13 @@ void Configure::parseCmdLine()
break;
dictionary[ "ARM_FPU_TYPE" ] = configCmdLine.at(i);
}
+
+ // S60 Support -------------------------------------------
+ else if( configCmdLine.at(i) == "-s60" )
+ dictionary[ "S60" ] = "yes";
+ else if( configCmdLine.at(i) == "-no-s60" )
+ dictionary[ "S60" ] = "no";
+
else if (configCmdLine.at(i) == "-fast" )
dictionary[ "FAST" ] = "yes";
else if (configCmdLine.at(i) == "-no-fast" )
@@ -897,6 +905,12 @@ void Configure::parseCmdLine()
dictionary[ "PLUGIN_MANIFESTS" ] = "yes";
}
+ // Work around compiler nesting limitation
+ else
+ continueElse = true;
+ if (!continueElse) {
+ }
+
else if( configCmdLine.at(i) == "-internal" )
dictionary[ "QMAKE_INTERNAL" ] = "yes";
@@ -1432,6 +1446,7 @@ void Configure::applySpecSpecifics()
dictionary[ "PHONON" ] = "yes";
dictionary[ "XMLPATTERNS" ] = "no";
dictionary[ "QT_GLIB" ] = "no";
+ dictionary[ "S60" ] = "yes";
// iconv makes makes apps start and run ridiculously slowly in symbian emulator (HW not tested)
// iconv_open seems to return -1 always, so something is probably missing from the platform.
dictionary[ "QT_ICONV" ] = "no";
@@ -1768,10 +1783,12 @@ bool Configure::displayHelp()
desc("DIRECTSHOW", "no", "-phonon-wince-ds9", "Enable Phonon Direct Show 9 backend for Windows CE");
// Qt\Symbian only options go below here -----------------------------------------------------------------------------
- desc("Qt for S60 only:\n\n");
+ desc("Qt for Symbian OS only:\n\n");
desc("FREETYPE", "no", "-no-freetype", "Do not compile in Freetype2 support.");
- desc("FREETYPE", "yes", "-qt-freetype", "Use the libfreetype bundled with Qt.\n");
- desc( "-fpu <flags>", "VFP type on ARM, supported options: softvfp(default) | vfpv2 | softvfp+vfpv2\n");
+ desc("FREETYPE", "yes", "-qt-freetype", "Use the libfreetype bundled with Qt.");
+ desc( "-fpu <flags>", "VFP type on ARM, supported options: softvfp(default) | vfpv2 | softvfp+vfpv2");
+ desc("S60", "no", "-no-s60", "Do not compile in S60 support.");
+ desc("S60", "yes", "-s60", "Compile with support for the S60 UI Framework\n");
return true;
}
return false;
@@ -2399,6 +2416,10 @@ void Configure::generateOutputVars()
qtConfig += "egl";
}
+ if ( dictionary["S60"] == "yes" ) {
+ qtConfig += "s60";
+ }
+
if ( dictionary["DIRECTSHOW"] == "yes" )
qtConfig += "directshow";
@@ -2819,6 +2840,7 @@ void Configure::generateConfigfiles()
if(dictionary["XMLPATTERNS"] == "no") qconfigList += "QT_NO_XMLPATTERNS";
if(dictionary["SCRIPTTOOLS"] == "no") qconfigList += "QT_NO_SCRIPTTOOLS";
if(dictionary["FREETYPE"] == "no") qconfigList += "QT_NO_FREETYPE";
+ if(dictionary["S60"] == "no") qconfigList += "QT_NO_S60";
if(dictionary["OPENGL_ES_CM"] == "yes" ||
dictionary["OPENGL_ES_CL"] == "yes" ||
@@ -3137,6 +3159,10 @@ void Configure::displayConfig()
cout << "Signature..................." << dictionary[ "CE_SIGNATURE"] << endl << endl;
}
+ if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith(QLatin1String("symbian"))) {
+ cout << "Support for S60............." << dictionary[ "S60" ] << endl;
+ }
+
if(dictionary["ASSISTANT_WEBKIT"] == "yes")
cout << "Using WebKit as html rendering engine in Qt Assistant." << endl;