diff options
author | axis <qt-info@nokia.com> | 2009-11-04 10:18:15 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-11-04 10:18:15 (GMT) |
commit | 67105efc1e1ebfb435ad5d64171111799959a7c3 (patch) | |
tree | 9f330a35f0e0bf48ae844f4eceea84ba001568f1 | |
parent | bffb6602177476f08710b40a83205b9ab839f6f4 (diff) | |
parent | fc45c07c27100591750ad5c360fde535e15b9dbd (diff) | |
download | Qt-67105efc1e1ebfb435ad5d64171111799959a7c3.zip Qt-67105efc1e1ebfb435ad5d64171111799959a7c3.tar.gz Qt-67105efc1e1ebfb435ad5d64171111799959a7c3.tar.bz2 |
Merge branch '4.6-s60' into 4.6
41 files changed, 365 insertions, 186 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro index 0e540e5..b8734cd 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro @@ -5,7 +5,7 @@ SOURCES += tst_qwebframe.cpp RESOURCES += qwebframe.qrc QT += testlib network QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR -DEFINES += SRCDIR=\\\"$$PWD/resources\\\" +!symbian:DEFINES += SRCDIR=\\\"$$PWD/resources\\\" symbian { TARGET.UID3 = 0xA000E53D diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp index 5445ce8..d304d3e 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -38,6 +38,10 @@ #endif #include "../util.h" +#if defined(Q_OS_SYMBIAN) +# define SRCDIR "" +#endif + //TESTED_CLASS= //TESTED_FILES= diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro index 6b28efd..7853b28 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro @@ -5,7 +5,7 @@ SOURCES += tst_qwebpage.cpp RESOURCES += tst_qwebpage.qrc QT += testlib network QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR -DEFINES += SRCDIR=\\\"$$PWD/\\\" +!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\" symbian { TARGET.UID3 = 0xA000E53E diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 0cf85ee..8373e04 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -37,6 +37,10 @@ #include <QPushButton> #include <QDir> +#if defined(Q_OS_SYMBIAN) +# define SRCDIR "" +#endif + // Will try to wait for the condition while allowing event processing #define QTRY_COMPARE(__expr, __expected) \ do { \ diff --git a/src/corelib/arch/qatomic_symbian.h b/src/corelib/arch/qatomic_symbian.h index 5880120..3721aca 100644 --- a/src/corelib/arch/qatomic_symbian.h +++ b/src/corelib/arch/qatomic_symbian.h @@ -42,8 +42,6 @@ #ifndef QATOMIC_SYMBIAN_H #define QATOMIC_SYMBIAN_H -QT_BEGIN_HEADER - #if defined(Q_CC_RVCT) # define QT_NO_ARM_EABI # include <QtCore/qatomic_arm.h> @@ -51,6 +49,16 @@ QT_BEGIN_HEADER # include <QtCore/qatomic_generic.h> #endif +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Core) + +// Empty, but needed to avoid warnings + +QT_END_NAMESPACE + QT_END_HEADER #endif // QATOMIC_SYMBIAN_H diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 33c6a34..5578091 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -960,7 +960,7 @@ QT_BEGIN_NAMESPACE \relates <QtGlobal> Turns the major, minor and patch numbers of a version into an - integer, 0xMMNNPP (MM = major, NN = minor, PP = patch). This can + integer, 0xMMNNPP (MM = major, NN = minor, PP = patch). This can be compared with another similarly processed version id. \sa QT_VERSION @@ -1795,7 +1795,7 @@ QSysInfo::S60Version QSysInfo::s60Version() TInt err = fileFinder.FindWildByDir(qt_S60Filter, qt_S60SystemInstallDir, contents); if (err == KErrNone) { err = contents->Sort(EDescending|ESortByName); - if (err == KErrNone) { + if (err == KErrNone && contents->Count() > 0 && (*contents)[0].iName.Length() >= 12) { TInt major = (*contents)[0].iName[9] - '0'; TInt minor = (*contents)[0].iName[11] - '0'; if (major == 3) { @@ -1808,6 +1808,12 @@ QSysInfo::S60Version QSysInfo::s60Version() if (minor == 0) { return cachedS60Version = SV_S60_5_0; } + else if (minor == 1) { + return cachedS60Version = SV_S60_5_1; + } + else if (minor == 2) { + return cachedS60Version = SV_S60_5_2; + } } } delete contents; @@ -1822,12 +1828,10 @@ QSysInfo::S60Version QSysInfo::s60Version() return cachedS60Version = SV_S60_3_2; # elif defined(__S60_50__) return cachedS60Version = SV_S60_5_0; -# else - return cachedS60Version = SV_S60_Unknown; # endif -# else - return cachedS60Version = SV_S60_Unknown; # endif + //If reaching here, it was not possible to determine the version + return cachedS60Version = SV_S60_Unknown; } QSysInfo::SymbianVersion QSysInfo::symbianVersion() { @@ -1838,6 +1842,10 @@ QSysInfo::SymbianVersion QSysInfo::symbianVersion() return SV_9_3; case SV_S60_5_0: return SV_9_4; + case SV_S60_5_1: + return SV_9_4; + case SV_S60_5_2: + return SV_9_4; default: return SV_Unknown; } @@ -2572,7 +2580,7 @@ void qsrand() seed = GetTickCount(); srand(seed); -#else +#else // Symbian? #endif // defined(Q_OS_UNIX) || defined(Q_OS_WIN)) && !defined(QT_NO_THREAD) && !defined(Q_OS_SYMBIAN) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 1dbdc6d..d113e02 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1486,17 +1486,26 @@ public: #ifdef Q_OS_SYMBIAN enum SymbianVersion { SV_Unknown = 0x0000, + //These are the Symbian Ltd versions 9.2-9.4 SV_9_2 = 10, SV_9_3 = 20, - SV_9_4 = 30 + SV_9_4 = 30, + //Following values are the symbian foundation versions, i.e. Symbian^1 == SV_SF_1 + SV_SF_1 = SV_9_4, + SV_SF_2 = 40, + SV_SF_3 = 50, + SV_SF_4 = 60 }; static SymbianVersion symbianVersion(); enum S60Version { SV_S60_None = 0, SV_S60_Unknown = 1, - SV_S60_3_1 = 10, - SV_S60_3_2 = 20, - SV_S60_5_0 = 30 + SV_S60_3_1 = SV_9_2, + SV_S60_3_2 = SV_9_3, + SV_S60_5_0 = SV_9_4, + //versions beyond 5.0 are to be confirmed - it is better to use symbian version + SV_S60_5_1 = SV_SF_2, + SV_S60_5_2 = SV_SF_3 }; static S60Version s60Version(); #endif diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index c6b4a77..6bc6b76 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -3187,7 +3187,17 @@ void QFileDialogTreeView::keyPressEvent(QKeyEvent *e) if (!d_ptr->itemViewKeyboardEvent(e)) { QTreeView::keyPressEvent(e); } +#ifdef QT_KEYPAD_NAVIGATION + else if ((QApplication::navigationMode() == Qt::NavigationModeKeypadTabOrder + || QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional) + && !hasEditFocus()) { + e->ignore(); + } else { + e->accept(); + } +#else e->accept(); +#endif } QSize QFileDialogTreeView::sizeHint() const diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 7f0a504..49a8942 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -73,27 +73,27 @@ const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08, used to lock the global bitmap heap. Only used in S60 v3.1 and S60 v3.2. */ +_LIT(KFBSERVLargeBitmapAccessName,"FbsLargeBitmapAccess"); class QSymbianFbsClient { public: - QSymbianFbsClient() : heapLock(0), heapLocked(false) + QSymbianFbsClient() : heapLocked(false) { - QT_TRAP_THROWING(heapLock = new(ELeave) CFbsBitmap); - heapLock->Create(TSize(0,0), S60->screenDevice()->DisplayMode()); + heapLock.OpenGlobal(KFBSERVLargeBitmapAccessName); } ~QSymbianFbsClient() { - delete heapLock; + heapLock.Close(); } bool lockHeap() { bool wasLocked = heapLocked; - if (heapLock && !heapLocked) { - heapLock->LockHeap(ETrue); + if (heapLock.Handle() && !heapLocked) { + heapLock.Wait(); heapLocked = true; } @@ -104,8 +104,8 @@ public: { bool wasLocked = heapLocked; - if (heapLock && heapLocked) { - heapLock->UnlockHeap(ETrue); + if (heapLock.Handle() && heapLocked) { + heapLock.Signal(); heapLocked = false; } @@ -115,7 +115,7 @@ public: private: - CFbsBitmap *heapLock; + RMutex heapLock; bool heapLocked; }; @@ -169,7 +169,7 @@ public: inline void beginDataAccess(CFbsBitmap *bitmap) { - if (symbianVersion == QSysInfo::SV_9_2 || symbianVersion == QSysInfo::SV_9_3) + if (symbianVersion == QSysInfo::SV_9_2) heapWasLocked = qt_symbianFbsClient()->lockHeap(); else bitmap->LockHeap(ETrue); @@ -177,7 +177,7 @@ public: inline void endDataAccess(CFbsBitmap *bitmap) { - if (symbianVersion == QSysInfo::SV_9_2 || symbianVersion == QSysInfo::SV_9_3) { + if (symbianVersion == QSysInfo::SV_9_2) { if (!heapWasLocked) qt_symbianFbsClient()->unlockHeap(); } else { diff --git a/src/gui/itemviews/qabstractitemview.h b/src/gui/itemviews/qabstractitemview.h index 7a0509b..ea5d259 100644 --- a/src/gui/itemviews/qabstractitemview.h +++ b/src/gui/itemviews/qabstractitemview.h @@ -363,6 +363,7 @@ private: friend class QTreeViewPrivate; // needed to compile with MSVC friend class QAccessibleItemRow; friend class QListModeViewBase; + friend class QListViewPrivate; // needed to compile for Symbian emulator }; Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractItemView::EditTriggers) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 30bf99a..1b0659a 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -836,7 +836,7 @@ void QSymbianControl::Draw(const TRect& controlRect) const if (qwidget->d_func()->isOpaque) gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha); gc.BitBlt(controlRect.iTl, bitmap, backingStoreRect); - } + } } else { surface->flush(qwidget, QRegion(qt_TRect2QRect(backingStoreRect)), QPoint()); } @@ -910,9 +910,9 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) CEikStatusPane* statusPane = S60->statusPane(); CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer(); bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen; - if (statusPane && (statusPane->IsVisible() == isFullscreen)) + if (statusPane && (bool)statusPane->IsVisible() == isFullscreen) statusPane->MakeVisible(!isFullscreen); - if (buttonGroup && (buttonGroup->IsVisible() == isFullscreen)) + if (buttonGroup && (bool)buttonGroup->IsVisible() == isFullscreen) buttonGroup->MakeVisible(!isFullscreen); #endif } else if (QApplication::activeWindow() == qwidget->window()) { @@ -925,6 +925,12 @@ void QSymbianControl::HandleResourceChange(int resourceType) { switch (resourceType) { case KInternalStatusPaneChange: + if (qwidget->isFullScreen()) { + SetExtentToWholeScreen(); + } else if (qwidget->isMaximized()) { + TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect(); + SetExtent(r.iTl, r.Size()); + } qwidget->d_func()->setWindowIcon_sys(true); break; case KUidValueCoeFontChangeEvent: @@ -1046,8 +1052,17 @@ void qt_init(QApplicationPrivate * /* priv */, int) // After this construction, CEikonEnv will be available from CEikonEnv::Static(). // (much like our qApp). CEikonEnv* coe = new CEikonEnv; - QT_TRAP_THROWING(coe->ConstructAppFromCommandLineL(factory,*commandLine)); + //not using QT_TRAP_THROWING, because coe owns the cleanupstack so it can't be pushed there. + if(err == KErrNone) + TRAP(err, coe->ConstructAppFromCommandLineL(factory,*commandLine)); delete commandLine; + if(err != KErrNone) { + qWarning() << "qt_init: Eikon application construct failed (" + << err + << "), maybe missing resource file on S60 3.1?"; + delete coe; + qt_symbian_throwIfError(err); + } S60->s60InstalledTrapHandler = User::SetTrapHandler(origTrapHandler); @@ -1080,9 +1095,9 @@ void qt_init(QApplicationPrivate * /* priv */, int) // enable focus events - used to re-enable mouse after focus changed between mouse and non mouse app, // and for dimming behind modal windows - S60->windowGroup().EnableFocusChangeEvents(); + S60->windowGroup().EnableFocusChangeEvents(); - //Check if mouse interaction is supported (either EMouse=1 in the HAL, or EMachineUID is one of the phones known to support this) + //Check if mouse interaction is supported (either EMouse=1 in the HAL, or EMachineUID is one of the phones known to support this) const TInt KMachineUidSamsungI8510 = 0x2000C51E; // HAL::Get(HALData::EPen, TInt& result) may set 'result' to 1 on some 3.1 systems (e.g. N95). // But we know that S60 systems below 5.0 did not support touch. @@ -1560,7 +1575,7 @@ int QApplicationPrivate::symbianProcessWsEvent(const TWsEvent *event) } #endif break; - default: + default: break; } diff --git a/src/gui/kernel/qsound_s60.cpp b/src/gui/kernel/qsound_s60.cpp index 352580e..e4b7cec 100644 --- a/src/gui/kernel/qsound_s60.cpp +++ b/src/gui/kernel/qsound_s60.cpp @@ -60,13 +60,13 @@ class QAuServerS60; class QAuBucketS60 : public QAuBucket, public MMdaAudioPlayerCallback { public: - QAuBucketS60( QAuServerS60 *server, QSound *sound); + QAuBucketS60(QAuServerS60 *server, QSound *sound); ~QAuBucketS60(); void play(); void stop(); - inline QSound* sound() const { return m_sound; } + inline QSound *sound() const { return m_sound; } public: // from MMdaAudioPlayerCallback void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration); @@ -77,88 +77,106 @@ private: QAuServerS60 *m_server; bool m_prepared; bool m_playCalled; - CMdaAudioPlayerUtility* m_playUtility; + CMdaAudioPlayerUtility *m_playUtility; }; class QAuServerS60 : public QAuServer { public: - QAuServerS60( QObject* parent ); + QAuServerS60(QObject *parent); - void init( QSound* s ) + void init(QSound *s) { - QAuBucketS60 *bucket = new QAuBucketS60( this, s ); - setBucket( s, bucket ); + QAuBucketS60 *bucket = new QAuBucketS60(this, s); + setBucket(s, bucket); } - void play( QSound* s ) + void play(QSound *s) { - bucket( s )->play(); + bucket(s)->play(); } - void stop( QSound* s ) + void stop(QSound *s) { - bucket( s )->stop(); + bucket(s)->stop(); } bool okay() { return true; } + void play(const QString& filename); + protected: - void playCompleted(QAuBucketS60* bucket, int error) - { - QSound *sound = bucket->sound(); - if(!error) { - // We need to handle repeats by ourselves, since with Symbian API we don't - // know how many loops have been played when user asks it - if( decLoop( sound ) ) { - play( sound ); - } - } else { - // We don't have a way to inform about errors -> just decrement loops - // in order that QSound::isFinished will return true; - while(decLoop(sound)) {} - } - } + void playCompleted(QAuBucketS60 *bucket, int error); protected: - QAuBucketS60* bucket( QSound *s ) + QAuBucketS60 *bucket(QSound *s) { - return (QAuBucketS60*)QAuServer::bucket( s ); + return (QAuBucketS60 *)QAuServer::bucket( s ); } friend class QAuBucketS60; + // static QSound::play(filename) cannot be stopped, meaning that playCompleted + // will get always called and QSound gets removed form this list. + QList<QSound *> staticPlayingSounds; }; -QAuServerS60::QAuServerS60(QObject* parent) : +QAuServerS60::QAuServerS60(QObject *parent) : QAuServer(parent) { setObjectName(QLatin1String("QAuServerS60")); } +void QAuServerS60::play(const QString& filename) +{ + QSound *s = new QSound(filename); + staticPlayingSounds.append(s); + play(s); +} + +void QAuServerS60::playCompleted(QAuBucketS60 *bucket, int error) +{ + QSound *sound = bucket->sound(); + if (!error) { + // We need to handle repeats by ourselves, since with Symbian API we don't + // know how many loops have been played when user asks it + if (decLoop(sound)) { + play(sound); + } else { + if (staticPlayingSounds.removeAll(sound)) + delete sound; + } + } else { + // We don't have a way to inform about errors -> just decrement loops + // in order that QSound::isFinished will return true; + while (decLoop(sound)) {} + if (staticPlayingSounds.removeAll(sound)) + delete sound; + } +} -QAuServer* qt_new_audio_server() +QAuServer *qt_new_audio_server() { return new QAuServerS60(qApp); } -QAuBucketS60::QAuBucketS60( QAuServerS60 *server, QSound *sound ) - : m_sound( sound ), m_server( server ), m_prepared(false), m_playCalled(false) +QAuBucketS60::QAuBucketS60(QAuServerS60 *server, QSound *sound) + : m_sound(sound), m_server(server), m_prepared(false), m_playCalled(false) { - QString filepath = QFileInfo( m_sound->fileName() ).absoluteFilePath(); + QString filepath = QFileInfo(m_sound->fileName()).absoluteFilePath(); filepath = QDir::toNativeSeparators(filepath); TPtrC filepathPtr(qt_QString2TPtrC(filepath)); TRAPD(err, m_playUtility = CMdaAudioPlayerUtility::NewL(*this); m_playUtility->OpenFileL(filepathPtr)); - if(err){ + if (err) { m_server->playCompleted(this, err); } } void QAuBucketS60::play() { - if(m_prepared) { + if (m_prepared) { // OpenFileL call is completed we can start playing immediately m_playUtility->Play(); } else { @@ -180,11 +198,11 @@ void QAuBucketS60::MapcPlayComplete(TInt aError) void QAuBucketS60::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/) { - if(aError) { + if (aError) { m_server->playCompleted(this, aError); } else { m_prepared = true; - if(m_playCalled){ + if (m_playCalled){ play(); } } @@ -192,7 +210,7 @@ void QAuBucketS60::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds QAuBucketS60::~QAuBucketS60() { - if(m_playUtility){ + if (m_playUtility){ m_playUtility->Stop(); m_playUtility->Close(); } diff --git a/src/gui/s60framework/s60framework.pri b/src/gui/s60framework/s60framework.pri index fea74fe..5884b68 100644 --- a/src/gui/s60framework/s60framework.pri +++ b/src/gui/s60framework/s60framework.pri @@ -1,3 +1,14 @@ +# 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" \ + "HEADER" \ + "TARGETPATH resource\apps" \ + "END" +MMP_RULES += minimalAppResource31 + SOURCES += s60framework/qs60mainapplication.cpp \ s60framework/qs60mainappui.cpp \ s60framework/qs60maindocument.cpp diff --git a/src/s60main/s60main.rss b/src/gui/s60framework/s60main.rss index 07dc6a1..07dc6a1 100644 --- a/src/s60main/s60main.rss +++ b/src/gui/s60framework/s60main.rss diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index b87f3a8..350a8e6 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -499,7 +499,7 @@ void QS60StylePrivate::setBackgroundTexture(QApplication *app) const Q_UNUSED(app) QPalette applicationPalette = QApplication::palette(); applicationPalette.setBrush(QPalette::Window, backgroundTexture()); - QApplication::setPalette(applicationPalette); + setThemePalette(app); } void QS60StylePrivate::deleteBackground() @@ -743,7 +743,7 @@ void QS60StylePrivate::setThemePaletteHash(QPalette *palette) const const QColor mainAreaTextColor = s60Color(QS60StyleEnums::CL_QsnTextColors, 6, 0); - widgetPalette.setColor(QPalette::All, QPalette::WindowText, + widgetPalette.setColor(QPalette::WindowText, s60Color(QS60StyleEnums::CL_QsnLineColors, 8, 0)); QApplication::setPalette(widgetPalette, "QSlider"); // return to original palette after each widget @@ -767,34 +767,34 @@ void QS60StylePrivate::setThemePaletteHash(QPalette *palette) const QApplication::setPalette(widgetPalette, "QHeaderView"); widgetPalette = *palette; - widgetPalette.setColor(QPalette::All, QPalette::ButtonText, + widgetPalette.setColor(QPalette::ButtonText, s60Color(QS60StyleEnums::CL_QsnTextColors, 8, 0)); QApplication::setPalette(widgetPalette, "QMenuBar"); widgetPalette = *palette; - widgetPalette.setColor(QPalette::Active, QPalette::WindowText, + widgetPalette.setColor(QPalette::WindowText, s60Color(QS60StyleEnums::CL_QsnTextColors, 4, 0)); QApplication::setPalette(widgetPalette, "QTabBar"); widgetPalette = *palette; - widgetPalette.setColor(QPalette::All, QPalette::Text, + widgetPalette.setColor(QPalette::Text, s60Color(QS60StyleEnums::CL_QsnTextColors, 22, 0)); QApplication::setPalette(widgetPalette, "QTableView"); widgetPalette = *palette; - widgetPalette.setColor(QPalette::All, QPalette::HighlightedText, + widgetPalette.setColor(QPalette::HighlightedText, s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0)); QApplication::setPalette(widgetPalette, "QLineEdit"); widgetPalette = *palette; - widgetPalette.setColor(QPalette::All, QPalette::Text, + widgetPalette.setColor(QPalette::Text, s60Color(QS60StyleEnums::CL_QsnTextColors, 34, 0)); - widgetPalette.setColor(QPalette::All, QPalette::HighlightedText, + widgetPalette.setColor(QPalette::HighlightedText, s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0)); QApplication::setPalette(widgetPalette, "QTextEdit"); widgetPalette = *palette; - widgetPalette.setColor(QPalette::All, QPalette::HighlightedText, + widgetPalette.setColor(QPalette::HighlightedText, s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0)); QApplication::setPalette(widgetPalette, "QComboBox"); widgetPalette = *palette; @@ -994,6 +994,10 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom if (const QStyleOptionToolButton *toolBtn = qstyleoption_cast<const QStyleOptionToolButton *>(option)) { const State bflags = toolBtn->state; const QRect button(subControlRect(control, toolBtn, SC_ToolButton, widget)); + QRect menuRect = QRect(); + if (toolBtn->subControls & SC_ToolButtonMenu) + menuRect = subControlRect(control, toolBtn, SC_ToolButtonMenu, widget); + QStyleOptionToolButton toolButton = *toolBtn; if (sub&SC_ToolButton) { @@ -1006,7 +1010,7 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom toolBar = qobject_cast<QToolBar *>(widget->parentWidget()); if (bflags & (State_Sunken | State_On | State_Raised)) { - tool.rect = button; + tool.rect = button.unite(menuRect); tool.state = bflags; // todo: I'd like to move extension button next to where last button is @@ -1061,6 +1065,12 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom } else { drawPrimitive(PE_PanelButtonTool, &tool, painter, widget); } + + if (toolButton.subControls & SC_ToolButtonMenu) { + tool.rect = menuRect; + tool.state = bflags; + drawPrimitive(PE_IndicatorArrowDown, &tool, painter, widget); + } } } @@ -1752,7 +1762,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, #endif //QT_NO_MENUBAR case CE_HeaderSection: - if ( const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { + if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { painter->save(); QPen linePen = QPen(QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 1, header)); const int penWidth = (header->orientation == Qt::Horizontal) ? @@ -1770,6 +1780,25 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, } } painter->restore(); + + //Draw corner button as normal pushButton. + if (qobject_cast<const QAbstractButton *>(widget)) { + //Make cornerButton slightly smaller so that it is not on top of table border graphic. + QStyleOptionHeader subopt = *header; + const int borderTweak = + QS60StylePrivate::pixelMetric(PM_Custom_FrameCornerWidth)>>1; + if (subopt.direction == Qt::LeftToRight) + subopt.rect.adjust(borderTweak, borderTweak, 0, -borderTweak); + else + subopt.rect.adjust(0, borderTweak, -borderTweak, -borderTweak); + drawPrimitive(PE_PanelButtonBevel, &subopt, painter, widget); + } else if ((header->palette.brush(QPalette::Button) != Qt::transparent)) { + //Draw non-themed background. Background for theme is drawn in CE_ShapedFrame + //to get continuous theme graphic across all the header cells. + qDrawShadePanel(painter, header->rect, header->palette, + header->state & (State_Sunken | State_On), penWidth, + &header->palette.brush(QPalette::Button)); + } } break; case CE_HeaderEmptyArea: // no need to draw this @@ -1840,15 +1869,24 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, } else if (qobject_cast<const QTableView *>(widget)) { QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_TableItem, painter, option->rect, flags); } else if (const QHeaderView *header = qobject_cast<const QHeaderView *>(widget)) { - if (header->orientation() == Qt::Horizontal) { - QRect headerRect = option->rect; - const int frameWidth = QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth); - headerRect.adjust(0,frameWidth,-2*frameWidth,0); - QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_TableHeaderItem, painter, headerRect, flags); - } else { + //QS60style draws header background here instead of in each headersection, to get + //continuous graphic from section to section. + QS60StylePrivate::SkinElementFlags adjustableFlags = flags; + QRect headerRect = option->rect; + if (header->orientation() != Qt::Horizontal) { //todo: update to horizontal table graphic - QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_TableHeaderItem, painter, option->rect, flags | QS60StylePrivate::SF_PointWest); + adjustableFlags = (adjustableFlags | QS60StylePrivate::SF_PointWest); + } else { + const int frameWidth = QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth); + if (option->direction == Qt::LeftToRight) + headerRect.adjust(-2*frameWidth, 0, 0, 0); + else + headerRect.adjust(0, 0, 2*frameWidth, 0); } + if (option->palette.brush(QPalette::Button).color() == Qt::transparent) + QS60StylePrivate::drawSkinElement( + QS60StylePrivate::SE_TableHeaderItem, painter, headerRect, adjustableFlags); + } else if (qobject_cast<const QFrame *>(widget)) { QCommonStyle::drawControl(element, option, painter, widget); } @@ -2204,7 +2242,6 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti // todo: items are below with #ifdefs "just in case". in final version, remove all non-required cases case PE_FrameLineEdit: - case PE_IndicatorButtonDropDown: case PE_IndicatorDockWidgetResizeHandle: case PE_PanelTipLabel: case PE_PanelScrollAreaCorner: @@ -2266,10 +2303,19 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, sz += QSize(2*f->lineWidth, 4*f->lineWidth); break; case CT_TabBarTab: - QSize naviPaneSize = QS60StylePrivate::naviPaneSize(); + { + const QSize naviPaneSize = QS60StylePrivate::naviPaneSize(); + sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget); + if (naviPaneSize.height() > sz.height()) + sz.setHeight(naviPaneSize.height()); + } + break; + case CT_ItemViewItem: sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget); - if (naviPaneSize.height() > sz.height()) - sz.setHeight(naviPaneSize.height()); + if (QS60StylePrivate::isTouchSupported()) + //Make itemview easier to use in touch devices + //QCommonStyle does not adjust height with horizontal margin, it only adjusts width + sz.setHeight(sz.height() + 2*pixelMetric(QStyle::PM_FocusFrameVMargin)); break; default: sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget); @@ -2524,6 +2570,29 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple } } break; + case CC_ToolButton: + if (const QStyleOptionToolButton *toolButton = qstyleoption_cast<const QStyleOptionToolButton *>(option)) { + const int indicatorRect = pixelMetric(PM_MenuButtonIndicator, toolButton, widget) + + 2*pixelMetric(PM_ButtonMargin, toolButton, widget); + ret = toolButton->rect; + const bool popup = (toolButton->features & + (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) + == QStyleOptionToolButton::MenuButtonPopup; + switch (scontrol) { + case SC_ToolButton: + if (popup) + ret.adjust(0, 0, -indicatorRect, 0); + break; + case SC_ToolButtonMenu: + if (popup) + ret.adjust(ret.width() - indicatorRect, ret.height() - indicatorRect, 0, 0); + break; + default: + break; + } + ret = visualRect(toolButton->direction, toolButton->rect, ret); + } + break; default: ret = QCommonStyle::subControlRect(control, option, scontrol, widget); } diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 678844c..0cd87bd 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -1382,13 +1382,13 @@ QSize QS60StylePrivate::naviPaneSize() QSize QS60StyleModeSpecifics::naviPaneSize() { CAknNavigationControlContainer* naviContainer; - if (S60->statusPane()) - naviContainer = static_cast<CAknNavigationControlContainer*> - (S60->statusPane()->ControlL(TUid::Uid(EEikStatusPaneUidNavi))); - if (naviContainer) - return QSize(naviContainer->Size().iWidth, naviContainer->Size().iHeight); - else - return QSize(0,0); + if (S60->statusPane()) { + TRAPD(err, naviContainer = static_cast<CAknNavigationControlContainer*> + (S60->statusPane()->ControlL(TUid::Uid(EEikStatusPaneUidNavi)))); + if (err==KErrNone) + return QSize(naviContainer->Size().iWidth, naviContainer->Size().iHeight); + } + return QSize(0,0); } #endif // Q_WS_S60 diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp index 14f0424..706b4e9 100644 --- a/src/gui/styles/qs60style_simulated.cpp +++ b/src/gui/styles/qs60style_simulated.cpp @@ -322,7 +322,7 @@ QPixmap QS60StylePrivate::backgroundTexture() { if (!m_background) { const QSize size = QApplication::desktop()->screen()->size(); - QPixmap background = part(QS60StyleEnums::SP_QsnBgScreen, size); + QPixmap background = part(QS60StyleEnums::SP_QsnBgScreen, size, 0); m_background = new QPixmap(background); } return *m_background; diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index 3f6545c..9497b6f 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1831,7 +1831,8 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) e->ignore(); return; } - bool isGettingInput = !e->commitString().isEmpty() || !e->preeditString().isEmpty() + bool isGettingInput = !e->commitString().isEmpty() + || e->preeditString() != cursor.block().layout()->preeditAreaText() || e->replacementLength() > 0; if (isGettingInput) { diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 8f17e98..0fc94c9 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -401,7 +401,8 @@ void QLineControl::moveCursor(int pos, bool mark) void QLineControl::processInputMethodEvent(QInputMethodEvent *event) { int priorState = 0; - bool isGettingInput = !event->commitString().isEmpty() || !event->preeditString().isEmpty() + bool isGettingInput = !event->commitString().isEmpty() + || event->preeditString() != preeditAreaText() || event->replacementLength() > 0; bool cursorPositionChanged = false; diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro index 4734144..158633d 100644 --- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro +++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro @@ -1,5 +1,7 @@ # Use subdirs template to suppress generation of unnecessary files TEMPLATE = subdirs -# We just want to extract the zip file containing sqlite binaries for Symbian -BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip" +# We just want to export the sqlite3 binaries for Symbian for platforms that do not have them. +!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) { + BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip" +} diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 022a072..90c9f27 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -12,7 +12,7 @@ symbian: { VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main.rsc - qtresources.path = $$APP_RESOURCE_DIR + qtresources.path = c:$$APP_RESOURCE_DIR qtlibraries.sources = \ QtCore.dll \ @@ -24,24 +24,24 @@ symbian: { qts60plugindeployment = \ "IF package(0x1028315F)" \ - " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_5_0.dll\" - \"!:\\sys\\bin\\qts60plugin_5_0.dll\"" \ + " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ "ELSEIF package(0x102752AE)" \ - " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_3_2.dll\" - \"!:\\sys\\bin\\qts60plugin_3_2.dll\"" \ + " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_3_2.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2.dll\"" \ "ELSEIF package(0x102032BE)" \ - " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_3_1.dll\" - \"!:\\sys\\bin\\qts60plugin_3_1.dll\"" \ + " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_3_1.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1.dll\"" \ "ELSE" \ - " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_5_0.dll\" - \"!:\\sys\\bin\\qts60plugin_5_0.dll\"" \ + " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ "ENDIF" qtlibraries.pkg_postrules += qts60plugindeployment sqlitedeployment = \ "; Deploy sqlite onto phone that does not have it (this should be replaced with embedded sis file when available)" \ "IF NOT package(0x2002533b) " \ - "\"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/sqlite3.dll\" - \"!:\\sys\\bin\\sqlite3.dll\"" \ + "\"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/sqlite3.dll\" - \"c:\\sys\\bin\\sqlite3.dll\"" \ "ENDIF" qtlibraries.pkg_postrules += sqlitedeployment - qtlibraries.path = /sys/bin + qtlibraries.path = c:/sys/bin vendorinfo = \ "; Localised Vendor name" \ @@ -67,15 +67,15 @@ symbian: { !contains(QT_CONFIG, no-mng): imageformats_plugins.sources += qmng.dll !contains(QT_CONFIG, no-tiff): imageformats_plugins.sources += qtiff.dll !contains(QT_CONFIG, no-ico): imageformats_plugins.sources += qico.dll - imageformats_plugins.path = $$QT_PLUGINS_BASE_DIR/imageformats + imageformats_plugins.path = c:$$QT_PLUGINS_BASE_DIR/imageformats codecs_plugins.sources = qcncodecs.dll qjpcodecs.dll qtwcodecs.dll qkrcodecs.dll - codecs_plugins.path = $$QT_PLUGINS_BASE_DIR/codecs + codecs_plugins.path = c:$$QT_PLUGINS_BASE_DIR/codecs contains(QT_CONFIG, phonon-backend) { phonon_backend_plugins.sources += phonon_mmf.dll - phonon_backend_plugins.path = $$QT_PLUGINS_BASE_DIR/phonon_backend + phonon_backend_plugins.path = c:$$QT_PLUGINS_BASE_DIR/phonon_backend DEPLOYMENT += phonon_backend_plugins } @@ -85,7 +85,7 @@ symbian: { qtlibraries.sources += QtSvg.dll imageformats_plugins.sources += qsvg.dll iconengines_plugins.sources = qsvgicon.dll - iconengines_plugins.path = $$QT_PLUGINS_BASE_DIR/iconengines + iconengines_plugins.path = c:$$QT_PLUGINS_BASE_DIR/iconengines DEPLOYMENT += iconengines_plugins } @@ -105,9 +105,9 @@ symbian: { qtlibraries.sources += QtWebKit.dll } - graphicssystems_plugins.path = $$QT_PLUGINS_BASE_DIR/graphicssystems + graphicssystems_plugins.path = c:$$QT_PLUGINS_BASE_DIR/graphicssystems contains(QT_CONFIG, openvg) { - qtlibraries.sources = QtOpenVG.dll + qtlibraries.sources += QtOpenVG.dll graphicssystems_plugins.sources += qvggraphicssystem.dll } diff --git a/src/s60main/qts60main_mcrt0.cpp b/src/s60main/qts60main_mcrt0.cpp index d30e07a..edc2fb8 100644 --- a/src/s60main/qts60main_mcrt0.cpp +++ b/src/s60main/qts60main_mcrt0.cpp @@ -83,12 +83,10 @@ GLDEF_C TInt QtMainWrapper() char **envp = 0; // get args & environment __crt0(argc, argv, envp); - CleanupArrayDelete<char*>::PushL(argv); - CleanupArrayDelete<char*>::PushL(envp); //Call user(application)'s main - int ret = 0; - QT_TRYCATCH_LEAVING(ret = CALLMAIN(argc, argv, envp);); - CleanupStack::PopAndDestroy(2, argv); + TRAPD(ret, QT_TRYCATCH_LEAVING(ret = CALLMAIN(argc, argv, envp);)); + delete[] argv; + delete[] envp; return ret; } diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro index cc3c547..47cf020 100644 --- a/src/s60main/s60main.pro +++ b/src/s60main/s60main.pro @@ -16,16 +16,6 @@ symbian { SOURCES = qts60main.cpp \ qts60main_mcrt0.cpp - # 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 = \ - "START RESOURCE s60main.rss" \ - "HEADER" \ - "TARGETPATH resource\apps" \ - "END" - MMP_RULES += minimalAppResource31 - # s60main needs to be built in ARM mode for GCCE to work. MMP_RULES+="ALWAYS_BUILD_AS_ARM" @@ -36,14 +26,4 @@ symbian { error("$$_FILE_ is intended only for Symbian!") } -symbian-abld: { - # abld build commands generated resources after the static library is built, and - # we have dependency to resource from static lib -> resources need to be generated - # explicitly before library - rsgFix2.commands = "-$(DEL_FILE) $(EPOCROOT)Epoc32\Data\z\resource\apps\s60main.rsc >NUL 2>&1" - rsgFix.commands = "-$(ABLD) resource $(PLATFORM) $(CFG) 2>NUL" - QMAKE_EXTRA_TARGETS += rsgFix rsgFix2 - PRE_TARGETDEPS += rsgFix rsgFix2 -} - include(../qbase.pri) diff --git a/src/xmlpatterns/acceltree/qacceltree_p.h b/src/xmlpatterns/acceltree/qacceltree_p.h index 8da61c9..ee7d6f6 100644 --- a/src/xmlpatterns/acceltree/qacceltree_p.h +++ b/src/xmlpatterns/acceltree/qacceltree_p.h @@ -89,7 +89,7 @@ namespace QPatternist * @see <a href"http://www.inf.uni-konstanz.de/dbis/publications/download/accelerating-locsteps.pdf">Accelerating * XPath Evaluation in Any RDBMS, Torsten Grust</a> */ - class AccelTree : public QAbstractXmlNodeModel + class Q_AUTOTEST_EXPORT AccelTree : public QAbstractXmlNodeModel { friend class AccelTreePrivate; public: diff --git a/src/xmlpatterns/acceltree/qcompressedwhitespace_p.h b/src/xmlpatterns/acceltree/qcompressedwhitespace_p.h index bb547bd..27e3c22 100644 --- a/src/xmlpatterns/acceltree/qcompressedwhitespace_p.h +++ b/src/xmlpatterns/acceltree/qcompressedwhitespace_p.h @@ -84,7 +84,7 @@ namespace QPatternist * * @author Frans Englich <frans.englich@nokia.com> */ - class CompressedWhitespace + class Q_AUTOTEST_EXPORT CompressedWhitespace { public: /** diff --git a/tests/auto/checkxmlfiles/checkxmlfiles.pro b/tests/auto/checkxmlfiles/checkxmlfiles.pro index c368c02..d53c11c 100644 --- a/tests/auto/checkxmlfiles/checkxmlfiles.pro +++ b/tests/auto/checkxmlfiles/checkxmlfiles.pro @@ -12,7 +12,7 @@ addFiles.sources = \ $$QT_SOURCE_TREE/examples/sql/masterdetail/albumdetails.xml \ $$QT_SOURCE_TREE/examples/xmlpatterns/xquery/globalVariables/globals.gccxml \ $$QT_SOURCE_TREE/doc/src/diagrams/stylesheet/treeview.svg \ - $$QT_SOURCE_TREE/doc/src/diagrams/designer-mainwindow-actions.ui \ + $$QT_SOURCE_TREE/doc/src/diagrams/designer-manual/designer-mainwindow-actions.ui \ $$QT_SOURCE_TREE/demos/undo/undo.qrc addFiles.path = xmlfiles DEPLOYMENT += addFiles diff --git a/tests/auto/qclipboard/test/test.pro b/tests/auto/qclipboard/test/test.pro index 508eba1..62a38af 100644 --- a/tests/auto/qclipboard/test/test.pro +++ b/tests/auto/qclipboard/test/test.pro @@ -13,7 +13,18 @@ win32 { wince*|symbian*: { copier.sources = ../copier/copier.exe copier.path = copier - paster.sources = ../paster/paster.exe + paster.sources = ../paster/paster.exe paster.path = paster - DEPLOYMENT = copier paster + + symbian*: { + load(data_caging_paths) + rsc.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/copier.rsc + rsc.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/paster.rsc + rsc.path = $$APP_RESOURCE_DIR + reg_resource.sources = $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/copier_reg.rsc + reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/paster_reg.rsc + reg_resource.path = $$REG_RESOURCE_IMPORT_DIR + } + + DEPLOYMENT = copier paster rsc reg_resource }
\ No newline at end of file diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp index c53780e..1140402 100644 --- a/tests/auto/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/qdatetime/tst_qdatetime.cpp @@ -450,11 +450,12 @@ void tst_QDateTime::toString_enumformat() qDebug() << str3; QVERIFY(!str3.isEmpty()); //check for date/time components in any order - QVERIFY(str3.contains("1995")); + //year may be 2 or 4 digits + QVERIFY(str3.contains("95")); //day and month may be in numeric or word form QVERIFY(str3.contains("12")); QVERIFY(str3.contains("34")); - QVERIFY(str3.contains("56")); + //seconds may be absent } void tst_QDateTime::addDays() diff --git a/tests/auto/qsound/tst_qsound.cpp b/tests/auto/qsound/tst_qsound.cpp index 56a330b..73eca98 100644 --- a/tests/auto/qsound/tst_qsound.cpp +++ b/tests/auto/qsound/tst_qsound.cpp @@ -55,20 +55,32 @@ public: tst_QSound( QObject* parent=0) : QObject(parent) {} private slots: - void checkFinished(); + void checkFinished(); + + // Manual tests + void staticPlay(); }; void tst_QSound::checkFinished() { - QSound sound(SRCDIR"4.wav"); - sound.setLoops(3); - sound.play(); - QTest::qWait(5000); + QSound sound(SRCDIR"4.wav"); + sound.setLoops(3); + sound.play(); + QTest::qWait(5000); #if defined(Q_WS_QWS) - QEXPECT_FAIL("", "QSound buggy on embedded (task QTBUG-157)", Abort); + QEXPECT_FAIL("", "QSound buggy on embedded (task QTBUG-157)", Abort); #endif - QVERIFY(sound.isFinished() ); + QVERIFY(sound.isFinished() ); +} + +void tst_QSound::staticPlay() +{ + QSKIP("Test disabled -- only for manual purposes", SkipAll); + + // Check that you hear sound with static play also. + QSound::play(SRCDIR"4.wav"); + QTest::qWait(2000); } QTEST_MAIN(tst_QSound); diff --git a/tests/auto/qxmlnodemodelindex/tst_qxmlnodemodelindex.cpp b/tests/auto/qxmlnodemodelindex/tst_qxmlnodemodelindex.cpp index cb6bd4d..c19deb6 100644 --- a/tests/auto/qxmlnodemodelindex/tst_qxmlnodemodelindex.cpp +++ b/tests/auto/qxmlnodemodelindex/tst_qxmlnodemodelindex.cpp @@ -178,7 +178,7 @@ void tst_QXmlNodeModelIndex::model() const /* Check default value. */ { const QXmlNodeModelIndex index; - QCOMPARE(index.model(), static_cast<void *>(0)); + QCOMPARE(index.model(), static_cast<const QAbstractXmlNodeModel *>(0)); } } diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp index 8a9d4ef..49f2b08 100644 --- a/tests/auto/qxmlquery/tst_qxmlquery.cpp +++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp @@ -345,8 +345,8 @@ void tst_QXmlQuery::copyConstructor() const query1.setInitialTemplateName(name); const QXmlQuery query2(query1); - QCOMPARE(query2.messageHandler(), &silencer); - QCOMPARE(query2.uriResolver(), &resolver); + QCOMPARE(query2.messageHandler(), static_cast<QAbstractMessageHandler *>(&silencer)); + QCOMPARE(query2.uriResolver(), static_cast<const QAbstractUriResolver *>(&resolver)); QCOMPARE(query2.queryLanguage(), QXmlQuery::XSLT20); QCOMPARE(query2.initialTemplateName(), name); QCOMPARE(query2.networkAccessManager(), &networkManager); @@ -522,7 +522,7 @@ void tst_QXmlQuery::assignmentOperator() const QVERIFY(copy.isValid()); QCOMPARE(copy.uriResolver(), static_cast<const QAbstractUriResolver *>(&returnURI)); - QCOMPARE(copy.messageHandler(), &silencer); + QCOMPARE(copy.messageHandler(), static_cast<QAbstractMessageHandler *>(&silencer)); QCOMPARE(testName.localName(copy.namePool()), QString::fromLatin1("somethingToCheck")); QXmlResultItems result; @@ -559,7 +559,7 @@ void tst_QXmlQuery::assignmentOperator() const /* Check that the copy picked up the new things. */ QVERIFY(copy.isValid()); QCOMPARE(copy.uriResolver(), static_cast<const QAbstractUriResolver *>(&secondUriResolver)); - QCOMPARE(copy.messageHandler(), &secondSilencer); + QCOMPARE(copy.messageHandler(), static_cast<QAbstractMessageHandler *>(&secondSilencer)); QXmlResultItems resultCopy; copy.evaluateTo(&resultCopy); @@ -577,7 +577,7 @@ void tst_QXmlQuery::assignmentOperator() const /* Check that the original is unchanged. */ QVERIFY(original.isValid()); QCOMPARE(original.uriResolver(), static_cast<const QAbstractUriResolver *>(&returnURI)); - QCOMPARE(original.messageHandler(), &silencer); + QCOMPARE(original.messageHandler(), static_cast<QAbstractMessageHandler *>(&silencer)); QXmlResultItems resultOriginal; original.evaluateTo(&resultOriginal); @@ -931,7 +931,7 @@ void tst_QXmlQuery::setMessageHandler() const QXmlQuery query; MessageSilencer silencer; query.setMessageHandler(&silencer); - QCOMPARE(&silencer, query.messageHandler()); + QCOMPARE(static_cast<QAbstractMessageHandler *>(&silencer), query.messageHandler()); } void tst_QXmlQuery::evaluateToReceiver() @@ -1691,7 +1691,7 @@ void tst_QXmlQuery::setUriResolver() const TestURIResolver resolver; QXmlQuery query; query.setUriResolver(&resolver); - QCOMPARE(query.uriResolver(), &resolver); + QCOMPARE(query.uriResolver(), static_cast<const QAbstractUriResolver *>(&resolver)); } } diff --git a/tests/auto/qxmlschema/tst_qxmlschema.cpp b/tests/auto/qxmlschema/tst_qxmlschema.cpp index 79f5587..ec91f88 100644 --- a/tests/auto/qxmlschema/tst_qxmlschema.cpp +++ b/tests/auto/qxmlschema/tst_qxmlschema.cpp @@ -357,7 +357,7 @@ void tst_QXmlSchema::messageHandler() const QXmlSchema schema; schema.setMessageHandler(&handler); - QCOMPARE(schema.messageHandler(), &handler); + QCOMPARE(schema.messageHandler(), static_cast<QAbstractMessageHandler *>(&handler)); } } @@ -394,7 +394,7 @@ void tst_QXmlSchema::uriResolver() const QXmlSchema schema; schema.setUriResolver(&resolver); - QCOMPARE(schema.uriResolver(), &resolver); + QCOMPARE(schema.uriResolver(), static_cast<const QAbstractUriResolver *>(&resolver)); } } diff --git a/tests/auto/qxmlschemavalidator/tst_qxmlschemavalidator.cpp b/tests/auto/qxmlschemavalidator/tst_qxmlschemavalidator.cpp index 519f864..9fc784b 100644 --- a/tests/auto/qxmlschemavalidator/tst_qxmlschemavalidator.cpp +++ b/tests/auto/qxmlschemavalidator/tst_qxmlschemavalidator.cpp @@ -149,8 +149,8 @@ void tst_QXmlSchemaValidator::propertyInitialization() const schema.setNetworkAccessManager(&manager); QXmlSchemaValidator validator(schema); - QCOMPARE(validator.messageHandler(), &handler); - QCOMPARE(validator.uriResolver(), &resolver); + QCOMPARE(validator.messageHandler(), static_cast<QAbstractMessageHandler *>(&handler)); + QCOMPARE(validator.uriResolver(), static_cast<const QAbstractUriResolver *>(&resolver)); QCOMPARE(validator.networkAccessManager(), &manager); } } @@ -384,7 +384,7 @@ void tst_QXmlSchemaValidator::messageHandler() const QXmlSchemaValidator validator(schema); validator.setMessageHandler(&handler); - QCOMPARE(validator.messageHandler(), &handler); + QCOMPARE(validator.messageHandler(), static_cast<QAbstractMessageHandler *>(&handler)); } /* Test that we return the message handler that was set, even if the schema changed in between. */ @@ -399,7 +399,7 @@ void tst_QXmlSchemaValidator::messageHandler() const const QXmlSchema schema2; validator.setSchema(schema2); - QCOMPARE(validator.messageHandler(), &handler); + QCOMPARE(validator.messageHandler(), static_cast<QAbstractMessageHandler *>(&handler)); } } @@ -452,7 +452,7 @@ void tst_QXmlSchemaValidator::uriResolver() const QXmlSchemaValidator validator(schema); validator.setUriResolver(&resolver); - QCOMPARE(validator.uriResolver(), &resolver); + QCOMPARE(validator.uriResolver(), static_cast<const QAbstractUriResolver *>(&resolver)); } /* Test that we return the uri resolver that was set, even if the schema changed in between. */ @@ -467,7 +467,7 @@ void tst_QXmlSchemaValidator::uriResolver() const const QXmlSchema schema2; validator.setSchema(schema2); - QCOMPARE(validator.uriResolver(), &resolver); + QCOMPARE(validator.uriResolver(), static_cast<const QAbstractUriResolver *>(&resolver)); } } diff --git a/tests/auto/qxmlserializer/tst_qxmlserializer.cpp b/tests/auto/qxmlserializer/tst_qxmlserializer.cpp index aeca140..51044ff 100644 --- a/tests/auto/qxmlserializer/tst_qxmlserializer.cpp +++ b/tests/auto/qxmlserializer/tst_qxmlserializer.cpp @@ -148,7 +148,7 @@ void tst_QXmlSerializer::outputDevice() const { const QXmlQuery query; const QXmlSerializer serializer(query, &file); - QCOMPARE(serializer.outputDevice(), &file); + QCOMPARE(serializer.outputDevice(), static_cast< QIODevice *>(&file)); } } @@ -158,7 +158,7 @@ void tst_QXmlSerializer::serializationError() const QXmlQuery query; MessageSilencer silencer; query.setMessageHandler(&silencer); - + query.setQuery(queryString); QByteArray output; diff --git a/tests/auto/xmlpatterns.pri b/tests/auto/xmlpatterns.pri index 7cdd67f..8c8ccad 100644 --- a/tests/auto/xmlpatterns.pri +++ b/tests/auto/xmlpatterns.pri @@ -15,8 +15,9 @@ QT -= gui XMLPATTERNS_SDK = QtXmlPatternsSDK if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { - win32:XMLPATTERNS_SDK = $${XMLPATTERNS_SDK}d - else: XMLPATTERNS_SDK = $${XMLPATTERNS_SDK}_debug + symbian: XMLPATTERNS_SDK = $${XMLPATTERNS_SDK} + else:win32: XMLPATTERNS_SDK = $${XMLPATTERNS_SDK}d + else: XMLPATTERNS_SDK = $${XMLPATTERNS_SDK}_debug } INCLUDEPATH += \ diff --git a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp index 0dcb070..22f6693 100644 --- a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp +++ b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp @@ -48,6 +48,10 @@ #include "../qxmlquery/TestFundament.h" #include "../network-settings.h" +#if defined(Q_OS_SYMBIAN) +#define SRCDIR "" +#endif + /*! \class tst_XmlPatterns \internal @@ -130,6 +134,8 @@ void tst_XmlPatterns::xquerySupport() #ifdef Q_OS_WINCE QSKIP("WinCE: This test uses unsupported WinCE functionality", SkipAll); +#elif defined(Q_OS_SYMBIAN) + QSKIP("Symbian: This test uses unsupported Symbian functionality (QProcess with std streams)", SkipAll); #endif QFETCH(int, expectedExitCode); @@ -218,7 +224,7 @@ void tst_XmlPatterns::xquerySupport() void tst_XmlPatterns::xquerySupport_data() const { -#ifdef Q_OS_WINCE +#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) return; #endif @@ -849,6 +855,8 @@ void tst_XmlPatterns::xsltSupport_data() const #ifdef Q_OS_WINCE QSKIP("WinCE: This test uses unsupported WinCE functionality", SkipAll); +#elif defined(Q_OS_SYMBIAN) + QSKIP("Symbian: This test uses unsupported Symbian functionality (QProcess with std streams)", SkipAll); #endif QTest::addColumn<int>("expectedExitCode"); diff --git a/tests/auto/xmlpatterns/xmlpatterns.pro b/tests/auto/xmlpatterns/xmlpatterns.pro index 01e3b2b..54dd9aa 100644 --- a/tests/auto/xmlpatterns/xmlpatterns.pro +++ b/tests/auto/xmlpatterns/xmlpatterns.pro @@ -2,10 +2,10 @@ load(qttest_p4) SOURCES += tst_xmlpatterns.cpp \ ../qxmlquery/TestFundament.cpp -!wince* { -DEFINES += SRCDIR=\\\"$$PWD/\\\" -} else { +wince* { DEFINES += SRCDIR=\\\"./\\\" +} else:!symbian { +DEFINES += SRCDIR=\\\"$$PWD/\\\" } include (../xmlpatterns.pri) diff --git a/tests/auto/xmlpatternsdiagnosticsts/test/test.pro b/tests/auto/xmlpatternsdiagnosticsts/test/test.pro index aeff896..acd71e4 100644 --- a/tests/auto/xmlpatternsdiagnosticsts/test/test.pro +++ b/tests/auto/xmlpatternsdiagnosticsts/test/test.pro @@ -25,8 +25,8 @@ INCLUDEPATH += $$(QTSRCDIR)/tests/auto/xmlpatternsxqts/lib/ \ ../../xmlpatternsxqts/test \ ../../xmlpatternsxqts/lib -wince*: { - catalog.sources = TestSuite Baseline.xml +wince*|symbian { + catalog.sources = ../TestSuite ../Baseline.xml catalog.path = . DEPLOYMENT += catalog } diff --git a/tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro b/tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro index bcc988a..0f55078 100644 --- a/tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro +++ b/tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro @@ -11,8 +11,9 @@ SOURCES += ../xmlpatternsxqts/test/tst_suitetest.cpp PATTERNIST_SDK = QtXmlPatternsSDK if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { - win32:PATTERNIST_SDK = $${PATTERNIST_SDK}d - else: PATTERNIST_SDK = $${PATTERNIST_SDK}_debug + symbian: PATTERNIST_SDK = $${PATTERNIST_SDK} + else:win32: PATTERNIST_SDK = $${PATTERNIST_SDK}d + else: PATTERNIST_SDK = $${PATTERNIST_SDK}_debug } LIBS += -l$$PATTERNIST_SDK diff --git a/tests/auto/xmlpatternsxqts/lib/Global.h b/tests/auto/xmlpatternsxqts/lib/Global.h index eadb940..a620417 100644 --- a/tests/auto/xmlpatternsxqts/lib/Global.h +++ b/tests/auto/xmlpatternsxqts/lib/Global.h @@ -47,7 +47,7 @@ #include "private/qitem_p.h" #include "private/qnamepool_p.h" -#ifdef Q_WS_WIN +#if defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) # ifdef Q_PATTERNISTSDK_BUILDING #define Q_PATTERNISTSDK_EXPORT __declspec(dllexport) #else diff --git a/tests/auto/xmlpatternsxqts/lib/lib.pro b/tests/auto/xmlpatternsxqts/lib/lib.pro index cb9453a..f5b0a06 100644 --- a/tests/auto/xmlpatternsxqts/lib/lib.pro +++ b/tests/auto/xmlpatternsxqts/lib/lib.pro @@ -13,6 +13,12 @@ mac { INSTALLS += target } +symbian { + TARGET.EPOCALLOWDLLDATA=1 + TARGET.CAPABILITY = All -Tcb + MMP_RULES += EXPORTUNFROZEN +} + # We add gui, because xmlpatterns.pri pull it out. QT += xmlpatterns xml network testlib gui |