diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-03-18 12:40:46 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-03-19 09:57:52 (GMT) |
commit | 4542e8dbc2aeb942a8c963724c02da5220deef4f (patch) | |
tree | d5796315dd3b81812c7a76b4e24c6ce381f62e8d | |
parent | b45f6f856fe72629e2e0752fc8732de487278f41 (diff) | |
download | Qt-4542e8dbc2aeb942a8c963724c02da5220deef4f.zip Qt-4542e8dbc2aeb942a8c963724c02da5220deef4f.tar.gz Qt-4542e8dbc2aeb942a8c963724c02da5220deef4f.tar.bz2 |
Enable s60main.rsc infixing.
Now s60main.rsc file is also infixed, making infixed and vanilla builds
indepenendent of each other.
Task-number: QTBUG-9065
Reviewed-by: Shane Kearns
-rw-r--r-- | src/corelib/kernel/qcore_symbian_p.cpp | 25 | ||||
-rw-r--r-- | src/corelib/kernel/qcore_symbian_p.h | 9 | ||||
-rw-r--r-- | src/gui/s60framework/qs60mainapplication.cpp | 7 | ||||
-rw-r--r-- | src/gui/s60framework/qs60mainappui.cpp | 10 | ||||
-rw-r--r-- | src/gui/s60framework/s60framework.pri | 3 | ||||
-rw-r--r-- | src/s60installs/s60installs.pro | 8 |
6 files changed, 32 insertions, 30 deletions
diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp index a0a80c8..402eccf 100644 --- a/src/corelib/kernel/qcore_symbian_p.cpp +++ b/src/corelib/kernel/qcore_symbian_p.cpp @@ -132,27 +132,10 @@ private: void init() { #ifdef Q_WS_S60 -# if defined(QT_LIBINFIX) -# define S60_LIBNAME_3_1 "qts60plugin_3_1" QT_LIBINFIX ".dll" -# define S60_LIBNAME_3_2 "qts60plugin_3_2" QT_LIBINFIX ".dll" -# define S60_LIBNAME_5_0 "qts60plugin_5_0" QT_LIBINFIX ".dll" - - TPtrC8 ptrLibName_3_1(reinterpret_cast<const TUint8 *>(S60_LIBNAME_3_1)); - TPtrC8 ptrLibName_3_2(reinterpret_cast<const TUint8 *>(S60_LIBNAME_3_2)); - TPtrC8 ptrLibName_5_0(reinterpret_cast<const TUint8 *>(S60_LIBNAME_5_0)); - - TFileName KLibName_3_1; - TFileName KLibName_3_2; - TFileName KLibName_5_0; - - KLibName_3_1.Copy(ptrLibName_3_1); - KLibName_3_2.Copy(ptrLibName_3_2); - KLibName_5_0.Copy(ptrLibName_5_0); -# else - _LIT(KLibName_3_1, "qts60plugin_3_1.dll"); - _LIT(KLibName_3_2, "qts60plugin_3_2.dll"); - _LIT(KLibName_5_0, "qts60plugin_5_0.dll"); -# endif + _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"); + TPtrC libName; TInt uidValue; switch (QSysInfo::s60Version()) { diff --git a/src/corelib/kernel/qcore_symbian_p.h b/src/corelib/kernel/qcore_symbian_p.h index 9f282d5..4a515ce 100644 --- a/src/corelib/kernel/qcore_symbian_p.h +++ b/src/corelib/kernel/qcore_symbian_p.h @@ -60,6 +60,15 @@ #include <qhash.h> #include <f32file.h> +#define QT_LSTRING2(x) L##x +#define QT_LSTRING(x) QT_LSTRING2(x) + +#if defined(QT_LIBINFIX) +# define QT_LIBINFIX_UNICODE QT_LSTRING(QT_LIBINFIX) +#else +# define QT_LIBINFIX_UNICODE L"" +#endif + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/gui/s60framework/qs60mainapplication.cpp b/src/gui/s60framework/qs60mainapplication.cpp index 2a7c4aa..41ac1a8 100644 --- a/src/gui/s60framework/qs60mainapplication.cpp +++ b/src/gui/s60framework/qs60mainapplication.cpp @@ -41,6 +41,7 @@ // INCLUDE FILES #include <exception> +#include <private/qcore_symbian_p.h> #include "qs60maindocument.h" #include "qs60mainapplication_p.h" #include "qs60mainapplication.h" @@ -57,17 +58,17 @@ CApaApplication *newS60Application() return new QS60MainApplication; } -_LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main.rsc"); +_LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main" QT_LIBINFIX_UNICODE L".rsc"); /*! \class QS60MainApplication \since 4.6 \brief The QS60MainApplication class provides support for migration from S60. - + \warning This class is provided only to get access to S60 specific functionality in the application framework classes. It is not portable. We strongly recommend against using it in new applications. - + 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 diff --git a/src/gui/s60framework/qs60mainappui.cpp b/src/gui/s60framework/qs60mainappui.cpp index 012985b..3b5b9d3 100644 --- a/src/gui/s60framework/qs60mainappui.cpp +++ b/src/gui/s60framework/qs60mainappui.cpp @@ -45,7 +45,15 @@ #include <eikmenub.h> #include <eikmenup.h> #include <barsread.h> -#include <s60main.rsg> +#include <qconfig.h> +#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> +#endif #include <avkon.rsg> #include "qs60mainappui.h" diff --git a/src/gui/s60framework/s60framework.pri b/src/gui/s60framework/s60framework.pri index 6080e6d..d30f80a 100644 --- a/src/gui/s60framework/s60framework.pri +++ b/src/gui/s60framework/s60framework.pri @@ -4,6 +4,7 @@ minimalAppResource31 = \ "SOURCEPATH s60framework" \ "START RESOURCE s60main.rss" \ + "TARGET s60main$${QT_LIBINFIX}" \ "HEADER" \ "TARGETPATH /resource/apps" \ "END" @@ -17,3 +18,5 @@ HEADERS += s60framework/qs60mainapplication_p.h \ s60framework/qs60mainapplication.h \ s60framework/qs60mainappui.h \ s60framework/qs60maindocument.h + +!isEmpty(QT_LIBINFIX): DEFINES += QT_LIBINFIX_UNQUOTED=$$QT_LIBINFIX
\ No newline at end of file diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index ec03673..1f6e72b 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -12,10 +12,7 @@ symbian: { isEmpty(QT_LIBINFIX) { TARGET.UID3 = 0x2001E61C - # s60main.rsc and sqlite3 are expected to be already found on phone if - # infixed configuration is built. - DEPLOYMENT += qtresources - + # sqlite3 is expected to be already found on phone if infixed configuration is built. sqlitedeployment = \ "; Deploy sqlite onto phone that does not have it already" \ "@\"$$PWD/sqlite3.sis\", (0x2002af5f)" @@ -26,8 +23,9 @@ symbian: { } VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} - qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main.rsc + qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main$${QT_LIBINFIX}.rsc qtresources.path = c:$$APP_RESOURCE_DIR + DEPLOYMENT += qtresources qtlibraries.sources = \ QtCore$${QT_LIBINFIX}.dll \ |