summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-12 13:46:14 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-12 13:46:14 (GMT)
commitda71781844f85d5f66ca676a21fa2c0896e35e06 (patch)
tree9486fda1d88db9443192aea45304be107bc9061b
parent76c0bc4f95fce3c5fd9f77b778180d1b50b2b095 (diff)
parentf87f8078cdda79aad81cbd3fab3c5077bef3e2f6 (diff)
downloadQt-da71781844f85d5f66ca676a21fa2c0896e35e06.zip
Qt-da71781844f85d5f66ca676a21fa2c0896e35e06.tar.gz
Qt-da71781844f85d5f66ca676a21fa2c0896e35e06.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fixed filename cases to support building Qt for Symbian in Linux Moved softkey "Options" action handling from QMainWindow to QMenuBar.
-rw-r--r--src/gui/kernel/qapplication_s60.cpp2
-rw-r--r--src/gui/kernel/qdnd_s60.cpp2
-rw-r--r--src/gui/kernel/qsound_s60.cpp2
-rw-r--r--src/gui/kernel/qt_s60_p.h4
-rw-r--r--src/gui/s60framework/qs60maindocument.h2
-rw-r--r--src/gui/s60framework/s60framework.pri2
-rw-r--r--src/gui/styles/qs60style_s60.cpp14
-rw-r--r--src/gui/styles/styles.pri24
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp2
-rw-r--r--src/gui/text/qfontengine_s60_p.h2
-rw-r--r--src/gui/util/qdesktopservices_s60.cpp4
-rw-r--r--src/gui/util/util.pri2
-rw-r--r--src/gui/widgets/qmainwindow.cpp25
-rw-r--r--src/gui/widgets/qmenu_symbian.cpp8
-rw-r--r--src/gui/widgets/qmenubar.cpp51
-rw-r--r--src/gui/widgets/qmenubar_p.h5
-rw-r--r--src/plugins/s60/3_2/3_2.pro2
-rw-r--r--src/plugins/s60/5_0/5_0.pro2
-rw-r--r--src/plugins/s60/src/qdesktopservices_3_2.cpp2
19 files changed, 89 insertions, 68 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 79b2bff..4a15cf2 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -63,7 +63,7 @@
#include "private/qsoftkeymanager_p.h"
#include "apgwgnam.h" // For CApaWindowGroupName
-#include <MdaAudioTonePlayer.h> // For CMdaAudioToneUtility
+#include <mdaaudiotoneplayer.h> // For CMdaAudioToneUtility
#if defined(Q_WS_S60)
# if !defined(QT_NO_IM)
diff --git a/src/gui/kernel/qdnd_s60.cpp b/src/gui/kernel/qdnd_s60.cpp
index 24f0090..1aa30af 100644
--- a/src/gui/kernel/qdnd_s60.cpp
+++ b/src/gui/kernel/qdnd_s60.cpp
@@ -52,7 +52,7 @@
#include "qdnd_p.h"
#include "qt_s60_p.h"
-#include <COECNTRL.H>
+#include <coecntrl.h>
// pointer cursor
#include <w32std.h>
#include <gdi.h>
diff --git a/src/gui/kernel/qsound_s60.cpp b/src/gui/kernel/qsound_s60.cpp
index 1832b85..df2830b 100644
--- a/src/gui/kernel/qsound_s60.cpp
+++ b/src/gui/kernel/qsound_s60.cpp
@@ -51,7 +51,7 @@
#include <private/qcore_symbian_p.h>
#include <e32std.h>
-#include <MdaAudioSamplePlayer.h>
+#include <mdaaudiosampleplayer.h>
QT_BEGIN_NAMESPACE
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 735ca7a..cedede1 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -68,12 +68,12 @@
#include <eikappui.h>
#ifdef Q_WS_S60
-#include <aknutils.h> // AknLayoutUtils
+#include <AknUtils.h> // AknLayoutUtils
#include <avkon.hrh> // EEikStatusPaneUidTitle
#include <akntitle.h> // CAknTitlePane
#include <akncontext.h> // CAknContextPane
#include <eikspane.h> // CEikStatusPane
-#include <aknpopupfader.h> // MAknFadedComponent and TAknPopupFader
+#include <AknPopupFader.h> // MAknFadedComponent and TAknPopupFader
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/gui/s60framework/qs60maindocument.h b/src/gui/s60framework/qs60maindocument.h
index 438b80c..553675f 100644
--- a/src/gui/s60framework/qs60maindocument.h
+++ b/src/gui/s60framework/qs60maindocument.h
@@ -46,7 +46,7 @@
#ifdef Q_WS_S60
-#include <akndoc.h>
+#include <AknDoc.h>
class CEikApplication;
diff --git a/src/gui/s60framework/s60framework.pri b/src/gui/s60framework/s60framework.pri
index 5884b68..6080e6d 100644
--- a/src/gui/s60framework/s60framework.pri
+++ b/src/gui/s60framework/s60framework.pri
@@ -5,7 +5,7 @@ minimalAppResource31 = \
"SOURCEPATH s60framework" \
"START RESOURCE s60main.rss" \
"HEADER" \
- "TARGETPATH resource\apps" \
+ "TARGETPATH /resource/apps" \
"END"
MMP_RULES += minimalAppResource31
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index d57b187..5202701 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -50,17 +50,17 @@
#include "qapplication.h"
#include <w32std.h>
-#include <aknsconstants.h>
+#include <AknsConstants.h>
#include <aknconsts.h>
-#include <aknsitemid.h>
-#include <aknsutils.h>
-#include <aknsdrawutils.h>
-#include <aknsskininstance.h>
-#include <aknsbasicbackgroundcontrolcontext.h>
+#include <AknsItemID.h>
+#include <AknsUtils.h>
+#include <AknsDrawUtils.h>
+#include <AknsSkinInstance.h>
+#include <AknsBasicBackgroundControlContext.h>
#include <avkon.mbg>
#include <AknFontAccess.h>
#include <AknLayoutFont.h>
-#include <aknutils.h>
+#include <AknUtils.h>
#include <aknnavi.h>
#include <gulicon.h>
#include <AknBitmapAnimation.h>
diff --git a/src/gui/styles/styles.pri b/src/gui/styles/styles.pri
index 676f59e..5084442 100644
--- a/src/gui/styles/styles.pri
+++ b/src/gui/styles/styles.pri
@@ -164,17 +164,17 @@ contains( styles, windowsmobile ) {
}
contains( styles, s60 ):contains(QT_CONFIG, s60) {
- HEADERS += \
- styles/qs60style.h \
- styles/qs60style_p.h
- SOURCES += styles/qs60style.cpp
- symbian {
- SOURCES += styles/qs60style_s60.cpp
- LIBS += -laknicon -laknskins -laknskinsrv -lfontutils -legul -lbmpanim
- } else {
- SOURCES += styles/qs60style_simulated.cpp
- RESOURCES += styles/qstyle_s60_simulated.qrc
- }
+ HEADERS += \
+ styles/qs60style.h \
+ styles/qs60style_p.h
+ SOURCES += styles/qs60style.cpp
+ symbian {
+ SOURCES += styles/qs60style_s60.cpp
+ LIBS += -lAknIcon -lAKNSKINS -lAKNSKINSRV -lFontUtils -legul -lbmpanim
+ } else {
+ SOURCES += styles/qs60style_simulated.cpp
+ RESOURCES += styles/qstyle_s60_simulated.qrc
+ }
} else {
- DEFINES += QT_NO_STYLE_S60
+ DEFINES += QT_NO_STYLE_S60
}
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 7e5397d..87a73df 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -50,7 +50,7 @@
#include "qendian.h"
#include <private/qcore_symbian_p.h>
#if defined(QT_NO_FREETYPE)
-#include <OPENFONT.H>
+#include <openfont.h>
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
#include <graphics/openfontrasterizer.h> // COpenFontRasterizer has moved to a new header file
#endif // SYMBIAN_ENABLE_SPLIT_HEADERS
diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h
index 78f8a9a..5834cc4 100644
--- a/src/gui/text/qfontengine_s60_p.h
+++ b/src/gui/text/qfontengine_s60_p.h
@@ -56,7 +56,7 @@
#include "qconfig.h"
#include "qfontengine_p.h"
#include "qsize.h"
-#include <OPENFONT.H>
+#include <openfont.h>
class CFont;
diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp
index adc4fc1..39240e6 100644
--- a/src/gui/util/qdesktopservices_s60.cpp
+++ b/src/gui/util/qdesktopservices_s60.cpp
@@ -62,8 +62,8 @@ const TUid KUidMsgTypeSMTP = {0x10001028}; // 268439592
#ifdef Q_WS_S60
# include <pathinfo.h> // PathInfo
# ifdef USE_DOCUMENTHANDLER
-# include <documenthandler.h> // CDocumentHandler
-# include <aknserverapp.h>
+# include <DocumentHandler.h> // CDocumentHandler
+# include <AknServerApp.h>
# endif
#else
# warning CDocumentHandler requires support for S60
diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri
index cdbb7cc..3074367 100644
--- a/src/gui/util/util.pri
+++ b/src/gui/util/util.pri
@@ -41,5 +41,5 @@ embedded {
symbian {
LIBS += -lsendas2 -letext -lapmime
- contains(QT_CONFIG, s60): LIBS += -lplatformenv -lcommonui
+ contains(QT_CONFIG, s60): LIBS += -lplatformenv -lCommonUI
}
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 7e59bb0..16a7c31 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -65,9 +65,6 @@ QT_BEGIN_NAMESPACE
extern OSWindowRef qt_mac_window_for(const QWidget *); // qwidget_mac.cpp
QT_END_NAMESPACE
#endif
-#ifdef QT_SOFTKEYS_ENABLED
-#include <private/qsoftkeymanager_p.h>
-#endif
QT_BEGIN_NAMESPACE
@@ -80,9 +77,6 @@ public:
#ifdef Q_WS_MAC
, useHIToolBar(false)
#endif
-#ifdef QT_SOFTKEYS_ENABLED
- , menuBarAction(0)
-#endif
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
, hasOldCursor(false) , cursorAdjusted(false)
#endif
@@ -94,9 +88,6 @@ public:
#ifdef Q_WS_MAC
bool useHIToolBar;
#endif
-#ifdef QT_SOFTKEYS_ENABLED
- QAction *menuBarAction;
-#endif
void init();
QList<int> hoverSeparator;
QPoint hoverPos;
@@ -117,10 +108,6 @@ void QMainWindowPrivate::init()
const int metric = q->style()->pixelMetric(QStyle::PM_ToolBarIconSize, 0, q);
iconSize = QSize(metric, metric);
q->setAttribute(Qt::WA_Hover);
-#ifdef QT_SOFTKEYS_ENABLED
- menuBarAction = QSoftKeyManager::createAction(QSoftKeyManager::MenuSoftKey, q);
- menuBarAction->setVisible(false);
-#endif
}
/*
@@ -492,13 +479,6 @@ void QMainWindow::setMenuBar(QMenuBar *menuBar)
oldMenuBar->deleteLater();
}
d->layout->setMenuBar(menuBar);
-
-#ifdef QT_SOFTKEYS_ENABLED
- if (menuBar)
- addAction(d->menuBarAction);
- else
- removeAction(d->menuBarAction);
-#endif
}
/*!
@@ -1427,11 +1407,6 @@ bool QMainWindow::event(QEvent *event)
}
break;
#endif
-#ifdef QT_SOFTKEYS_ENABLED
- case QEvent::LanguageChange:
- d->menuBarAction->setText(QSoftKeyManager::standardSoftKeyText(QSoftKeyManager::MenuSoftKey));
- break;
-#endif
default:
break;
}
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp
index e46688c..7224768 100644
--- a/src/gui/widgets/qmenu_symbian.cpp
+++ b/src/gui/widgets/qmenu_symbian.cpp
@@ -324,6 +324,14 @@ void QMenuBarPrivate::symbianDestroyMenuBar()
symbian_menubar = 0;
}
+void QMenuBarPrivate::reparentMenuBar(QWidget *oldParent, QWidget *newParent)
+{
+ if (menubars()->contains(oldParent)) {
+ QMenuBarPrivate *object = menubars()->take(oldParent);
+ menubars()->insert(newParent, object);
+ }
+}
+
QMenuBarPrivate::QSymbianMenuBarPrivate::QSymbianMenuBarPrivate(QMenuBarPrivate *menubar)
{
d = menubar;
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index 9caadb7..13aa02b 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -71,6 +71,10 @@
extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp
#endif
+#ifdef QT_SOFTKEYS_ENABLED
+#include <private/qsoftkeymanager_p.h>
+#endif
+
QT_BEGIN_NAMESPACE
class QMenuBarExtension : public QToolButton
@@ -740,17 +744,14 @@ void QMenuBarPrivate::init()
QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true);
}
#endif
-#ifdef Q_WS_S60
- symbianCreateMenuBar(q->parentWidget());
- if(symbian_menubar)
- q->hide();
-#endif
-
q->setBackgroundRole(QPalette::Button);
oldWindow = oldParent = 0;
#ifdef QT3_SUPPORT
doAutoResize = false;
#endif
+#ifdef QT_SOFTKEYS_ENABLED
+ menuBarAction = 0;
+#endif
handleReparent();
q->setMouseTracking(q->style()->styleHint(QStyle::SH_MenuBar_MouseTracking, 0, q));
@@ -1384,10 +1385,38 @@ void QMenuBarPrivate::handleReparent()
wce_menubar->rebuild();
#endif
#ifdef Q_WS_S60
- if (symbian_menubar)
+
+ // Construct symbian_menubar when this code path is entered first time
+ // and when newParent != NULL
+ if (!symbian_menubar)
+ symbianCreateMenuBar(newParent);
+
+ // Reparent and rebuild menubar when parent is changed
+ if (symbian_menubar) {
+ if (oldParent != newParent)
+ reparentMenuBar(oldParent, newParent);
+ q->hide();
symbian_menubar->rebuild();
-#endif
+ }
+#ifdef QT_SOFTKEYS_ENABLED
+ // Constuct menuBarAction when this code path is entered first time
+ if (!menuBarAction) {
+ if (newParent) {
+ menuBarAction = QSoftKeyManager::createAction(QSoftKeyManager::MenuSoftKey, newParent);
+ menuBarAction->setVisible(false);
+ newParent->addAction(menuBarAction);
+ }
+ } else {
+ // If reparenting i.e. we already have menuBarAction, remove it from old parent
+ // and add for a new parent
+ if (oldParent)
+ oldParent->removeAction(menuBarAction);
+ if (newParent)
+ newParent->addAction(menuBarAction);
+ }
+#endif // QT_SOFTKEYS_ENABLED
+#endif // Q_WS_S60
}
#ifdef QT3_SUPPORT
@@ -1440,7 +1469,13 @@ void QMenuBar::changeEvent(QEvent *e)
|| e->type() == QEvent::ApplicationFontChange) {
d->itemsDirty = true;
d->updateGeometries();
+#ifdef QT_SOFTKEYS_ENABLED
+ } else if (e->type() == QEvent::LanguageChange) {
+ if (d->menuBarAction)
+ d->menuBarAction->setText(QSoftKeyManager::standardSoftKeyText(QSoftKeyManager::MenuSoftKey));
+#endif
}
+
QWidget::changeEvent(e);
}
diff --git a/src/gui/widgets/qmenubar_p.h b/src/gui/widgets/qmenubar_p.h
index f2e5357..e4db6ce 100644
--- a/src/gui/widgets/qmenubar_p.h
+++ b/src/gui/widgets/qmenubar_p.h
@@ -243,6 +243,7 @@ public:
#ifdef Q_WS_S60
void symbianCreateMenuBar(QWidget *);
void symbianDestroyMenuBar();
+ void reparentMenuBar(QWidget *oldParent, QWidget *newParent);
struct QSymbianMenuBarPrivate {
QList<QSymbianMenuAction*> actionItems;
QMenuBarPrivate *d;
@@ -267,7 +268,9 @@ public:
} *symbian_menubar;
static int symbianCommands(int command);
-
+#ifdef QT_SOFTKEYS_ENABLED
+ QAction *menuBarAction;
+#endif
#endif
};
#endif
diff --git a/src/plugins/s60/3_2/3_2.pro b/src/plugins/s60/3_2/3_2.pro
index 4b28eb9..468197d 100644
--- a/src/plugins/s60/3_2/3_2.pro
+++ b/src/plugins/s60/3_2/3_2.pro
@@ -10,7 +10,7 @@ contains(S60_VERSION, 3.1) {
SOURCES += ../src/qlocale_3_2.cpp \
../src/qdesktopservices_3_2.cpp \
../src/qcoreapplication_3_2.cpp
- LIBS += -ldirectorylocalizer -lefsrv
+ LIBS += -lDirectoryLocalizer -lefsrv
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
}
diff --git a/src/plugins/s60/5_0/5_0.pro b/src/plugins/s60/5_0/5_0.pro
index 4cdce12..86e3dc9 100644
--- a/src/plugins/s60/5_0/5_0.pro
+++ b/src/plugins/s60/5_0/5_0.pro
@@ -10,7 +10,7 @@ contains(S60_VERSION, 3.1) {
SOURCES += ../src/qlocale_3_2.cpp \
../src/qdesktopservices_3_2.cpp \
../src/qcoreapplication_3_2.cpp
- LIBS += -ldirectorylocalizer -lefsrv
+ LIBS += -lDirectoryLocalizer -lefsrv
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
}
diff --git a/src/plugins/s60/src/qdesktopservices_3_2.cpp b/src/plugins/s60/src/qdesktopservices_3_2.cpp
index a2f30f2..b4ca9a3 100644
--- a/src/plugins/s60/src/qdesktopservices_3_2.cpp
+++ b/src/plugins/s60/src/qdesktopservices_3_2.cpp
@@ -45,7 +45,7 @@
#ifdef Q_WS_S60
#include <e32base.h> // CBase -> Required by cdirectorylocalizer.h
-#include <cdirectorylocalizer.h> // CDirectoryLocalizer
+#include <CDirectoryLocalizer.h> // CDirectoryLocalizer
EXPORT_C QString localizedDirectoryName(QString& rawPath)
{