summaryrefslogtreecommitdiffstats
path: root/src/gui/s60framework
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2010-10-07 09:41:03 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2010-10-07 12:59:43 (GMT)
commita3c755e358596238dc7fc1c284328a6226c2ed3a (patch)
tree2cb4ef96c1344ed3115777d9196ca291eecdea52 /src/gui/s60framework
parent8082a800a55875fd2e64cf2ab5c6fa2c26722132 (diff)
downloadQt-a3c755e358596238dc7fc1c284328a6226c2ed3a.zip
Qt-a3c755e358596238dc7fc1c284328a6226c2ed3a.tar.gz
Qt-a3c755e358596238dc7fc1c284328a6226c2ed3a.tar.bz2
Removed the need for S60main.rsc resource file in Symbian.
Qt upgrade was failing since the s60main.rsc is being locked by S60 application framework. And when installer detects that old version of Qt has already been installed it first tries to uninstall the old one and then install the new one. The uninstallion failed since the file was locked by the running Qt application. It should be noted that this patch fixes the Qt upgradibility only for Qt versions where patch is included. I.e. the versions before 4.7.2 need a different mechanism to be upgradable. This different mechanism is based on partial upgrade SIS packages as described in QT-4052. Task-number: QT-3471 Reviewed-by: Axis
Diffstat (limited to 'src/gui/s60framework')
-rw-r--r--src/gui/s60framework/qs60mainapplication.cpp5
-rw-r--r--src/gui/s60framework/qs60mainappui.cpp28
-rw-r--r--src/gui/s60framework/s60framework.pri18
3 files changed, 14 insertions, 37 deletions
diff --git a/src/gui/s60framework/qs60mainapplication.cpp b/src/gui/s60framework/qs60mainapplication.cpp
index 5d4c54e..74432af 100644
--- a/src/gui/s60framework/qs60mainapplication.cpp
+++ b/src/gui/s60framework/qs60mainapplication.cpp
@@ -58,7 +58,6 @@ CApaApplication *newS60Application()
return new QS60MainApplication;
}
-_LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main" QT_LIBINFIX_UNICODE L".rsc");
/*!
\class QS60MainApplication
@@ -129,10 +128,6 @@ TUid QS60MainApplication::AppDllUid() const
*/
TFileName QS60MainApplication::ResourceFileName() const
{
- TFindFile finder(iCoeEnv->FsSession());
- TInt err = finder.FindByDir(KQtWrapperResourceFile, KNullDesC);
- if (err == KErrNone)
- return finder.File();
return KNullDesC();
}
diff --git a/src/gui/s60framework/qs60mainappui.cpp b/src/gui/s60framework/qs60mainappui.cpp
index ea9dbb3..92b3b55 100644
--- a/src/gui/s60framework/qs60mainappui.cpp
+++ b/src/gui/s60framework/qs60mainappui.cpp
@@ -50,16 +50,6 @@
#endif
#include <barsread.h>
#include <qconfig.h>
-#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>
-# endif
-#endif
#include "qs60mainappui.h"
#include <QtGui/qapplication.h>
@@ -125,8 +115,8 @@ void QS60MainAppUi::ConstructL()
#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.
+ // 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
@@ -244,7 +234,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 (resourceId == R_AVKON_MENUPANE_EMPTY) {
if (menuPane->NumberOfItemsInPane() <= 1)
QT_TRYCATCH_LEAVING(qt_symbian_show_toplevel(menuPane));
@@ -274,7 +264,17 @@ void QS60MainAppUi::RestoreMenuL(CCoeControl *menuWindow, TInt resourceId, TMenu
DynInitMenuPaneL(resourceId, (CEikMenuPane*)menuWindow);
else
DynInitMenuBarL(resourceId, (CEikMenuBar*)menuWindow);
- } else
+ } else if(resourceId == R_AVKON_MENUPANE_EMPTY) {
+ CEikMenuBarTitle *title = new(ELeave) CEikMenuBarTitle;
+ CleanupStack::PushL(title);
+
+ title->iData.iMenuPaneResourceId = R_AVKON_MENUPANE_EMPTY;
+ title->iTitleFlags = 0;
+
+ S60->menuBar()->TitleArray()->AddTitleL(title);
+ CleanupStack::Pop( title );
+ }
+ else
#endif
{
QS60MainAppUiBase::RestoreMenuL(menuWindow, resourceId, menuType);
diff --git a/src/gui/s60framework/s60framework.pri b/src/gui/s60framework/s60framework.pri
index edbacc0..19525b7 100644
--- a/src/gui/s60framework/s60framework.pri
+++ b/src/gui/s60framework/s60framework.pri
@@ -1,21 +1,3 @@
-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
-}
-
SOURCES += s60framework/qs60mainapplication.cpp \
s60framework/qs60mainappui.cpp \
s60framework/qs60maindocument.cpp