summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2010-07-01 12:01:01 (GMT)
committerSami Merila <sami.merila@nokia.com>2010-07-01 12:01:01 (GMT)
commit24bc9555ba04bb357dc3d956a190d02c4152b9a4 (patch)
treef4104a2af05cf9e5f0c9e389fda31eab4b8ac515 /src
parent30fbf43186521c10b9cd36577da57688be7f600d (diff)
parentbdb90df5d51d071c5b105a36654184a2c0f6ed65 (diff)
downloadQt-24bc9555ba04bb357dc3d956a190d02c4152b9a4.zip
Qt-24bc9555ba04bb357dc3d956a190d02c4152b9a4.tar.gz
Qt-24bc9555ba04bb357dc3d956a190d02c4152b9a4.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp2
-rw-r--r--src/corelib/global/qglobal.cpp14
-rw-r--r--src/corelib/io/io.pri2
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp10
-rw-r--r--src/corelib/kernel/qcore_symbian_p.cpp2
-rw-r--r--src/gui/dialogs/qdialog.cpp21
-rw-r--r--src/gui/dialogs/qdialog.h6
-rw-r--r--src/gui/image/qpixmapdatafactory.cpp4
-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
-rw-r--r--src/gui/painting/qgraphicssystem.cpp4
-rw-r--r--src/gui/s60framework/qs60mainapplication.cpp23
-rw-r--r--src/gui/s60framework/qs60mainapplication.h20
-rw-r--r--src/gui/s60framework/qs60mainappui.cpp131
-rw-r--r--src/gui/s60framework/qs60mainappui.h75
-rw-r--r--src/gui/s60framework/qs60maindocument.cpp22
-rw-r--r--src/gui/s60framework/qs60maindocument.h20
-rw-r--r--src/gui/s60framework/s60framework.pri22
-rw-r--r--src/gui/styles/qs60style.h8
-rw-r--r--src/gui/styles/qs60style_stub.cpp131
-rw-r--r--src/gui/styles/styles.pri4
-rw-r--r--src/gui/util/qdesktopservices_s60.cpp19
-rw-r--r--src/gui/util/util.pri3
-rw-r--r--src/gui/widgets/qmenubar_p.h2
-rw-r--r--src/s60installs/bwins/QtGuiu.def22
-rw-r--r--src/s60installs/eabi/QtGuiu.def26
31 files changed, 519 insertions, 127 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 9a4e9b2..dc12881 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -3614,7 +3614,7 @@ QString QWebPage::userAgentForUrl(const QUrl&) const
firstPartTemp += QString::fromLatin1("Sun Solaris");
#elif defined Q_OS_ULTRIX
firstPartTemp += QString::fromLatin1("DEC Ultrix");
-#elif defined Q_WS_S60
+#elif defined Q_OS_SYMBIAN
firstPartTemp += QLatin1Char(' ');
QSysInfo::S60Version s60Version = QSysInfo::s60Version();
switch (s60Version) {
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index b31c83b..75a51ec 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1622,7 +1622,7 @@ bool qSharedBuild()
\macro Q_WS_S60
\relates <QtGlobal>
- Defined on S60.
+ Defined on S60 with the Avkon UI framework.
\sa Q_WS_MAC, Q_WS_WIN, Q_WS_X11, Q_WS_QWS
*/
@@ -1813,7 +1813,6 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
#endif
#ifdef Q_OS_SYMBIAN
-# ifdef Q_WS_S60
static QSysInfo::S60Version cachedS60Version = QSysInfo::S60Version(-1);
QSysInfo::S60Version QSysInfo::s60Version()
@@ -1885,17 +1884,6 @@ QSysInfo::SymbianVersion QSysInfo::symbianVersion()
return SV_Unknown;
}
}
-#else
-QSysInfo::S60Version QSysInfo::s60Version()
-{
- return SV_S60_None;
-}
-
-QSysInfo::SymbianVersion QSysInfo::symbianVersion()
-{
- return SV_Unknown;
-}
-# endif // ifdef Q_WS_S60
#endif // ifdef Q_OS_SYMBIAN
/*!
diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri
index ef448b1..3d964c6 100644
--- a/src/corelib/io/io.pri
+++ b/src/corelib/io/io.pri
@@ -93,6 +93,6 @@ win32 {
SOURCES += io/qfilesystemwatcher_symbian.cpp
HEADERS += io/qfilesystemwatcher_symbian_p.h
INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
- contains(QT_CONFIG, s60): LIBS += -lplatformenv
+ LIBS += -lplatformenv
}
}
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 5762d94..9464a97 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -634,13 +634,8 @@ QString QFSFileEngine::homePath()
QString QFSFileEngine::rootPath()
{
#if defined(Q_OS_SYMBIAN)
-# ifdef Q_WS_S60
TFileName symbianPath = PathInfo::PhoneMemoryRootPath();
return QDir::cleanPath(QDir::fromNativeSeparators(qt_TDesC2QString(symbianPath)));
-# else
-# warning No fallback implementation of QFSFileEngine::rootPath()
- return QString();
-# endif
#else
return QLatin1String("/");
#endif
@@ -649,17 +644,12 @@ QString QFSFileEngine::rootPath()
QString QFSFileEngine::tempPath()
{
#if defined(Q_OS_SYMBIAN)
-# ifdef Q_WS_S60
TFileName symbianPath = PathInfo::PhoneMemoryRootPath();
QString temp = QDir::fromNativeSeparators(qt_TDesC2QString(symbianPath));
temp += QLatin1String( "temp/");
// Just to verify that folder really exist on hardware
QT_MKDIR(QFile::encodeName(temp), 0777);
-# else
-# warning No fallback implementation of QFSFileEngine::tempPath()
- QString temp;
-# endif
#else
QString temp = QFile::decodeName(qgetenv("TMPDIR"));
if (temp.isEmpty())
diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp
index 402eccf..5afde9a 100644
--- a/src/corelib/kernel/qcore_symbian_p.cpp
+++ b/src/corelib/kernel/qcore_symbian_p.cpp
@@ -131,7 +131,7 @@ public:
private:
void init()
{
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
_LIT(KLibName_3_1, "qts60plugin_3_1" QT_LIBINFIX_UNICODE L".dll");
_LIT(KLibName_3_2, "qts60plugin_3_2" QT_LIBINFIX_UNICODE L".dll");
_LIT(KLibName_5_0, "qts60plugin_5_0" QT_LIBINFIX_UNICODE L".dll");
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index c2184f2..a2adb05 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -71,8 +71,9 @@ extern bool qt_wince_is_smartphone(); //is defined in qguifunctions_wce.cpp
# include "qwizard.h"
#endif
-#if defined(Q_WS_S60)
#include "private/qt_s60_p.h"
+#if defined(Q_WS_S60)
+#include <AknUtils.h> // AknLayoutUtils
#endif
#ifndef SPI_GETSNAPTODEFBUTTON
@@ -393,7 +394,7 @@ void QDialogPrivate::resetModalitySetByOpen()
resetModalityTo = -1;
}
-#if defined(Q_WS_WINCE) || defined(Q_WS_S60)
+#if defined(Q_WS_WINCE) || defined(Q_OS_SYMBIAN)
#ifdef Q_WS_WINCE_WM
void QDialogPrivate::_q_doneAction()
{
@@ -413,7 +414,7 @@ bool QDialog::event(QEvent *e)
accept();
result = true;
}
-#else
+#elif defined(Q_WS_S60)
if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize )) {
if (!testAttribute(Qt::WA_Moved)) {
Qt::WindowStates state = windowState();
@@ -423,6 +424,7 @@ bool QDialog::event(QEvent *e)
setWindowState(state);
}
}
+ // TODO is Symbian, non-S60 behaviour required?
#endif
return result;
}
@@ -823,8 +825,8 @@ void QDialog::adjustPosition(QWidget* w)
return;
#endif
-#ifdef Q_WS_S60
- if (s60AdjustedPosition())
+#ifdef Q_OS_SYMBIAN
+ if (symbianAdjustedPosition())
//dialog has already been positioned
return;
#endif
@@ -892,10 +894,11 @@ void QDialog::adjustPosition(QWidget* w)
move(p);
}
-#if defined(Q_WS_S60)
+#if defined(Q_OS_SYMBIAN)
/*! \internal */
-bool QDialog::s60AdjustedPosition()
+bool QDialog::symbianAdjustedPosition()
{
+#if defined(Q_WS_S60)
QPoint p;
const bool doS60Positioning = !(isFullScreen()||isMaximized());
if (doS60Positioning) {
@@ -940,6 +943,10 @@ bool QDialog::s60AdjustedPosition()
move(p);
}
return doS60Positioning;
+#else
+ // TODO - check positioning requirement for Symbian, non-s60
+ return false;
+#endif
}
#endif
diff --git a/src/gui/dialogs/qdialog.h b/src/gui/dialogs/qdialog.h
index 777256a..b2ba93c 100644
--- a/src/gui/dialogs/qdialog.h
+++ b/src/gui/dialogs/qdialog.h
@@ -107,7 +107,7 @@ public Q_SLOTS:
protected:
QDialog(QDialogPrivate &, QWidget *parent, Qt::WindowFlags f = 0);
-#if defined(Q_WS_WINCE) || defined(Q_WS_S60)
+#if defined(Q_WS_WINCE) || defined(Q_OS_SYMBIAN)
bool event(QEvent *e);
#endif
void keyPressEvent(QKeyEvent *);
@@ -123,8 +123,8 @@ private:
Q_DECLARE_PRIVATE(QDialog)
Q_DISABLE_COPY(QDialog)
-#if defined(Q_WS_S60)
- bool s60AdjustedPosition();
+#if defined(Q_OS_SYMBIAN)
+ bool symbianAdjustedPosition();
#endif
diff --git a/src/gui/image/qpixmapdatafactory.cpp b/src/gui/image/qpixmapdatafactory.cpp
index 8014660..7498a7c 100644
--- a/src/gui/image/qpixmapdatafactory.cpp
+++ b/src/gui/image/qpixmapdatafactory.cpp
@@ -53,7 +53,7 @@
#ifdef Q_WS_MAC
# include <private/qpixmap_mac_p.h>
#endif
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
# include <private/qpixmap_s60_p.h>
#endif
@@ -82,7 +82,7 @@ QPixmapData* QSimplePixmapDataFactory::create(QPixmapData::PixelType type)
return new QRasterPixmapData(type);
#elif defined(Q_WS_MAC)
return new QMacPixmapData(type);
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
return new QS60PixmapData(type);
#else
#error QSimplePixmapDataFactory::create() not implemented
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..365c2c8 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_S60)
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();
diff --git a/src/gui/painting/qgraphicssystem.cpp b/src/gui/painting/qgraphicssystem.cpp
index 2ea3d33..bd9e7fc 100644
--- a/src/gui/painting/qgraphicssystem.cpp
+++ b/src/gui/painting/qgraphicssystem.cpp
@@ -50,7 +50,7 @@
#ifdef Q_WS_MAC
# include <private/qpixmap_mac_p.h>
#endif
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
# include <private/qpixmap_s60_p.h>
#endif
@@ -71,7 +71,7 @@ QPixmapData *QGraphicsSystem::createDefaultPixmapData(QPixmapData::PixelType typ
return new QRasterPixmapData(type);
#elif defined(Q_WS_MAC)
return new QMacPixmapData(type);
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
return new QS60PixmapData(type);
#elif !defined(Q_WS_QWS)
#error QGraphicsSystem::createDefaultPixmapData() not implemented
diff --git a/src/gui/s60framework/qs60mainapplication.cpp b/src/gui/s60framework/qs60mainapplication.cpp
index 41ac1a8..0f9367e 100644
--- a/src/gui/s60framework/qs60mainapplication.cpp
+++ b/src/gui/s60framework/qs60mainapplication.cpp
@@ -71,17 +71,17 @@ _LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main" QT_LIBINFIX_UNICODE L".
The QS60MainApplication provides a helper class for use in migrating
from existing S60 based applications to Qt based applications. It is
- used in the exact same way as the \c CAknApplication class from
+ used in the exact same way as the \c CEikApplication class from
Symbian, but internally provides extensions used by Qt.
When modifying old S60 applications that rely on implementing
- functions in \c CAknApplication, the class should be modified to
- inherit from this class instead of \c CAknApplication. Then the
+ functions in \c CEikApplication, the class should be modified to
+ inherit from this class instead of \c CEikApplication. Then the
application can choose to override only certain functions. To make
Qt use the custom application objects, pass a factory function to
\c{QApplication::QApplication(QApplication::QS60MainApplicationFactory, int &, char **)}.
- For more information on \c CAknApplication, please see the S60 documentation.
+ For more information on \c CEikApplication, please see the S60 documentation.
Unlike other Qt classes, QS60MainApplication behaves like an S60 class, and can throw Symbian
leaves.
@@ -136,4 +136,19 @@ TFileName QS60MainApplication::ResourceFileName() const
return KNullDesC();
}
+void QS60MainApplication::PreDocConstructL()
+{
+ QS60MainApplicationBase::PreDocConstructL();
+}
+
+CDictionaryStore *QS60MainApplication::OpenIniFileLC(RFs &aFs) const
+{
+ return QS60MainApplicationBase::OpenIniFileLC(aFs);
+}
+
+void QS60MainApplication::NewAppServerL(CApaAppServer *&aAppServer)
+{
+ QS60MainApplicationBase::NewAppServerL(aAppServer);
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/s60framework/qs60mainapplication.h b/src/gui/s60framework/qs60mainapplication.h
index 997f30f..cb22e68 100644
--- a/src/gui/s60framework/qs60mainapplication.h
+++ b/src/gui/s60framework/qs60mainapplication.h
@@ -44,9 +44,15 @@
#include <QtCore/qglobal.h>
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
#include <aknapp.h>
+typedef CAknApplication QS60MainApplicationBase;
+#else
+#include <eikapp.h>
+typedef CEikApplication QS60MainApplicationBase;
+#endif
QT_BEGIN_HEADER
@@ -54,7 +60,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
-class Q_GUI_EXPORT QS60MainApplication : public CAknApplication
+class Q_GUI_EXPORT QS60MainApplication : public QS60MainApplicationBase
{
public:
QS60MainApplication();
@@ -65,6 +71,14 @@ public:
virtual TFileName ResourceFileName() const;
+public:
+
+ virtual void PreDocConstructL();
+
+ virtual CDictionaryStore *OpenIniFileLC(RFs &aFs) const;
+
+ virtual void NewAppServerL(CApaAppServer *&aAppServer);
+
protected:
virtual CApaDocument *CreateDocumentL();
@@ -74,6 +88,6 @@ QT_END_NAMESPACE
QT_END_HEADER
-#endif // Q_WS_S60
+#endif // Q_OS_SYMBIAN
#endif // QS60MAINAPPLICATION_H
diff --git a/src/gui/s60framework/qs60mainappui.cpp b/src/gui/s60framework/qs60mainappui.cpp
index ce13de8..40c2d03 100644
--- a/src/gui/s60framework/qs60mainappui.cpp
+++ b/src/gui/s60framework/qs60mainappui.cpp
@@ -41,20 +41,25 @@
// INCLUDE FILES
#include <exception>
+#include <qglobal.h>
+#ifdef Q_WS_S60
#include <avkon.hrh>
#include <eikmenub.h>
#include <eikmenup.h>
+#include <avkon.rsg>
+#endif
#include <barsread.h>
#include <qconfig.h>
-#if defined(QT_LIBINFIX_UNQUOTED)
+#ifdef Q_WS_S60
+# if defined(QT_LIBINFIX_UNQUOTED)
// Two level macro needed for proper expansion of libinfix
-# define QT_S60MAIN_RSG_2(x) <s60main##x##.rsg>
-# define QT_S60MAIN_RSG(x) QT_S60MAIN_RSG_2(x)
-# include QT_S60MAIN_RSG(QT_LIBINFIX_UNQUOTED)
-#else
-# include <s60main.rsg>
+# define QT_S60MAIN_RSG_2(x) <s60main##x##.rsg>
+# define QT_S60MAIN_RSG(x) QT_S60MAIN_RSG_2(x)
+# include QT_S60MAIN_RSG(QT_LIBINFIX_UNQUOTED)
+# else
+# include <s60main.rsg>
+# endif
#endif
-#include <avkon.rsg>
#include "qs60mainappui.h"
#include <QtGui/qapplication.h>
@@ -115,14 +120,16 @@ void QS60MainAppUi::ConstructL()
// ENoAppResourceFile and ENonStandardResourceFile makes UI to work without
// resource files in most SDKs. S60 3rd FP1 public seems to require resource file
// even these flags are defined
- TInt flags = CAknAppUi::EAknEnableSkin
- | CAknAppUi::ENoScreenFurniture
- | CAknAppUi::ENonStandardResourceFile;
+ TInt flags = CEikAppUi::ENoScreenFurniture
+ | CEikAppUi::ENonStandardResourceFile;
+#ifdef Q_WS_S60
+ flags |= CAknAppUi::EAknEnableSkin;
// After 5th Edition S60, native side supports animated wallpapers.
// However, there is no support for that feature on Qt side, so indicate to
// native UI framework that this application will not support background animations.
if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)
flags |= KAknDisableAnimationBackground;
+#endif
BaseConstructL(flags);
}
@@ -168,7 +175,7 @@ void QS60MainAppUi::HandleCommandL(TInt command)
*/
void QS60MainAppUi::HandleResourceChangeL(TInt type)
{
- CAknAppUi::HandleResourceChangeL(type);
+ QS60MainAppUiBase::HandleResourceChangeL(type);
if (qApp) {
QSymbianEvent event(QSymbianEvent::ResourceChangeEvent, type);
@@ -185,7 +192,7 @@ void QS60MainAppUi::HandleResourceChangeL(TInt type)
* If you override this function, you should call the base class implementation if you do not
* handle the event.
*/
-void QS60MainAppUi::HandleWsEventL(const TWsEvent& wsEvent, CCoeControl *destination)
+void QS60MainAppUi::HandleWsEventL(const TWsEvent &wsEvent, CCoeControl *destination)
{
int result = 0;
if (qApp) {
@@ -196,7 +203,7 @@ void QS60MainAppUi::HandleWsEventL(const TWsEvent& wsEvent, CCoeControl *destina
}
if (result <= 0)
- CAknAppUi::HandleWsEventL(wsEvent, destination);
+ QS60MainAppUiBase::HandleWsEventL(wsEvent, destination);
}
@@ -236,6 +243,7 @@ void QS60MainAppUi::DynInitMenuBarL(TInt /* resourceId */, CEikMenuBar * /* menu
*/
void QS60MainAppUi::DynInitMenuPaneL(TInt resourceId, CEikMenuPane *menuPane)
{
+#ifdef Q_WS_S60
if (resourceId == R_QT_WRAPPERAPP_MENU) {
if (menuPane->NumberOfItemsInPane() <= 1)
QT_TRYCATCH_LEAVING(qt_symbian_show_toplevel(menuPane));
@@ -245,6 +253,9 @@ void QS60MainAppUi::DynInitMenuPaneL(TInt resourceId, CEikMenuPane *menuPane)
&& resourceId != R_AVKON_MENUPANE_LANGUAGE_DEFAULT) {
QT_TRYCATCH_LEAVING(qt_symbian_show_submenu(menuPane, resourceId));
}
+#else
+ QS60MainAppUiBase::DynInitMenuPaneL(resourceId, menuPane);
+#endif
}
/*!
@@ -255,16 +266,104 @@ void QS60MainAppUi::DynInitMenuPaneL(TInt resourceId, CEikMenuPane *menuPane)
*
* If you override this function, you should call the base class implementation as well.
*/
-void QS60MainAppUi::RestoreMenuL(CCoeControl* menuWindow, TInt resourceId, TMenuType menuType)
+void QS60MainAppUi::RestoreMenuL(CCoeControl *menuWindow, TInt resourceId, TMenuType menuType)
{
+#ifdef Q_WS_S60
if (resourceId >= QT_SYMBIAN_FIRST_MENU_ITEM && resourceId <= QT_SYMBIAN_LAST_MENU_ITEM) {
if (menuType == EMenuPane)
DynInitMenuPaneL(resourceId, (CEikMenuPane*)menuWindow);
else
DynInitMenuBarL(resourceId, (CEikMenuBar*)menuWindow);
- } else {
- CAknAppUi::RestoreMenuL(menuWindow, resourceId, menuType);
+ } else
+#endif
+ {
+ QS60MainAppUiBase::RestoreMenuL(menuWindow, resourceId, menuType);
}
}
+void QS60MainAppUi::Exit()
+{
+ QS60MainAppUiBase::Exit();
+}
+
+void QS60MainAppUi::SetFadedL(TBool aFaded)
+{
+ QS60MainAppUiBase::SetFadedL(aFaded);
+}
+
+TRect QS60MainAppUi::ApplicationRect() const
+{
+ return QS60MainAppUiBase::ApplicationRect();
+}
+
+void QS60MainAppUi::HandleScreenDeviceChangedL()
+{
+ QS60MainAppUiBase::HandleScreenDeviceChangedL();
+}
+
+void QS60MainAppUi::HandleApplicationSpecificEventL(TInt aType, const TWsEvent &aEvent)
+{
+ QS60MainAppUiBase::HandleApplicationSpecificEventL(aType, aEvent);
+}
+
+TTypeUid::Ptr QS60MainAppUi::MopSupplyObject(TTypeUid aId)
+{
+ return QS60MainAppUiBase::MopSupplyObject(aId);
+}
+
+void QS60MainAppUi::ProcessCommandL(TInt aCommand)
+{
+ QS60MainAppUiBase::ProcessCommandL(aCommand);
+}
+
+TErrorHandlerResponse QS60MainAppUi::HandleError (TInt aError, const SExtendedError &aExtErr, TDes &aErrorText, TDes &aContextText)
+{
+ return QS60MainAppUiBase::HandleError(aError, aExtErr, aErrorText, aContextText);
+}
+
+void QS60MainAppUi::HandleViewDeactivation(const TVwsViewId &aViewIdToBeDeactivated, const TVwsViewId &aNewlyActivatedViewId)
+{
+ QS60MainAppUiBase::HandleViewDeactivation(aViewIdToBeDeactivated, aNewlyActivatedViewId);
+}
+
+void QS60MainAppUi::PrepareToExit()
+{
+ QS60MainAppUiBase::PrepareToExit();
+}
+
+void QS60MainAppUi::HandleTouchPaneSizeChange()
+{
+ QS60MainAppUiBase::HandleTouchPaneSizeChange();
+}
+
+void QS60MainAppUi::HandleSystemEventL(const TWsEvent &aEvent)
+{
+ QS60MainAppUiBase::HandleSystemEventL(aEvent);
+}
+
+void QS60MainAppUi::Reserved_MtsmPosition()
+{
+ QS60MainAppUiBase::Reserved_MtsmPosition();
+}
+
+void QS60MainAppUi::Reserved_MtsmObject()
+{
+ QS60MainAppUiBase::Reserved_MtsmObject();
+}
+
+void QS60MainAppUi::HandleForegroundEventL(TBool aForeground)
+{
+ QS60MainAppUiBase::HandleForegroundEventL(aForeground);
+}
+
+#ifndef Q_WS_S60
+
+void QS60StubAknAppUi::HandleViewDeactivation(const TVwsViewId &, const TVwsViewId &) {}
+void QS60StubAknAppUi::HandleTouchPaneSizeChange() {}
+void QS60StubAknAppUi::HandleStatusPaneSizeChange() {}
+void QS60StubAknAppUi::Reserved_MtsmPosition() {}
+void QS60StubAknAppUi::Reserved_MtsmObject() {}
+
+#endif
+
QT_END_NAMESPACE
diff --git a/src/gui/s60framework/qs60mainappui.h b/src/gui/s60framework/qs60mainappui.h
index dcc72d1..796059f 100644
--- a/src/gui/s60framework/qs60mainappui.h
+++ b/src/gui/s60framework/qs60mainappui.h
@@ -44,9 +44,55 @@
#include <QtCore/qglobal.h>
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
+#ifdef Q_WS_S60
#include <aknappui.h>
+typedef CAknAppUi QS60MainAppUiBase;
+#else
+#include <eikappui.h>
+// these stub classes simulate the structure of CAknAppUi, to help binary compatibility between Qt configured with and without S60/Avkon
+class QS60StubAknAppUiBase : public CEikAppUi
+{
+private:
+ int qS60StubAknAppUiBaseSpace[4];
+};
+
+class QS60StubMEikStatusPaneObserver
+{
+public:
+ virtual void HandleStatusPaneSizeChange() = 0;
+};
+
+class QS60StubMAknTouchPaneObserver
+{
+public:
+ virtual void HandleTouchPaneSizeChange() = 0;
+};
+
+class QS60StubAknAppUi : public QS60StubAknAppUiBase, QS60StubMEikStatusPaneObserver,
+ public MCoeViewDeactivationObserver,
+ public QS60StubMAknTouchPaneObserver
+{
+public: // MCoeViewDeactivationObserver
+ virtual void HandleViewDeactivation(const TVwsViewId&, const TVwsViewId &);
+
+public: // from MAknTouchPaneObserver
+ virtual void HandleTouchPaneSizeChange();
+
+protected: // from MEikStatusPaneObserver
+ virtual void HandleStatusPaneSizeChange();
+
+protected: // from CAknAppUi
+ virtual void Reserved_MtsmPosition();
+ virtual void Reserved_MtsmObject();
+
+private:
+ int qS60StubAknAppUiSpace[4];
+};
+
+typedef QS60StubAknAppUi QS60MainAppUiBase;
+#endif
QT_BEGIN_HEADER
@@ -54,7 +100,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
-class Q_GUI_EXPORT QS60MainAppUi : public CAknAppUi
+class Q_GUI_EXPORT QS60MainAppUi : public QS60MainAppUiBase
{
public:
QS60MainAppUi();
@@ -63,7 +109,7 @@ public:
virtual void ConstructL();
- virtual void RestoreMenuL(CCoeControl* menuWindow,TInt resourceId,TMenuType menuType);
+ virtual void RestoreMenuL(CCoeControl *menuWindow,TInt resourceId,TMenuType menuType);
virtual void DynInitMenuBarL(TInt resourceId, CEikMenuBar *menuBar);
virtual void DynInitMenuPaneL(TInt resourceId, CEikMenuPane *menuPane);
@@ -74,13 +120,32 @@ public:
virtual void HandleStatusPaneSizeChange();
protected:
- virtual void HandleWsEventL(const TWsEvent& event, CCoeControl* destination);
+ virtual void HandleWsEventL(const TWsEvent &event, CCoeControl *destination);
+
+public:
+ virtual void Exit();
+ virtual void SetFadedL(TBool aFaded);
+ virtual TRect ApplicationRect() const;
+ virtual void ProcessCommandL(TInt aCommand);
+ virtual TErrorHandlerResponse HandleError (TInt aError, const SExtendedError &aExtErr, TDes &aErrorText, TDes &aContextText);
+ virtual void HandleViewDeactivation(const TVwsViewId &aViewIdToBeDeactivated, const TVwsViewId &aNewlyActivatedViewId);
+ virtual void PrepareToExit();
+ virtual void HandleTouchPaneSizeChange();
+
+protected:
+ virtual void HandleScreenDeviceChangedL();
+ virtual void HandleApplicationSpecificEventL(TInt aType, const TWsEvent &aEvent);
+ virtual TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
+ virtual void HandleSystemEventL(const TWsEvent &aEvent);
+ virtual void Reserved_MtsmPosition();
+ virtual void Reserved_MtsmObject();
+ virtual void HandleForegroundEventL(TBool aForeground);
};
QT_END_NAMESPACE
QT_END_HEADER
-#endif // Q_WS_S60
+#endif // Q_OS_SYMBIAN
#endif // QS60MAINAPPUI_H
diff --git a/src/gui/s60framework/qs60maindocument.cpp b/src/gui/s60framework/qs60maindocument.cpp
index 487e067..ed33a41 100644
--- a/src/gui/s60framework/qs60maindocument.cpp
+++ b/src/gui/s60framework/qs60maindocument.cpp
@@ -57,15 +57,15 @@ QT_BEGIN_NAMESPACE
The QS60MainDocument provides a helper class for use in migrating
from existing S60 based applications to Qt based applications. It is
- used in the exact same way as the \c CAknDocument class from
+ used in the exact same way as the \c CEikDocument class from
Symbian, but internally provides extensions used by Qt.
When modifying old S60 applications that rely on implementing
- functions in \c CAknDocument, the class should be modified to
- inherit from this class instead of \c CAknDocument. Then the
+ functions in \c CEikDocument, the class should be modified to
+ inherit from this class instead of \c CEikDocument. Then the
application can choose to override only certain functions.
- For more information on \c CAknDocument, please see the S60
+ For more information on \c CEikDocument, please see the S60
documentation.
Unlike other Qt classes, QS60MainDocument behaves like an S60 class,
@@ -79,8 +79,8 @@ QT_BEGIN_NAMESPACE
*
* \a mainApplication should contain a pointer to a QS60MainApplication instance.
*/
-QS60MainDocument::QS60MainDocument(CEikApplication& mainApplication)
- : CAknDocument(mainApplication)
+QS60MainDocument::QS60MainDocument(CEikApplication &mainApplication)
+ : QS60MainDocumentBase(mainApplication)
{
// No implementation required
}
@@ -105,4 +105,14 @@ CEikAppUi *QS60MainDocument::CreateAppUiL()
return (static_cast <CEikAppUi*>(new(ELeave)QS60MainAppUi));
}
+CFileStore *QS60MainDocument::OpenFileL(TBool aDoOpen, const TDesC &aFilename, RFs &aFs)
+{
+ return QS60MainDocumentBase::OpenFileL(aDoOpen, aFilename, aFs);
+}
+
+void QS60MainDocument::OpenFileL(CFileStore *&aFileStore, RFile &aFile)
+{
+ QS60MainDocumentBase::OpenFileL(aFileStore, aFile);
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/s60framework/qs60maindocument.h b/src/gui/s60framework/qs60maindocument.h
index 553675f..2f0564f 100644
--- a/src/gui/s60framework/qs60maindocument.h
+++ b/src/gui/s60framework/qs60maindocument.h
@@ -44,9 +44,15 @@
#include <QtCore/qglobal.h>
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
-#include <AknDoc.h>
+#ifdef Q_WS_S60
+#include <akndoc.h>
+typedef CAknDocument QS60MainDocumentBase;
+#else
+#include <eikdoc.h>
+typedef CEikDocument QS60MainDocumentBase;
+#endif
class CEikApplication;
@@ -58,7 +64,7 @@ QT_MODULE(Gui)
class QS60MainAppUi;
-class Q_GUI_EXPORT QS60MainDocument : public CAknDocument
+class Q_GUI_EXPORT QS60MainDocument : public QS60MainDocumentBase
{
public:
@@ -69,12 +75,18 @@ public:
public:
virtual CEikAppUi *CreateAppUiL();
+
+public:
+
+ virtual CFileStore *OpenFileL(TBool aDoOpen, const TDesC &aFilename, RFs &aFs);
+
+ virtual void OpenFileL(CFileStore *&aFileStore, RFile &aFile);
};
QT_END_NAMESPACE
QT_END_HEADER
-#endif // Q_WS_S60
+#endif // Q_OS_SYMBIAN
#endif // QS60MAINDOCUMENT_H
diff --git a/src/gui/s60framework/s60framework.pri b/src/gui/s60framework/s60framework.pri
index f9d89dc..edbacc0 100644
--- a/src/gui/s60framework/s60framework.pri
+++ b/src/gui/s60framework/s60framework.pri
@@ -1,16 +1,20 @@
+contains(QT_CONFIG, s60) {
# This block serves the minimalistic resource file for S60 3.1 platforms.
# Note there is no way to ifdef S60 version in mmp file, that is why the resource
# file is always compiled for WINSCW
-minimalAppResource31 = \
- "SOURCEPATH s60framework" \
- "START RESOURCE s60main.rss" \
- "TARGET s60main$${QT_LIBINFIX}" \
- "HEADER" \
- "TARGETPATH /resource/apps" \
- "END"
-MMP_RULES += minimalAppResource31
-SYMBIAN_RESOURCES += s60framework/s60main.rss
+ minimalAppResource31 = \
+ "SOURCEPATH s60framework" \
+ "START RESOURCE s60main.rss" \
+ "TARGET s60main$${QT_LIBINFIX}" \
+ "HEADER" \
+ "TARGETPATH /resource/apps" \
+ "END"
+
+ MMP_RULES += minimalAppResource31
+
+ SYMBIAN_RESOURCES += s60framework/s60main.rss
+}
SOURCES += s60framework/qs60mainapplication.cpp \
s60framework/qs60mainappui.cpp \
diff --git a/src/gui/styles/qs60style.h b/src/gui/styles/qs60style.h
index c878538..f588d9f 100644
--- a/src/gui/styles/qs60style.h
+++ b/src/gui/styles/qs60style.h
@@ -50,8 +50,6 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
-#if !defined(QT_NO_STYLE_S60)
-
//Public custom pixel metrics values.
//These can be used to fetch custom pixel metric value from outside QS60Style.
enum {
@@ -91,14 +89,14 @@ public:
#endif
bool event(QEvent *e);
-#ifndef Q_WS_S60
+#ifndef Q_OS_SYMBIAN
static QStringList partKeys();
static QStringList colorListKeys();
void setS60Theme(const QHash<QString, QPicture> &parts,
const QHash<QPair<QString , int>, QColor> &colors);
bool loadS60ThemeFromBlob(const QString &blobFile);
bool saveS60ThemeToBlob(const QString &blobFile) const;
-#endif // !Q_WS_S60
+#endif // !Q_OS_SYMBIAN
protected Q_SLOTS:
QIcon standardIconImplementation(
@@ -113,8 +111,6 @@ private:
friend class QApplicationPrivate;
};
-#endif // QT_NO_STYLE_S60
-
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/gui/styles/qs60style_stub.cpp b/src/gui/styles/qs60style_stub.cpp
new file mode 100644
index 0000000..a3a5b9d
--- /dev/null
+++ b/src/gui/styles/qs60style_stub.cpp
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qs60style.h"
+#include "qdebug.h"
+
+#if defined(QT_NO_STYLE_S60)
+QT_BEGIN_NAMESPACE
+
+QS60Style::QS60Style()
+{
+ qWarning() << "QS60Style stub created";
+}
+
+QS60Style::~QS60Style()
+{
+}
+
+void QS60Style::drawComplexControl(ComplexControl , const QStyleOptionComplex *, QPainter *, const QWidget *) const
+{
+}
+
+void QS60Style::drawControl(ControlElement , const QStyleOption *, QPainter *, const QWidget *) const
+{
+}
+
+void QS60Style::drawPrimitive(PrimitiveElement , const QStyleOption *, QPainter *, const QWidget *) const
+{
+}
+
+int QS60Style::pixelMetric(PixelMetric , const QStyleOption *, const QWidget *) const
+{
+ return 0;
+}
+
+QSize QS60Style::sizeFromContents(ContentsType , const QStyleOption *, const QSize &, const QWidget *) const
+{
+ return QSize();
+}
+
+int QS60Style::styleHint(StyleHint , const QStyleOption *, const QWidget *, QStyleHintReturn *) const
+{
+ return 0;
+}
+
+QRect QS60Style::subControlRect(ComplexControl , const QStyleOptionComplex *, SubControl , const QWidget *) const
+{
+ return QRect();
+}
+
+QRect QS60Style::subElementRect(SubElement , const QStyleOption *, const QWidget *) const
+{
+ return QRect();
+}
+
+void QS60Style::polish(QWidget *)
+{
+}
+
+void QS60Style::unpolish(QWidget *)
+{
+}
+
+void QS60Style::polish(QApplication *)
+{
+}
+
+void QS60Style::unpolish(QApplication *)
+{
+}
+
+bool QS60Style::event(QEvent *)
+{
+ return false;
+}
+
+QIcon QS60Style::standardIconImplementation(StandardPixmap , const QStyleOption *, const QWidget *) const
+{
+ return QIcon();
+}
+
+void QS60Style::timerEvent(QTimerEvent *)
+{
+}
+
+bool QS60Style::eventFilter(QObject *, QEvent *)
+{
+ return false;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_STYLE_S60
diff --git a/src/gui/styles/styles.pri b/src/gui/styles/styles.pri
index 0a96272..b22a908 100644
--- a/src/gui/styles/styles.pri
+++ b/src/gui/styles/styles.pri
@@ -182,5 +182,9 @@ contains( styles, s60 ):contains(QT_CONFIG, s60) {
RESOURCES += styles/qstyle_s60_simulated.qrc
}
} else {
+ symbian {
+ HEADERS += styles/qs60style.h
+ SOURCES += styles/qs60style_stub.cpp
+ }
DEFINES += QT_NO_STYLE_S60
}
diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp
index a415180..24f6ccf 100644
--- a/src/gui/util/qdesktopservices_s60.cpp
+++ b/src/gui/util/qdesktopservices_s60.cpp
@@ -39,9 +39,6 @@
**
****************************************************************************/
-// This flag changes the implementation to use S60 CDcoumentHandler
-// instead of apparch when opening the files
-#define USE_DOCUMENTHANDLER
#include <qcoreapplication.h>
#include <qdir.h>
@@ -56,10 +53,16 @@
#include <rsendas.h> // RSendAs
#include <rsendasmessage.h> // RSendAsMessage
+#ifdef Q_WS_S60
+// This flag changes the implementation to use S60 CDcoumentHandler
+// instead of apparch when opening the files
+#define USE_DOCUMENTHANDLER
+#endif
+
// copied from miutset.h, so we don't get a dependency into the app layer
const TUid KUidMsgTypeSMTP = {0x10001028}; // 268439592
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
# include <pathinfo.h> // PathInfo
# ifdef USE_DOCUMENTHANDLER
# include <DocumentHandler.h> // CDocumentHandler
@@ -264,7 +267,7 @@ static TDriveUnit writableExeDrive()
static TPtrC writableDataRoot()
{
TDriveUnit drive = exeDrive();
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
switch(drive.operator TInt()){
case EDriveC:
return PathInfo::PhoneMemoryRootPath();
@@ -391,19 +394,19 @@ QString QDesktopServices::storageLocation(StandardLocation type)
break;
case MusicLocation:
path.Append(writableDataRoot());
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
path.Append(PathInfo::SoundsPath());
#endif
break;
case MoviesLocation:
path.Append(writableDataRoot());
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
path.Append(PathInfo::VideosPath());
#endif
break;
case PicturesLocation:
path.Append(writableDataRoot());
-#ifdef Q_WS_S60
+#ifdef Q_OS_SYMBIAN
path.Append(PathInfo::ImagesPath());
#endif
break;
diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri
index be8db93..bea520e 100644
--- a/src/gui/util/util.pri
+++ b/src/gui/util/util.pri
@@ -43,9 +43,8 @@ embedded {
}
symbian {
- LIBS += -lsendas2 -letext -lapmime
+ LIBS += -lsendas2 -letext -lapmime -lplatformenv
contains(QT_CONFIG, s60) {
- LIBS += -lplatformenv
contains(CONFIG, is_using_gnupoc) {
LIBS += -lcommonui
} else {
diff --git a/src/gui/widgets/qmenubar_p.h b/src/gui/widgets/qmenubar_p.h
index 82070fe..fc6701c 100644
--- a/src/gui/widgets/qmenubar_p.h
+++ b/src/gui/widgets/qmenubar_p.h
@@ -269,10 +269,10 @@ public:
} *symbian_menubar;
static int symbianCommands(int command);
+#endif
#ifdef QT_SOFTKEYS_ENABLED
QAction *menuBarAction;
#endif
-#endif
};
#endif
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 6e20131..de8e052 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -8181,7 +8181,7 @@ EXPORTS
?rowsInserted@QTreeView@@MAEXABVQModelIndex@@HH@Z @ 8180 NONAME ; void QTreeView::rowsInserted(class QModelIndex const &, int, int)
?rowsRemoved@QTreeView@@IAEXABVQModelIndex@@HH@Z @ 8181 NONAME ; void QTreeView::rowsRemoved(class QModelIndex const &, int, int)
?rubberBandSelectionMode@QGraphicsView@@QBE?AW4ItemSelectionMode@Qt@@XZ @ 8182 NONAME ; enum Qt::ItemSelectionMode QGraphicsView::rubberBandSelectionMode(void) const
- ?s60AdjustedPosition@QDialog@@AAE_NXZ @ 8183 NONAME ; bool QDialog::s60AdjustedPosition(void)
+ ?symbianAdjustedPosition@QDialog@@AAE_NXZ @ 8183 NONAME ; bool QDialog::symbianAdjustedPosition(void)
?s60UpdateIsOpaque@QWidgetPrivate@@QAEXXZ @ 8184 NONAME ; void QWidgetPrivate::s60UpdateIsOpaque(void)
?saturation@QColor@@QBEHXZ @ 8185 NONAME ; int QColor::saturation(void) const
?saturationF@QColor@@QBEMXZ @ 8186 NONAME ; float QColor::saturationF(void) const
@@ -12824,4 +12824,24 @@ EXPORTS
?createPixmapForImage@QRasterPixmapData@@IAEXAAVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@_N@Z @ 12823 NONAME ; void QRasterPixmapData::createPixmapForImage(class QImage &, class QFlags<enum Qt::ImageConversionFlag>, bool)
??0Tab@QTextOption@@QAE@MW4TabType@1@VQChar@@@Z @ 12824 NONAME ; QTextOption::Tab::Tab(float, enum QTextOption::TabType, class QChar)
?fromData@QRasterPixmapData@@UAE_NPBEIPBDV?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 12825 NONAME ; bool QRasterPixmapData::fromData(unsigned char const *, unsigned int, char const *, class QFlags<enum Qt::ImageConversionFlag>)
+ ?OpenIniFileLC@QS60MainApplication@@UBEPAVCDictionaryStore@@AAVRFs@@@Z @ 12826 NONAME ; class CDictionaryStore * QS60MainApplication::OpenIniFileLC(class RFs &) const
+ ?Reserved_MtsmObject@QS60MainAppUi@@MAEXXZ @ 12827 NONAME ; void QS60MainAppUi::Reserved_MtsmObject(void)
+ ?HandleForegroundEventL@QS60MainAppUi@@MAEXH@Z @ 12828 NONAME ; void QS60MainAppUi::HandleForegroundEventL(int)
+ ?OpenFileL@QS60MainDocument@@UAEPAVCFileStore@@HABVTDesC16@@AAVRFs@@@Z @ 12829 NONAME ; class CFileStore * QS60MainDocument::OpenFileL(int, class TDesC16 const &, class RFs &)
+ ?HandleTouchPaneSizeChange@QS60MainAppUi@@UAEXXZ @ 12830 NONAME ; void QS60MainAppUi::HandleTouchPaneSizeChange(void)
+ ?Reserved_MtsmPosition@QS60MainAppUi@@MAEXXZ @ 12831 NONAME ; void QS60MainAppUi::Reserved_MtsmPosition(void)
+ ?ApplicationRect@QS60MainAppUi@@UBE?AVTRect@@XZ @ 12832 NONAME ; class TRect QS60MainAppUi::ApplicationRect(void) const
+ ?HandleSystemEventL@QS60MainAppUi@@MAEXABVTWsEvent@@@Z @ 12833 NONAME ; void QS60MainAppUi::HandleSystemEventL(class TWsEvent const &)
+ ?HandleApplicationSpecificEventL@QS60MainAppUi@@MAEXHABVTWsEvent@@@Z @ 12834 NONAME ; void QS60MainAppUi::HandleApplicationSpecificEventL(int, class TWsEvent const &)
+ ?HandleError@QS60MainAppUi@@UAE?AW4TErrorHandlerResponse@@HABUSExtendedError@@AAVTDes16@@1@Z @ 12835 NONAME ; enum TErrorHandlerResponse QS60MainAppUi::HandleError(int, struct SExtendedError const &, class TDes16 &, class TDes16 &)
+ ?PrepareToExit@QS60MainAppUi@@UAEXXZ @ 12836 NONAME ; void QS60MainAppUi::PrepareToExit(void)
+ ?MopSupplyObject@QS60MainAppUi@@MAE?AVPtr@TTypeUid@@V3@@Z @ 12837 NONAME ; class TTypeUid::Ptr QS60MainAppUi::MopSupplyObject(class TTypeUid)
+ ?SetFadedL@QS60MainAppUi@@UAEXH@Z @ 12838 NONAME ; void QS60MainAppUi::SetFadedL(int)
+ ?Exit@QS60MainAppUi@@UAEXXZ @ 12839 NONAME ; void QS60MainAppUi::Exit(void)
+ ?ProcessCommandL@QS60MainAppUi@@UAEXH@Z @ 12840 NONAME ; void QS60MainAppUi::ProcessCommandL(int)
+ ?OpenFileL@QS60MainDocument@@UAEXAAPAVCFileStore@@AAVRFile@@@Z @ 12841 NONAME ; void QS60MainDocument::OpenFileL(class CFileStore * &, class RFile &)
+ ?HandleScreenDeviceChangedL@QS60MainAppUi@@MAEXXZ @ 12842 NONAME ; void QS60MainAppUi::HandleScreenDeviceChangedL(void)
+ ?PreDocConstructL@QS60MainApplication@@UAEXXZ @ 12843 NONAME ; void QS60MainApplication::PreDocConstructL(void)
+ ?NewAppServerL@QS60MainApplication@@UAEXAAPAVCApaAppServer@@@Z @ 12844 NONAME ; void QS60MainApplication::NewAppServerL(class CApaAppServer * &)
+ ?HandleViewDeactivation@QS60MainAppUi@@UAEXABVTVwsViewId@@0@Z @ 12845 NONAME ; void QS60MainAppUi::HandleViewDeactivation(class TVwsViewId const &, class TVwsViewId const &)
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index e7d865b..5e46a25 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -5957,7 +5957,7 @@ EXPORTS
_ZN7QDialog16staticMetaObjectE @ 5956 NONAME DATA 16
_ZN7QDialog18setSizeGripEnabledEb @ 5957 NONAME
_ZN7QDialog19getStaticMetaObjectEv @ 5958 NONAME
- _ZN7QDialog19s60AdjustedPositionEv @ 5959 NONAME
+ _ZN7QDialog23symbianAdjustedPositionEv @ 5959 NONAME
_ZN7QDialog4doneEi @ 5960 NONAME
_ZN7QDialog4execEv @ 5961 NONAME
_ZN7QDialog4openEv @ 5962 NONAME
@@ -12020,4 +12020,28 @@ EXPORTS
_ZN10QImageData14convertInPlaceEN6QImage6FormatE6QFlagsIN2Qt19ImageConversionFlagEE @ 12019 NONAME
_ZN17QRasterPixmapData20createPixmapForImageER6QImage6QFlagsIN2Qt19ImageConversionFlagEEb @ 12020 NONAME
_ZN17QRasterPixmapData8fromDataEPKhjPKc6QFlagsIN2Qt19ImageConversionFlagEE @ 12021 NONAME
+ _ZN13QS60MainAppUi11HandleErrorEiRK14SExtendedErrorR6TDes16S4_ @ 12022 NONAME
+ _ZN13QS60MainAppUi13PrepareToExitEv @ 12023 NONAME
+ _ZN13QS60MainAppUi15MopSupplyObjectE8TTypeUid @ 12024 NONAME
+ _ZN13QS60MainAppUi15ProcessCommandLEi @ 12025 NONAME
+ _ZN13QS60MainAppUi18HandleSystemEventLERK8TWsEvent @ 12026 NONAME
+ _ZN13QS60MainAppUi19Reserved_MtsmObjectEv @ 12027 NONAME
+ _ZN13QS60MainAppUi21Reserved_MtsmPositionEv @ 12028 NONAME
+ _ZN13QS60MainAppUi22HandleForegroundEventLEi @ 12029 NONAME
+ _ZN13QS60MainAppUi22HandleViewDeactivationERK10TVwsViewIdS2_ @ 12030 NONAME
+ _ZN13QS60MainAppUi25HandleTouchPaneSizeChangeEv @ 12031 NONAME
+ _ZN13QS60MainAppUi26HandleScreenDeviceChangedLEv @ 12032 NONAME
+ _ZN13QS60MainAppUi31HandleApplicationSpecificEventLEiRK8TWsEvent @ 12033 NONAME
+ _ZN13QS60MainAppUi4ExitEv @ 12034 NONAME
+ _ZN13QS60MainAppUi9SetFadedLEi @ 12035 NONAME
+ _ZN16QS60MainDocument9OpenFileLERP10CFileStoreR5RFile @ 12036 NONAME
+ _ZN16QS60MainDocument9OpenFileLEiRK7TDesC16R3RFs @ 12037 NONAME
+ _ZN19QS60MainApplication13NewAppServerLERP13CApaAppServer @ 12038 NONAME
+ _ZN19QS60MainApplication16PreDocConstructLEv @ 12039 NONAME
+ _ZNK13QS60MainAppUi15ApplicationRectEv @ 12040 NONAME
+ _ZNK19QS60MainApplication13OpenIniFileLCER3RFs @ 12041 NONAME
+ _ZThn100_N13QS60MainAppUi25HandleTouchPaneSizeChangeEv @ 12042 NONAME
+ _ZThn24_N13QS60MainAppUi15ProcessCommandLEi @ 12043 NONAME
+ _ZThn40_N13QS60MainAppUi15MopSupplyObjectE8TTypeUid @ 12044 NONAME
+ _ZThn92_N13QS60MainAppUi22HandleViewDeactivationERK10TVwsViewIdS2_ @ 12045 NONAME