From 14e75e741c78313b9d13fd9597a3eed6df834365 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 27 Apr 2009 13:29:21 +0300 Subject: Make all Symbian binaries pageable by default. --- mkspecs/common/symbian/symbian.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index f39a5d6..81b439a 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -107,7 +107,7 @@ QMAKE_STRIPFLAGS_LIB += --strip-unneeded load(qt_config) load(platform_paths) -MMP_RULES += EXPORTUNFROZEN +MMP_RULES += EXPORTUNFROZEN PAGED SYMBIAN_PLATFORMS = WINSCW GCCE ARMV5 # Legacy support requires some hardcoded stdapis paths. -- cgit v0.12 From a61f1978ec17120d3902e5ef7d625abb07d6c402 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 27 Apr 2009 13:30:48 +0300 Subject: Workaround for problems with paging Core and Sql libs --- src/corelib/corelib.pro | 8 +++++++- src/sql/sql.pro | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index 469225e..c55c2da 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -27,4 +27,10 @@ QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtCore.dynlist contains(DEFINES,QT_EVAL):include(eval.pri) -symbian:TARGET.UID3=0x2001B2DC \ No newline at end of file +symbian: { + TARGET.UID3=0x2001B2DC + + # Workaroud for problems with paging this dll + MMP_RULES -= PAGED + MMP_RULES *= UNPAGED +} \ No newline at end of file diff --git a/src/sql/sql.pro b/src/sql/sql.pro index f089dd7..60be748 100644 --- a/src/sql/sql.pro +++ b/src/sql/sql.pro @@ -17,5 +17,11 @@ include(kernel/kernel.pri) include(drivers/drivers.pri) include(models/models.pri) -symbian:TARGET.UID3=0x2001E61D +symbian: { + TARGET.UID3=0x2001E61D + + # Workaroud for problems with paging this dll + MMP_RULES -= PAGED + MMP_RULES *= UNPAGED +} -- cgit v0.12 From a10e5b8102abde1f3edff44f24d8fcdcab859393 Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Mon, 27 Apr 2009 14:11:39 +0200 Subject: Network server test related data (serever name, IP address ...) can now be read from a file at runtime. This should make auto testing more flexibile. Currently this is supported for Symbian platform. The file is named "iap.txt" and should be placed under "C:\data". When creating file use UNIX line ending and UTF 16 LE encoding. Conflicts: tests/auto/network-settings.h --- tests/auto/network-settings.h | 140 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 127 insertions(+), 13 deletions(-) diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index 663d817..4cee7ed 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -43,6 +43,8 @@ #ifdef Q_OS_SYMBIAN #include #include +#include +#include #endif #if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) // In emulator we use WINSOCK connectivity by default. Unfortunately winsock @@ -55,22 +57,62 @@ //#define SYMBIAN_WINSOCK_CONNECTIVITY #endif + class QtNetworkSettingsRecord { + public: + QtNetworkSettingsRecord() { } + + QtNetworkSettingsRecord(const QString& recName, const QString& recVal) + : strRecordName(recName), strRecordValue(recVal) { } + + QtNetworkSettingsRecord(const QtNetworkSettingsRecord & other) + : strRecordName(other.strRecordName), strRecordValue(other.strRecordValue) { } + + ~QtNetworkSettingsRecord() { } + + const QString& recordName() const { return strRecordName; } + const QString& recordValue() const { return strRecordValue; } + + private: + QString strRecordName; + QString strRecordValue; + }; + class QtNetworkSettings { public: + static QString serverLocalName() { +#ifdef Q_OS_SYMBIAN + loadTestSettings(); + + if(QtNetworkSettings::entries.contains("server.localname")) { + QtNetworkSettingsRecord* entry = entries["server.localname"]; + return entry->recordValue(); + } +#endif return QString("qttest"); //return QString("aspiriniks"); //return QString("qt-test-server"); } static QString serverDomainName() { +#ifdef Q_OS_SYMBIAN + loadTestSettings(); + + if(QtNetworkSettings::entries.contains("server.domainname")) { + QtNetworkSettingsRecord* entry = entries["server.domainname"]; + return entry->recordValue(); + } +#endif return QString("it.local"); //return QString("troll.no"); } static QString serverName() { +#ifdef Q_OS_SYMBIAN + loadTestSettings(); +#endif return serverLocalName() + "." + serverDomainName(); } static QString winServerName() @@ -84,6 +126,18 @@ public: } static const char *serverIP() { +#ifdef Q_OS_SYMBIAN + loadTestSettings(); + + if(QtNetworkSettings::entries.contains("server.ip")) { + QtNetworkSettingsRecord* entry = entries["server.ip"]; + QByteArray valueAsAscii = entry->recordValue().toAscii(); + if(*serverIPAscii == 0) { + ::strcpy(serverIPAscii, valueAsAscii.data()); + } + return serverIPAscii; + } +#endif //return "10.10.0.147"; return "10.10.14.172"; //return "10.3.7.2"; @@ -114,6 +168,7 @@ public: expected = expected.append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); return expected; } +<<<<<<< HEAD:tests/auto/network-settings.h static QByteArray expectedReplyFtp() { @@ -122,6 +177,8 @@ public: expected = expected.append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); return expected; } +======= +>>>>>>> 6d41f31... Nwteork server test related data (serever name, IP address ...) can now:tests/auto/network-settings.h #ifdef Q_OS_SYMBIAN static void setDefaultIap() @@ -139,50 +196,107 @@ public: private: #ifdef Q_OS_SYMBIAN - static bool bIsIapLoaded; + + static QHash entries; + static bool bDefaultIapLoaded; + static bool bTestSettingsLoaded; static QString iapFileFullPath; - static QString defaultIap; + static QString strDefaultIap; + static char serverIPAscii[256]; static QString getDefaultIap() { - if(!bIsIapLoaded) - loadIapCfg(); + if(!bDefaultIapLoaded) { + if(!loadDefaultIap()) // not found in file - use default + strDefaultIap = QString("Lab"); + } - return defaultIap; + return strDefaultIap; } - static void loadIapCfg() { + static bool loadDefaultIap() { QFile iapCfgFile(iapFileFullPath); + bool bFoundDefaultIapTag = false; + if (iapCfgFile.open(QFile::ReadOnly)) { QTextStream input(&iapCfgFile); QString line; - bool bFoundDefaultTag = false; do { line = input.readLine().trimmed(); if(line.startsWith(QString("#"))) continue; // comment found if(line.contains(QString("[DEFAULT]"))) { - bFoundDefaultTag = true; - } else if(line.startsWith(QString("[")) && bFoundDefaultTag) { + bFoundDefaultIapTag = true; + } else if(line.startsWith(QString("[")) && bFoundDefaultIapTag) { + bFoundDefaultIapTag = false; break; // stick to default } - if(bFoundDefaultTag && line.contains("name")) { + if(bFoundDefaultIapTag && line.contains("name")) { int position = line.indexOf(QString("=")); position += QString("=").length(); - defaultIap = line.mid(position).trimmed(); + strDefaultIap = line.mid(position).trimmed(); break; } } while (!line.isNull()); } + + return bFoundDefaultIapTag; + } + + static bool loadTestSettings() { + if(bTestSettingsLoaded) + return true; + + QFile cfgFile(iapFileFullPath); + bool bFoundTestTag = false; + + if (cfgFile.open(QFile::ReadOnly)) { + QTextStream input(&cfgFile); + QString line; + do { + line = input.readLine().trimmed(); + + if(line.startsWith(QString("#")) || line.length() == 0) + continue; // comment or empty line found + + if(line.contains(QString("[TEST]"))) { + bFoundTestTag = true; + } else if(line.startsWith(QString("[")) && bFoundTestTag) { + bFoundTestTag = false; + break; // finished with test tag + } + + if(bFoundTestTag) { // non-empty line + int position = line.indexOf(QString("=")); + + if(position <= 0) // not found + continue; + + // found - extract + + QString recname = line.mid(0, position - QString("=").length()).trimmed(); + QString recval = line.mid(position + QString("=").length()).trimmed(); + + //create record + QtNetworkSettingsRecord *entry = new QtNetworkSettingsRecord(recname, recval); + entries.insert(entry->recordName(), entry); + } + } while (!line.isNull()); + } + + return bTestSettingsLoaded = true; } #endif }; #ifdef Q_OS_SYMBIAN -bool QtNetworkSettings::bIsIapLoaded = false; +QHash QtNetworkSettings::entries = QHash (); +bool QtNetworkSettings::bDefaultIapLoaded = false; +bool QtNetworkSettings::bTestSettingsLoaded = false; QString QtNetworkSettings::iapFileFullPath = QString("C:\\Data\\iap.txt"); -QString QtNetworkSettings::defaultIap = QString("Lab"); // this will be default value +QString QtNetworkSettings::strDefaultIap = QString(""); +char QtNetworkSettings::serverIPAscii[256]; #endif #ifdef Q_OS_SYMBIAN -- cgit v0.12 From 2229bbed83dc002aeba56cf21610204c3ea0e54f Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Mon, 27 Apr 2009 15:25:12 +0200 Subject: Qt lib dependencies had to be revisited as there were issues with some components when working on Tube HW. --- src/s60installs/qt_libs.pro | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/s60installs/qt_libs.pro b/src/s60installs/qt_libs.pro index 546c5b6..2ba8b79 100644 --- a/src/s60installs/qt_libs.pro +++ b/src/s60installs/qt_libs.pro @@ -42,11 +42,9 @@ symbian: { #ENDIF qtlibraries.path = /sys/bin - qtlibraries.depends = "(0x20009a80), 1, 5, 0, {\"Symbian OS PIPS\"}" + qtlibraries.depends = "(0x20013851), 1, 5, 1, {\"PIPS Installer\"}" contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) { - qtlibraries.depends += "(0x200110CB), 1, 5, 0, {\"Open C LIBSSL Common\"}" - qtlibraries.depends += "(0x10281f34), 1, 5, 0, {\"Open C LIBSSL\"}" - qtlibraries.depends += "(0x2001B28B), 1, 5, 0, {\"OpenC LIBZ Support Files\"}" + qtlibraries.depends += "(0x200110CB), 1, 5, 1, {\"Open C LIBSSL Common\"}" } contains(QT_CONFIG, stl) { qtlibraries.depends += "(0x2000F866), 1, 0, 0, {\"Standard C++ Library Common\"}" -- cgit v0.12 From 6d733287e384b9256efed3cd97d9badc64af6fb2 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 28 Apr 2009 09:48:24 +0300 Subject: Removed preserving read-only flag from winscw deployed files to make functionality similar to hw deployment. --- qmake/generators/symbian/symmake_abld.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index d1942c6..aee9745 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -157,7 +157,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; - t << "XCOPY = xcopy /d /f /h /r /k /y /i" << endl; + t << "XCOPY = xcopy /d /f /h /r /y /i" << endl; t << "ABLD = ABLD.BAT" << endl; t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl; -- cgit v0.12 From 9a17e2ac3f9654f7f328aeae5673cff1254517ae Mon Sep 17 00:00:00 2001 From: Markku Luukkainen Date: Tue, 28 Apr 2009 08:57:23 +0200 Subject: Fixed wrong menu showing up on S60 while launching a dialog. --- src/gui/dialogs/qdialog.cpp | 19 ++++++++++++++++++- src/gui/widgets/qmenu_symbian.cpp | 24 ++++++++++++++---------- src/gui/widgets/qmenubar.cpp | 6 ++++++ 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index b0aa7b6..ef562f4 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -67,7 +67,9 @@ extern bool qt_wince_is_smartphone(); //is defined in qguifunctions_wce.cpp #elif defined(Q_WS_S60) # include "qfiledialog.h" #endif - +#if defined(Q_OS_SYMBIAN) +#include "qmenubar.h" +#endif #ifndef SPI_GETSNAPTODEFBUTTON # define SPI_GETSNAPTODEFBUTTON 95 #endif @@ -488,6 +490,14 @@ int QDialog::exec() #endif //QT_NO_MENUBAR #endif //Q_OS_WINCE_WM +#ifdef Q_OS_SYMBIAN +#ifndef QT_NO_MENUBAR + QMenuBar *menuBar = 0; + if (!findChild()) + menuBar = new QMenuBar(this); +#endif +#endif + #if !defined(Q_WS_S60) show(); #else @@ -520,6 +530,13 @@ int QDialog::exec() delete menuBar; #endif //QT_NO_MENUBAR #endif //Q_OS_WINCE_WM +#ifdef Q_OS_SYMBIAN +#ifndef QT_NO_MENUBAR + else if (menuBar) + delete menuBar; +#endif //QT_NO_MENUBAR +#endif //Q_OS_SYMBIAN + return res; } diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index a50c5c0..0da3b1c 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -33,7 +33,7 @@ QT_BEGIN_NAMESPACE // ### FIX/Document this, we need some safe range of menu id's for Qt that don't clash with AIW ones #define QT_FIRST_MENU_ITEM 32000 -static QMenuBarPrivate *s60_menubar=0; +static QList s60_menubars; struct SymbianMenuItem { @@ -167,7 +167,7 @@ static void setSoftkeys() { CEikButtonGroupContainer* cba = CEikonEnv::Static()->AppUiFactory()->Cba(); if (cba){ - if (s60_menubar) + if (s60_menubars.count()>0) cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_EXIT); else cba->SetCommandSetL(R_AVKON_SOFTKEYS_EXIT); @@ -178,11 +178,11 @@ static void rebuildMenu() { qt_symbian_menu_static_cmd_id = QT_FIRST_MENU_ITEM; deleteAll( &symbianMenus ); - if (!s60_menubar) + if (s60_menubars.count()==0) return; - for (int i = 0; i < s60_menubar->actions.size(); ++i) { + for (int i = 0; i < s60_menubars.last()->actions.size(); ++i) { QSymbianMenuAction *symbianActionTopLevel = new QSymbianMenuAction; - symbianActionTopLevel->action = s60_menubar->actions.at(i); + symbianActionTopLevel->action = s60_menubars.last()->actions.at(i); symbianActionTopLevel->parent = 0; symbianActionTopLevel->command = qt_symbian_menu_static_cmd_id++; qt_symbian_insert_action(symbianActionTopLevel, &symbianMenus); @@ -193,7 +193,7 @@ static void rebuildMenu() Q_GUI_EXPORT void qt_symbian_show_toplevel( CEikMenuPane* menuPane) { - if (!s60_menubar) + if (s60_menubars.count()==0) return; rebuildMenu(); for (int i = 0; i < symbianMenus.count(); ++i) @@ -252,6 +252,7 @@ void QMenuBarPrivate::symbianCreateMenuBar(QWidget *parent) Q_Q(QMenuBar); if (parent && parent->isWindow()){ symbian_menubar = new QSymbianMenuBarPrivate(this); + symbian_menubar->parent = parent; nativeMenuBars.append(q); } } @@ -261,15 +262,17 @@ void QMenuBarPrivate::symbianDestroyMenuBar() Q_Q(QMenuBar); int index = nativeMenuBars.indexOf(q); nativeMenuBars.removeAt(index); + s60_menubars.removeLast(); + rebuildMenu(); if (symbian_menubar) - delete symbian_menubar; + delete symbian_menubar; symbian_menubar = 0; } QMenuBarPrivate::QSymbianMenuBarPrivate::QSymbianMenuBarPrivate(QMenuBarPrivate *menubar) { d = menubar; - s60_menubar = menubar; + s60_menubars.append(menubar); } QMenuBarPrivate::QSymbianMenuBarPrivate::~QSymbianMenuBarPrivate() @@ -277,7 +280,7 @@ QMenuBarPrivate::QSymbianMenuBarPrivate::~QSymbianMenuBarPrivate() deleteAll( &symbianMenus ); symbianMenus.clear(); d = 0; - s60_menubar = 0; + rebuild(); } QMenuPrivate::QSymbianMenuPrivate::QSymbianMenuPrivate() @@ -362,9 +365,10 @@ void QMenuBarPrivate::QSymbianMenuBarPrivate::removeAction(QSymbianMenuAction *a void QMenuBarPrivate::QSymbianMenuBarPrivate::rebuild() { setSoftkeys(); - if (!s60_menubar) + if (s60_menubars.count()==0) return; rebuildMenu(); } + #endif //QT_NO_MENUBAR diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index b92f48b..b6ce76b 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -1045,6 +1045,12 @@ void QMenuBar::setVisible(bool visible) if(d->wce_menubar) return; #endif +#ifdef Q_OS_SYMBIAN + Q_D(QMenuBar); + if(d->symbian_menubar) + return; +#endif + QWidget::setVisible(visible); } -- cgit v0.12 From bce48e0a5317be7ebbfbaf714de00ab083ef7cf5 Mon Sep 17 00:00:00 2001 From: Markku Luukkainen Date: Tue, 28 Apr 2009 09:08:15 +0200 Subject: Removed setting the unnecessary parent for menu structures --- src/gui/widgets/qmenu_symbian.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index 0da3b1c..9e53df5 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -252,7 +252,6 @@ void QMenuBarPrivate::symbianCreateMenuBar(QWidget *parent) Q_Q(QMenuBar); if (parent && parent->isWindow()){ symbian_menubar = new QSymbianMenuBarPrivate(this); - symbian_menubar->parent = parent; nativeMenuBars.append(q); } } -- cgit v0.12