From c04fbce5ee7f6b59c01bb444ca8e0e166aae0317 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 26 Mar 2010 13:54:12 +0100 Subject: Cleaned up the elf2e32 options a bit. --- mkspecs/common/symbian/symbian-makefile.conf | 8 +++++- mkspecs/features/symbian/symbian_building.prf | 37 +++++++++++++++++---------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index 3801eff..2397c96 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -13,7 +13,13 @@ QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< -QMAKE_ELF2E32_FLAGS += +QMAKE_ELF2E32_FLAGS = --dlldata \ + --heap=0x00020000,0x00800000 \ + --stack=0x00014000 \ + --fpu=softvfp \ + --unfrozen \ + --compressionmethod bytepair \ + --unpaged include(../../common/unix.conf) diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index c21b4c9..17c9be3 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -100,13 +100,19 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { # The comparison of dso files is to avoid extra building of modules that depend on this dso, in # case it has not changed. QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym \ - && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 \ - --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 \ - --stack=0x00014000 --fpu=softvfp --targettype=DLL \ - --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.dll \ - --dso=$$symbianObjdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def \ - --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ - --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \ + && elf2e32 --version=$$decVersion \ + --sid=$$TARGET.SID \ + --uid1=0x10000079 \ + --uid2=$$TARGET.UID2 \ + --uid3=$$TARGET.UID3 \ + --targettype=DLL \ + --elfinput=$${symbianDestdir}/$${TARGET}.sym \ + --output=$${symbianDestdir}/$${TARGET}.dll \ + --dso=$$symbianObjdir/$${TARGET}.dso \ + --defoutput=$$symbianObjdir/$${TARGET}.def \ + --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ + $$elf2e32_LIBPATH \ + $$capability \ $$QMAKE_ELF2E32_FLAGS \ | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ && if ! diff -q $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso \ @@ -144,12 +150,17 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { } # the tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym \ - && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a \ - --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 \ - --stack=0x00014000 --fpu=softvfp --targettype=EXE \ - --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe \ - --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \ - --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \ + && elf2e32 --version $$decVersion \ + --sid=$$TARGET.SID \ + --uid1=0x1000007a \ + --uid2=$$TARGET.UID2 \ + --uid3=$$TARGET.UID3 \ + --targettype=EXE \ + --elfinput=$${symbianDestdir}/$${TARGET}.sym \ + --output=$${symbianDestdir}/$${TARGET}.exe \ + --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \ + $$elf2e32_LIBPATH \ + $$capability \ $$QMAKE_ELF2E32_FLAGS \ | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ && ln "$${symbianDestdir}/$${TARGET}.exe" "$${symbianDestdir}/$$TARGET" \ -- cgit v0.12 From 8cbdeb1306084d01b00028e8a08b54165dd73fb4 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 26 Mar 2010 14:08:48 +0100 Subject: Removed the --export_all_vtbl from linking. It causes wrong exports. This required rearranging some libraries to avoid undefined symbols. --- mkspecs/features/symbian/symbian_building.prf | 6 ++++-- mkspecs/symbian/linux-armcc/qmake.conf | 6 ++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index 17c9be3..261cc10 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -126,9 +126,10 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def linux-armcc: { - QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) + LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\) + LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) } else :linux-gcce { - QMAKE_LIBS += \ + LIBS += \ -l:edll.lib \ -l:usrt2_2.lib \ -l:dfpaeabi.dso \ @@ -170,6 +171,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { QMAKE_CLEAN += $${symbianDestdir}/$${TARGET} linux-armcc: { + QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\) QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) contains(CONFIG, "qt"):contains(QT, "core") { #if linking with QtCore QMAKE_LIBS += -lqtmain$${QT_LIBINFIX}.lib diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 599e552..77fb1ea 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -6,8 +6,6 @@ include(../../common/symbian/symbian-makefile.conf) include(../../common/armcc.conf) -QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\) - QMAKE_RVCT_LINKSTYLE = 1 # notice that the middle part of the following set of vars matches the TARGET content of the libs @@ -33,8 +31,8 @@ QMAKE_QtWebKit_CXXFLAGS = --arm # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. QMAKE_QtWebKit_LFLAGS = --rw-base 0xE00000 -QMAKE_CFLAGS += --dllimport_runtime --preinclude rvct2_2.h --diag_suppress 186,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --export_all_vtbl --no_vfe --apcs /inter $$QMAKE_CFLAGS.ARMCC -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates $$QMAKE_CXXFLAGS.ARMCC +QMAKE_CFLAGS += --dllimport_runtime --preinclude rvct2_2.h --diag_suppress 186,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --no_vfe --apcs /inter $$QMAKE_CFLAGS.ARMCC +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS $$QMAKE_CXXFLAGS.ARMCC QMAKE_LFLAGS += --symver_soname --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --dll --no_scanlib QMAKE_LFLAGS_APP += --entry _E32Startup QMAKE_LFLAGS_SHLIB += --entry _E32Dll -- cgit v0.12 From ebdd7b195087358f4bc43ade8faedcd38ecdc1be Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 26 Mar 2010 14:13:25 +0100 Subject: Fixed library dependency for Gnupoc. --- src/gui/styles/styles.pri | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/styles/styles.pri b/src/gui/styles/styles.pri index 5084442..f920032 100644 --- a/src/gui/styles/styles.pri +++ b/src/gui/styles/styles.pri @@ -170,7 +170,12 @@ contains( styles, s60 ):contains(QT_CONFIG, s60) { SOURCES += styles/qs60style.cpp symbian { SOURCES += styles/qs60style_s60.cpp - LIBS += -lAknIcon -lAKNSKINS -lAKNSKINSRV -lFontUtils -legul -lbmpanim + LIBS += -legul -lbmpanim + contains(CONFIG, is_using_gnupoc) { + LIBS += -laknicon -laknskins -laknskinsrv -lfontutils + } else { + LIBS += -lAknIcon -lAKNSKINS -lAKNSKINSRV -lFontUtils + } } else { SOURCES += styles/qs60style_simulated.cpp RESOURCES += styles/qstyle_s60_simulated.qrc -- cgit v0.12 From 70ad91b6464d77eee8b8d86cda05dee01e6669c5 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Mon, 3 May 2010 13:10:53 +0200 Subject: Use lowercase includes so it compiles in Linux too --- src/gui/styles/qs60style_s60.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 55aa6b0..46de9ef 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -50,17 +50,17 @@ #include "qapplication.h" #include -#include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include -#include +#include #include #include #include -- cgit v0.12 From 6b36913cbe0b97431742edc3b16639e8cf2a722a Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Mon, 3 May 2010 14:10:30 +0200 Subject: Fix includes so it compiles --- src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h | 2 +- src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h b/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h index fca66b3..8d0eafa 100644 --- a/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h +++ b/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h @@ -48,7 +48,7 @@ typedef CMdaAudioPlayerUtility CAudioPlayer; typedef MMdaAudioPlayerCallback MAudioPlayerObserver; -#include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h b/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h index 52e311a..9aece61 100644 --- a/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h +++ b/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h @@ -48,8 +48,7 @@ #include #include -#include -#include +#include QT_BEGIN_NAMESPACE -- cgit v0.12 From 38cd479383056fb08041e31e3ca6bdb0006f959e Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 26 Mar 2010 14:12:01 +0100 Subject: Enabled previously disabled Qt features. --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 63d8f2d..a15f61f 100755 --- a/configure +++ b/configure @@ -607,7 +607,7 @@ mkdir -p "$outpath/config.tests" rm -f "$outpath/config.tests/.qmake.cache" cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache" -QMakeVar add styles "cde mac motif plastique cleanlooks windows" +QMakeVar add styles "cde mac motif plastique cleanlooks windows s60" QMakeVar add decorations "default windows styled" QMakeVar add mouse-drivers "pc" if [ "$UNAME_SYSTEM" = "Linux" ] ; then @@ -7495,7 +7495,7 @@ then # We cannot use Linux's default export rules since they export everything. QCONFIG_FLAGS="$QCONFIG_FLAGS QT_DLL" # Disable non-working features. - QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT QT_NO_QFUTURE QT_NO_CRASHHANDLER QT_NO_PRINTER QT_NO_CURSOR QT_NO_SYSTEMTRAYICON" + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT QT_NO_QFUTURE QT_NO_CRASHHANDLER QT_NO_PRINTER QT_NO_SYSTEMTRAYICON" fi if [ -n "$QCONFIG_FLAGS" ]; then -- cgit v0.12 From dfa6c04356d4fe93a88f2c237a920367220b9ed6 Mon Sep 17 00:00:00 2001 From: Espen Riskedal Date: Mon, 3 May 2010 19:33:50 +0200 Subject: Added missing UID3 for qsymbianbearer.dll. Without a proper UID3 it is not possible to sign Qt.sis at symbiansigned.com. I also reserved the UID3 in our Wiki pages Reviewed-by: Aleksandar Babic --- src/plugins/bearer/symbian/symbian.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/bearer/symbian/symbian.pro b/src/plugins/bearer/symbian/symbian.pro index f915570..4f1e51c 100644 --- a/src/plugins/bearer/symbian/symbian.pro +++ b/src/plugins/bearer/symbian/symbian.pro @@ -11,6 +11,7 @@ SOURCES += symbianengine.cpp \ main.cpp symbian { + TARGET.UID3=0x20021319 exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \ exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) { message("Building with SNAP support") -- cgit v0.12 From 33664eaa591b4325f83643d8c8a21476b1306c34 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Tue, 4 May 2010 14:15:24 +0200 Subject: Disable compiling of the plugin when extra package not found The plugin will only compile when the symbian audiorouting API is installed which is not there by default. So check for that. The configure check should be added soon too. --- src/plugins/mediaservices/mediaservices.pro | 4 +++- src/s60installs/s60installs.pro | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/plugins/mediaservices/mediaservices.pro b/src/plugins/mediaservices/mediaservices.pro index 27f05bc..0f0b021 100644 --- a/src/plugins/mediaservices/mediaservices.pro +++ b/src/plugins/mediaservices/mediaservices.pro @@ -9,5 +9,7 @@ contains(QT_CONFIG, media-backend) { SUBDIRS += gstreamer } - symbian:SUBDIRS += symbian + symbian:contains(QT_CONFIG, audio-routing-available) { + SUBDIRS += symbian + } } diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index dfd2694..97b2232 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -158,11 +158,12 @@ symbian: { contains(QT_CONFIG, media-backend) { qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtMediaServices$${QT_LIBINFIX}.dll - mediaservices_plugins.path = c:$$QT_PLUGINS_BASE_DIR/mediaservices - mediaservices_plugins.sources += $$QT_BUILD_TREE/plugins/mediaservices/qmmfengine$${QT_LIBINFIX}.dll + contains(QT_CONFIG, audio-routing-available) { + mediaservices_plugins.path = c:$$QT_PLUGINS_BASE_DIR/mediaservices + mediaservices_plugins.sources += $$QT_BUILD_TREE/plugins/mediaservices/qmmfengine$${QT_LIBINFIX}.dll + } DEPLOYMENT += mediaservices_plugins - } BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)" -- cgit v0.12 From 250f7a34d3b1e6b946f2bfc7ce69c135e426b204 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 6 May 2010 13:47:32 +0300 Subject: Fix thread synchronization issues in Symbian QFileSystemWatcher In Symbian the QSymbianFileSystemWatcherEngine thread now stays running as long as the instance is alive to avoid repeatedly stopping and restarting the thread as watched paths are removed and added. Also fixed issue of misreporting adding failure in cases where both adds and removes were done in quick succession. Task-number: QTBUG-10091 Reviewed-by: Shane Kearns --- src/corelib/io/qfilesystemwatcher_symbian.cpp | 63 +++++++++------------------ src/corelib/io/qfilesystemwatcher_symbian_p.h | 6 +-- 2 files changed, 24 insertions(+), 45 deletions(-) diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp index 69daae7..6136742 100644 --- a/src/corelib/io/qfilesystemwatcher_symbian.cpp +++ b/src/corelib/io/qfilesystemwatcher_symbian.cpp @@ -106,7 +106,7 @@ void QNotifyChangeEvent::DoCancel() } QSymbianFileSystemWatcherEngine::QSymbianFileSystemWatcherEngine() : - errorCode(KErrNone), watcherStarted(false) + watcherStarted(false) { moveToThread(this); } @@ -122,11 +122,7 @@ QStringList QSymbianFileSystemWatcherEngine::addPaths(const QStringList &paths, QMutexLocker locker(&mutex); QStringList p = paths; - if (!startWatcher()) { - qWarning("Could not start QSymbianFileSystemWatcherEngine thread"); - - return p; - } + startWatcher(); QMutableListIterator it(p); while (it.hasNext()) { @@ -150,18 +146,17 @@ QStringList QSymbianFileSystemWatcherEngine::addPaths(const QStringList &paths, filePath += QChar(L'/'); } - currentEvent = NULL; + currentAddEvent = NULL; QMetaObject::invokeMethod(this, "addNativeListener", Qt::QueuedConnection, Q_ARG(QString, filePath)); syncCondition.wait(&mutex); + if (currentAddEvent) { + currentAddEvent->isDir = isDir; - if (currentEvent) { - currentEvent->isDir = isDir; - - activeObjectToPath.insert(currentEvent, path); + activeObjectToPath.insert(currentAddEvent, path); it.remove(); if (isDir) @@ -185,10 +180,10 @@ QStringList QSymbianFileSystemWatcherEngine::removePaths(const QStringList &path while (it.hasNext()) { QString path = it.next(); - currentEvent = activeObjectToPath.key(path); - if (!currentEvent) + currentRemoveEvent = activeObjectToPath.key(path); + if (!currentRemoveEvent) continue; - activeObjectToPath.remove(currentEvent); + activeObjectToPath.remove(currentRemoveEvent); QMetaObject::invokeMethod(this, "removeNativeListener", @@ -202,9 +197,6 @@ QStringList QSymbianFileSystemWatcherEngine::removePaths(const QStringList &path directories->removeAll(path); } - if (activeObjectToPath.size() == 0) - stop(); - return p; } @@ -228,44 +220,31 @@ void QSymbianFileSystemWatcherEngine::stop() } // This method must be called inside mutex -bool QSymbianFileSystemWatcherEngine::startWatcher() +void QSymbianFileSystemWatcherEngine::startWatcher() { - bool retval = true; - if (!watcherStarted) { setStackSize(0x5000); start(); syncCondition.wait(&mutex); - - if (errorCode != KErrNone) { - retval = false; - } else { - watcherStarted = true; - } + watcherStarted = true; } - return retval; } void QSymbianFileSystemWatcherEngine::run() { - // Initialize file session - mutex.lock(); syncCondition.wakeOne(); mutex.unlock(); - if (errorCode == KErrNone) { - exec(); + exec(); - foreach(QNotifyChangeEvent *e, activeObjectToPath.keys()) { - e->Cancel(); - delete e; - } - - activeObjectToPath.clear(); - watcherStarted = false; + foreach(QNotifyChangeEvent *e, activeObjectToPath.keys()) { + e->Cancel(); + delete e; } + + activeObjectToPath.clear(); } void QSymbianFileSystemWatcherEngine::addNativeListener(const QString &directoryPath) @@ -273,16 +252,16 @@ void QSymbianFileSystemWatcherEngine::addNativeListener(const QString &directory QMutexLocker locker(&mutex); QString nativeDir(QDir::toNativeSeparators(directoryPath)); TPtrC ptr(qt_QString2TPtrC(nativeDir)); - currentEvent = new QNotifyChangeEvent(qt_s60GetRFs(), ptr, this, directoryPath.endsWith(QChar(L'/'), Qt::CaseSensitive)); + currentAddEvent = new QNotifyChangeEvent(qt_s60GetRFs(), ptr, this, directoryPath.endsWith(QChar(L'/'), Qt::CaseSensitive)); syncCondition.wakeOne(); } void QSymbianFileSystemWatcherEngine::removeNativeListener() { QMutexLocker locker(&mutex); - currentEvent->Cancel(); - delete currentEvent; - currentEvent = NULL; + currentRemoveEvent->Cancel(); + delete currentRemoveEvent; + currentRemoveEvent = NULL; syncCondition.wakeOne(); } diff --git a/src/corelib/io/qfilesystemwatcher_symbian_p.h b/src/corelib/io/qfilesystemwatcher_symbian_p.h index 7e3f045..e687a4a 100644 --- a/src/corelib/io/qfilesystemwatcher_symbian_p.h +++ b/src/corelib/io/qfilesystemwatcher_symbian_p.h @@ -113,14 +113,14 @@ private: friend class QNotifyChangeEvent; void emitPathChanged(QNotifyChangeEvent *e); - bool startWatcher(); + void startWatcher(); QHash activeObjectToPath; QMutex mutex; QWaitCondition syncCondition; - int errorCode; bool watcherStarted; - QNotifyChangeEvent *currentEvent; + QNotifyChangeEvent *currentAddEvent; + QNotifyChangeEvent *currentRemoveEvent; }; #endif // QT_NO_FILESYSTEMWATCHER -- cgit v0.12 From fff6751d0ae61837f08874bce5ad04c4b9536894 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 6 May 2010 14:02:59 +0100 Subject: Check for existance of sis file parameter to runonphone Previously, it would skip over a non existant sis file - which could cause invalid test results if a previous version of the sis was already installed. Now, it checks if the file exists and exits with an error message if asked to install a sis file that doesn't exist. Task-number: QTBUG-9290 Reviewed-by: Miikka Heikkinen --- tools/runonphone/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp index 37e4548..885d029 100644 --- a/tools/runonphone/main.cpp +++ b/tools/runonphone/main.cpp @@ -102,6 +102,10 @@ int main(int argc, char *argv[]) else if (arg == "--sis" || arg == "-s") { CHECK_PARAMETER_EXISTS sisFile = it.next(); + if (!QFileInfo(sisFile).exists()) { + errstream << "Sis file (" << sisFile << ") doesn't exist" << endl; + return 1; + } } else if (arg == "--download" || arg == "-d") { CHECK_PARAMETER_EXISTS -- cgit v0.12 From 175eedd991d321d0902ea0065f9b288c62958a5d Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Tue, 4 May 2010 17:46:48 +0200 Subject: Add configure time checks for symbian environment Adding test for various compile time components like rcomp and the compiler actually working should make it failing much more transparant. Reviewed-by: Thiago --- config.tests/symbian/simple/main.cpp | 6 +++++ config.tests/symbian/simple/simple.pro | 4 ++++ configure | 41 +++++++++++++++++++++++++++++++--- 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 config.tests/symbian/simple/main.cpp create mode 100644 config.tests/symbian/simple/simple.pro diff --git a/config.tests/symbian/simple/main.cpp b/config.tests/symbian/simple/main.cpp new file mode 100644 index 0000000..41371da --- /dev/null +++ b/config.tests/symbian/simple/main.cpp @@ -0,0 +1,6 @@ +#include + +int main(int, char **) { + printf("test\n"); + return 0; +} diff --git a/config.tests/symbian/simple/simple.pro b/config.tests/symbian/simple/simple.pro new file mode 100644 index 0000000..fa086c9 --- /dev/null +++ b/config.tests/symbian/simple/simple.pro @@ -0,0 +1,4 @@ +TEMPLATE = app +QT = +SOURCES += main.cpp + diff --git a/configure b/configure index 6194eb5..a0ccf9a 100755 --- a/configure +++ b/configure @@ -780,7 +780,7 @@ L_FLAGS= RPATH_FLAGS= l_FLAGS= QCONFIG_FLAGS= -XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" +XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian/linux-gcce" PLATFORM=$QMAKESPEC QT_CROSS_COMPILE=no OPT_CONFIRM_LICENSE=no @@ -4057,7 +4057,7 @@ if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then EOF fi -if echo "$XPLATFORM" | grep symbian > /dev/null ; then +case "$XPLATFORM" in *symbian*) cat << EOF Qt for Symbian only: @@ -4069,7 +4069,8 @@ Qt for Symbian only: -no-usedeffiles .... Disable the usage of DEF files. * -usedeffiles ....... Enable the usage of DEF files. EOF -fi +;; +esac [ "x$ERROR" = "xyes" ] && exit 1 exit 0 @@ -4697,6 +4698,40 @@ if [ "$CFG_ZLIB" = "auto" ]; then fi fi +case "$XPLATFORM" in *symbian*) + if test -z "$EPOCROOT"; then + echo "Please export EPOCROOT. It should point to the sdk install dir" + exit 1 + fi + if test ! -d "$EPOCROOT/epoc32"; then + echo "Could not find the 'epoc32' dir in your EPOCROOT." + exit 1 + fi + + # the main commands needed to compile; + (cd config.tests/symbian + mkdir -p rcomp + cd rcomp + rm -f rcomp_test.rsg + touch rcomp_test.rpp rcomp_test.rsc rcomp_test.rss + rcomp -u -m045,046,047 -s./rcomp_test.rpp -o./rcomp_test.rsc -h./rcomp_test.rsg -i./rcomp_test.rss 2>&1 > /dev/null + if test ! -f rcomp_test.rsg; then + echo "Finding a working rcomp in your PATH failed." + echo "Fatal error. Make sure you have the epoc tools working and in your PATH"; + exit 1; + fi + ) + + # compile a simple main that uses printf + if ! "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/simple "simple" $L_FLAGS $I_FLAGS $l_FLAGS + then + echo "Testing your compiler failed. Could not compile a simple application." + echo "Fatal error; Rerun configure with -verbose to get more details." + exit 1; + fi + ;; +esac + if [ "$CFG_S60" = "auto" ]; then if echo "$XPLATFORM" | grep symbian > /dev/null; then CFG_S60=yes -- cgit v0.12 From db1254131c8d372e1d47acbaaa7c5c2b2be5b7d7 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 7 May 2010 11:51:10 +0300 Subject: Fix fetchedRoot test variable to work also in Symbian RVCT builds cannot seem to be able to deal with data symbols at runtime, so made accessors for fetchedRoot test variable. Also moved it out of QFileInfoGatherer class as there is no need to have it there. Reviewed-by: Janne Koskinen --- src/gui/dialogs/qfileinfogatherer.cpp | 15 +++++++++++++-- src/gui/dialogs/qfileinfogatherer_p.h | 3 --- tests/auto/qfiledialog2/tst_qfiledialog2.cpp | 16 +++++++++++----- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/gui/dialogs/qfileinfogatherer.cpp b/src/gui/dialogs/qfileinfogatherer.cpp index 3b279ae..af0506f 100644 --- a/src/gui/dialogs/qfileinfogatherer.cpp +++ b/src/gui/dialogs/qfileinfogatherer.cpp @@ -55,7 +55,18 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_FILESYSTEMMODEL -bool QFileInfoGatherer::fetchedRoot = false; +#ifdef QT_BUILD_INTERNAL +static bool fetchedRoot = false; +Q_AUTOTEST_EXPORT void qt_test_resetFetchedRoot() +{ + fetchedRoot = false; +} + +Q_AUTOTEST_EXPORT bool qt_test_isFetchedRoot() +{ + return fetchedRoot; +} +#endif /*! Creates thread @@ -278,7 +289,7 @@ void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &fil // List drives if (path.isEmpty()) { -#if defined Q_AUTOTEST_EXPORT +#ifdef QT_BUILD_INTERNAL fetchedRoot = true; #endif QFileInfoList infoList; diff --git a/src/gui/dialogs/qfileinfogatherer_p.h b/src/gui/dialogs/qfileinfogatherer_p.h index 5abcd94..8681eb5 100644 --- a/src/gui/dialogs/qfileinfogatherer_p.h +++ b/src/gui/dialogs/qfileinfogatherer_p.h @@ -195,9 +195,6 @@ private: uint userId; uint groupId; #endif -public : - //for testing purpose - static bool fetchedRoot; }; #endif // QT_NO_FILESYSTEMMODEL diff --git a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp index 6bfa8be..eee495f 100644 --- a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp +++ b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp @@ -76,6 +76,13 @@ # define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/" #endif +#if defined QT_BUILD_INTERNAL +QT_BEGIN_NAMESPACE +Q_GUI_EXPORT bool qt_test_isFetchedRoot(); +Q_GUI_EXPORT void qt_test_resetFetchedRoot(); +QT_END_NAMESPACE +#endif + class QNonNativeFileDialog : public QFileDialog { Q_OBJECT @@ -139,7 +146,7 @@ private: }; tst_QFileDialog2::tst_QFileDialog2() -{ +{ #if defined(Q_OS_WINCE) qApp->setAutoMaximizeThreshold(-1); #endif @@ -177,19 +184,18 @@ void tst_QFileDialog2::listRoot() QFileInfoGatherer fileInfoGatherer; fileInfoGatherer.start(); QTest::qWait(1500); - - QFileInfoGatherer::fetchedRoot = false; + qt_test_resetFetchedRoot(); QString dir(QDir::currentPath()); QNonNativeFileDialog fd(0, QString(), dir); fd.show(); - QCOMPARE(QFileInfoGatherer::fetchedRoot,false); + QCOMPARE(qt_test_isFetchedRoot(),false); fd.setDirectory(""); #ifdef Q_OS_WINCE QTest::qWait(1500); #else QTest::qWait(500); #endif - QCOMPARE(QFileInfoGatherer::fetchedRoot,true); + QCOMPARE(qt_test_isFetchedRoot(),true); #endif } -- cgit v0.12 From 20b7f5773777b8999f21f50e55b8f446a29fd976 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 10 May 2010 14:18:53 +0300 Subject: Workaround for Symbian Open C bug in socket connect. Socket connect in Symbian may return non-standard EPIPE error, after which the connection is terminated. Added Symbian specific workaround to set socket to UnconnectedState if EPIPE errno is received. In addition a bug report for Open C is created: http://developer.symbian.org/bugs/show_bug.cgi?id=2676 Task-number: QT-3362 Reviewed-by: Aleksandar Sasha Babic Reviewed-by: Markus Goetz --- src/network/socket/qnativesocketengine_unix.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index d155357..70bb0da 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -425,6 +425,9 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &addr, quint16 case EBADF: case EFAULT: case ENOTSOCK: +#ifdef Q_OS_SYMBIAN + case EPIPE: +#endif socketState = QAbstractSocket::UnconnectedState; default: break; -- cgit v0.12 From dc63ab9018b1a7db94e822e710346600a83a4bc6 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Mon, 10 May 2010 14:12:46 +0200 Subject: Allow EPOCROOT env var to be without trailing slash. --- mkspecs/symbian/linux-gcce/qmake.conf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf index 57bb56a..faac2f1 100644 --- a/mkspecs/symbian/linux-gcce/qmake.conf +++ b/mkspecs/symbian/linux-gcce/qmake.conf @@ -83,13 +83,13 @@ for(line, QMAKE_GCC_SEARCH_DIRS) { } } -QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib - -INCLUDEPATH = ${EPOCROOT}epoc32/include/ \ - $${EPOCROOT}epoc32/include/variant \ - $${EPOCROOT}epoc32/include/stdapis \ - $${EPOCROOT}epoc32/include/gcce \ - ${EPOCROOT}epoc32/include/stdapis/sys \ - ${EPOCROOT}epoc32/include/stdapis/stlport \ +QMAKE_LIBDIR += $${EPOCROOT}/epoc32/release/armv5/lib + +INCLUDEPATH = ${EPOCROOT}/epoc32/include/ \ + $${EPOCROOT}/epoc32/include/variant \ + $${EPOCROOT}/epoc32/include/stdapis \ + $${EPOCROOT}/epoc32/include/gcce \ + ${EPOCROOT}/epoc32/include/stdapis/sys \ + ${EPOCROOT}/epoc32/include/stdapis/stlport \ $$INCLUDEPATH -- cgit v0.12 From 4ad58161814a80409f790bf8269e147551adfee0 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Mon, 10 May 2010 15:16:55 +0200 Subject: Documentation updates for Qt/Symbian on Linux development --- doc/src/getting-started/installation.qdoc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index 3ea351e..36abc10 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -703,21 +703,19 @@ If you are using pre-built binaries, follow the instructions given in the \ingroup qtsymbian \brief How to install Qt on the Symbian platform using Linux. -\note Qt for the Symbian platform has some requirements that are given in more detail -in the \l{Qt for the Symbian platform Requirements} document. TODO list requirements like SDK here. - \note \bold {This document describes how to install and configure Qt for the Symbian platform from scratch, using Linux as the build host. -Qt does not come with a binary package for Linux yet, but if you want to avoid -the full build of Qt and start developing applications right away, you can -download drop-in binaries from here: TODO} +Qt for Symbian binaries can be downloaded directly so development of +applications using Qt for Symbian can start right away.} \list 1 \o Setup the development environment - TODO Make sure your Symbian development environment is correctly installed and - patched as explained in the \l{Qt for the Symbian platform Requirements} document. + \note Qt for the Symbian platform has some requirements on the development + platform. The Symbian SDK for Linux as well as a cross compiler for the ARM + processor used on Symbian devices should be present on the development machine. + See {http://qt.gitorious.org/qt/pages/QtCreatorSymbianLinux} for more details. \o Install Qt @@ -770,7 +768,7 @@ download drop-in binaries from here: TODO} The Qt libraries are built with "All -Tcb" capability, so that they can support all types of applications. However, these - capabilities are automatically lowered if you make a selfsigned + capabilities are automatically lowered if you make a self-signed package. \o Building a Qt package with a Symbian developer certificate @@ -826,7 +824,7 @@ download drop-in binaries from here: TODO} Note the identifier on the line where your Symbian device appears. Then execute the following, using the first and - second part of the identifier in place of \c XXXX, + second part of the identifier in place of \c XXX, respectively. \snippet doc/src/snippets/code/doc_src_installation.qdoc 44 -- cgit v0.12 From 2df5a9567ff83a547c3c66e4b523844b78968108 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 6 May 2010 17:34:58 +0100 Subject: Run autotests with minimal capabilities The autotests were previously run with ALL-Tcb capability which gives them more access to the filesystem etc. than a typical Qt application. To have more realistic testing environmnent, tests are run with no capabilities other than those required for the Qt APIs they use. i.e. NetworkServices for network tests, None for others. Reviewed-by: Liang Qi --- mkspecs/features/qttest_p4.prf | 2 +- tests/auto/languagechange/tst_languagechange.cpp | 4 ++-- tests/auto/qabstractnetworkcache/qabstractnetworkcache.pro | 1 + tests/auto/qabstractsocket/qabstractsocket.pro | 1 + tests/auto/qdirmodel/tst_qdirmodel.cpp | 5 +++++ tests/auto/qftp/qftp.pro | 1 + tests/auto/qhostaddress/qhostaddress.pro | 1 + tests/auto/qhostinfo/qhostinfo.pro | 1 + tests/auto/qhttp/qhttp.pro | 1 + tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro | 2 ++ tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro | 1 + tests/auto/qhttpsocketengine/qhttpsocketengine.pro | 1 + tests/auto/qiodevice/qiodevice.pro | 1 + tests/auto/qlocalsocket/qlocalsocket.pro | 1 + tests/auto/qnativesocketengine/qnativesocketengine.pro | 1 + tests/auto/qnetworkaccessmanager/qnetworkaccessmanager.pro | 1 + .../qnetworkaccessmanager_and_qprogressdialog.pro | 1 + tests/auto/qnetworkaddressentry/qnetworkaddressentry.pro | 2 ++ tests/auto/qnetworkcachemetadata/qnetworkcachemetadata.pro | 1 + tests/auto/qnetworkcookie/qnetworkcookie.pro | 1 + tests/auto/qnetworkcookiejar/qnetworkcookiejar.pro | 1 + tests/auto/qnetworkdiskcache/qnetworkdiskcache.pro | 1 + tests/auto/qnetworkinterface/qnetworkinterface.pro | 1 + tests/auto/qnetworkproxy/qnetworkproxy.pro | 1 + tests/auto/qnetworkreply/qnetworkreply.pro | 1 + tests/auto/qnetworkrequest/qnetworkrequest.pro | 1 + tests/auto/qnetworksession/qnetworksession.pro | 1 + tests/auto/qsocketnotifier/qsocketnotifier.pro | 1 + tests/auto/qsocks5socketengine/qsocks5socketengine.pro | 1 + tests/auto/qsslcertificate/qsslcertificate.pro | 1 + tests/auto/qsslcipher/qsslcipher.pro | 1 + tests/auto/qsslerror/qsslerror.pro | 1 + tests/auto/qsslkey/qsslkey.pro | 1 + tests/auto/qsslsocket/qsslsocket.pro | 2 +- tests/auto/qtcpserver/qtcpserver.pro | 1 + tests/auto/qtcpsocket/qtcpsocket.pro | 1 + tests/auto/qudpsocket/qudpsocket.pro | 1 + tests/auto/qurl/qurl.pro | 1 + 38 files changed, 45 insertions(+), 4 deletions(-) diff --git a/mkspecs/features/qttest_p4.prf b/mkspecs/features/qttest_p4.prf index e3faef1..d2011d0 100644 --- a/mkspecs/features/qttest_p4.prf +++ b/mkspecs/features/qttest_p4.prf @@ -6,7 +6,7 @@ qtAddLibrary(QtTest) symbian:{ TARGET.EPOCHEAPSIZE = 0x100000 0x2000000 # DEFINES += QTEST_NO_SPECIALIZATIONS - TARGET.CAPABILITY="ALL -TCB" + TARGET.CAPABILITY="None" RSS_RULES ="group_name=\"QtTests\";" } diff --git a/tests/auto/languagechange/tst_languagechange.cpp b/tests/auto/languagechange/tst_languagechange.cpp index d04707e..bcc3be4 100644 --- a/tests/auto/languagechange/tst_languagechange.cpp +++ b/tests/auto/languagechange/tst_languagechange.cpp @@ -238,8 +238,8 @@ void tst_languageChange::retranslatability() QString fooName = tmpParentDir + "/foo"; QDir dir; QCOMPARE(dir.mkpath(tmpDir), true); -#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) - // Just create a new file instead of copying exe, because exe is not there in emulator +#if defined(Q_OS_SYMBIAN) + // Just create a new file instead of copying exe, because there is no read access to /sys/bin { QFile fooFile(fooName); QVERIFY(fooFile.open(QIODevice::WriteOnly | QIODevice::Text)); diff --git a/tests/auto/qabstractnetworkcache/qabstractnetworkcache.pro b/tests/auto/qabstractnetworkcache/qabstractnetworkcache.pro index a57c56f..2e2577d 100644 --- a/tests/auto/qabstractnetworkcache/qabstractnetworkcache.pro +++ b/tests/auto/qabstractnetworkcache/qabstractnetworkcache.pro @@ -9,3 +9,4 @@ wince*|symbian: { DEPLOYMENT += testFiles } +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qabstractsocket/qabstractsocket.pro b/tests/auto/qabstractsocket/qabstractsocket.pro index 59999af..814a7d2 100644 --- a/tests/auto/qabstractsocket/qabstractsocket.pro +++ b/tests/auto/qabstractsocket/qabstractsocket.pro @@ -7,4 +7,5 @@ QT = core network SOURCES += tst_qabstractsocket.cpp +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qdirmodel/tst_qdirmodel.cpp b/tests/auto/qdirmodel/tst_qdirmodel.cpp index 1bc5b7f..41bbd87 100644 --- a/tests/auto/qdirmodel/tst_qdirmodel.cpp +++ b/tests/auto/qdirmodel/tst_qdirmodel.cpp @@ -613,6 +613,11 @@ void tst_QDirModel::task196768_sorting() //this task showed that the persistent model indexes got corrupted when sorting QString path = SRCDIR; +#ifdef Q_OS_SYMBIAN + if(!RProcess().HasCapability(ECapabilityAllFiles)) + QEXPECT_FAIL("", "QTBUG-9746", Continue); +#endif + QDirModel model; /* QDirModel has a bug if we show the content of the subdirectory inside a hidden directory diff --git a/tests/auto/qftp/qftp.pro b/tests/auto/qftp/qftp.pro index c060296..33d479a 100644 --- a/tests/auto/qftp/qftp.pro +++ b/tests/auto/qftp/qftp.pro @@ -14,6 +14,7 @@ wince*: { addFiles.path = . DEPLOYMENT += addFiles TARGET.EPOCHEAPSIZE="0x100 0x1000000" + TARGET.CAPABILITY = NetworkServices } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qhostaddress/qhostaddress.pro b/tests/auto/qhostaddress/qhostaddress.pro index b208214..7bcbfb0 100644 --- a/tests/auto/qhostaddress/qhostaddress.pro +++ b/tests/auto/qhostaddress/qhostaddress.pro @@ -12,3 +12,4 @@ wince*: { } } +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qhostinfo/qhostinfo.pro b/tests/auto/qhostinfo/qhostinfo.pro index 9bfe576..06a4b17 100644 --- a/tests/auto/qhostinfo/qhostinfo.pro +++ b/tests/auto/qhostinfo/qhostinfo.pro @@ -10,4 +10,5 @@ wince*: { win32:LIBS += -lws2_32 } +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qhttp/qhttp.pro b/tests/auto/qhttp/qhttp.pro index 8678a19..23a73c4 100644 --- a/tests/auto/qhttp/qhttp.pro +++ b/tests/auto/qhttp/qhttp.pro @@ -21,6 +21,7 @@ wince*: { addFiles.sources = rfc3252.txt trolltech addFiles.path = . DEPLOYMENT = addFiles webFiles cgi + TARGET.CAPABILITY = NetworkServices } else:vxworks*: { DEFINES += SRCDIR=\\\"\\\" } else { diff --git a/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro b/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro index 0021bc1..d9e2dce 100644 --- a/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro +++ b/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro @@ -4,3 +4,5 @@ INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/zlib requires(contains(QT_CONFIG,private_tests)) QT = core network + +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro b/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro index 1782b43..36d56c6 100644 --- a/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro +++ b/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro @@ -4,3 +4,4 @@ INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/zlib requires(contains(QT_CONFIG,private_tests)) QT = core network +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qhttpsocketengine/qhttpsocketengine.pro b/tests/auto/qhttpsocketengine/qhttpsocketengine.pro index f6ad073..d76ebb6 100644 --- a/tests/auto/qhttpsocketengine/qhttpsocketengine.pro +++ b/tests/auto/qhttpsocketengine/qhttpsocketengine.pro @@ -8,5 +8,6 @@ MOC_DIR=tmp QT = core network +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qiodevice/qiodevice.pro b/tests/auto/qiodevice/qiodevice.pro index e695bf6..716cdce 100644 --- a/tests/auto/qiodevice/qiodevice.pro +++ b/tests/auto/qiodevice/qiodevice.pro @@ -14,6 +14,7 @@ wince*: { addFiles.sources = tst_qiodevice.cpp addFiles.path = . DEPLOYMENT += addFiles + TARGET.CAPABILITY = NetworkServices } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" contains(QT_CONFIG, qt3support):QT += qt3support diff --git a/tests/auto/qlocalsocket/qlocalsocket.pro b/tests/auto/qlocalsocket/qlocalsocket.pro index 0849453..287e946 100644 --- a/tests/auto/qlocalsocket/qlocalsocket.pro +++ b/tests/auto/qlocalsocket/qlocalsocket.pro @@ -1,3 +1,4 @@ TEMPLATE = subdirs SUBDIRS = lackey test !wince*:!symbian*: SUBDIRS += example +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnativesocketengine/qnativesocketengine.pro b/tests/auto/qnativesocketengine/qnativesocketengine.pro index ad40d53..0275d37 100644 --- a/tests/auto/qnativesocketengine/qnativesocketengine.pro +++ b/tests/auto/qnativesocketengine/qnativesocketengine.pro @@ -9,4 +9,5 @@ MOC_DIR=tmp QT = core network +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnetworkaccessmanager/qnetworkaccessmanager.pro b/tests/auto/qnetworkaccessmanager/qnetworkaccessmanager.pro index e2889c1..3ccbffb 100644 --- a/tests/auto/qnetworkaccessmanager/qnetworkaccessmanager.pro +++ b/tests/auto/qnetworkaccessmanager/qnetworkaccessmanager.pro @@ -2,4 +2,5 @@ load(qttest_p4) SOURCES += tst_qnetworkaccessmanager.cpp QT = core network +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro b/tests/auto/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro index 7ed5b07..378deba 100644 --- a/tests/auto/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro +++ b/tests/auto/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro @@ -2,4 +2,5 @@ load(qttest_p4) SOURCES += tst_qnetworkaccessmanager_and_qprogressdialog.cpp QT += network +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnetworkaddressentry/qnetworkaddressentry.pro b/tests/auto/qnetworkaddressentry/qnetworkaddressentry.pro index 8feb95f..885dbf7 100644 --- a/tests/auto/qnetworkaddressentry/qnetworkaddressentry.pro +++ b/tests/auto/qnetworkaddressentry/qnetworkaddressentry.pro @@ -2,3 +2,5 @@ load(qttest_p4) SOURCES += tst_qnetworkaddressentry.cpp QT = core network + +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnetworkcachemetadata/qnetworkcachemetadata.pro b/tests/auto/qnetworkcachemetadata/qnetworkcachemetadata.pro index b24fe00..77ad347 100644 --- a/tests/auto/qnetworkcachemetadata/qnetworkcachemetadata.pro +++ b/tests/auto/qnetworkcachemetadata/qnetworkcachemetadata.pro @@ -2,4 +2,5 @@ load(qttest_p4) QT += network SOURCES += tst_qnetworkcachemetadata.cpp +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnetworkcookie/qnetworkcookie.pro b/tests/auto/qnetworkcookie/qnetworkcookie.pro index 95d8b6e..2f31138 100644 --- a/tests/auto/qnetworkcookie/qnetworkcookie.pro +++ b/tests/auto/qnetworkcookie/qnetworkcookie.pro @@ -2,3 +2,4 @@ load(qttest_p4) SOURCES += tst_qnetworkcookie.cpp QT = core network +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnetworkcookiejar/qnetworkcookiejar.pro b/tests/auto/qnetworkcookiejar/qnetworkcookiejar.pro index 3a8e61b..6d75fab 100644 --- a/tests/auto/qnetworkcookiejar/qnetworkcookiejar.pro +++ b/tests/auto/qnetworkcookiejar/qnetworkcookiejar.pro @@ -2,3 +2,4 @@ load(qttest_p4) SOURCES += tst_qnetworkcookiejar.cpp QT = core network +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnetworkdiskcache/qnetworkdiskcache.pro b/tests/auto/qnetworkdiskcache/qnetworkdiskcache.pro index f47d6d7..3b13087 100644 --- a/tests/auto/qnetworkdiskcache/qnetworkdiskcache.pro +++ b/tests/auto/qnetworkdiskcache/qnetworkdiskcache.pro @@ -2,4 +2,5 @@ load(qttest_p4) QT += network SOURCES += tst_qnetworkdiskcache.cpp +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnetworkinterface/qnetworkinterface.pro b/tests/auto/qnetworkinterface/qnetworkinterface.pro index 26095e9..1c5feee 100644 --- a/tests/auto/qnetworkinterface/qnetworkinterface.pro +++ b/tests/auto/qnetworkinterface/qnetworkinterface.pro @@ -3,4 +3,5 @@ SOURCES += tst_qnetworkinterface.cpp QT = core network +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnetworkproxy/qnetworkproxy.pro b/tests/auto/qnetworkproxy/qnetworkproxy.pro index 8ffc80c..fc0a216 100644 --- a/tests/auto/qnetworkproxy/qnetworkproxy.pro +++ b/tests/auto/qnetworkproxy/qnetworkproxy.pro @@ -7,4 +7,5 @@ QT = core network SOURCES += tst_qnetworkproxy.cpp +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnetworkreply/qnetworkreply.pro b/tests/auto/qnetworkreply/qnetworkreply.pro index fd8454c..86d3155 100644 --- a/tests/auto/qnetworkreply/qnetworkreply.pro +++ b/tests/auto/qnetworkreply/qnetworkreply.pro @@ -4,3 +4,4 @@ SUBDIRS = test requires(contains(QT_CONFIG,private_tests)) !wince*:SUBDIRS += echo +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnetworkrequest/qnetworkrequest.pro b/tests/auto/qnetworkrequest/qnetworkrequest.pro index f576ba2..f96fd3b 100644 --- a/tests/auto/qnetworkrequest/qnetworkrequest.pro +++ b/tests/auto/qnetworkrequest/qnetworkrequest.pro @@ -2,3 +2,4 @@ load(qttest_p4) SOURCES += tst_qnetworkrequest.cpp QT = core network +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qnetworksession/qnetworksession.pro b/tests/auto/qnetworksession/qnetworksession.pro index a85925b..34761e5 100644 --- a/tests/auto/qnetworksession/qnetworksession.pro +++ b/tests/auto/qnetworksession/qnetworksession.pro @@ -1,2 +1,3 @@ TEMPLATE = subdirs SUBDIRS = lackey test +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qsocketnotifier/qsocketnotifier.pro b/tests/auto/qsocketnotifier/qsocketnotifier.pro index ec924c1..c43c96a 100644 --- a/tests/auto/qsocketnotifier/qsocketnotifier.pro +++ b/tests/auto/qsocketnotifier/qsocketnotifier.pro @@ -6,5 +6,6 @@ requires(contains(QT_CONFIG,private_tests)) include(../qnativesocketengine/qsocketengine.pri) +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qsocks5socketengine/qsocks5socketengine.pro b/tests/auto/qsocks5socketengine/qsocks5socketengine.pro index 4a32852..cd5e6e7 100644 --- a/tests/auto/qsocks5socketengine/qsocks5socketengine.pro +++ b/tests/auto/qsocks5socketengine/qsocks5socketengine.pro @@ -11,6 +11,7 @@ QT = core network # Symbian toolchain does not support correct include semantics symbian:INCPATH+=..\..\..\include\QtNetwork\private +symbian: TARGET.CAPABILITY = NetworkServices requires(contains(QT_CONFIG,private_tests)) diff --git a/tests/auto/qsslcertificate/qsslcertificate.pro b/tests/auto/qsslcertificate/qsslcertificate.pro index b237f2e..d7671ea 100644 --- a/tests/auto/qsslcertificate/qsslcertificate.pro +++ b/tests/auto/qsslcertificate/qsslcertificate.pro @@ -24,4 +24,5 @@ wince*: { DEFINES += SRCDIR=\\\".\\\" } else:!symbian { DEFINES += SRCDIR=\\\"$$PWD/\\\" + TARGET.CAPABILITY = NetworkServices } diff --git a/tests/auto/qsslcipher/qsslcipher.pro b/tests/auto/qsslcipher/qsslcipher.pro index 6eae588..78fd387 100644 --- a/tests/auto/qsslcipher/qsslcipher.pro +++ b/tests/auto/qsslcipher/qsslcipher.pro @@ -14,4 +14,5 @@ win32 { } } +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qsslerror/qsslerror.pro b/tests/auto/qsslerror/qsslerror.pro index ee5872b..5b907fb 100644 --- a/tests/auto/qsslerror/qsslerror.pro +++ b/tests/auto/qsslerror/qsslerror.pro @@ -14,4 +14,5 @@ win32 { } } +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qsslkey/qsslkey.pro b/tests/auto/qsslkey/qsslkey.pro index 32138f8..e3eeef9 100644 --- a/tests/auto/qsslkey/qsslkey.pro +++ b/tests/auto/qsslkey/qsslkey.pro @@ -24,4 +24,5 @@ wince*: { DEFINES += SRCDIR=\\\".\\\" } else:!symbian { DEFINES+= SRCDIR=\\\"$$PWD\\\" + TARGET.CAPABILITY = NetworkServices } diff --git a/tests/auto/qsslsocket/qsslsocket.pro b/tests/auto/qsslsocket/qsslsocket.pro index 541b2d9..3557fc8 100644 --- a/tests/auto/qsslsocket/qsslsocket.pro +++ b/tests/auto/qsslsocket/qsslsocket.pro @@ -24,7 +24,7 @@ wince* { } else:symbian { DEFINES += QSSLSOCKET_CERTUNTRUSTED_WORKAROUND TARGET.EPOCHEAPSIZE="0x100 0x1000000" - TARGET.CAPABILITY="ALL -TCB" + TARGET.CAPABILITY=NetworkServices certFiles.sources = certs ssl.tar.gz certFiles.path = . diff --git a/tests/auto/qtcpserver/qtcpserver.pro b/tests/auto/qtcpserver/qtcpserver.pro index fe5ea37..a3744a2 100644 --- a/tests/auto/qtcpserver/qtcpserver.pro +++ b/tests/auto/qtcpserver/qtcpserver.pro @@ -1,5 +1,6 @@ TEMPLATE = subdirs SUBDIRS = test crashingServer +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qtcpsocket/qtcpsocket.pro b/tests/auto/qtcpsocket/qtcpsocket.pro index 3d4eba3..370a695 100644 --- a/tests/auto/qtcpsocket/qtcpsocket.pro +++ b/tests/auto/qtcpsocket/qtcpsocket.pro @@ -6,3 +6,4 @@ wince*|symbian*|vxworks* : SUBDIRS = test requires(contains(QT_CONFIG,private_tests)) +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qudpsocket/qudpsocket.pro b/tests/auto/qudpsocket/qudpsocket.pro index 4ef8a40..8fd3545 100644 --- a/tests/auto/qudpsocket/qudpsocket.pro +++ b/tests/auto/qudpsocket/qudpsocket.pro @@ -1,5 +1,6 @@ TEMPLATE = subdirs SUBDIRS = test clientserver +symbian: TARGET.CAPABILITY = NetworkServices diff --git a/tests/auto/qurl/qurl.pro b/tests/auto/qurl/qurl.pro index 72c93bc..018bb38 100644 --- a/tests/auto/qurl/qurl.pro +++ b/tests/auto/qurl/qurl.pro @@ -1,3 +1,4 @@ load(qttest_p4) SOURCES += tst_qurl.cpp QT = core +symbian: TARGET.CAPABILITY = NetworkServices -- cgit v0.12 From 48acfd970f5fab740fd16ecdc31656c56ec2356b Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 10 May 2010 15:26:12 +0100 Subject: Fix compile errors Added #ifdef QT_BUILD_INTERNAL for autotests which rely on AUTOTEST_EXPORT symbols (only available in internal developer configurations) Reviewed-by: Liang Qi --- tests/auto/qwidget/tst_qwidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 76e20b9..5d47aed 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -9514,6 +9514,8 @@ void tst_QWidget::destroyBackingStore() w.update(); QApplication::processEvents(); QCOMPARE(w.numPaintEvents, 2); +#else + QSKIP("Test case relies on developer build (AUTOTEST_EXPORT)", SkipAll); #endif } @@ -9992,6 +9994,7 @@ void tst_QWidget::focusProxyAndInputMethods() delete toplevel; } +#ifdef QT_BUILD_INTERNAL class scrollWidgetWBS : public QWidget { public: @@ -10011,9 +10014,11 @@ public: } } }; +#endif void tst_QWidget::scrollWithoutBackingStore() { +#ifdef QT_BUILD_INTERNAL scrollWidgetWBS scrollable; scrollable.resize(100,100); QLabel child(QString("@"),&scrollable); @@ -10027,6 +10032,9 @@ void tst_QWidget::scrollWithoutBackingStore() QCOMPARE(child.pos(),QPoint(25,25)); scrollable.enableBackingStore(); QCOMPARE(child.pos(),QPoint(25,25)); +#else + QSKIP("Test case relies on developer build (AUTOTEST_EXPORT)", SkipAll); +#endif } void tst_QWidget::taskQTBUG_7532_tabOrderWithFocusProxy() -- cgit v0.12 From a21d6927e58a72ac5123d2479cbcc06bd764dfa4 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 10 May 2010 16:45:05 +0100 Subject: Remove test cases which cause stack overflow These test cases are not considered reasonable for a small screen device (625 widgets). Patching the QWidget code to use iteration rather than recursion is considered too risky, as the code is performance critical. Task-number: QTBUG-8512 Reviewed-by: Bjoern Erik Nilsen --- tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp index 8c30be4..7015bd1 100644 --- a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp +++ b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp @@ -159,12 +159,17 @@ void tst_QWidget::update_data() QTest::newRow("10x10x1 opaque") << 10 << 10 << 1 << true; QTest::newRow("10x10x10 opaque") << 10 << 10 << 10 << true; QTest::newRow("10x10x100 opaque") << 10 << 10 << 100 << true; +#ifndef Q_OS_SYMBIAN + //These test cases cause stack overflow in QWidgetPrivate::paintSiblingsRecursive + //see http://bugreports.qt.nokia.com/browse/QTBUG-8512 + //Symbian threads have a hard limit of 80kB user stack QTest::newRow("25x25x1 transparent ") << 25 << 25 << 1 << false; QTest::newRow("25x25x10 transparent") << 25 << 25 << 10 << false; QTest::newRow("25x25x100 transparent") << 25 << 25 << 100 << false; QTest::newRow("25x25x1 opaque") << 25 << 25 << 1 << true; QTest::newRow("25x25x10 opaque") << 25 << 25 << 10 << true; QTest::newRow("25x25x100 opaque") << 25 << 25 << 100 << true; +#endif } void tst_QWidget::update() -- cgit v0.12 From 2445d7adc19bb1355cbba8361345feb9d4cf10f9 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 11 May 2010 09:21:50 +0200 Subject: Emit numFlagsChanged Task-number: QTBUG-10552 --- demos/declarative/minehunt/minehunt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demos/declarative/minehunt/minehunt.cpp b/demos/declarative/minehunt/minehunt.cpp index 93cd1c1..2a4ed10 100644 --- a/demos/declarative/minehunt/minehunt.cpp +++ b/demos/declarative/minehunt/minehunt.cpp @@ -212,6 +212,8 @@ void MinehuntGame::reset() } nMines = 12; nFlags = 0; + emit numMinesChanged(); + emit numFlagsChanged(); setPlaying(false); QTimer::singleShot(600,this, SLOT(setBoard())); } -- cgit v0.12 From aa04c975442aace80d95f9f70ab11fa845436c54 Mon Sep 17 00:00:00 2001 From: Janne Koskinen Date: Tue, 11 May 2010 11:22:59 +0300 Subject: fix webkit crash when accessing network on Symbian Fixes crash on startup and crashes on network requests Task-number: QTBUG-9820 Reviewed-by: Janne Anttila --- src/plugins/bearer/symbian/qnetworksession_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index 1b9c8cc..5fc0edb 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -947,7 +947,7 @@ void QNetworkSessionPrivateImpl::RunL() #endif if (publicConfig.type() == QNetworkConfiguration::UserChoice) { serviceConfig = QNetworkConfigurationManager() - .configurationFromIdentifier(symbianConfig->serviceNetworkPtr->id); + .configurationFromIdentifier(symbianConfig->id); } symbianConfig->mutex.unlock(); -- cgit v0.12 From 9b2038e41a9aa16df0595b812df0d414a8246f52 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 11 May 2010 13:35:32 +0300 Subject: Fix slider stepping when used with keypad navigation QElapsedTimer usage was corrected Task-number: QTBUG-9857 Reviewed-by: Alessandro Portale --- src/gui/widgets/qabstractslider.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index 6a01d68..f38bae7 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -219,8 +219,12 @@ QAbstractSliderPrivate::QAbstractSliderPrivate() #ifdef QT_KEYPAD_NAVIGATION , isAutoRepeating(false) , repeatMultiplier(1) -#endif { + firstRepeat.invalidate(); +#else +{ +#endif + } QAbstractSliderPrivate::~QAbstractSliderPrivate() @@ -787,7 +791,7 @@ void QAbstractSlider::keyPressEvent(QKeyEvent *ev) } } - else if (!d->firstRepeat.isValid()) { + else if (d->firstRepeat.isValid()) { d->firstRepeat.invalidate(); d->repeatMultiplier = 1; } -- cgit v0.12 From 05399347ed467693d45009c6ba659746ea492231 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Tue, 11 May 2010 14:04:24 +0200 Subject: Add license header --- config.tests/symbian/simple/main.cpp | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/config.tests/symbian/simple/main.cpp b/config.tests/symbian/simple/main.cpp index 41371da..9227c42 100644 --- a/config.tests/symbian/simple/main.cpp +++ b/config.tests/symbian/simple/main.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ #include int main(int, char **) { -- cgit v0.12 From fffb09adfd07eef5d2f296374b507032eec06cad Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Tue, 11 May 2010 13:34:37 +0100 Subject: Symbian/trk: Fix debugging output for the N8. 1. Fix hanging behaviour when we receive a message on the wrong mux in framed mode 2. Treat messages on the trace mux (0102) as debug output 3. Separate timestamp from text in trace messages Reviewed-by: Friedemann Kleint --- tools/runonphone/symbianutils/launcher.cpp | 18 ++++++++++++++++-- tools/runonphone/symbianutils/trkutils.cpp | 22 +++++++++++++++++----- tools/runonphone/symbianutils/trkutils.h | 8 ++++++++ 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/tools/runonphone/symbianutils/launcher.cpp b/tools/runonphone/symbianutils/launcher.cpp index fa509e7..ecb067e 100644 --- a/tools/runonphone/symbianutils/launcher.cpp +++ b/tools/runonphone/symbianutils/launcher.cpp @@ -365,8 +365,22 @@ void Launcher::handleResult(const TrkResult &result) QByteArray prefix = "READ BUF: "; QByteArray str = result.toString().toUtf8(); if (result.isDebugOutput) { // handle application output - logMessage("APPLICATION OUTPUT: " + result.data); - emit applicationOutputReceived(result.data); + QString msg; + if (result.multiplex == MuxTextTrace) { + if (result.data.length() > 8) { + quint64 timestamp = extractInt64(result.data) & 0x0FFFFFFFFFFFFFFFULL; + quint64 secs = timestamp / 1000000000; + quint64 ns = timestamp % 1000000000; + msg = QString("[%1.%2] %3").arg(secs).arg(ns).arg(QString(result.data.mid(8))); + logMessage("TEXT TRACE: " + msg); + } + } else { + logMessage("APPLICATION OUTPUT: " + result.data); + msg = result.data; + } + msg.replace("\r\n", "\n"); + if(!msg.endsWith('\n')) msg.append('\n'); + emit applicationOutputReceived(msg); return; } switch (result.code) { diff --git a/tools/runonphone/symbianutils/trkutils.cpp b/tools/runonphone/symbianutils/trkutils.cpp index 9b43c96..60e391e 100644 --- a/tools/runonphone/symbianutils/trkutils.cpp +++ b/tools/runonphone/symbianutils/trkutils.cpp @@ -276,14 +276,13 @@ QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool s /* returns 0 if array doesn't represent a result, otherwise returns the length of the result data */ -ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame) +ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame, ushort& mux) { if (serialFrame) { // Serial protocol with length info if (buffer.length() < 4) return 0; - if (buffer.at(0) != 0x01 || byte(buffer.at(1)) != 0x90) - return 0; + mux = extractShort(buffer.data()); const ushort len = extractShort(buffer.data() + 2); return (buffer.size() >= len + 4) ? len : ushort(0); } @@ -292,6 +291,7 @@ ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame) const int firstDelimiterPos = buffer.indexOf(delimiter); // Regular message delimited by 0x7e..0x7e if (firstDelimiterPos == 0) { + mux = MuxTrk; const int endPos = buffer.indexOf(delimiter, firstDelimiterPos + 1); return endPos != -1 ? endPos + 1 - firstDelimiterPos : 0; } @@ -304,7 +304,7 @@ bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *result, QByt result->clear(); if(rawData) rawData->clear(); - const ushort len = isValidTrkResult(*buffer, serialFrame); + const ushort len = isValidTrkResult(*buffer, serialFrame, result->multiplex); if (!len) return false; // handle receiving application output, which is not a regular command @@ -312,7 +312,6 @@ bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *result, QByt if (buffer->at(delimiterPos) != 0x7e) { result->isDebugOutput = true; result->data = buffer->mid(delimiterPos, len); - result->data.replace("\r\n", "\n"); *buffer->remove(0, delimiterPos + len); return true; } @@ -353,6 +352,19 @@ SYMBIANUTILS_EXPORT uint extractInt(const char *data) return res; } +SYMBIANUTILS_EXPORT quint64 extractInt64(const char *data) +{ + quint64 res = byte(data[0]); + res <<= 8; res += byte(data[1]); + res <<= 8; res += byte(data[2]); + res <<= 8; res += byte(data[3]); + res <<= 8; res += byte(data[4]); + res <<= 8; res += byte(data[5]); + res <<= 8; res += byte(data[6]); + res <<= 8; res += byte(data[7]); + return res; +} + SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba) { QString res; diff --git a/tools/runonphone/symbianutils/trkutils.h b/tools/runonphone/symbianutils/trkutils.h index 553fc7d..e571028 100644 --- a/tools/runonphone/symbianutils/trkutils.h +++ b/tools/runonphone/symbianutils/trkutils.h @@ -135,9 +135,16 @@ enum Command { TrkDSPositionFile = 0xd4 }; +enum SerialMultiplexor { + MuxRaw = 0, + MuxTextTrace = 0x0102, + MuxTrk = 0x0190 +}; + inline byte extractByte(const char *data) { return *data; } SYMBIANUTILS_EXPORT ushort extractShort(const char *data); SYMBIANUTILS_EXPORT uint extractInt(const char *data); +SYMBIANUTILS_EXPORT quint64 extractInt64(const char *data); SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba); @@ -217,6 +224,7 @@ struct SYMBIANUTILS_EXPORT TrkResult int errorCode() const; QString errorString() const; + ushort multiplex; byte code; byte token; QByteArray data; -- cgit v0.12 From b4b4cb3248b987dd6c15908f0b46e131dc2b7cde Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Tue, 11 May 2010 16:54:41 +0100 Subject: Update DEF files for Qt 4.7 Task-Number: QTBUG-10251 Reviewed-by: Trust Me --- src/s60installs/bwins/QtCoreu.def | 2 + src/s60installs/bwins/QtDeclarativeu.def | 71 ++++++++++++++++++++------ src/s60installs/bwins/QtGuiu.def | 4 +- src/s60installs/eabi/QtCoreu.def | 2 + src/s60installs/eabi/QtDeclarativeu.def | 88 +++++++++++++++++++++++--------- src/s60installs/eabi/QtGuiu.def | 3 +- 6 files changed, 129 insertions(+), 41 deletions(-) diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def index e309e25..13b8157 100644 --- a/src/s60installs/bwins/QtCoreu.def +++ b/src/s60installs/bwins/QtCoreu.def @@ -4463,4 +4463,6 @@ EXPORTS ?parentChanged@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@1@ZA @ 4462 NONAME ; void (*QAbstractDeclarativeData::parentChanged)(class QAbstractDeclarativeData *, class QObject *, class QObject *) ?destroyed@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@@ZA @ 4463 NONAME ; void (*QAbstractDeclarativeData::destroyed)(class QAbstractDeclarativeData *, class QObject *) ?selectThread@QEventDispatcherSymbian@@AAEAAVQSelectThread@@XZ @ 4464 NONAME ; class QSelectThread & QEventDispatcherSymbian::selectThread(void) + ?setRawData@QByteArray@@QAEAAV1@PBDI@Z @ 4465 NONAME ; class QByteArray & QByteArray::setRawData(char const *, unsigned int) + ?setRawData@QString@@QAEAAV1@PBVQChar@@H@Z @ 4466 NONAME ; class QString & QString::setRawData(class QChar const *, int) diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index 5f05f08..18372a4 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -581,7 +581,7 @@ EXPORTS ?advance@QDeclarativeParticleMotionWander@@UAEXAAVQDeclarativeParticle@@H@Z @ 580 NONAME ABSENT ; void QDeclarativeParticleMotionWander::advance(class QDeclarativeParticle &, int) ?alert@QDeclarativeWebView@@IAEXABVQString@@@Z @ 581 NONAME ABSENT ; void QDeclarativeWebView::alert(class QString const &) ?alternateBase@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 582 NONAME ; class QColor QDeclarativeSystemPalette::alternateBase(void) const - ?anchors@QDeclarativeItem@@QAEPAVQDeclarativeAnchors@@XZ @ 583 NONAME ; class QDeclarativeAnchors * QDeclarativeItem::anchors(void) + ?anchors@QDeclarativeItem@@QAEPAVQDeclarativeAnchors@@XZ @ 583 NONAME ABSENT ; class QDeclarativeAnchors * QDeclarativeItem::anchors(void) ?angle@QDeclarativeParticles@@QBEMXZ @ 584 NONAME ABSENT ; float QDeclarativeParticles::angle(void) const ?angleChanged@QDeclarativeParticles@@IAEXXZ @ 585 NONAME ABSENT ; void QDeclarativeParticles::angleChanged(void) ?angleDeviation@QDeclarativeParticles@@QBEMXZ @ 586 NONAME ABSENT ; float QDeclarativeParticles::angleDeviation(void) const @@ -647,7 +647,7 @@ EXPORTS ?buildObject@QDeclarativeCompiler@@AAE_NPAVObject@QDeclarativeParser@@ABUBindingContext@1@@Z @ 646 NONAME ; bool QDeclarativeCompiler::buildObject(class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &) ?buildProperty@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@ABUBindingContext@1@@Z @ 647 NONAME ; bool QDeclarativeCompiler::buildProperty(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &) ?buildPropertyAssignment@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@ABUBindingContext@1@@Z @ 648 NONAME ; bool QDeclarativeCompiler::buildPropertyAssignment(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &) - ?buildPropertyInNamespace@QDeclarativeCompiler@@AAE_NPAUImportedNamespace@QDeclarativeEnginePrivate@@PAVProperty@QDeclarativeParser@@PAVObject@5@ABUBindingContext@1@@Z @ 649 NONAME ; bool QDeclarativeCompiler::buildPropertyInNamespace(struct QDeclarativeEnginePrivate::ImportedNamespace *, class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &) + ?buildPropertyInNamespace@QDeclarativeCompiler@@AAE_NPAUImportedNamespace@QDeclarativeEnginePrivate@@PAVProperty@QDeclarativeParser@@PAVObject@5@ABUBindingContext@1@@Z @ 649 NONAME ABSENT ; bool QDeclarativeCompiler::buildPropertyInNamespace(struct QDeclarativeEnginePrivate::ImportedNamespace *, class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &) ?buildPropertyLiteralAssignment@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@PAVValue@3@ABUBindingContext@1@@Z @ 650 NONAME ; bool QDeclarativeCompiler::buildPropertyLiteralAssignment(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, class QDeclarativeParser::Value *, struct QDeclarativeCompiler::BindingContext const &) ?buildPropertyObjectAssignment@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@PAVValue@3@ABUBindingContext@1@@Z @ 651 NONAME ; bool QDeclarativeCompiler::buildPropertyObjectAssignment(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, class QDeclarativeParser::Value *, struct QDeclarativeCompiler::BindingContext const &) ?buildScript@QDeclarativeCompiler@@AAE_NPAVObject@QDeclarativeParser@@0@Z @ 652 NONAME ABSENT ; bool QDeclarativeCompiler::buildScript(class QDeclarativeParser::Object *, class QDeclarativeParser::Object *) @@ -693,7 +693,7 @@ EXPORTS ?classBegin@QDeclarativeDateTimeFormatter@@UAEXXZ @ 692 NONAME ABSENT ; void QDeclarativeDateTimeFormatter::classBegin(void) ?classBegin@QDeclarativeItem@@MAEXXZ @ 693 NONAME ; void QDeclarativeItem::classBegin(void) ?classBegin@QDeclarativeNumberFormatter@@UAEXXZ @ 694 NONAME ABSENT ; void QDeclarativeNumberFormatter::classBegin(void) - ?classBegin@QDeclarativeParserStatus@@UAEXXZ @ 695 NONAME ; void QDeclarativeParserStatus::classBegin(void) + ?classBegin@QDeclarativeParserStatus@@UAEXXZ @ 695 NONAME ABSENT ; void QDeclarativeParserStatus::classBegin(void) ?classBegin@QDeclarativeStateGroup@@UAEXXZ @ 696 NONAME ; void QDeclarativeStateGroup::classBegin(void) ?classBegin@QDeclarativeTimer@@MAEXXZ @ 697 NONAME ; void QDeclarativeTimer::classBegin(void) ?classBegin@QDeclarativeXmlListModel@@UAEXXZ @ 698 NONAME ; void QDeclarativeXmlListModel::classBegin(void) @@ -754,7 +754,7 @@ EXPORTS ?componentComplete@QDeclarativeItem@@MAEXXZ @ 753 NONAME ; void QDeclarativeItem::componentComplete(void) ?componentComplete@QDeclarativeListView@@MAEXXZ @ 754 NONAME ; void QDeclarativeListView::componentComplete(void) ?componentComplete@QDeclarativeNumberFormatter@@UAEXXZ @ 755 NONAME ABSENT ; void QDeclarativeNumberFormatter::componentComplete(void) - ?componentComplete@QDeclarativeParserStatus@@UAEXXZ @ 756 NONAME ; void QDeclarativeParserStatus::componentComplete(void) + ?componentComplete@QDeclarativeParserStatus@@UAEXXZ @ 756 NONAME ABSENT ; void QDeclarativeParserStatus::componentComplete(void) ?componentComplete@QDeclarativeParticles@@MAEXXZ @ 757 NONAME ABSENT ; void QDeclarativeParticles::componentComplete(void) ?componentComplete@QDeclarativePath@@MAEXXZ @ 758 NONAME ; void QDeclarativePath::componentComplete(void) ?componentComplete@QDeclarativePathView@@MAEXXZ @ 759 NONAME ; void QDeclarativePathView::componentComplete(void) @@ -1369,7 +1369,7 @@ EXPORTS ?indexOfSignal@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1368 NONAME ; int QMetaObjectBuilder::indexOfSignal(class QByteArray const &) ?indexOfSlot@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1369 NONAME ; int QMetaObjectBuilder::indexOfSlot(class QByteArray const &) ?init@QDeclarativeContextPrivate@@QAEXXZ @ 1370 NONAME ABSENT ; void QDeclarativeContextPrivate::init(void) - ?init@QDeclarativePaintedItem@@AAEXXZ @ 1371 NONAME ; void QDeclarativePaintedItem::init(void) + ?init@QDeclarativePaintedItem@@AAEXXZ @ 1371 NONAME ABSENT ; void QDeclarativePaintedItem::init(void) ?init@QDeclarativeWebView@@AAEXXZ @ 1372 NONAME ABSENT ; void QDeclarativeWebView::init(void) ?initialLayout@QDeclarativeWebView@@AAEXXZ @ 1373 NONAME ABSENT ; void QDeclarativeWebView::initialLayout(void) ?initialValue@QDeclarativeOpenMetaObject@@UAE?AVQVariant@@H@Z @ 1374 NONAME ; class QVariant QDeclarativeOpenMetaObject::initialValue(int) @@ -2214,9 +2214,9 @@ EXPORTS ?resetVerticalCenter@QDeclarativeAnchors@@QAEXXZ @ 2213 NONAME ; void QDeclarativeAnchors::resetVerticalCenter(void) ?resetWidth@QDeclarativeItem@@QAEXXZ @ 2214 NONAME ; void QDeclarativeItem::resetWidth(void) ?resizeEvent@QDeclarativeView@@MAEXPAVQResizeEvent@@@Z @ 2215 NONAME ; void QDeclarativeView::resizeEvent(class QResizeEvent *) - ?resizeMode@QDeclarativeLoader@@QBE?AW4ResizeMode@1@XZ @ 2216 NONAME ; enum QDeclarativeLoader::ResizeMode QDeclarativeLoader::resizeMode(void) const + ?resizeMode@QDeclarativeLoader@@QBE?AW4ResizeMode@1@XZ @ 2216 NONAME ABSENT ; enum QDeclarativeLoader::ResizeMode QDeclarativeLoader::resizeMode(void) const ?resizeMode@QDeclarativeView@@QBE?AW4ResizeMode@1@XZ @ 2217 NONAME ; enum QDeclarativeView::ResizeMode QDeclarativeView::resizeMode(void) const - ?resizeModeChanged@QDeclarativeLoader@@IAEXXZ @ 2218 NONAME ; void QDeclarativeLoader::resizeModeChanged(void) + ?resizeModeChanged@QDeclarativeLoader@@IAEXXZ @ 2218 NONAME ABSENT ; void QDeclarativeLoader::resizeModeChanged(void) ?resolvedUrl@QDeclarativeContext@@QAE?AVQUrl@@ABV2@@Z @ 2219 NONAME ; class QUrl QDeclarativeContext::resolvedUrl(class QUrl const &) ?resources@QDeclarativeItem@@QAE?AU?$QDeclarativeListProperty@VQObject@@@@XZ @ 2220 NONAME ABSENT ; struct QDeclarativeListProperty QDeclarativeItem::resources(void) ?restart@QDeclarativeTimer@@QAEXXZ @ 2221 NONAME ; void QDeclarativeTimer::restart(void) @@ -2542,7 +2542,7 @@ EXPORTS ?setRepeating@QDeclarativeTimer@@QAEX_N@Z @ 2541 NONAME ; void QDeclarativeTimer::setRepeating(bool) ?setReset@QDeclarativeAnchorChanges@@QAEXABVQString@@@Z @ 2542 NONAME ABSENT ; void QDeclarativeAnchorChanges::setReset(class QString const &) ?setResettable@QMetaPropertyBuilder@@QAEX_N@Z @ 2543 NONAME ; void QMetaPropertyBuilder::setResettable(bool) - ?setResizeMode@QDeclarativeLoader@@QAEXW4ResizeMode@1@@Z @ 2544 NONAME ; void QDeclarativeLoader::setResizeMode(enum QDeclarativeLoader::ResizeMode) + ?setResizeMode@QDeclarativeLoader@@QAEXW4ResizeMode@1@@Z @ 2544 NONAME ABSENT ; void QDeclarativeLoader::setResizeMode(enum QDeclarativeLoader::ResizeMode) ?setResizeMode@QDeclarativeView@@QAEXW4ResizeMode@1@@Z @ 2545 NONAME ; void QDeclarativeView::setResizeMode(enum QDeclarativeView::ResizeMode) ?setRestoreEntryValues@QDeclarativePropertyChanges@@QAEX_N@Z @ 2546 NONAME ; void QDeclarativePropertyChanges::setRestoreEntryValues(bool) ?setReturnType@QMetaMethodBuilder@@QAEXABVQByteArray@@@Z @ 2547 NONAME ; void QMetaMethodBuilder::setReturnType(class QByteArray const &) @@ -2595,7 +2595,7 @@ EXPORTS ?setStartY@QDeclarativePath@@QAEXM@Z @ 2594 NONAME ; void QDeclarativePath::setStartY(float) ?setState@QDeclarativeDebugQuery@@AAEXW4State@1@@Z @ 2595 NONAME ; void QDeclarativeDebugQuery::setState(enum QDeclarativeDebugQuery::State) ?setState@QDeclarativeDebugWatch@@AAEXW4State@1@@Z @ 2596 NONAME ; void QDeclarativeDebugWatch::setState(enum QDeclarativeDebugWatch::State) - ?setState@QDeclarativeItem@@QAEXABVQString@@@Z @ 2597 NONAME ; void QDeclarativeItem::setState(class QString const &) + ?setState@QDeclarativeItem@@QAEXABVQString@@@Z @ 2597 NONAME ABSENT ; void QDeclarativeItem::setState(class QString const &) ?setState@QDeclarativeStateGroup@@QAEXABVQString@@@Z @ 2598 NONAME ; void QDeclarativeStateGroup::setState(class QString const &) ?setStateGroup@QDeclarativeState@@QAEXPAVQDeclarativeStateGroup@@@Z @ 2599 NONAME ; void QDeclarativeState::setStateGroup(class QDeclarativeStateGroup *) ?setStaticMetacallFunction@QMetaObjectBuilder@@QAEXP6AHW4Call@QMetaObject@@HPAPAX@Z@Z @ 2600 NONAME ; void QMetaObjectBuilder::setStaticMetacallFunction(int (*)(enum QMetaObject::Call, int, void * *)) @@ -2714,7 +2714,7 @@ EXPORTS ?startY@QDeclarativePath@@QBEMXZ @ 2713 NONAME ; float QDeclarativePath::startY(void) const ?state@QDeclarativeDebugQuery@@QBE?AW4State@1@XZ @ 2714 NONAME ; enum QDeclarativeDebugQuery::State QDeclarativeDebugQuery::state(void) const ?state@QDeclarativeDebugWatch@@QBE?AW4State@1@XZ @ 2715 NONAME ; enum QDeclarativeDebugWatch::State QDeclarativeDebugWatch::state(void) const - ?state@QDeclarativeItem@@QBE?AVQString@@XZ @ 2716 NONAME ; class QString QDeclarativeItem::state(void) const + ?state@QDeclarativeItem@@QBE?AVQString@@XZ @ 2716 NONAME ABSENT ; class QString QDeclarativeItem::state(void) const ?state@QDeclarativeStateGroup@@QBE?AVQString@@XZ @ 2717 NONAME ; class QString QDeclarativeStateGroup::state(void) const ?stateChanged@QDeclarativeDebugQuery@@IAEXW4State@1@@Z @ 2718 NONAME ; void QDeclarativeDebugQuery::stateChanged(enum QDeclarativeDebugQuery::State) ?stateChanged@QDeclarativeDebugWatch@@IAEXW4State@1@@Z @ 2719 NONAME ; void QDeclarativeDebugWatch::stateChanged(enum QDeclarativeDebugWatch::State) @@ -3576,7 +3576,7 @@ EXPORTS ?d_func@QDeclarativeSmoothedAnimation@@ABEPBVQDeclarativeSmoothedAnimationPrivate@@XZ @ 3575 NONAME ; class QDeclarativeSmoothedAnimationPrivate const * QDeclarativeSmoothedAnimation::d_func(void) const ?d_func@QDeclarativeTranslate@@AAEPAVQDeclarativeTranslatePrivate@@XZ @ 3576 NONAME ; class QDeclarativeTranslatePrivate * QDeclarativeTranslate::d_func(void) ?d_func@QDeclarativeTranslate@@ABEPBVQDeclarativeTranslatePrivate@@XZ @ 3577 NONAME ; class QDeclarativeTranslatePrivate const * QDeclarativeTranslate::d_func(void) const - ?data@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 3578 NONAME ; class QDeclarativeListProperty QDeclarativeItem::data(void) + ?data@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 3578 NONAME ABSENT ; class QDeclarativeListProperty QDeclarativeItem::data(void) ?dataCleared@QDeclarativeXmlListModel@@AAEXXZ @ 3579 NONAME ; void QDeclarativeXmlListModel::dataCleared(void) ?data_append@QDeclarativeItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQObject@@@@PAVQObject@@@Z @ 3580 NONAME ; void QDeclarativeItemPrivate::data_append(class QDeclarativeListProperty *, class QObject *) ?delegateChanged@QDeclarativeGridView@@IAEXXZ @ 3581 NONAME ; void QDeclarativeGridView::delegateChanged(void) @@ -3707,7 +3707,7 @@ EXPORTS ?request@QDeclarativePixmapCache@@SAPAVQDeclarativePixmapReply@@PAVQDeclarativeEngine@@ABVQUrl@@HH@Z @ 3706 NONAME ; class QDeclarativePixmapReply * QDeclarativePixmapCache::request(class QDeclarativeEngine *, class QUrl const &, int, int) ?resetHeight@QDeclarativeItemPrivate@@UAEXXZ @ 3707 NONAME ; void QDeclarativeItemPrivate::resetHeight(void) ?resetWidth@QDeclarativeItemPrivate@@UAEXXZ @ 3708 NONAME ; void QDeclarativeItemPrivate::resetWidth(void) - ?resources@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 3709 NONAME ; class QDeclarativeListProperty QDeclarativeItem::resources(void) + ?resources@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 3709 NONAME ABSENT ; class QDeclarativeListProperty QDeclarativeItem::resources(void) ?resources_append@QDeclarativeItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQObject@@@@PAVQObject@@@Z @ 3710 NONAME ; void QDeclarativeItemPrivate::resources_append(class QDeclarativeListProperty *, class QObject *) ?resources_at@QDeclarativeItemPrivate@@SAPAVQObject@@PAV?$QDeclarativeListProperty@VQObject@@@@H@Z @ 3711 NONAME ; class QObject * QDeclarativeItemPrivate::resources_at(class QDeclarativeListProperty *, int) ?resources_count@QDeclarativeItemPrivate@@SAHPAV?$QDeclarativeListProperty@VQObject@@@@@Z @ 3712 NONAME ; int QDeclarativeItemPrivate::resources_count(class QDeclarativeListProperty *) @@ -3771,8 +3771,8 @@ EXPORTS ?start@QDeclarativeItemPrivate@@SAXAAVQTime@@@Z @ 3770 NONAME ; void QDeclarativeItemPrivate::start(class QTime &) ?startXChanged@QDeclarativePath@@IAEXXZ @ 3771 NONAME ; void QDeclarativePath::startXChanged(void) ?startYChanged@QDeclarativePath@@IAEXXZ @ 3772 NONAME ; void QDeclarativePath::startYChanged(void) - ?states@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeState@@@@XZ @ 3773 NONAME ; class QDeclarativeListProperty QDeclarativeItem::states(void) - ?states@QDeclarativeItemPrivate@@QAEPAVQDeclarativeStateGroup@@XZ @ 3774 NONAME ; class QDeclarativeStateGroup * QDeclarativeItemPrivate::states(void) + ?states@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeState@@@@XZ @ 3773 NONAME ABSENT ; class QDeclarativeListProperty QDeclarativeItem::states(void) + ?states@QDeclarativeItemPrivate@@QAEPAVQDeclarativeStateGroup@@XZ @ 3774 NONAME ABSENT ; class QDeclarativeStateGroup * QDeclarativeItemPrivate::states(void) ?statesProperty@QDeclarativeStateGroup@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeState@@@@XZ @ 3775 NONAME ; class QDeclarativeListProperty QDeclarativeStateGroup::statesProperty(void) ?stops@QDeclarativeGradient@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeGradientStop@@@@XZ @ 3776 NONAME ; class QDeclarativeListProperty QDeclarativeGradient::stops(void) ?subFocusItemChange@QDeclarativeItemPrivate@@UAEXXZ @ 3777 NONAME ; void QDeclarativeItemPrivate::subFocusItemChange(void) @@ -3799,7 +3799,7 @@ EXPORTS ?transform_clear@QDeclarativeItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQGraphicsTransform@@@@@Z @ 3798 NONAME ; void QDeclarativeItemPrivate::transform_clear(class QDeclarativeListProperty *) ?transform_count@QDeclarativeItemPrivate@@SAHPAV?$QDeclarativeListProperty@VQGraphicsTransform@@@@@Z @ 3799 NONAME ; int QDeclarativeItemPrivate::transform_count(class QDeclarativeListProperty *) ?transition@QDeclarativeSmoothedAnimation@@UAEXAAV?$QList@VQDeclarativeAction@@@@AAV?$QList@VQDeclarativeProperty@@@@W4TransitionDirection@QDeclarativeAbstractAnimation@@@Z @ 3800 NONAME ; void QDeclarativeSmoothedAnimation::transition(class QList &, class QList &, enum QDeclarativeAbstractAnimation::TransitionDirection) - ?transitions@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeTransition@@@@XZ @ 3801 NONAME ; class QDeclarativeListProperty QDeclarativeItem::transitions(void) + ?transitions@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeTransition@@@@XZ @ 3801 NONAME ABSENT ; class QDeclarativeListProperty QDeclarativeItem::transitions(void) ?transitionsProperty@QDeclarativeStateGroup@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeTransition@@@@XZ @ 3802 NONAME ; class QDeclarativeListProperty QDeclarativeStateGroup::transitionsProperty(void) ?triggeredOnStartChanged@QDeclarativeTimer@@IAEXXZ @ 3803 NONAME ; void QDeclarativeTimer::triggeredOnStartChanged(void) ?type@Variant@QDeclarativeParser@@QBE?AW4Type@12@XZ @ 3804 NONAME ; enum QDeclarativeParser::Variant::Type QDeclarativeParser::Variant::type(void) const @@ -3920,7 +3920,7 @@ EXPORTS ?execute@QDeclarativeParentChange@@UAEXW4Reason@QDeclarativeActionEvent@@@Z @ 3919 NONAME ; void QDeclarativeParentChange::execute(enum QDeclarativeActionEvent::Reason) ?resetSourceComponent@QDeclarativeLoader@@QAEXXZ @ 3920 NONAME ; void QDeclarativeLoader::resetSourceComponent(void) ?rootIndex@QDeclarativeVisualDataModel@@QBE?AVQVariant@@XZ @ 3921 NONAME ; class QVariant QDeclarativeVisualDataModel::rootIndex(void) const - ?createObject@QDeclarativeComponent@@IAE?AVQScriptValue@@XZ @ 3922 NONAME ; class QScriptValue QDeclarativeComponent::createObject(void) + ?createObject@QDeclarativeComponent@@IAE?AVQScriptValue@@XZ @ 3922 NONAME ABSENT ; class QScriptValue QDeclarativeComponent::createObject(void) ?execute@QDeclarativeStateChangeScript@@UAEXW4Reason@QDeclarativeActionEvent@@@Z @ 3923 NONAME ; void QDeclarativeStateChangeScript::execute(enum QDeclarativeActionEvent::Reason) ?active@QDeclarativeDrag@@QBE_NXZ @ 3924 NONAME ; bool QDeclarativeDrag::active(void) const ?retransformBack@QDeclarativeFlipable@@AAEXXZ @ 3925 NONAME ; void QDeclarativeFlipable::retransformBack(void) @@ -3955,4 +3955,43 @@ EXPORTS ?parentModelIndex@QDeclarativeVisualDataModel@@QBE?AVQVariant@@XZ @ 3954 NONAME ; class QVariant QDeclarativeVisualDataModel::parentModelIndex(void) const ?usedAnchors@QDeclarativeAnchors@@QBE?AV?$QFlags@W4Anchor@QDeclarativeAnchors@@@@XZ @ 3955 NONAME ; class QFlags QDeclarativeAnchors::usedAnchors(void) const ?eventFilter@QDeclarativeView@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 3956 NONAME ; bool QDeclarativeView::eventFilter(class QObject *, class QEvent *) + ??0QDeclarativeInfo@@AAE@PAVQDeclarativeInfoPrivate@@@Z @ 3957 NONAME ; QDeclarativeInfo::QDeclarativeInfo(class QDeclarativeInfoPrivate *) + ?_states@QDeclarativeItemPrivate@@QAEPAVQDeclarativeStateGroup@@XZ @ 3958 NONAME ; class QDeclarativeStateGroup * QDeclarativeItemPrivate::_states(void) + ?baseline@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3959 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::baseline(void) const + ?bottom@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3960 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::bottom(void) const + ?buildPropertyInNamespace@QDeclarativeCompiler@@AAE_NPAVQDeclarativeImportedNamespace@@PAVProperty@QDeclarativeParser@@PAVObject@4@ABUBindingContext@1@@Z @ 3961 NONAME ; bool QDeclarativeCompiler::buildPropertyInNamespace(class QDeclarativeImportedNamespace *, class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &) + ?canceled@QDeclarativeMouseArea@@IAEXXZ @ 3962 NONAME ; void QDeclarativeMouseArea::canceled(void) + ?classBegin@QDeclarativeBind@@MAEXXZ @ 3963 NONAME ; void QDeclarativeBind::classBegin(void) + ?classBegin@QDeclarativeConnections@@EAEXXZ @ 3964 NONAME ; void QDeclarativeConnections::classBegin(void) + ?classBegin@QDeclarativePath@@MAEXXZ @ 3965 NONAME ; void QDeclarativePath::classBegin(void) + ?classBegin@QDeclarativeWorkerScript@@MAEXXZ @ 3966 NONAME ; void QDeclarativeWorkerScript::classBegin(void) + ?completePending@QDeclarativeVisualDataModel@@UBE_NXZ @ 3967 NONAME ; bool QDeclarativeVisualDataModel::completePending(void) const + ?completePending@QDeclarativeVisualItemModel@@UBE_NXZ @ 3968 NONAME ; bool QDeclarativeVisualItemModel::completePending(void) const + ?componentFinalized@QDeclarativeBehavior@@AAEXXZ @ 3969 NONAME ; void QDeclarativeBehavior::componentFinalized(void) + ?createObject@QDeclarativeComponent@@IAE?AVQScriptValue@@PAVQObject@@@Z @ 3970 NONAME ; class QScriptValue QDeclarativeComponent::createObject(class QObject *) + ?data@QDeclarativeItemPrivate@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 3971 NONAME ; class QDeclarativeListProperty QDeclarativeItemPrivate::data(void) + ?engine@QDeclarativeWorkerScript@@AAEPAVQDeclarativeWorkerScriptEngine@@XZ @ 3972 NONAME ; class QDeclarativeWorkerScriptEngine * QDeclarativeWorkerScript::engine(void) + ?geometryChanged@QDeclarativePaintedItem@@MAEXABVQRectF@@0@Z @ 3973 NONAME ; void QDeclarativePaintedItem::geometryChanged(class QRectF const &, class QRectF const &) + ?get@QDeclarativeItemPrivate@@SAPAV1@PAVQDeclarativeItem@@@Z @ 3974 NONAME ; class QDeclarativeItemPrivate * QDeclarativeItemPrivate::get(class QDeclarativeItem *) + ?horizontalCenter@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3975 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::horizontalCenter(void) const + ?hoverEnabled@QDeclarativeMouseArea@@QBE_NXZ @ 3976 NONAME ; bool QDeclarativeMouseArea::hoverEnabled(void) const + ?hoverEnabledChanged@QDeclarativeMouseArea@@IAEXXZ @ 3977 NONAME ; void QDeclarativeMouseArea::hoverEnabledChanged(void) + ?ignoreUnknownSignals@QDeclarativeConnections@@QBE_NXZ @ 3978 NONAME ; bool QDeclarativeConnections::ignoreUnknownSignals(void) const + ?itemChange@QDeclarativeMouseArea@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 3979 NONAME ; class QVariant QDeclarativeMouseArea::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &) + ?itemChange@QDeclarativePaintedItem@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 3980 NONAME ; class QVariant QDeclarativePaintedItem::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &) + ?left@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3981 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::left(void) const + ?reportConflictingAnchors@QDeclarativeColumn@@MAEXXZ @ 3982 NONAME ; void QDeclarativeColumn::reportConflictingAnchors(void) + ?reportConflictingAnchors@QDeclarativeFlow@@MAEXXZ @ 3983 NONAME ; void QDeclarativeFlow::reportConflictingAnchors(void) + ?reportConflictingAnchors@QDeclarativeGrid@@MAEXXZ @ 3984 NONAME ; void QDeclarativeGrid::reportConflictingAnchors(void) + ?reportConflictingAnchors@QDeclarativeRow@@MAEXXZ @ 3985 NONAME ; void QDeclarativeRow::reportConflictingAnchors(void) + ?resources@QDeclarativeItemPrivate@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 3986 NONAME ; class QDeclarativeListProperty QDeclarativeItemPrivate::resources(void) + ?right@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3987 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::right(void) const + ?setHoverEnabled@QDeclarativeMouseArea@@QAEX_N@Z @ 3988 NONAME ; void QDeclarativeMouseArea::setHoverEnabled(bool) + ?setIgnoreUnknownSignals@QDeclarativeConnections@@QAEX_N@Z @ 3989 NONAME ; void QDeclarativeConnections::setIgnoreUnknownSignals(bool) + ?setState@QDeclarativeItemPrivate@@QAEXABVQString@@@Z @ 3990 NONAME ; void QDeclarativeItemPrivate::setState(class QString const &) + ?state@QDeclarativeItemPrivate@@QBE?AVQString@@XZ @ 3991 NONAME ; class QString QDeclarativeItemPrivate::state(void) const + ?states@QDeclarativeItemPrivate@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeState@@@@XZ @ 3992 NONAME ; class QDeclarativeListProperty QDeclarativeItemPrivate::states(void) + ?top@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3993 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::top(void) const + ?transitions@QDeclarativeItemPrivate@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeTransition@@@@XZ @ 3994 NONAME ; class QDeclarativeListProperty QDeclarativeItemPrivate::transitions(void) + ?verticalCenter@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3995 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::verticalCenter(void) const diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index c3a3a08..e574c31 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -12717,7 +12717,7 @@ EXPORTS ?updateInputMethodSensitivity@QGraphicsViewPrivate@@QAEXXZ @ 12716 NONAME ; void QGraphicsViewPrivate::updateInputMethodSensitivity(void) ?updateLastCenterPoint@QGraphicsViewPrivate@@QAEXXZ @ 12717 NONAME ; void QGraphicsViewPrivate::updateLastCenterPoint(void) ?updateRect@QGraphicsViewPrivate@@QAE_NABVQRect@@@Z @ 12718 NONAME ; bool QGraphicsViewPrivate::updateRect(class QRect const &) - ?updateRegion@QGraphicsViewPrivate@@QAE_NABVQRegion@@@Z @ 12719 NONAME ; bool QGraphicsViewPrivate::updateRegion(class QRegion const &) + ?updateRegion@QGraphicsViewPrivate@@QAE_NABVQRegion@@@Z @ 12719 NONAME ABSENT ; bool QGraphicsViewPrivate::updateRegion(class QRegion const &) ?updateScroll@QGraphicsViewPrivate@@QAEXXZ @ 12720 NONAME ; void QGraphicsViewPrivate::updateScroll(void) ?verticalScroll@QGraphicsViewPrivate@@QBE_JXZ @ 12721 NONAME ; long long QGraphicsViewPrivate::verticalScroll(void) const ?viewportEvent@QAbstractScrollAreaPrivate@@QAE_NPAVQEvent@@@Z @ 12722 NONAME ; bool QAbstractScrollAreaPrivate::viewportEvent(class QEvent *) @@ -12798,4 +12798,6 @@ EXPORTS ?hasPartialUpdateSupport@QWindowSurface@@QBE_NXZ @ 12797 NONAME ; bool QWindowSurface::hasPartialUpdateSupport(void) const ?name@QIcon@@QBE?AVQString@@XZ @ 12798 NONAME ; class QString QIcon::name(void) const ?iconName@QIconEngineV2@@QAE?AVQString@@XZ @ 12799 NONAME ; class QString QIconEngineV2::iconName(void) + ?updateRectF@QGraphicsViewPrivate@@QAE_NABVQRectF@@@Z @ 12800 NONAME ; bool QGraphicsViewPrivate::updateRectF(class QRectF const &) + ?updateRegion@QGraphicsViewPrivate@@QAE_NABVQRectF@@ABVQTransform@@@Z @ 12801 NONAME ; bool QGraphicsViewPrivate::updateRegion(class QRectF const &, class QTransform const &) diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def index 92a4020..dc9431b 100644 --- a/src/s60installs/eabi/QtCoreu.def +++ b/src/s60installs/eabi/QtCoreu.def @@ -3698,4 +3698,6 @@ EXPORTS _ZN24QAbstractDeclarativeData13parentChangedE @ 3697 NONAME DATA 4 _ZN24QAbstractDeclarativeData9destroyedE @ 3698 NONAME DATA 4 _ZN23QEventDispatcherSymbian12selectThreadEv @ 3699 NONAME + _ZN10QByteArray10setRawDataEPKcj @ 3700 NONAME + _ZN7QString10setRawDataEPK5QChari @ 3701 NONAME diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index ad12166..e1d8e96 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -111,7 +111,7 @@ EXPORTS _ZN16QDeclarativeItem11qt_metacallEN11QMetaObject4CallEiPPv @ 110 NONAME _ZN16QDeclarativeItem11qt_metacastEPKc @ 111 NONAME _ZN16QDeclarativeItem11resetHeightEv @ 112 NONAME - _ZN16QDeclarativeItem11transitionsEv @ 113 NONAME + _ZN16QDeclarativeItem11transitionsEv @ 113 NONAME ABSENT _ZN16QDeclarativeItem12childrenRectEv @ 114 NONAME _ZN16QDeclarativeItem12focusChangedEb @ 115 NONAME _ZN16QDeclarativeItem12stateChangedERK7QString @ 116 NONAME @@ -135,17 +135,17 @@ EXPORTS _ZN16QDeclarativeItem19getStaticMetaObjectEv @ 134 NONAME _ZN16QDeclarativeItem21baselineOffsetChangedEf @ 135 NONAME _ZN16QDeclarativeItem22transformOriginChangedENS_15TransformOriginE @ 136 NONAME - _ZN16QDeclarativeItem4dataEv @ 137 NONAME + _ZN16QDeclarativeItem4dataEv @ 137 NONAME ABSENT _ZN16QDeclarativeItem5eventEP6QEvent @ 138 NONAME _ZN16QDeclarativeItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 139 NONAME - _ZN16QDeclarativeItem6statesEv @ 140 NONAME - _ZN16QDeclarativeItem7anchorsEv @ 141 NONAME + _ZN16QDeclarativeItem6statesEv @ 140 NONAME ABSENT + _ZN16QDeclarativeItem7anchorsEv @ 141 NONAME ABSENT _ZN16QDeclarativeItem7setClipEb @ 142 NONAME _ZN16QDeclarativeItem7setSizeERK6QSizeF @ 143 NONAME _ZN16QDeclarativeItem8setFocusEb @ 144 NONAME - _ZN16QDeclarativeItem8setStateERK7QString @ 145 NONAME + _ZN16QDeclarativeItem8setStateERK7QString @ 145 NONAME ABSENT _ZN16QDeclarativeItem8setWidthEf @ 146 NONAME - _ZN16QDeclarativeItem9resourcesEv @ 147 NONAME + _ZN16QDeclarativeItem9resourcesEv @ 147 NONAME ABSENT _ZN16QDeclarativeItem9setHeightEf @ 148 NONAME _ZN16QDeclarativeItem9setSmoothEb @ 149 NONAME _ZN16QDeclarativeItem9transformEv @ 150 NONAME @@ -361,13 +361,13 @@ EXPORTS _ZN18QDeclarativeLoader11itemChangedEv @ 360 NONAME _ZN18QDeclarativeLoader11qt_metacallEN11QMetaObject4CallEiPPv @ 361 NONAME _ZN18QDeclarativeLoader11qt_metacastEPKc @ 362 NONAME - _ZN18QDeclarativeLoader13setResizeModeENS_10ResizeModeE @ 363 NONAME + _ZN18QDeclarativeLoader13setResizeModeENS_10ResizeModeE @ 363 NONAME ABSENT _ZN18QDeclarativeLoader13sourceChangedEv @ 364 NONAME _ZN18QDeclarativeLoader13statusChangedEv @ 365 NONAME _ZN18QDeclarativeLoader15geometryChangedERK6QRectFS2_ @ 366 NONAME _ZN18QDeclarativeLoader15progressChangedEv @ 367 NONAME _ZN18QDeclarativeLoader16staticMetaObjectE @ 368 NONAME DATA 16 - _ZN18QDeclarativeLoader17resizeModeChangedEv @ 369 NONAME + _ZN18QDeclarativeLoader17resizeModeChangedEv @ 369 NONAME ABSENT _ZN18QDeclarativeLoader18setSourceComponentEP21QDeclarativeComponent @ 370 NONAME _ZN18QDeclarativeLoader19getStaticMetaObjectEv @ 371 NONAME _ZN18QDeclarativeLoader9setSourceERK4QUrl @ 372 NONAME @@ -586,7 +586,7 @@ EXPORTS _ZN20QDeclarativeCompiler22completeComponentBuildEv @ 585 NONAME _ZN20QDeclarativeCompiler22isAttachedPropertyNameERK10QByteArray @ 586 NONAME _ZN20QDeclarativeCompiler23buildPropertyAssignmentEPN18QDeclarativeParser8PropertyEPNS0_6ObjectERKNS_14BindingContextE @ 587 NONAME - _ZN20QDeclarativeCompiler24buildPropertyInNamespaceEPN25QDeclarativeEnginePrivate17ImportedNamespaceEPN18QDeclarativeParser8PropertyEPNS3_6ObjectERKNS_14BindingContextE @ 588 NONAME + _ZN20QDeclarativeCompiler24buildPropertyInNamespaceEPN25QDeclarativeEnginePrivate17ImportedNamespaceEPN18QDeclarativeParser8PropertyEPNS3_6ObjectERKNS_14BindingContextE @ 588 NONAME ABSENT _ZN20QDeclarativeCompiler25buildPropertyOnAssignmentEPN18QDeclarativeParser8PropertyEPNS0_6ObjectES4_PNS0_5ValueERKNS_14BindingContextE @ 589 NONAME _ZN20QDeclarativeCompiler25buildScriptStringPropertyEPN18QDeclarativeParser8PropertyEPNS0_6ObjectERKNS_14BindingContextE @ 590 NONAME _ZN20QDeclarativeCompiler26mergeDynamicMetaPropertiesEPN18QDeclarativeParser6ObjectE @ 591 NONAME @@ -969,7 +969,7 @@ EXPORTS _ZN21QDeclarativeComponent11beginCreateEP19QDeclarativeContext @ 968 NONAME _ZN21QDeclarativeComponent11qt_metacallEN11QMetaObject4CallEiPPv @ 969 NONAME _ZN21QDeclarativeComponent11qt_metacastEPKc @ 970 NONAME - _ZN21QDeclarativeComponent12createObjectEv @ 971 NONAME + _ZN21QDeclarativeComponent12createObjectEv @ 971 NONAME ABSENT _ZN21QDeclarativeComponent13statusChangedENS_6StatusE @ 972 NONAME _ZN21QDeclarativeComponent14completeCreateEv @ 973 NONAME _ZN21QDeclarativeComponent15progressChangedEf @ 974 NONAME @@ -1493,7 +1493,7 @@ EXPORTS _ZN23QDeclarativePaintedItem19contentsSizeChangedEv @ 1492 NONAME _ZN23QDeclarativePaintedItem19getStaticMetaObjectEv @ 1493 NONAME _ZN23QDeclarativePaintedItem20contentsScaleChangedEv @ 1494 NONAME - _ZN23QDeclarativePaintedItem4initEv @ 1495 NONAME + _ZN23QDeclarativePaintedItem4initEv @ 1495 NONAME ABSENT _ZN23QDeclarativePaintedItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 1496 NONAME _ZN23QDeclarativePaintedItemC2EP16QDeclarativeItem @ 1497 NONAME _ZN23QDeclarativePaintedItemC2ER30QDeclarativePaintedItemPrivateP16QDeclarativeItem @ 1498 NONAME @@ -1624,9 +1624,9 @@ EXPORTS _ZN24QDeclarativeParentChangeD0Ev @ 1623 NONAME _ZN24QDeclarativeParentChangeD1Ev @ 1624 NONAME _ZN24QDeclarativeParentChangeD2Ev @ 1625 NONAME - _ZN24QDeclarativeParserStatus10classBeginEv @ 1626 NONAME - _ZN24QDeclarativeParserStatus17componentCompleteEv @ 1627 NONAME - _ZN24QDeclarativeParserStatusC1Ev @ 1628 NONAME + _ZN24QDeclarativeParserStatus10classBeginEv @ 1626 NONAME ABSENT + _ZN24QDeclarativeParserStatus17componentCompleteEv @ 1627 NONAME ABSENT + _ZN24QDeclarativeParserStatusC1Ev @ 1628 NONAME ABSENT _ZN24QDeclarativeParserStatusC2Ev @ 1629 NONAME _ZN24QDeclarativeParserStatusD0Ev @ 1630 NONAME _ZN24QDeclarativeParserStatusD1Ev @ 1631 NONAME @@ -2203,21 +2203,21 @@ EXPORTS _ZNK16QDeclarativeItem13keepMouseGrabEv @ 2202 NONAME _ZNK16QDeclarativeItem14baselineOffsetEv @ 2203 NONAME _ZNK16QDeclarativeItem14implicitHeightEv @ 2204 NONAME - _ZNK16QDeclarativeItem14verticalCenterEv @ 2205 NONAME + _ZNK16QDeclarativeItem14verticalCenterEv @ 2205 NONAME ABSENT _ZNK16QDeclarativeItem15transformOriginEv @ 2206 NONAME - _ZNK16QDeclarativeItem16horizontalCenterEv @ 2207 NONAME + _ZNK16QDeclarativeItem16horizontalCenterEv @ 2207 NONAME ABSENT _ZNK16QDeclarativeItem16inputMethodQueryEN2Qt16InputMethodQueryE @ 2208 NONAME _ZNK16QDeclarativeItem19isComponentCompleteEv @ 2209 NONAME - _ZNK16QDeclarativeItem3topEv @ 2210 NONAME + _ZNK16QDeclarativeItem3topEv @ 2210 NONAME ABSENT _ZNK16QDeclarativeItem4clipEv @ 2211 NONAME - _ZNK16QDeclarativeItem4leftEv @ 2212 NONAME - _ZNK16QDeclarativeItem5rightEv @ 2213 NONAME - _ZNK16QDeclarativeItem5stateEv @ 2214 NONAME + _ZNK16QDeclarativeItem4leftEv @ 2212 NONAME ABSENT + _ZNK16QDeclarativeItem5rightEv @ 2213 NONAME ABSENT + _ZNK16QDeclarativeItem5stateEv @ 2214 NONAME ABSENT _ZNK16QDeclarativeItem5widthEv @ 2215 NONAME - _ZNK16QDeclarativeItem6bottomEv @ 2216 NONAME + _ZNK16QDeclarativeItem6bottomEv @ 2216 NONAME ABSENT _ZNK16QDeclarativeItem6heightEv @ 2217 NONAME _ZNK16QDeclarativeItem6smoothEv @ 2218 NONAME - _ZNK16QDeclarativeItem8baselineEv @ 2219 NONAME + _ZNK16QDeclarativeItem8baselineEv @ 2219 NONAME ABSENT _ZNK16QDeclarativeItem8hasFocusEv @ 2220 NONAME _ZNK16QDeclarativeItem9mapToItemERK12QScriptValueff @ 2221 NONAME _ZNK16QDeclarativePath10attributesEv @ 2222 NONAME @@ -2310,7 +2310,7 @@ EXPORTS _ZNK18QDeclarativeEngine27networkAccessManagerFactoryEv @ 2309 NONAME _ZNK18QDeclarativeEngine7baseUrlEv @ 2310 NONAME _ZNK18QDeclarativeLoader10metaObjectEv @ 2311 NONAME - _ZNK18QDeclarativeLoader10resizeModeEv @ 2312 NONAME + _ZNK18QDeclarativeLoader10resizeModeEv @ 2312 NONAME ABSENT _ZNK18QDeclarativeLoader15sourceComponentEv @ 2313 NONAME _ZNK18QDeclarativeLoader4itemEv @ 2314 NONAME _ZNK18QDeclarativeLoader6sourceEv @ 2315 NONAME @@ -3536,4 +3536,46 @@ EXPORTS _ZThn8_N25QDeclarativeAnchorChanges7executeEN23QDeclarativeActionEvent6ReasonE @ 3535 NONAME _ZThn8_N25QDeclarativeAnchorChanges7reverseEN23QDeclarativeActionEvent6ReasonE @ 3536 NONAME _ZThn8_N29QDeclarativeStateChangeScript7executeEN23QDeclarativeActionEvent6ReasonE @ 3537 NONAME + _ZN15QDeclarativeRow24reportConflictingAnchorsEv @ 3538 NONAME + _ZN16QDeclarativeBind10classBeginEv @ 3539 NONAME + _ZN16QDeclarativeFlow24reportConflictingAnchorsEv @ 3540 NONAME + _ZN16QDeclarativeGrid24reportConflictingAnchorsEv @ 3541 NONAME + _ZN16QDeclarativePath10classBeginEv @ 3542 NONAME + _ZN18QDeclarativeColumn24reportConflictingAnchorsEv @ 3543 NONAME + _ZN20QDeclarativeBehavior18componentFinalizedEv @ 3544 NONAME + _ZN20QDeclarativeCompiler24buildPropertyInNamespaceEP29QDeclarativeImportedNamespacePN18QDeclarativeParser8PropertyEPNS2_6ObjectERKNS_14BindingContextE @ 3545 NONAME + _ZN21QDeclarativeComponent12createObjectEP7QObject @ 3546 NONAME + _ZN21QDeclarativeMouseArea10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3547 NONAME + _ZN21QDeclarativeMouseArea15setHoverEnabledEb @ 3548 NONAME + _ZN21QDeclarativeMouseArea19hoverEnabledChangedEv @ 3549 NONAME + _ZN21QDeclarativeMouseArea8canceledEv @ 3550 NONAME + _ZN23QDeclarativeConnections10classBeginEv @ 3551 NONAME + _ZN23QDeclarativeConnections23setIgnoreUnknownSignalsEb @ 3552 NONAME + _ZN23QDeclarativeItemPrivate11transitionsEv @ 3553 NONAME + _ZN23QDeclarativeItemPrivate4dataEv @ 3554 NONAME + _ZN23QDeclarativeItemPrivate7_statesEv @ 3555 NONAME + _ZN23QDeclarativeItemPrivate8setStateERK7QString @ 3556 NONAME + _ZN23QDeclarativeItemPrivate9resourcesEv @ 3557 NONAME + _ZN23QDeclarativePaintedItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3558 NONAME + _ZN23QDeclarativePaintedItem15geometryChangedERK6QRectFS2_ @ 3559 NONAME + _ZN24QDeclarativeWorkerScript10classBeginEv @ 3560 NONAME + _ZN24QDeclarativeWorkerScript6engineEv @ 3561 NONAME + _ZNK21QDeclarativeMouseArea12hoverEnabledEv @ 3562 NONAME + _ZNK23QDeclarativeConnections20ignoreUnknownSignalsEv @ 3563 NONAME + _ZNK23QDeclarativeItemPrivate14verticalCenterEv @ 3564 NONAME + _ZNK23QDeclarativeItemPrivate16horizontalCenterEv @ 3565 NONAME + _ZNK23QDeclarativeItemPrivate3topEv @ 3566 NONAME + _ZNK23QDeclarativeItemPrivate4leftEv @ 3567 NONAME + _ZNK23QDeclarativeItemPrivate5rightEv @ 3568 NONAME + _ZNK23QDeclarativeItemPrivate5stateEv @ 3569 NONAME + _ZNK23QDeclarativeItemPrivate6bottomEv @ 3570 NONAME + _ZNK23QDeclarativeItemPrivate8baselineEv @ 3571 NONAME + _ZNK27QDeclarativeVisualDataModel15completePendingEv @ 3572 NONAME + _ZNK27QDeclarativeVisualItemModel15completePendingEv @ 3573 NONAME + _ZThn8_N16QDeclarativeBind10classBeginEv @ 3574 NONAME + _ZThn8_N16QDeclarativePath10classBeginEv @ 3575 NONAME + _ZThn8_N21QDeclarativeMouseArea10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3576 NONAME + _ZThn8_N23QDeclarativeConnections10classBeginEv @ 3577 NONAME + _ZThn8_N23QDeclarativePaintedItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3578 NONAME + _ZThn8_N24QDeclarativeWorkerScript10classBeginEv @ 3579 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index b1166c5..8987470 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -11849,7 +11849,7 @@ EXPORTS _ZN19QApplicationPrivate15getPixmapCursorEN2Qt11CursorShapeE @ 11848 NONAME _ZN20QGraphicsViewPrivate10centerViewEN13QGraphicsView14ViewportAnchorE @ 11849 NONAME _ZN20QGraphicsViewPrivate10updateRectERK5QRect @ 11850 NONAME - _ZN20QGraphicsViewPrivate12updateRegionERK7QRegion @ 11851 NONAME + _ZN20QGraphicsViewPrivate12updateRegionERK7QRegion @ 11851 NONAME ABSENT _ZN20QGraphicsViewPrivate12updateScrollEv @ 11852 NONAME _ZN20QGraphicsViewPrivate15storeMouseEventEP11QMouseEvent @ 11853 NONAME _ZN20QGraphicsViewPrivate18storeDragDropEventEPK27QGraphicsSceneDragDropEvent @ 11854 NONAME @@ -11998,4 +11998,5 @@ EXPORTS _ZN14QWindowSurface23setPartialUpdateSupportEb @ 11997 NONAME _ZNK14QWindowSurface23hasPartialUpdateSupportEv @ 11998 NONAME _ZNK5QIcon4nameEv @ 11999 NONAME + _ZN20QGraphicsViewPrivate12updateRegionERK6QRectFRK10QTransform @ 12000 NONAME -- cgit v0.12 From 855368e447a1db8f72c1ad135b9edfb9c373a01d Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 12 May 2010 11:33:56 +1000 Subject: Qt.widgets was removed, point to graphics layouts example --- doc/src/declarative/integrating.qdoc | 50 ++---------------- .../declarative/graphicswidgets/bluecircle.h | 55 ------------------- .../graphicswidgets/graphicswidgets.pro | 13 ----- .../snippets/declarative/graphicswidgets/main.qml | 32 ------------ .../snippets/declarative/graphicswidgets/qmldir | 1 - .../declarative/graphicswidgets/redsquare.h | 54 ------------------- .../declarative/graphicswidgets/shapesplugin.cpp | 61 ---------------------- 7 files changed, 5 insertions(+), 261 deletions(-) delete mode 100644 doc/src/snippets/declarative/graphicswidgets/bluecircle.h delete mode 100644 doc/src/snippets/declarative/graphicswidgets/graphicswidgets.pro delete mode 100644 doc/src/snippets/declarative/graphicswidgets/main.qml delete mode 100644 doc/src/snippets/declarative/graphicswidgets/qmldir delete mode 100644 doc/src/snippets/declarative/graphicswidgets/redsquare.h delete mode 100644 doc/src/snippets/declarative/graphicswidgets/shapesplugin.cpp diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc index 1c07f8e..972976f 100644 --- a/doc/src/declarative/integrating.qdoc +++ b/doc/src/declarative/integrating.qdoc @@ -110,51 +110,11 @@ of QML UIs: \section2 Loading QGraphicsWidget objects in QML An alternative approach is to expose your existing QGraphicsWidget objects to -QML and construct your scene in QML instead. To do this, you need to register -any custom C++ types and create a plugin that registers the custom types -so that they can be used from your QML file. +QML and construct your scene in QML instead. See the \l {declarative/layouts/graphicsLayouts}{graphics layouts example} +which shows how to expose Qt's graphics layout classes to QML in order +to use QGraphicsWidget with classes like QGraphicsLinearLayout and QGraphicsGridLayout. -Here is an example. Suppose you have two classes, \c RedSquare and \c BlueCircle, -that both inherit from QGraphicsWidget: - -\c [graphicswidgets/redsquare.h] -\snippet doc/src/snippets/declarative/graphicswidgets/redsquare.h 0 - -\c [graphicswidgets/bluecircle.h] -\snippet doc/src/snippets/declarative/graphicswidgets/bluecircle.h 0 - -Then, create a plugin by subclassing QDeclarativeExtensionPlugin, and register the -types by calling qmlRegisterType(). Also export the plugin with Q_EXPORT_PLUGIN2. - -\c [graphicswidgets/shapesplugin.cpp] -\snippet doc/src/snippets/declarative/graphicswidgets/shapesplugin.cpp 0 - -Now write a project file that creates the plugin: - -\c [graphicswidgets/graphicswidgets.pro] -\quotefile doc/src/snippets/declarative/graphicswidgets/graphicswidgets.pro - -And add a \c qmldir file that includes the \c graphicswidgets plugin from the \c lib -subdirectory (as defined in the project file): - -\c [graphicswidgets/qmldir] -\quotefile doc/src/snippets/declarative/graphicswidgets/qmldir - -Now, we can write a QML file that uses the \c RedSquare and \c BlueCircle widgets. -(As an example, we can also create \c QGraphicsWidget items if we import the \c Qt.widgets -module.) - -\c [main.qml] -\quotefile doc/src/snippets/declarative/graphicswidgets/main.qml - -Here is a screenshot of the result: - -\image declarative-integrating-graphicswidgets.png - - -Note this approach of creating your graphics objects from QML does not work -with QGraphicsItems that are not QGraphicsObject-based, since they are not QObjects. - -See \l{Extending QML in C++} for further information on using C++ types. +To expose your existing QGraphicsWidget classes to QML, use \l {qmlRegisterType()}. +See \l{Extending QML in C++} for further information on using C++ types in QML. */ diff --git a/doc/src/snippets/declarative/graphicswidgets/bluecircle.h b/doc/src/snippets/declarative/graphicswidgets/bluecircle.h deleted file mode 100644 index 73d66b7..0000000 --- a/doc/src/snippets/declarative/graphicswidgets/bluecircle.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -//![0] -#include -#include - -class BlueCircle : public QGraphicsWidget -{ - Q_OBJECT -public: - void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) - { - painter->setPen(QColor(Qt::blue)); - painter->drawEllipse(0, 0, size().width(), size().height()); - } -}; -//![0] diff --git a/doc/src/snippets/declarative/graphicswidgets/graphicswidgets.pro b/doc/src/snippets/declarative/graphicswidgets/graphicswidgets.pro deleted file mode 100644 index 21c8a37..0000000 --- a/doc/src/snippets/declarative/graphicswidgets/graphicswidgets.pro +++ /dev/null @@ -1,13 +0,0 @@ -TEMPLATE = lib -CONFIG += qt plugin -QT += declarative - -HEADERS += redsquare.h \ - bluecircle.h - -SOURCES += shapesplugin.cpp - -DESTDIR = lib -OBJECTS_DIR = tmp -MOC_DIR = tmp - diff --git a/doc/src/snippets/declarative/graphicswidgets/main.qml b/doc/src/snippets/declarative/graphicswidgets/main.qml deleted file mode 100644 index ffcf79d..0000000 --- a/doc/src/snippets/declarative/graphicswidgets/main.qml +++ /dev/null @@ -1,32 +0,0 @@ -import Qt 4.7 -import Qt.widgets 4.7 - -Rectangle { - width: 200 - height: 200 - - RedSquare { - id: square - width: 80 - height: 80 - } - - BlueCircle { - anchors.left: square.right - width: 80 - height: 80 - } - - QGraphicsWidget { - anchors.top: square.bottom - size.width: 80 - size.height: 80 - layout: QGraphicsLinearLayout { - LayoutItem { - preferredSize: "100x100" - Rectangle { color: "yellow"; anchors.fill: parent } - } - } - } -} - diff --git a/doc/src/snippets/declarative/graphicswidgets/qmldir b/doc/src/snippets/declarative/graphicswidgets/qmldir deleted file mode 100644 index f94dad2..0000000 --- a/doc/src/snippets/declarative/graphicswidgets/qmldir +++ /dev/null @@ -1 +0,0 @@ -plugin graphicswidgets lib diff --git a/doc/src/snippets/declarative/graphicswidgets/redsquare.h b/doc/src/snippets/declarative/graphicswidgets/redsquare.h deleted file mode 100644 index 3050662..0000000 --- a/doc/src/snippets/declarative/graphicswidgets/redsquare.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -//![0] -#include -#include - -class RedSquare : public QGraphicsWidget -{ - Q_OBJECT -public: - void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) - { - painter->fillRect(0, 0, size().width(), size().height(), QColor(Qt::red)); - } -}; -//![0] diff --git a/doc/src/snippets/declarative/graphicswidgets/shapesplugin.cpp b/doc/src/snippets/declarative/graphicswidgets/shapesplugin.cpp deleted file mode 100644 index 4c18ef3..0000000 --- a/doc/src/snippets/declarative/graphicswidgets/shapesplugin.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -//![0] -#include "redsquare.h" -#include "bluecircle.h" - -#include -#include - -class ShapesPlugin : public QDeclarativeExtensionPlugin -{ - Q_OBJECT -public: - void registerTypes(const char *uri) { - qmlRegisterType(uri, 1, 0, "RedSquare"); - qmlRegisterType(uri, 1, 0, "BlueCircle"); - } -}; - -#include "shapesplugin.moc" - -Q_EXPORT_PLUGIN2(shapesplugin, ShapesPlugin); -//![0] -- cgit v0.12 From 34f9f08dd290710512fb7dc8a4d473b6e08c84b4 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 12 May 2010 11:40:23 +1000 Subject: Remove unused image --- .../images/declarative-integrating-graphicswidgets.png | Bin 1061 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 doc/src/images/declarative-integrating-graphicswidgets.png diff --git a/doc/src/images/declarative-integrating-graphicswidgets.png b/doc/src/images/declarative-integrating-graphicswidgets.png deleted file mode 100644 index d57f4b9..0000000 Binary files a/doc/src/images/declarative-integrating-graphicswidgets.png and /dev/null differ -- cgit v0.12 From f303375383ff405afbbe78ec2c951f2e24a121be Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 12 May 2010 10:36:34 +1000 Subject: Apply signal handler changes immediately. Fix regression in bindinganimation visual test introduced in 129940723d9145a4380f7e44c06cbaa88ee4053b. --- src/declarative/util/qdeclarativepropertychanges.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index 94780c4..a22c756 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -161,20 +161,15 @@ public: QDeclarativeExpression *rewindExpression; QDeclarativeGuard ownedExpression; - virtual bool changesBindings() { return true; } - virtual void clearBindings() { - ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, 0); - } - virtual void execute(Reason) { - QDeclarativePropertyPrivate::setSignalExpression(property, expression); + ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, expression); if (ownedExpression == expression) ownedExpression = 0; } virtual bool isReversable() { return true; } virtual void reverse(Reason) { - QDeclarativePropertyPrivate::setSignalExpression(property, reverseExpression); + ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, reverseExpression); if (ownedExpression == reverseExpression) ownedExpression = 0; } @@ -198,7 +193,7 @@ public: } virtual void rewind() { - QDeclarativePropertyPrivate::setSignalExpression(property, rewindExpression); + ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, rewindExpression); if (ownedExpression == rewindExpression) ownedExpression = 0; } -- cgit v0.12 From 43db14d83279566cdd5626321251efc5da8acc1d Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 12 May 2010 11:06:55 +1000 Subject: Correctly resize TextInput in the presence of preedit text. Task-number: QTBUG-10466 Reviewed-by: alexis --- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 604f508..4d89887 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -1233,9 +1233,7 @@ void QDeclarativeTextInput::updateSize(bool needsRedraw) int cursorWidth = d->control->cursorWidth(); if(d->cursorItem) cursorWidth = d->cursorItem->width(); - //### Is QFontMetrics too slow? - QFontMetricsF fm(d->font); - setImplicitWidth(fm.width(d->control->displayText())+cursorWidth); + setImplicitWidth(d->control->naturalTextWidth() + cursorWidth); setContentsSize(QSize(width(), height()));//Repaints if changed if(w==width() && h==height() && needsRedraw){ clearCache(); -- cgit v0.12 From 7827b791828c3efa96143ed7a9af354883c8d926 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 12 May 2010 11:14:39 +1000 Subject: Correctly position any input method popups for TextInput. Reviewed-by: alexis --- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 4d89887..8f86aa0 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -1018,6 +1018,8 @@ QVariant QDeclarativeTextInput::inputMethodQuery(Qt::InputMethodQuery property) { Q_D(const QDeclarativeTextInput); switch(property) { + case Qt::ImMicroFocus: + return d->control->cursorRect(); case Qt::ImFont: return font(); case Qt::ImCursorPosition: -- cgit v0.12 From 5e843ec092e2d236bd51f015b136db3fca5c10ba Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 12 May 2010 11:46:15 +1000 Subject: Bail out early if the same target value is reassigned to a Behavior. Task-number: QTBUG-10586 Reviewed-by: leo --- src/declarative/util/qdeclarativebehavior.cpp | 6 + .../animation/qtbug10586/data/qtbug10586.0.png | Bin 0 -> 1149 bytes .../animation/qtbug10586/data/qtbug10586.1.png | Bin 0 -> 1173 bytes .../animation/qtbug10586/data/qtbug10586.2.png | Bin 0 -> 1173 bytes .../animation/qtbug10586/data/qtbug10586.3.png | Bin 0 -> 1149 bytes .../animation/qtbug10586/data/qtbug10586.qml | 1151 ++++++++++++++++++++ .../qmlvisual/animation/qtbug10586/qtbug10586.qml | 27 + tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp | 5 +- 8 files changed, 1187 insertions(+), 2 deletions(-) create mode 100644 tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.0.png create mode 100644 tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.png create mode 100644 tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.png create mode 100644 tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.3.png create mode 100644 tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml create mode 100644 tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp index ba90007..90e0ca3 100644 --- a/src/declarative/util/qdeclarativebehavior.cpp +++ b/src/declarative/util/qdeclarativebehavior.cpp @@ -62,6 +62,7 @@ public: QDeclarativeProperty property; QVariant currentValue; + QVariant targetValue; QDeclarativeGuard animation; bool enabled; bool finalized; @@ -162,10 +163,15 @@ void QDeclarativeBehavior::write(const QVariant &value) qmlExecuteDeferred(this); if (!d->animation || !d->enabled || !d->finalized) { QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + d->targetValue = value; return; } + if (value == d->targetValue) + return; + d->currentValue = d->property.read(); + d->targetValue = value; if (d->animation->qtAnimation()->duration() != -1) d->animation->qtAnimation()->stop(); diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.0.png b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.0.png new file mode 100644 index 0000000..d8be67b Binary files /dev/null and b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.0.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.png b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.png new file mode 100644 index 0000000..249e0dd Binary files /dev/null and b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.png b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.png new file mode 100644 index 0000000..044f823 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.3.png b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.3.png new file mode 100644 index 0000000..d8be67b Binary files /dev/null and b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.3.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml new file mode 100644 index 0000000..dc8e2e2 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml @@ -0,0 +1,1151 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 32 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 48 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 64 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 80 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 96 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 112 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 128 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 144 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 160 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 176 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 192 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 208 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 224 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 240 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 256 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 272 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 288 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 304 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 320 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 336 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 352 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 368 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 384 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 400 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 416 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 432 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 448 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 464 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 480 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 496 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 512 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 528 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 544 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 560 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 576 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 592 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 608 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 624 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 640 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 656 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 672 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 688 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 704 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 720 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 736 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 752 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 768 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 784 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 800 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 816 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 832 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 848 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 864 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 880 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 896 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 912 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 928 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 944 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 960 + image: "qtbug10586.0.png" + } + Frame { + msec: 976 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 992 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1008 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1024 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1040 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1056 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1072 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1088 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1104 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1120 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1136 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1152 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1168 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1184 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1200 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1216 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1232 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1248 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1264 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1280 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1296 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1312 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 174; y: 204 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1328 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1344 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1360 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1376 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1392 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 170; y: 204 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1408 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 156; y: 204 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1424 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 1440 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 130; y: 204 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 130; y: 204 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1456 + hash: "8b7dd0f0a3881f10d76b47cbec4754c3" + } + Frame { + msec: 1472 + hash: "b6fc4990acb245e015c35261a3c6fd75" + } + Frame { + msec: 1488 + hash: "849fa4174134804dadc000323141b341" + } + Frame { + msec: 1504 + hash: "35f2d6405ed7d992bb62eb6e24478492" + } + Frame { + msec: 1520 + hash: "673ebb4499522c3f27b775dff1dbbe44" + } + Frame { + msec: 1536 + hash: "96945f5489ffd0dc8ab995c96eb5da43" + } + Frame { + msec: 1552 + hash: "2e4543754429ac3db831a2432098c063" + } + Frame { + msec: 1568 + hash: "02253fe8a9fd5009a07265c2c6ffc8e4" + } + Frame { + msec: 1584 + hash: "200a89949df1e9ef58d005a139857d2c" + } + Frame { + msec: 1600 + hash: "ceb28be34c7ea8eff5fa00fdea087439" + } + Frame { + msec: 1616 + hash: "a9ece475c51f126094c5eff4e20f4a19" + } + Frame { + msec: 1632 + hash: "aa0776f84aef87d6971affdfa2d8dd82" + } + Frame { + msec: 1648 + hash: "4c74661e1c73fefc9c5154b257239352" + } + Frame { + msec: 1664 + hash: "c10d23df3a75966aad5016bd8ba8e9d8" + } + Frame { + msec: 1680 + hash: "41692977d654a55d3b1d037aea9f2c03" + } + Frame { + msec: 1696 + hash: "2f1835a1de94f962eb5dc781c85b4c32" + } + Frame { + msec: 1712 + hash: "7cb78e2e5f6d35d456c95f2bd8652eb5" + } + Frame { + msec: 1728 + hash: "4388aee9b1c8b4fde43634ad08f03557" + } + Frame { + msec: 1744 + hash: "1cdc71100fd11cb6e60c9ab7e65e95bf" + } + Frame { + msec: 1760 + hash: "feddbf269adfc8bb1b1a3656b5b5736d" + } + Frame { + msec: 1776 + hash: "76b39ce0ee9b9b4af8aa0141577b8460" + } + Frame { + msec: 1792 + hash: "bac963d3df2841ab7a3770a371f3a94d" + } + Frame { + msec: 1808 + hash: "403007bb6c0782fece1cedbd40994550" + } + Frame { + msec: 1824 + hash: "72076c743fdd33fab2ac789c7c22973a" + } + Frame { + msec: 1840 + hash: "662be553c32b0145b3f4fee9bb0d659d" + } + Frame { + msec: 1856 + hash: "e6b9049949a0ee4ff8a0fcaf5464f479" + } + Frame { + msec: 1872 + hash: "eb1939458851780b7bb51ee50f0a3bd7" + } + Frame { + msec: 1888 + hash: "41c8d2686ddb882981a7d3a5c8c69005" + } + Frame { + msec: 1904 + hash: "7d3b1fc34082a160cbea4409af85fc9c" + } + Frame { + msec: 1920 + image: "qtbug10586.1.png" + } + Frame { + msec: 1936 + hash: "17be4a9c3d4d19e93bf1fc3a13a374a2" + } + Frame { + msec: 1952 + hash: "d449593024a59487eb92195ee6b77a64" + } + Frame { + msec: 1968 + hash: "c6ccbc2acec8e32f043f2cfb7b7848a9" + } + Frame { + msec: 1984 + hash: "cef9f8e8cdd5e2d33b86a9a6fb64ecb4" + } + Frame { + msec: 2000 + hash: "2a8956de5ce417431bdb156144985370" + } + Frame { + msec: 2016 + hash: "73721425a9c658bd9d40eac3fcbe8e25" + } + Frame { + msec: 2032 + hash: "9a9cf8eee0bf2f09944a4fb3b1c139d5" + } + Frame { + msec: 2048 + hash: "3673cdee04343ce679ec2cebadc9f512" + } + Frame { + msec: 2064 + hash: "eedd62019867e3189f9cf6e2b4149c6d" + } + Frame { + msec: 2080 + hash: "7a66bc37f5cf917e8b121003af0530b0" + } + Frame { + msec: 2096 + hash: "401667ed0f38858553de27164e9cadb5" + } + Frame { + msec: 2112 + hash: "b391699437c4092de3ad1684a35bfd30" + } + Frame { + msec: 2128 + hash: "109c91215f075292910095a25eaded49" + } + Frame { + msec: 2144 + hash: "c44d3f6ce1fa1ab324dd9ef394f37f87" + } + Frame { + msec: 2160 + hash: "299d43cb3dcf7b95af8803df3eb17a46" + } + Frame { + msec: 2176 + hash: "7ddd97266383d954a008fbe7b95a3169" + } + Frame { + msec: 2192 + hash: "941f2837ff5145a26df9a0d9f6d20bd9" + } + Frame { + msec: 2208 + hash: "d99d76cba43f3ae953605d7732d6ce21" + } + Frame { + msec: 2224 + hash: "929f49416f7ca80d7f5f2be3b13b849e" + } + Frame { + msec: 2240 + hash: "929f49416f7ca80d7f5f2be3b13b849e" + } + Frame { + msec: 2256 + hash: "fff9bbf16d1c3f7510ddfc44af616a5e" + } + Frame { + msec: 2272 + hash: "70b6cdb95ad6723d18c623e1dc79a8db" + } + Frame { + msec: 2288 + hash: "70b6cdb95ad6723d18c623e1dc79a8db" + } + Frame { + msec: 2304 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2320 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2336 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2352 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2368 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2384 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2400 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2416 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2432 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2448 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2464 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2480 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2496 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2512 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2528 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2544 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2560 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2576 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2592 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2608 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2624 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2640 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2656 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2672 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2688 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2704 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2720 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2736 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 29; y: 239 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2752 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2768 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2784 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2800 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Frame { + msec: 2816 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 35; y: 241 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2832 + hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 63; y: 243 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2848 + hash: "2732b282b8ac482033694cd04c6f5b7e" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 106; y: 244 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2864 + hash: "7d253797885f8b304d8fb3ba727a3c5d" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 158; y: 243 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 158; y: 243 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2880 + image: "qtbug10586.2.png" + } + Frame { + msec: 2896 + hash: "d85a416e4ddf59dfd0723b0be0e2b418" + } + Frame { + msec: 2912 + hash: "f1934f6ca6a3c5ac5df3451596b8d8ba" + } + Frame { + msec: 2928 + hash: "28fc74a76f9eaeeccbd3063dc55a1000" + } + Frame { + msec: 2944 + hash: "eb8ad8dae734b624664fcf584cda6ba0" + } + Frame { + msec: 2960 + hash: "a6d0f4aba3e5ae1e003520f45b75d6dd" + } + Frame { + msec: 2976 + hash: "4e5a4d04dfa5f06292774e6bf4f86508" + } + Frame { + msec: 2992 + hash: "fc9e16fd8c7379d774a09fe50d4259dc" + } + Frame { + msec: 3008 + hash: "721ea322d9a5e9d48117336476f568cb" + } + Frame { + msec: 3024 + hash: "5930448341bce1c50de7acaba1f64ca1" + } + Frame { + msec: 3040 + hash: "7194bacd56906f83948844224ce6a3e7" + } + Frame { + msec: 3056 + hash: "fcf11cf70b8ac210d4bb2bc716942053" + } + Frame { + msec: 3072 + hash: "767d707db4dbb02b6f97153b3822a1d1" + } + Frame { + msec: 3088 + hash: "f8eb75b97f5233aa82b887aab34a38e3" + } + Frame { + msec: 3104 + hash: "1d3beb06b39fa1d5cabd31ec4297f59f" + } + Frame { + msec: 3120 + hash: "cadc775e0764afa7b50c5bab782035dd" + } + Frame { + msec: 3136 + hash: "385f5a6e80da0d3ddf24539a64f26eb9" + } + Frame { + msec: 3152 + hash: "34204871a684ea251c9d07fb125436da" + } + Frame { + msec: 3168 + hash: "bc3e496535e66ff0d1e800092b7c78ca" + } + Frame { + msec: 3184 + hash: "d6c4ff5bf223361be42c78d6d81248c3" + } + Frame { + msec: 3200 + hash: "cb09d41612df66a8d099153026adcbf3" + } + Frame { + msec: 3216 + hash: "f82180b8c0389ddc3623107a049c3366" + } + Frame { + msec: 3232 + hash: "1b0f65e4599c65b8a603abd8da718d48" + } + Frame { + msec: 3248 + hash: "897391a8206178356858139b3d1a4ce8" + } + Frame { + msec: 3264 + hash: "b66d268dc7a42a7b1172b1ff566f4eb8" + } + Frame { + msec: 3280 + hash: "0fe5d38a253dbd1ebcc67cca7ea86dc7" + } + Frame { + msec: 3296 + hash: "b788f8a7e1e42f768fd1fe1198ca0344" + } + Frame { + msec: 3312 + hash: "4f7f8b7f5bb78bb9327b6fa8142ce3a2" + } + Frame { + msec: 3328 + hash: "30f041278c08174671568a0dfb7cbdf7" + } + Frame { + msec: 3344 + hash: "6ecd90fc89ab9b6c4813fa6a6e9dffdb" + } + Frame { + msec: 3360 + hash: "6ecd90fc89ab9b6c4813fa6a6e9dffdb" + } + Frame { + msec: 3376 + hash: "6d79d9d0ba8da0b5654b39768b25591f" + } + Frame { + msec: 3392 + hash: "6d79d9d0ba8da0b5654b39768b25591f" + } + Frame { + msec: 3408 + hash: "6d79d9d0ba8da0b5654b39768b25591f" + } + Frame { + msec: 3424 + hash: "6d79d9d0ba8da0b5654b39768b25591f" + } + Frame { + msec: 3440 + hash: "6d79d9d0ba8da0b5654b39768b25591f" + } + Frame { + msec: 3456 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3472 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3488 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3504 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3520 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3536 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3552 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3568 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3584 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3600 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3616 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3632 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3648 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3664 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3680 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3696 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3712 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3728 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3744 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3760 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3776 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3792 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3808 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3824 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3840 + image: "qtbug10586.3.png" + } + Frame { + msec: 3856 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3872 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3888 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3904 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3920 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3936 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3952 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3968 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 3984 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 4000 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 4016 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 4032 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 4048 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 4064 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Key { + type: 6 + key: 16777249 + modifiers: 67108864 + text: "" + autorep: false + count: 1 + } + Frame { + msec: 4080 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 4096 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 4112 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 4128 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 4144 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 4160 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 4176 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } + Frame { + msec: 4192 + hash: "cba9afe3f351e6cd6dc72d7f263401b0" + } +} diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml b/tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml new file mode 100644 index 0000000..f1a3ef7 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml @@ -0,0 +1,27 @@ +import Qt 4.7 + +Rectangle { + width: 200 + height: 400 + Flickable { + id: flick + anchors.fill: parent + contentWidth: 1000; contentHeight: parent.height + Rectangle { + border.color: "black" + border.width: 10 + width: 1000; height: 1000 + rotation: 90 + gradient: Gradient { + GradientStop { position: 0; color: "black" } + GradientStop { position: 1; color: "white" } + } + } + } + Rectangle { + color: "red" + width: 100; height: 100 + y: flick.contentX < 10 ? 300 : 0 + Behavior on y { NumberAnimation {} } + } +} diff --git a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp index 5f25882..0f33a07 100644 --- a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp +++ b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp @@ -101,9 +101,8 @@ void tst_qmlvisual::visual_data() files << findQmlFiles(QDir(QT_TEST_SOURCE_DIR)); else { //these are newly added tests we want to try out in CI (then move to the stable list) - files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/borders.qml"; + files << QT_TEST_SOURCE_DIR "/animation/qtbug10586/qtbug10586.qml"; files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/animated.qml"; - files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/animated-smooth.qml"; files << QT_TEST_SOURCE_DIR "/qdeclarativeflipable/test-flipable.qml"; files << QT_TEST_SOURCE_DIR "/qdeclarativepositioners/usingRepeater.qml"; @@ -123,6 +122,8 @@ void tst_qmlvisual::visual_data() //these reliably fail in CI, for unknown reasons //files << QT_TEST_SOURCE_DIR "/animation/easing/easing.qml"; //files << QT_TEST_SOURCE_DIR "/animation/pauseAnimation/pauseAnimation-visual.qml"; + //files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/borders.qml"; + //files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/animated-smooth.qml"; //these reliably fail on Linux because of color interpolation (different float rounding) #if !defined(Q_WS_X11) && !defined(Q_WS_QWS) -- cgit v0.12 From 84ae0d5c700b9b7396585301e7ef129ee0a2696d Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Wed, 12 May 2010 13:17:13 +1000 Subject: Sorted the tests list in declarative.pro Also removed the #Cover tag, which is not used anymore. --- tests/auto/declarative/declarative.pro | 130 ++++++++++++++++----------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index a9b069c..2520bcd 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -1,74 +1,74 @@ TEMPLATE = subdirs SUBDIRS += \ examples \ - parserstress \ # Cover - qmetaobjectbuilder \ # Cover - qdeclarativeanimations \ # Cover - qdeclarativebehaviors \ # Cover - qdeclarativebinding \ # Cover - qdeclarativecomponent \ # Cover - qdeclarativeconnection \ # Cover - qdeclarativecontext \ # Cover - qdeclarativedebug \ # Cover - qdeclarativedebugclient \ # Cover - qdeclarativedebugservice \ # Cover - qdeclarativedom \ # Cover - qdeclarativeecmascript \ # Cover - qdeclarativeengine \ # Cover - qdeclarativeerror \ # Cover - qdeclarativefontloader \ # Cover - qdeclarativeanchors \ # Cover - qdeclarativeanimatedimage \ # Cover - qdeclarativeimage \ # Cover - qdeclarativeborderimage \ # Cover - qdeclarativeflickable \ # Cover - qdeclarativeflipable \ # Cover - qdeclarativefocusscope \ # Cover - qdeclarativegridview \ # Cover - qdeclarativeitem \ # Cover - qdeclarativelistview \ # Cover - qdeclarativeloader \ # Cover - qdeclarativemousearea \ # Cover - qdeclarativeparticles \ # Cover - qdeclarativepathview \ # Cover - qdeclarativepositioners \ # Cover - qdeclarativetext \ # Cover - qdeclarativetextedit \ # Cover - qdeclarativetextinput \ # Cover - qdeclarativeinfo \ # Cover - qdeclarativeinstruction \ # Cover - qdeclarativelanguage \ # Cover - qdeclarativelistreference \ # Cover - qdeclarativelistmodel \ # Cover - qdeclarativeproperty \ # Cover - qdeclarativemetatype \ # Cover - qdeclarativemoduleplugin \ # Cover - qdeclarativepixmapcache \ # Cover - qdeclarativepropertymap \ # Cover - qdeclarativeqt \ # Cover - qdeclarativesmoothedanimation \ # Cover - qdeclarativesmoothedfollow\ # Cover - qdeclarativespringfollow \ # Cover - qdeclarativestates \ # Cover - qdeclarativesystempalette \ # Cover - qdeclarativetimer \ # Cover - qdeclarativexmllistmodel \ # Cover - qpacketprotocol \ # Cover - qdeclarativerepeater \ # Cover - qdeclarativeworkerscript \ # Cover - qdeclarativevaluetypes \ # Cover - qdeclarativeview \ # Cover - qdeclarativexmlhttprequest \ # Cover - qdeclarativeimageprovider \ # Cover - qdeclarativestyledtext \ # Cover - qdeclarativesqldatabase \ # Cover - qdeclarativevisualdatamodel \ # Cover - qdeclarativeviewer \ # Cover - qmlvisual # Cover + parserstress \ + qdeclarativeanchors \ + qdeclarativeanimatedimage \ + qdeclarativeanimations \ + qdeclarativebehaviors \ + qdeclarativebinding \ + qdeclarativeborderimage \ + qdeclarativecomponent \ + qdeclarativeconnection \ + qdeclarativecontext \ + qdeclarativedebug \ + qdeclarativedebugclient \ + qdeclarativedebugservice \ + qdeclarativedom \ + qdeclarativeecmascript \ + qdeclarativeengine \ + qdeclarativeerror \ + qdeclarativefontloader \ + qdeclarativeflickable \ + qdeclarativeflipable \ + qdeclarativefocusscope \ + qdeclarativegridview \ + qdeclarativeimage \ + qdeclarativeimageprovider \ + qdeclarativeinfo \ + qdeclarativeinstruction \ + qdeclarativeitem \ + qdeclarativelanguage \ + qdeclarativelistmodel \ + qdeclarativelistreference \ + qdeclarativelistview \ + qdeclarativeloader \ + qdeclarativemetatype \ + qdeclarativemoduleplugin \ + qdeclarativemousearea \ + qdeclarativeparticles \ + qdeclarativepathview \ + qdeclarativepixmapcache \ + qdeclarativepositioners \ + qdeclarativeproperty \ + qdeclarativepropertymap \ + qdeclarativeqt \ + qdeclarativerepeater \ + qdeclarativesmoothedanimation \ + qdeclarativesmoothedfollow\ + qdeclarativespringfollow \ + qdeclarativesqldatabase \ + qdeclarativestates \ + qdeclarativestyledtext \ + qdeclarativesystempalette \ + qdeclarativetext \ + qdeclarativetextedit \ + qdeclarativetextinput \ + qdeclarativetimer \ + qdeclarativevaluetypes \ + qdeclarativeview \ + qdeclarativeviewer \ + qdeclarativevisualdatamodel \ + qdeclarativeworkerscript \ + qdeclarativexmlhttprequest \ + qdeclarativexmllistmodel \ + qmlvisual \ + qpacketprotocol \ + qmetaobjectbuilder contains(QT_CONFIG, webkit) { SUBDIRS += \ - qdeclarativewebview # Cover + qdeclarativewebview } # Tests which should run in Pulse -- cgit v0.12 From 9e84653e20b20ea32a789deaef9d5d4acd5d68ea Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Wed, 12 May 2010 13:21:16 +1000 Subject: Add missing test, qdeclarativelayoutitem, to declarative.pro --- tests/auto/declarative/declarative.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index 2520bcd..3496906 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -29,6 +29,7 @@ SUBDIRS += \ qdeclarativeinstruction \ qdeclarativeitem \ qdeclarativelanguage \ + qdeclarativelayoutitem \ qdeclarativelistmodel \ qdeclarativelistreference \ qdeclarativelistview \ -- cgit v0.12 From d412a77d1e9a1c6810e10dfa4a0a35a81391cf29 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 12 May 2010 13:27:55 +1000 Subject: Use raster graphicssystem for qml.app on OS X. Task-number: QTBUG-10544 --- tools/qml/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 116ca71..003716e 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -184,7 +184,7 @@ int main(int argc, char ** argv) atexit(showWarnings); #endif -#if defined (Q_WS_X11) +#if defined (Q_WS_X11) || defined(Q_WS_MAC) //### default to using raster graphics backend for now bool gsSpecified = false; for (int i = 0; i < argc; ++i) { -- cgit v0.12 From 1e992df9dfa4abcd5073f94da765c5e47b2f0319 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 12 May 2010 12:20:00 +1000 Subject: Stop GIF handler claiming it can report Size for sequential devices, since it scans the entire image to do so (and then can't read the image). Task-number: QTBUG-10621 --- src/plugins/imageformats/gif/qgifhandler.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 25d3dfa..8abc2d1 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -1119,8 +1119,11 @@ bool QGifHandler::write(const QImage &image) bool QGifHandler::supportsOption(ImageOption option) const { - return option == Size - || option == Animation; + if (!device() || device()->isSequential()) + return option == Animation; + else + return option == Size + || option == Animation; } QVariant QGifHandler::option(ImageOption option) const -- cgit v0.12 From b3a06e47bc66c36de8558ab7bc9817ed2518ae9c Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 12 May 2010 13:18:32 +1000 Subject: Don't pass sequential (QNetworkReply) to image reader, it doesn't work well enough. Work around QTBUG-10622 --- src/declarative/util/qdeclarativepixmapcache.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp index dbca326..d9ce42c 100644 --- a/src/declarative/util/qdeclarativepixmapcache.cpp +++ b/src/declarative/util/qdeclarativepixmapcache.cpp @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -342,7 +343,10 @@ void QDeclarativeImageRequestHandler::networkRequestDone() errorString = reply->errorString(); } else { QSize read_impsize; - if (readImage(reply->url(), reply, &image, &errorString, &read_impsize, job->forcedWidth(), job->forcedHeight())) { + QByteArray all = reply->readAll(); + QBuffer buff(&all); + buff.open(QIODevice::ReadOnly); + if (readImage(reply->url(), &buff, &image, &errorString, &read_impsize, job->forcedWidth(), job->forcedHeight())) { qmlOriginalSizes()->insert(reply->url(), read_impsize); error = QDeclarativeImageReaderEvent::NoError; } else { -- cgit v0.12 From 29450fd82c2c8efdc296a051f6a8fac2bd3fa76a Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 12 May 2010 13:56:44 +1000 Subject: Avoid warning (and possible future crash) upon reload. Task-number: QTBUG-10555 --- src/declarative/util/qdeclarativexmllistmodel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index f02ed16..f1a00989 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -796,8 +796,11 @@ void QDeclarativeXmlListModel::reload() if (d->reply) { d->reply->abort(); - d->reply->deleteLater(); - d->reply = 0; + if (d->reply) { + // abort will generally have already done this (and more) + d->reply->deleteLater(); + d->reply = 0; + } } if (!d->xml.isEmpty()) { -- cgit v0.12 From 798bdb4543f84d427659b950a3a1643ae4987b8b Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Wed, 12 May 2010 07:12:34 +0200 Subject: Reset the dragDropItem to 0 when the item dies while dragging on top it. If you drag something on top of an item and the former is deleted then we need to reset the dragDropItem pointer to 0. Task-number:KDE BUG 232182 Reviewed-by:leo --- src/gui/graphicsview/qgraphicsscene.cpp | 4 ++++ tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 0d4e48a..dacdbfe 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -690,6 +690,10 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item) if (item == lastMouseGrabberItem) lastMouseGrabberItem = 0; + // Reset the current drop item + if (item == dragDropItem) + dragDropItem = 0; + // Reenable selectionChanged() for individual items --selectionChanging; if (!selectionChanging && selectedItems.size() != oldSelectedItemsSize) diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 81097be..5a5a821 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -447,6 +448,7 @@ private slots: void QT_2649_focusScope(); void sortItemsWhileAdding(); void doNotMarkFullUpdateIfNotInScene(); + void itemDiesDuringDraggingOperation(); private: QList paintedItems; @@ -10484,5 +10486,27 @@ void tst_QGraphicsItem::doNotMarkFullUpdateIfNotInScene() QTRY_COMPARE(item3->painted, 3); } +void tst_QGraphicsItem::itemDiesDuringDraggingOperation() +{ + QGraphicsScene scene; + QGraphicsView view(&scene); + QGraphicsRectItem *item = new QGraphicsRectItem(QRectF(0, 0, 100, 100)); + item->setFlag(QGraphicsItem::ItemIsMovable); + item->setAcceptDrops(true); + scene.addItem(item); + view.show(); + QApplication::setActiveWindow(&view); + QTest::qWaitForWindowShown(&view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget *)&view); + QGraphicsSceneDragDropEvent dragEnter(QEvent::GraphicsSceneDragEnter); + dragEnter.setScenePos(item->boundingRect().center()); + QApplication::sendEvent(&scene, &dragEnter); + QGraphicsSceneDragDropEvent event(QEvent::GraphicsSceneDragMove); + event.setScenePos(item->boundingRect().center()); + QApplication::sendEvent(&scene, &event); + QVERIFY(QGraphicsScenePrivate::get(&scene)->dragDropItem == item); + delete item; + QVERIFY(QGraphicsScenePrivate::get(&scene)->dragDropItem == 0); +} QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" -- cgit v0.12 From 71187a1f0d26ff61c033a7c2d46892f48816fc45 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Tue, 11 May 2010 13:33:48 +1000 Subject: Flickable small API changes. - Split moving into movingHorizontally anf movingVertically - Split flicking into flickingHorizontally and flickingVertically - Rename flickDirection to flickableDirection - onMovementStarted, onMovementEnded, onFlickStarted and onFlickEnded signals removed Task-number: QTBUG-10572 Reviewed-by: Martin Jones --- demos/declarative/flickr/common/ScrollBar.qml | 2 +- demos/declarative/flickr/mobile/ImageDetails.qml | 4 +- demos/declarative/webbrowser/content/ScrollBar.qml | 2 +- demos/declarative/webbrowser/webbrowser.qml | 14 +- examples/declarative/listview/dynamic.qml | 2 +- examples/declarative/scrollbar/display.qml | 2 +- src/declarative/QmlChanges.txt | 7 +- .../graphicsitems/qdeclarativeflickable.cpp | 213 ++++++++++++--------- .../graphicsitems/qdeclarativeflickable_p.h | 43 +++-- .../graphicsitems/qdeclarativeflickable_p_p.h | 10 +- .../graphicsitems/qdeclarativegridview.cpp | 44 +++-- .../graphicsitems/qdeclarativelistview.cpp | 42 ++-- .../tst_qdeclarativeflickable.cpp | 28 +++ 13 files changed, 257 insertions(+), 156 deletions(-) diff --git a/demos/declarative/flickr/common/ScrollBar.qml b/demos/declarative/flickr/common/ScrollBar.qml index 4022d23..d70cd3c 100644 --- a/demos/declarative/flickr/common/ScrollBar.qml +++ b/demos/declarative/flickr/common/ScrollBar.qml @@ -19,7 +19,7 @@ Item { states: [ State { name: "show" - when: flickableArea.moving + when: flickableArea.movingVertically PropertyChanges { target: container opacity: 1 diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml index caf1571..79d7cab 100644 --- a/demos/declarative/flickr/mobile/ImageDetails.qml +++ b/demos/declarative/flickr/mobile/ImageDetails.qml @@ -70,7 +70,7 @@ Flipable { Image { id: bigImage; source: container.photoUrl; scale: slider.value - anchors.centerIn: parent; smooth: !flickable.moving + anchors.centerIn: parent; smooth: !flickable.movingVertically onStatusChanged : { // Default scale shows the entire image. if (status == Image.Ready && width != 0) { @@ -119,7 +119,7 @@ Flipable { SequentialAnimation { PropertyAction { target: bigImage; property: "smooth"; value: false } NumberAnimation { easing.type: Easing.InOutQuad; properties: "angle"; duration: 500 } - PropertyAction { target: bigImage; property: "smooth"; value: !flickable.moving } + PropertyAction { target: bigImage; property: "smooth"; value: !flickable.movingVertically } } } } diff --git a/demos/declarative/webbrowser/content/ScrollBar.qml b/demos/declarative/webbrowser/content/ScrollBar.qml index 976297b..aa79d35 100644 --- a/demos/declarative/webbrowser/content/ScrollBar.qml +++ b/demos/declarative/webbrowser/content/ScrollBar.qml @@ -55,7 +55,7 @@ Item { states: State { name: "visible" - when: scrollArea.moving + when: container.orientation == Qt.Vertical ? scrollArea.movingVertically : scrollArea.movingHorizontally PropertyChanges { target: container; opacity: 1.0 } } diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index 27da814..f539e21 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -15,13 +15,9 @@ Rectangle { id: webView url: webBrowser.urlString anchors { top: headerSpace.bottom; left: parent.left; right: parent.right; bottom: parent.bottom } - } - Item { - id: headerSpace - width: parent.width; height: 62 - } + Item { id: headerSpace; width: parent.width; height: 62 } Header { id: header @@ -34,8 +30,8 @@ Rectangle { anchors { right: parent.right; top: header.bottom; bottom: parent.bottom } } -// ScrollBar { -// scrollArea: webView; height: 8; orientation: Qt.Horizontal -// anchors { right: parent.right; rightMargin: 8; left: parent.left; bottom: parent.bottom } -// } + ScrollBar { + scrollArea: webView; height: 8; orientation: Qt.Horizontal + anchors { right: parent.right; rightMargin: 8; left: parent.left; bottom: parent.bottom } + } } diff --git a/examples/declarative/listview/dynamic.qml b/examples/declarative/listview/dynamic.qml index 9b05ad5..64f324e 100644 --- a/examples/declarative/listview/dynamic.qml +++ b/examples/declarative/listview/dynamic.qml @@ -151,7 +151,7 @@ Rectangle { // Only show the scrollbar when the view is moving. states: State { - name: "ShowBars"; when: view.moving + name: "ShowBars"; when: view.movingVertically PropertyChanges { target: verticalScrollBar; opacity: 1 } } transitions: Transition { diff --git a/examples/declarative/scrollbar/display.qml b/examples/declarative/scrollbar/display.qml index b8a5e36..6b12d85 100644 --- a/examples/declarative/scrollbar/display.qml +++ b/examples/declarative/scrollbar/display.qml @@ -20,7 +20,7 @@ Rectangle { // Only show the scrollbars when the view is moving. states: State { name: "ShowBars" - when: view.moving + when: view.movingVertically || view.movingHorizontally PropertyChanges { target: verticalScrollBar; opacity: 1 } PropertyChanges { target: horizontalScrollBar; opacity: 1 } } diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt index 9f618d8..9ab3f08 100644 --- a/src/declarative/QmlChanges.txt +++ b/src/declarative/QmlChanges.txt @@ -1,7 +1,12 @@ ============================================================================= The changes below are pre Qt 4.7.0 RC -Flickable: overShoot is replaced by boundsBehavior enumeration. +Flickable: + - overShoot is replaced by boundsBehavior enumeration + - flicking is replaced by flickingHorizontally and flickingVertically + - moving is replaced by movingHorizontally and movingVertically + - flickDirection is renamed flickableDirection + - onMovementStarted, onMovementEnded, onFlickStarted and onFlickEnded signals removed Component: isReady, isLoading, isError and isNull properties removed, use status property instead QList models no longer provide properties in model object. The diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 34b0606..a7a8983 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -125,12 +125,14 @@ QDeclarativeFlickablePrivate::QDeclarativeFlickablePrivate() : viewport(new QDeclarativeItem) , hData(this, &QDeclarativeFlickablePrivate::setRoundedViewportX) , vData(this, &QDeclarativeFlickablePrivate::setRoundedViewportY) - , flicked(false), moving(false), stealMouse(false) - , pressed(false) + , flickingHorizontally(false), flickingVertically(false) + , hMoved(false), vMoved(false) + , movingHorizontally(false), movingVertically(false) + , stealMouse(false), pressed(false) , interactive(true), deceleration(500), maxVelocity(2000), reportedVelocitySmoothing(100) , delayedPressEvent(0), delayedPressTarget(0), pressDelay(0), fixupDuration(600) , vTime(0), visibleArea(0) - , flickDirection(QDeclarativeFlickable::AutoFlickDirection) + , flickableDirection(QDeclarativeFlickable::AutoFlickDirection) , boundsBehavior(QDeclarativeFlickable::DragAndOvershootBounds) { } @@ -226,10 +228,15 @@ void QDeclarativeFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal timeline.reset(data.move); timeline.accel(data.move, v, deceleration, maxDistance); timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this)); - if (!flicked) { - flicked = true; - emit q->flickingChanged(); - emit q->flickStarted(); + if (!flickingHorizontally && q->xflick()) { + flickingHorizontally = true; + emit q->flickingChanged(); // deprecated + emit q->flickingHorizontallyChanged(); + } + if (!flickingVertically && q->yflick()) { + flickingVertically = true; + emit q->flickingChanged(); // deprecated + emit q->flickingVerticallyChanged(); } } else { timeline.reset(data.move); @@ -274,7 +281,6 @@ void QDeclarativeFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal q->viewportMoved(); } } - //emit flickingChanged(); } else if (data.move.value() < maxExtent) { timeline.reset(data.move); if (fixupDuration) { @@ -285,11 +291,7 @@ void QDeclarativeFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal data.move.setValue(maxExtent); q->viewportMoved(); } - //emit flickingChanged(); - } else { - flicked = false; } - vTime = timeline.time(); } @@ -363,37 +365,6 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd() */ /*! - \qmlsignal Flickable::onMovementStarted() - - This handler is called when the view begins moving due to user - interaction. -*/ - -/*! - \qmlsignal Flickable::onMovementEnded() - - This handler is called when the view stops moving due to user - interaction. If a flick was generated, this handler will - be triggered once the flick stops. If a flick was not - generated, the handler will be triggered when the - user stops dragging - i.e. a mouse or touch release. -*/ - -/*! - \qmlsignal Flickable::onFlickStarted() - - This handler is called when the view is flicked. A flick - starts from the point that the mouse or touch is released, - while still in motion. -*/ - -/*! - \qmlsignal Flickable::onFlickEnded() - - This handler is called when the view stops moving due to a flick. -*/ - -/*! \qmlproperty real Flickable::visibleArea.xPosition \qmlproperty real Flickable::visibleArea.widthRatio \qmlproperty real Flickable::visibleArea.yPosition @@ -498,12 +469,14 @@ void QDeclarativeFlickable::setInteractive(bool interactive) Q_D(QDeclarativeFlickable); if (interactive != d->interactive) { d->interactive = interactive; - if (!interactive && d->flicked) { + if (!interactive && (d->flickingHorizontally || d->flickingVertically)) { d->timeline.clear(); d->vTime = d->timeline.time(); - d->flicked = false; - emit flickingChanged(); - emit flickEnded(); + d->flickingHorizontally = false; + d->flickingVertically = false; + emit flickingChanged(); // deprecated + emit flickingHorizontallyChanged(); + emit flickingVerticallyChanged(); } emit interactiveChanged(); } @@ -582,7 +555,7 @@ QDeclarativeFlickableVisibleArea *QDeclarativeFlickable::visibleArea() } /*! - \qmlproperty enumeration Flickable::flickDirection + \qmlproperty enumeration Flickable::flickableDirection This property determines which directions the view can be flicked. @@ -596,21 +569,33 @@ QDeclarativeFlickableVisibleArea *QDeclarativeFlickable::visibleArea() \o Flickable.HorizontalAndVerticalFlick - allows flicking in both directions. \endlist */ -QDeclarativeFlickable::FlickDirection QDeclarativeFlickable::flickDirection() const +QDeclarativeFlickable::FlickableDirection QDeclarativeFlickable::flickableDirection() const { Q_D(const QDeclarativeFlickable); - return d->flickDirection; + return d->flickableDirection; } -void QDeclarativeFlickable::setFlickDirection(FlickDirection direction) +void QDeclarativeFlickable::setFlickableDirection(FlickableDirection direction) { Q_D(QDeclarativeFlickable); - if (direction != d->flickDirection) { - d->flickDirection = direction; - emit flickDirectionChanged(); + if (direction != d->flickableDirection) { + d->flickableDirection = direction; + emit flickableDirectionChanged(); } } +QDeclarativeFlickable::FlickableDirection QDeclarativeFlickable::flickDirection() const +{ + qmlInfo(this) << "'flickDirection' is deprecated. Please use 'flickableDirection' instead."; + return flickableDirection(); +} + +void QDeclarativeFlickable::setFlickDirection(FlickableDirection direction) +{ + qmlInfo(this) << "'flickDirection' is deprecated. Please use 'flickableDirection' instead."; + setFlickableDirection(direction); +} + void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event) { if (interactive && timeline.isActive() && (qAbs(hData.velocity) > 10 || qAbs(vData.velocity) > 10)) @@ -626,7 +611,8 @@ void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEven pressPos = event->pos(); hData.pressPos = hData.move.value(); vData.pressPos = vData.move.value(); - flicked = false; + flickingHorizontally = false; + flickingVertically = false; QDeclarativeItemPrivate::start(pressTime); QDeclarativeItemPrivate::start(velocityTime); } @@ -638,7 +624,6 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent return; bool rejectY = false; bool rejectX = false; - bool moved = false; if (q->yflick()) { int dy = int(event->pos().y() - pressPos.y()); @@ -660,7 +645,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent } if (!rejectY && stealMouse) { vData.move.setValue(qRound(newY)); - moved = true; + vMoved = true; } if (qAbs(dy) > QApplication::startDragDistance()) stealMouse = true; @@ -687,7 +672,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent } if (!rejectX && stealMouse) { hData.move.setValue(qRound(newX)); - moved = true; + hMoved = true; } if (qAbs(dx) > QApplication::startDragDistance()) @@ -717,7 +702,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent if (rejectY) vData.velocity = 0; if (rejectX) hData.velocity = 0; - if (moved) { + if (hMoved || vMoved) { q->movementStarting(); q->viewportMoved(); } @@ -812,9 +797,9 @@ void QDeclarativeFlickable::wheelEvent(QGraphicsSceneWheelEvent *event) d->vData.velocity = qMax(event->delta() - d->vData.smoothVelocity.value(), qreal(250.0)); else d->vData.velocity = qMin(event->delta() - d->vData.smoothVelocity.value(), qreal(-250.0)); - d->flicked = false; + d->flickingVertically = false; d->flickY(d->vData.velocity); - if (d->flicked) + if (d->flickingVertically) movementStarting(); event->accept(); } else if (xflick()) { @@ -822,9 +807,9 @@ void QDeclarativeFlickable::wheelEvent(QGraphicsSceneWheelEvent *event) d->hData.velocity = qMax(event->delta() - d->hData.smoothVelocity.value(), qreal(250.0)); else d->hData.velocity = qMin(event->delta() - d->hData.smoothVelocity.value(), qreal(-250.0)); - d->flicked = false; + d->flickingHorizontally = false; d->flickX(d->hData.velocity); - if (d->flicked) + if (d->flickingHorizontally) movementStarting(); event->accept(); } else { @@ -1091,7 +1076,7 @@ void QDeclarativeFlickable::setContentWidth(qreal w) else d->viewport->setWidth(w); // Make sure that we're entirely in view. - if (!d->pressed && !d->moving) { + if (!d->pressed && !d->movingHorizontally && !d->movingVertically) { int oldDuration = d->fixupDuration; d->fixupDuration = 0; d->fixupX(); @@ -1118,7 +1103,7 @@ void QDeclarativeFlickable::setContentHeight(qreal h) else d->viewport->setHeight(h); // Make sure that we're entirely in view. - if (!d->pressed && !d->moving) { + if (!d->pressed && !d->movingHorizontally && !d->movingVertically) { int oldDuration = d->fixupDuration; d->fixupDuration = 0; d->fixupY(); @@ -1149,17 +1134,17 @@ qreal QDeclarativeFlickable::vHeight() const bool QDeclarativeFlickable::xflick() const { Q_D(const QDeclarativeFlickable); - if (d->flickDirection == QDeclarativeFlickable::AutoFlickDirection) + if (d->flickableDirection == QDeclarativeFlickable::AutoFlickDirection) return vWidth() != width(); - return d->flickDirection & QDeclarativeFlickable::HorizontalFlick; + return d->flickableDirection & QDeclarativeFlickable::HorizontalFlick; } bool QDeclarativeFlickable::yflick() const { Q_D(const QDeclarativeFlickable); - if (d->flickDirection == QDeclarativeFlickable::AutoFlickDirection) + if (d->flickableDirection == QDeclarativeFlickable::AutoFlickDirection) return vHeight() != height(); - return d->flickDirection & QDeclarativeFlickable::VerticalFlick; + return d->flickableDirection & QDeclarativeFlickable::VerticalFlick; } bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event) @@ -1281,16 +1266,30 @@ void QDeclarativeFlickable::setFlickDeceleration(qreal deceleration) emit flickDecelerationChanged(); } +bool QDeclarativeFlickable::isFlicking() const +{ + Q_D(const QDeclarativeFlickable); + qmlInfo(this) << "'flicking' is deprecated. Please use 'flickingHorizontally' and 'flickingVertically' instead."; + return d->flickingHorizontally || d->flickingVertically; +} + /*! - \qmlproperty bool Flickable::flicking + \qmlproperty bool Flickable::flickingHorizontally + \qmlproperty bool Flickable::flickingVertically - This property holds whether the view is currently moving due to - the user flicking the view. + These properties hold whether the view is currently moving horizontally + or vertically due to the user flicking the view. */ -bool QDeclarativeFlickable::isFlicking() const +bool QDeclarativeFlickable::isFlickingHorizontally() const { Q_D(const QDeclarativeFlickable); - return d->flicked; + return d->flickingHorizontally; +} + +bool QDeclarativeFlickable::isFlickingVertically() const +{ + Q_D(const QDeclarativeFlickable); + return d->flickingVertically; } /*! @@ -1319,40 +1318,72 @@ void QDeclarativeFlickable::setPressDelay(int delay) emit pressDelayChanged(); } + +bool QDeclarativeFlickable::isMoving() const +{ + Q_D(const QDeclarativeFlickable); + qmlInfo(this) << "'moving' is deprecated. Please use 'movingHorizontally' or 'movingVertically' instead."; + return d->movingHorizontally || d->movingVertically; +} + /*! - \qmlproperty bool Flickable::moving + \qmlproperty bool Flickable::movingHorizontally + \qmlproperty bool Flickable::movingVertically - This property holds whether the view is currently moving due to - the user either dragging or flicking the view. + These properties hold whether the view is currently moving horizontally + or vertically due to the user either dragging or flicking the view. */ -bool QDeclarativeFlickable::isMoving() const +bool QDeclarativeFlickable::isMovingHorizontally() const +{ + Q_D(const QDeclarativeFlickable); + return d->movingHorizontally; +} + +bool QDeclarativeFlickable::isMovingVertically() const { Q_D(const QDeclarativeFlickable); - return d->moving; + return d->movingVertically; } void QDeclarativeFlickable::movementStarting() { Q_D(QDeclarativeFlickable); - if (!d->moving) { - d->moving = true; - emit movingChanged(); - emit movementStarted(); + if (d->hMoved && !d->movingHorizontally) { + d->movingHorizontally = true; + emit movingChanged(); // deprecated + emit movingHorizontallyChanged(); + } + if (d->vMoved && !d->movingVertically) { + d->movingVertically = true; + emit movingChanged(); // deprecated + emit movingVerticallyChanged(); } } void QDeclarativeFlickable::movementEnding() { Q_D(QDeclarativeFlickable); - if (d->moving) { - d->moving = false; - emit movingChanged(); - emit movementEnded(); + if (d->flickingHorizontally) { + d->flickingHorizontally = false; + emit flickingChanged(); // deprecated + emit flickingHorizontallyChanged(); + } + if (d->flickingVertically) { + d->flickingVertically = false; + emit flickingChanged(); // deprecated + emit flickingVerticallyChanged(); + } + if (d->movingHorizontally) { + d->movingHorizontally = false; + d->hMoved = false; + emit movingChanged(); // deprecated + emit movingHorizontallyChanged(); } - if (d->flicked) { - d->flicked = false; - emit flickingChanged(); - emit flickEnded(); + if (d->movingVertically) { + d->movingVertically = false; + d->vMoved = false; + emit movingChanged(); // deprecated + emit movingVerticallyChanged(); } d->hData.smoothVelocity.setValue(0); d->vData.smoothVelocity.setValue(0); diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p.h index f031a24..7944e2b 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p.h @@ -68,9 +68,14 @@ class Q_DECLARATIVE_EXPORT QDeclarativeFlickable : public QDeclarativeItem Q_PROPERTY(BoundsBehavior boundsBehavior READ boundsBehavior WRITE setBoundsBehavior NOTIFY boundsBehaviorChanged) Q_PROPERTY(qreal maximumFlickVelocity READ maximumFlickVelocity WRITE setMaximumFlickVelocity NOTIFY maximumFlickVelocityChanged) Q_PROPERTY(qreal flickDeceleration READ flickDeceleration WRITE setFlickDeceleration NOTIFY flickDecelerationChanged) - Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged) - Q_PROPERTY(bool flicking READ isFlicking NOTIFY flickingChanged) - Q_PROPERTY(FlickDirection flickDirection READ flickDirection WRITE setFlickDirection NOTIFY flickDirectionChanged) + Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged) // deprecated + Q_PROPERTY(bool movingHorizontally READ isMovingHorizontally NOTIFY movingHorizontallyChanged) + Q_PROPERTY(bool movingVertically READ isMovingVertically NOTIFY movingVerticallyChanged) + Q_PROPERTY(bool flicking READ isFlicking NOTIFY flickingChanged) // deprecated + Q_PROPERTY(bool flickingHorizontally READ isFlickingHorizontally NOTIFY flickingHorizontallyChanged) + Q_PROPERTY(bool flickingVertically READ isFlickingVertically NOTIFY flickingVerticallyChanged) + Q_PROPERTY(FlickableDirection flickDirection READ flickDirection WRITE setFlickDirection NOTIFY flickableDirectionChanged) // deprecated + Q_PROPERTY(FlickableDirection flickableDirection READ flickableDirection WRITE setFlickableDirection NOTIFY flickableDirectionChanged) Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged) Q_PROPERTY(int pressDelay READ pressDelay WRITE setPressDelay NOTIFY pressDelayChanged) @@ -86,7 +91,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeFlickable : public QDeclarativeItem Q_PROPERTY(QDeclarativeListProperty flickableChildren READ flickableChildren) Q_CLASSINFO("DefaultProperty", "flickableData") - Q_ENUMS(FlickDirection) + Q_ENUMS(FlickableDirection) Q_ENUMS(BoundsBehavior) public: @@ -115,8 +120,12 @@ public: qreal contentY() const; void setContentY(qreal pos); - bool isMoving() const; - bool isFlicking() const; + bool isMoving() const; // deprecated + bool isMovingHorizontally() const; + bool isMovingVertically() const; + bool isFlicking() const; // deprecated + bool isFlickingHorizontally() const; + bool isFlickingVertically() const; int pressDelay() const; void setPressDelay(int delay); @@ -140,26 +149,28 @@ public: QDeclarativeItem *viewport(); - enum FlickDirection { AutoFlickDirection=0x00, HorizontalFlick=0x01, VerticalFlick=0x02, HorizontalAndVerticalFlick=0x03 }; - FlickDirection flickDirection() const; - void setFlickDirection(FlickDirection); + enum FlickableDirection { AutoFlickDirection=0x00, HorizontalFlick=0x01, VerticalFlick=0x02, HorizontalAndVerticalFlick=0x03 }; + FlickableDirection flickDirection() const; // deprecated + void setFlickDirection(FlickableDirection); // deprecated + FlickableDirection flickableDirection() const; + void setFlickableDirection(FlickableDirection); Q_SIGNALS: void contentWidthChanged(); void contentHeightChanged(); void contentXChanged(); void contentYChanged(); - void movingChanged(); - void flickingChanged(); - void movementStarted(); - void movementEnded(); - void flickStarted(); - void flickEnded(); + void movingChanged(); // deprecated + void movingHorizontallyChanged(); + void movingVerticallyChanged(); + void flickingChanged(); // deprecated + void flickingHorizontallyChanged(); + void flickingVerticallyChanged(); void horizontalVelocityChanged(); void verticalVelocityChanged(); void isAtBoundaryChanged(); void pageChanged(); - void flickDirectionChanged(); + void flickableDirectionChanged(); void interactiveChanged(); void overShootChanged(); void boundsBehaviorChanged(); diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h index 01cfb18..b467ed2 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h @@ -131,8 +131,12 @@ public: AxisData vData; QDeclarativeTimeLine timeline; - bool flicked : 1; - bool moving : 1; + bool flickingHorizontally : 1; + bool flickingVertically : 1; + bool hMoved : 1; + bool vMoved : 1; + bool movingHorizontally : 1; + bool movingVertically : 1; bool stealMouse : 1; bool pressed : 1; bool interactive : 1; @@ -158,7 +162,7 @@ public: int vTime; QDeclarativeTimeLine velocityTimeline; QDeclarativeFlickableVisibleArea *visibleArea; - QDeclarativeFlickable::FlickDirection flickDirection; + QDeclarativeFlickable::FlickableDirection flickableDirection; QDeclarativeFlickable::BoundsBehavior boundsBehavior; void handleMousePressEvent(QGraphicsSceneMouseEvent *); diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 305d55c..396acd0 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -347,9 +347,10 @@ public: void QDeclarativeGridViewPrivate::init() { Q_Q(QDeclarativeGridView); - QObject::connect(q, SIGNAL(movementEnded()), q, SLOT(animStopped())); + QObject::connect(q, SIGNAL(movingHorizontallyChanged()), q, SLOT(animStopped())); + QObject::connect(q, SIGNAL(movingVerticallyChanged()), q, SLOT(animStopped())); q->setFlag(QGraphicsItem::ItemIsFocusScope); - q->setFlickDirection(QDeclarativeFlickable::VerticalFlick); + q->setFlickableDirection(QDeclarativeFlickable::VerticalFlick); addItemChangeListener(this, Geometry); } @@ -692,7 +693,7 @@ void QDeclarativeGridViewPrivate::updateHighlight() { if ((!currentItem && highlight) || (currentItem && !highlight)) createHighlight(); - if (currentItem && autoHighlight && highlight && !moving) { + if (currentItem && autoHighlight && highlight && !movingHorizontally && !movingVertically) { // auto-update highlight highlightXAnimator->to = currentItem->item->x(); highlightYAnimator->to = currentItem->item->y(); @@ -806,7 +807,8 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m Q_Q(QDeclarativeGridView); moveReason = Mouse; - if ((!haveHighlightRange || highlightRange != QDeclarativeGridView::StrictlyEnforceRange) && snapMode == QDeclarativeGridView::NoSnap) { + if ((!haveHighlightRange || highlightRange != QDeclarativeGridView::StrictlyEnforceRange) + && snapMode == QDeclarativeGridView::NoSnap) { QDeclarativeFlickablePrivate::flick(data, minExtent, maxExtent, vSize, fixupCallback, velocity); return; } @@ -874,9 +876,16 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m timeline.reset(data.move); timeline.accel(data.move, v, accel, maxDistance + overshootDist); timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this)); - flicked = true; - emit q->flickingChanged(); - emit q->flickStarted(); + if (!flickingHorizontally && q->xflick()) { + flickingHorizontally = true; + emit q->flickingChanged(); // deprecated + emit q->flickingHorizontallyChanged(); + } + if (!flickingVertically && q->yflick()) { + flickingVertically = true; + emit q->flickingChanged(); // deprecated + emit q->flickingVerticallyChanged(); + } } else { timeline.reset(data.move); fixup(data, minExtent, maxExtent); @@ -1371,10 +1380,10 @@ void QDeclarativeGridView::setFlow(Flow flow) d->flow = flow; if (d->flow == LeftToRight) { setContentWidth(-1); - setFlickDirection(QDeclarativeFlickable::VerticalFlick); + setFlickableDirection(QDeclarativeFlickable::VerticalFlick); } else { setContentHeight(-1); - setFlickDirection(QDeclarativeFlickable::HorizontalFlick); + setFlickableDirection(QDeclarativeFlickable::HorizontalFlick); } d->clear(); d->updateGrid(); @@ -1530,7 +1539,7 @@ void QDeclarativeGridView::viewportMoved() Q_D(QDeclarativeGridView); QDeclarativeFlickable::viewportMoved(); d->lazyRelease = true; - if (d->flicked) { + if (d->flickingHorizontally || d->flickingVertically) { if (yflick()) { if (d->vData.velocity > 0) d->bufferMode = QDeclarativeGridViewPrivate::BufferBefore; @@ -1546,7 +1555,7 @@ void QDeclarativeGridView::viewportMoved() } } refill(); - if (isFlicking() || d->moving) + if (d->flickingHorizontally || d->flickingVertically || d->movingHorizontally || d->movingVertically) d->moveReason = QDeclarativeGridViewPrivate::Mouse; if (d->moveReason != QDeclarativeGridViewPrivate::SetIndex) { if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange && d->highlight) { @@ -1885,7 +1894,8 @@ void QDeclarativeGridView::trackedPositionChanged() Q_D(QDeclarativeGridView); if (!d->trackedItem || !d->currentItem) return; - if (!isFlicking() && !d->moving && d->moveReason == QDeclarativeGridViewPrivate::SetIndex) { + if (!d->flickingHorizontally && !d->flickingVertically && !d->movingHorizontally && !d->movingVertically + && d->moveReason == QDeclarativeGridViewPrivate::SetIndex) { const qreal trackedPos = d->trackedItem->rowPos(); const qreal viewPos = d->position(); if (d->haveHighlightRange) { @@ -2301,9 +2311,13 @@ void QDeclarativeGridView::destroyingItem(QDeclarativeItem *item) void QDeclarativeGridView::animStopped() { Q_D(QDeclarativeGridView); - d->bufferMode = QDeclarativeGridViewPrivate::NoBuffer; - if (d->haveHighlightRange && d->highlightRange == QDeclarativeGridView::StrictlyEnforceRange) - d->updateHighlight(); + if ((!d->movingVertically && d->flow == QDeclarativeGridView::LeftToRight) + || (!d->movingHorizontally && d->flow == QDeclarativeGridView::TopToBottom)) + { + d->bufferMode = QDeclarativeGridViewPrivate::NoBuffer; + if (d->haveHighlightRange && d->highlightRange == QDeclarativeGridView::StrictlyEnforceRange) + d->updateHighlight(); + } } void QDeclarativeGridView::refill() diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 65edb03..20106cb 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -525,8 +525,9 @@ void QDeclarativeListViewPrivate::init() Q_Q(QDeclarativeListView); q->setFlag(QGraphicsItem::ItemIsFocusScope); addItemChangeListener(this, Geometry); - QObject::connect(q, SIGNAL(movementEnded()), q, SLOT(animStopped())); - q->setFlickDirection(QDeclarativeFlickable::VerticalFlick); + QObject::connect(q, SIGNAL(movingHorizontallyChanged()), q, SLOT(animStopped())); + QObject::connect(q, SIGNAL(movingVerticallyChanged()), q, SLOT(animStopped())); + q->setFlickableDirection(QDeclarativeFlickable::VerticalFlick); ::memset(sectionCache, 0, sizeof(QDeclarativeItem*) * sectionCacheSize); } @@ -869,7 +870,7 @@ void QDeclarativeListViewPrivate::updateHighlight() { if ((!currentItem && highlight) || (currentItem && !highlight)) createHighlight(); - if (currentItem && autoHighlight && highlight && !moving) { + if (currentItem && autoHighlight && highlight && !movingHorizontally && !movingVertically) { // auto-update highlight highlightPosAnimator->to = currentItem->position(); highlightSizeAnimator->to = currentItem->size(); @@ -1209,7 +1210,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m else v = maxVelocity; } - if (!flicked) { + if (!flickingHorizontally && !flickingVertically) { // the initial flick - estimate boundary qreal accel = deceleration; qreal v2 = v * v; @@ -1257,9 +1258,16 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m timeline.reset(data.move); timeline.accel(data.move, v, accel, maxDistance + overshootDist); timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this)); - flicked = true; - emit q->flickingChanged(); - emit q->flickStarted(); + if (!flickingHorizontally && q->xflick()) { + flickingHorizontally = true; + emit q->flickingChanged(); // deprecated + emit q->flickingHorizontallyChanged(); + } + if (!flickingVertically && q->yflick()) { + flickingVertically = true; + emit q->flickingChanged(); // deprecated + emit q->flickingVerticallyChanged(); + } correctFlick = true; } else { // reevaluate the target boundary. @@ -1805,10 +1813,10 @@ void QDeclarativeListView::setOrientation(QDeclarativeListView::Orientation orie d->orient = orientation; if (d->orient == QDeclarativeListView::Vertical) { setContentWidth(-1); - setFlickDirection(VerticalFlick); + setFlickableDirection(VerticalFlick); } else { setContentHeight(-1); - setFlickDirection(HorizontalFlick); + setFlickableDirection(HorizontalFlick); } d->clear(); d->setPosition(0); @@ -2107,7 +2115,7 @@ void QDeclarativeListView::viewportMoved() QDeclarativeFlickable::viewportMoved(); d->lazyRelease = true; refill(); - if (isFlicking() || d->moving) + if (d->flickingHorizontally || d->flickingVertically || d->movingHorizontally || d->movingVertically) d->moveReason = QDeclarativeListViewPrivate::Mouse; if (d->moveReason != QDeclarativeListViewPrivate::SetIndex) { if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange && d->highlight) { @@ -2127,7 +2135,7 @@ void QDeclarativeListView::viewportMoved() } } - if (d->flicked && d->correctFlick && !d->inFlickCorrection) { + if ((d->flickingHorizontally || d->flickingVertically) && d->correctFlick && !d->inFlickCorrection) { d->inFlickCorrection = true; // Near an end and it seems that the extent has changed? // Recalculate the flick so that we don't end up in an odd position. @@ -2447,7 +2455,8 @@ void QDeclarativeListView::trackedPositionChanged() Q_D(QDeclarativeListView); if (!d->trackedItem || !d->currentItem) return; - if (!isFlicking() && !d->moving && d->moveReason == QDeclarativeListViewPrivate::SetIndex) { + if (!d->flickingHorizontally && !d->flickingVertically && !d->movingHorizontally && !d->movingVertically + && d->moveReason == QDeclarativeListViewPrivate::SetIndex) { const qreal trackedPos = qCeil(d->trackedItem->position()); const qreal viewPos = d->position(); if (d->haveHighlightRange) { @@ -2881,9 +2890,12 @@ void QDeclarativeListView::destroyingItem(QDeclarativeItem *item) void QDeclarativeListView::animStopped() { Q_D(QDeclarativeListView); - d->bufferMode = QDeclarativeListViewPrivate::NoBuffer; - if (d->haveHighlightRange && d->highlightRange == QDeclarativeListView::StrictlyEnforceRange) - d->updateHighlight(); + if ((!d->movingVertically && d->orient == QDeclarativeListView::Vertical) || (!d->movingHorizontally && d->orient == QDeclarativeListView::Horizontal)) + { + d->bufferMode = QDeclarativeListViewPrivate::NoBuffer; + if (d->haveHighlightRange && d->highlightRange == QDeclarativeListView::StrictlyEnforceRange) + d->updateHighlight(); + } } QDeclarativeListViewAttached *QDeclarativeListView::qmlAttachedProperties(QObject *obj) diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp index 9ce9c49..2c6890e 100644 --- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp +++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp @@ -61,6 +61,7 @@ private slots: void maximumFlickVelocity(); void flickDeceleration(); void pressDelay(); + void flickableDirection(); private: QDeclarativeEngine engine; @@ -224,6 +225,33 @@ void tst_qdeclarativeflickable::pressDelay() QCOMPARE(spy.count(),1); } +void tst_qdeclarativeflickable::flickableDirection() +{ + QDeclarativeComponent component(&engine); + component.setData("import Qt 4.7; Flickable { flickableDirection: Flickable.VerticalFlick; }", QUrl::fromLocalFile("")); + QDeclarativeFlickable *flickable = qobject_cast(component.create()); + QSignalSpy spy(flickable, SIGNAL(flickableDirectionChanged())); + + QVERIFY(flickable); + QCOMPARE(flickable->flickableDirection(), QDeclarativeFlickable::VerticalFlick); + + flickable->setFlickableDirection(QDeclarativeFlickable::HorizontalAndVerticalFlick); + QCOMPARE(flickable->flickableDirection(), QDeclarativeFlickable::HorizontalAndVerticalFlick); + QCOMPARE(spy.count(),1); + + flickable->setFlickableDirection(QDeclarativeFlickable::AutoFlickDirection); + QCOMPARE(flickable->flickableDirection(), QDeclarativeFlickable::AutoFlickDirection); + QCOMPARE(spy.count(),2); + + flickable->setFlickableDirection(QDeclarativeFlickable::HorizontalFlick); + QCOMPARE(flickable->flickableDirection(), QDeclarativeFlickable::HorizontalFlick); + QCOMPARE(spy.count(),3); + + flickable->setFlickableDirection(QDeclarativeFlickable::HorizontalFlick); + QCOMPARE(flickable->flickableDirection(), QDeclarativeFlickable::HorizontalFlick); + QCOMPARE(spy.count(),3); +} + QTEST_MAIN(tst_qdeclarativeflickable) #include "tst_qdeclarativeflickable.moc" -- cgit v0.12 From 9a45f780a24625f8f1104a6e2442f00874ab296f Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 12 May 2010 16:27:34 +1000 Subject: Improve Image docs. Move all fillMode image examples to fillMode property docs and remove the animated gif. --- doc/src/images/declarative-image_fillMode.gif | Bin 79561 -> 0 bytes .../declarative-qtlogo-preserveaspectcrop.png | Bin 0 -> 6440 bytes .../declarative-qtlogo-preserveaspectfit.png | Bin 0 -> 4076 bytes doc/src/images/declarative-qtlogo-stretch.png | Bin 0 -> 5584 bytes doc/src/images/declarative-qtlogo-tile.png | Bin 0 -> 3940 bytes .../images/declarative-qtlogo-tilehorizontally.png | Bin 0 -> 5544 bytes .../images/declarative-qtlogo-tilevertically.png | Bin 0 -> 6288 bytes doc/src/images/declarative-qtlogo.png | Bin 0 -> 3436 bytes doc/src/images/declarative-qtlogo1.png | Bin 3436 -> 0 bytes doc/src/images/declarative-qtlogo2.png | Bin 11023 -> 0 bytes doc/src/images/declarative-qtlogo3.png | Bin 4783 -> 0 bytes doc/src/images/declarative-qtlogo4.png | Bin 11241 -> 0 bytes doc/src/images/declarative-qtlogo5.png | Bin 3553 -> 0 bytes doc/src/images/declarative-qtlogo6.png | Bin 4763 -> 0 bytes .../graphicsitems/qdeclarativeimage.cpp | 193 ++++++++++++--------- 15 files changed, 109 insertions(+), 84 deletions(-) delete mode 100644 doc/src/images/declarative-image_fillMode.gif create mode 100644 doc/src/images/declarative-qtlogo-preserveaspectcrop.png create mode 100644 doc/src/images/declarative-qtlogo-preserveaspectfit.png create mode 100644 doc/src/images/declarative-qtlogo-stretch.png create mode 100644 doc/src/images/declarative-qtlogo-tile.png create mode 100644 doc/src/images/declarative-qtlogo-tilehorizontally.png create mode 100644 doc/src/images/declarative-qtlogo-tilevertically.png create mode 100644 doc/src/images/declarative-qtlogo.png delete mode 100644 doc/src/images/declarative-qtlogo1.png delete mode 100644 doc/src/images/declarative-qtlogo2.png delete mode 100644 doc/src/images/declarative-qtlogo3.png delete mode 100644 doc/src/images/declarative-qtlogo4.png delete mode 100644 doc/src/images/declarative-qtlogo5.png delete mode 100644 doc/src/images/declarative-qtlogo6.png diff --git a/doc/src/images/declarative-image_fillMode.gif b/doc/src/images/declarative-image_fillMode.gif deleted file mode 100644 index eb0a9af..0000000 Binary files a/doc/src/images/declarative-image_fillMode.gif and /dev/null differ diff --git a/doc/src/images/declarative-qtlogo-preserveaspectcrop.png b/doc/src/images/declarative-qtlogo-preserveaspectcrop.png new file mode 100644 index 0000000..64fb086 Binary files /dev/null and b/doc/src/images/declarative-qtlogo-preserveaspectcrop.png differ diff --git a/doc/src/images/declarative-qtlogo-preserveaspectfit.png b/doc/src/images/declarative-qtlogo-preserveaspectfit.png new file mode 100644 index 0000000..2585fa5 Binary files /dev/null and b/doc/src/images/declarative-qtlogo-preserveaspectfit.png differ diff --git a/doc/src/images/declarative-qtlogo-stretch.png b/doc/src/images/declarative-qtlogo-stretch.png new file mode 100644 index 0000000..32a0114 Binary files /dev/null and b/doc/src/images/declarative-qtlogo-stretch.png differ diff --git a/doc/src/images/declarative-qtlogo-tile.png b/doc/src/images/declarative-qtlogo-tile.png new file mode 100644 index 0000000..7d1b9d0 Binary files /dev/null and b/doc/src/images/declarative-qtlogo-tile.png differ diff --git a/doc/src/images/declarative-qtlogo-tilehorizontally.png b/doc/src/images/declarative-qtlogo-tilehorizontally.png new file mode 100644 index 0000000..367a8c7 Binary files /dev/null and b/doc/src/images/declarative-qtlogo-tilehorizontally.png differ diff --git a/doc/src/images/declarative-qtlogo-tilevertically.png b/doc/src/images/declarative-qtlogo-tilevertically.png new file mode 100644 index 0000000..68afafa Binary files /dev/null and b/doc/src/images/declarative-qtlogo-tilevertically.png differ diff --git a/doc/src/images/declarative-qtlogo.png b/doc/src/images/declarative-qtlogo.png new file mode 100644 index 0000000..940d159 Binary files /dev/null and b/doc/src/images/declarative-qtlogo.png differ diff --git a/doc/src/images/declarative-qtlogo1.png b/doc/src/images/declarative-qtlogo1.png deleted file mode 100644 index 940d159..0000000 Binary files a/doc/src/images/declarative-qtlogo1.png and /dev/null differ diff --git a/doc/src/images/declarative-qtlogo2.png b/doc/src/images/declarative-qtlogo2.png deleted file mode 100644 index b1d128a..0000000 Binary files a/doc/src/images/declarative-qtlogo2.png and /dev/null differ diff --git a/doc/src/images/declarative-qtlogo3.png b/doc/src/images/declarative-qtlogo3.png deleted file mode 100644 index d516524..0000000 Binary files a/doc/src/images/declarative-qtlogo3.png and /dev/null differ diff --git a/doc/src/images/declarative-qtlogo4.png b/doc/src/images/declarative-qtlogo4.png deleted file mode 100644 index 7c8aa64..0000000 Binary files a/doc/src/images/declarative-qtlogo4.png and /dev/null differ diff --git a/doc/src/images/declarative-qtlogo5.png b/doc/src/images/declarative-qtlogo5.png deleted file mode 100644 index b7b3513..0000000 Binary files a/doc/src/images/declarative-qtlogo5.png and /dev/null differ diff --git a/doc/src/images/declarative-qtlogo6.png b/doc/src/images/declarative-qtlogo6.png deleted file mode 100644 index 07a078f..0000000 Binary files a/doc/src/images/declarative-qtlogo6.png and /dev/null differ diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index aeddb15..88e8520 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -54,79 +54,36 @@ QT_BEGIN_NAMESPACE \brief The Image element allows you to add bitmaps to a scene. \inherits Item - Displays the image from the specified \l source. If a size is not specified explicitly, - the Image element will be sized to the loaded image. + An Image element displays a specified \l source image: - If the source resolves to a network resource, the image will be loaded asynchronously, - updating the \l progress and \l status properties appropriately. + \table + \o + \image declarative-qtlogo.png + \o + \qml + import Qt 4.7 + + Image { source: "qtlogo.png" } + \endqml + \endtable + + If a size is not specified explicitly, the Image element is sized to the loaded image. + Image elements can be stretched and tiled using the \l fillMode property. - Images which are available locally - will be loaded immediately, blocking the user interface. This is typically the - correct behavior for user interface elements. For large local images, which do not need - to be visible immediately, it may be preferable to enable \l asynchronous loading. - This will load the image in the background using a low priority thread. + If the image \l source is a network resource, the image is loaded asynchronous and the + \l progress and \l status properties are updated appropriately. Otherwise, if the image is + available locally, it is loaded immediately and the user interface is blocked until loading is + complete. (This is typically the correct behavior for user interface elements.) + For large local images, which do not need to be visible immediately, it may be preferable to + enable \l asynchronous loading. This loads the image in the background using a low priority thread. Images are cached and shared internally, so if several Image elements have the same source only one copy of the image will be loaded. - \bold Note: Images are often the greatest user of memory in QML UIs. It is recommended + \bold Note: Images are often the greatest user of memory in QML user interfaces. It is recommended that images which do not form part of the user interface have their size bounded via the \l sourceSize property. This is especially important for content that is loaded from external sources or provided by the user. - - The Image element supports untransformed, stretched and tiled images. - - For an explanation of stretching and tiling, see the fillMode property description. - - Examples: - \table - \row - \o \image declarative-qtlogo1.png - \o Untransformed - \qml - Image { source: "pics/qtlogo.png" } - \endqml - \row - \o \image declarative-qtlogo2.png - \o fillMode: Stretch (default) - \qml - Image { - width: 160 - height: 160 - source: "pics/qtlogo.png" - } - \endqml - \row - \o \image declarative-qtlogo3.png - \o fillMode: Tile - \qml - Image { - fillMode: Image.Tile - width: 160; height: 160 - source: "pics/qtlogo.png" - } - \endqml - \row - \o \image declarative-qtlogo6.png - \o fillMode: TileVertically - \qml - Image { - fillMode: Image.TileVertically - width: 160; height: 160 - source: "pics/qtlogo.png" - } - \endqml - \row - \o \image declarative-qtlogo5.png - \o fillMode: TileHorizontally - \qml - Image { - fillMode: Image.TileHorizontally - width: 160; height: 160 - source: "pics/qtlogo.png" - } - \endqml - \endtable */ /*! @@ -207,7 +164,77 @@ void QDeclarativeImagePrivate::setPixmap(const QPixmap &pixmap) \o Image.TileHorizontally - the image is stretched vertically and tiled horizontally \endlist - \image declarative-image_fillMode.gif + \table + + \row + \o \image declarative-qtlogo-stretch.png + \o Stretch (default) + \qml + Image { + width: 130; height: 100 + smooth: true + source: "qtlogo.png" + } + \endqml + + \row + \o \image declarative-qtlogo-preserveaspectfit.png + \o PreserveAspectFit + \qml + Image { + width: 130; height: 100 + fillMode: Image.PreserveAspectFit + smooth: true + source: "qtlogo.png" + } + \endqml + + \row + \o \image declarative-qtlogo-preserveaspectcrop.png + \o PreserveAspectCrop + \qml + Image { + width: 130; height: 100 + fillMode: Image.PreserveAspectCrop + smooth: true + source: "qtlogo.png" + } + \endqml + + \row + \o \image declarative-qtlogo-tile.png + \o Tile + \qml + Image { + width: 120; height: 120 + fillMode: Image.Tile + source: "qtlogo.png" + } + \endqml + + \row + \o \image declarative-qtlogo-tilevertically.png + \o TileVertically + \qml + Image { + width: 120; height: 120 + fillMode: Image.TileVertically + source: "qtlogo.png" + } + \endqml + + \row + \o \image declarative-qtlogo-tilehorizontally.png + \o TileHorizontally + \qml + Image { + width: 120; height: 120 + fillMode: Image.TileHorizontally + source: "qtlogo.png" + } + \endqml + + \endtable */ QDeclarativeImage::FillMode QDeclarativeImage::fillMode() const { @@ -290,32 +317,30 @@ qreal QDeclarativeImage::paintedHeight() const /*! \qmlproperty QSize Image::sourceSize - This properties is the size of the loaded image, in pixels. + This property holds the size of the loaded image, in pixels. - If you set this property explicitly, you can to control the storage - used by a loaded image. The image will be scaled down if its intrinsic size - is greater than this value. - - If only one dimension of the size is set (and the other left at 0), the - unset dimension will be set in proportion to the set dimension to preserve - the source image aspect ratio. The fillMode is independent of this. - - Unlike setting the width and height properties, which merely scale the painting - of the image, this property affects the number of pixels stored. - - \e{Changing this property dynamically will lead to the image source being reloaded, - potentially even from the network if it is not in the disk cache.} + This is used to control the storage used by a loaded image. Unlike + the width and height properties, which scale the painting of the image, this property + affects the number of pixels stored. + If the image's actual size is larger than the sourceSize, the image is scaled down. + If only one dimension of the size is set to greater than 0, the + other dimension is set in proportion to preserve the source image's aspect ratio. + (The \l fillMode is independent of this.) + If the source is an instrinsically scalable image (eg. SVG), this property - determines the size of the loaded image regardless of intrinsic size. You should - avoid changing this property dynamically - rendering an SVG is \e slow compared + determines the size of the loaded image regardless of intrinsic size. + Avoid changing this property dynamically; rendering an SVG is \e slow compared to an image. If the source is a non-scalable image (eg. JPEG), the loaded image will be no greater than this property specifies. For some formats (currently only JPEG), the whole image will never actually be loaded into memory. + + \note \e{Changing this property dynamically will lead to the image source being reloaded, + potentially even from the network if it is not in the disk cache.} - The example below will ensure that the size of the image in memory is + Here is an example that ensures the size of the image in memory is no larger than 1024x1024 pixels, regardless of the size of the Image element. \code @@ -327,8 +352,8 @@ qreal QDeclarativeImage::paintedHeight() const } \endcode - The example below will ensure that the memory used by the image is - no more than necessary to display the image at the size of the Image element. + The example below ensures the memory used by the image is no more than necessary + to display the image at the size of the Image element. Of course if the Image element is resized a costly reload will be required, so use this technique \e only when the Image size is fixed. -- cgit v0.12 From 01fbf55727678509f87523ef2ddda1d21d4ac2ab Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 12 May 2010 17:02:14 +1000 Subject: Correctly assign bool to variant properties QTBUG-10623 --- src/declarative/qml/qdeclarativecompiler.cpp | 4 ++++ src/declarative/qml/qdeclarativeinstruction.cpp | 3 +++ src/declarative/qml/qdeclarativeinstruction_p.h | 1 + src/declarative/qml/qdeclarativevme.cpp | 10 ++++++++++ .../qdeclarativelanguage/data/assignLiteralToVariant.qml | 2 ++ .../qdeclarativelanguage/tst_qdeclarativelanguage.cpp | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 6d420a7..a43b9ac 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -352,6 +352,10 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop, instr.storeDouble.propertyIndex = prop.propertyIndex(); instr.storeDouble.value = n; } + } else if(v->value.isBoolean()) { + instr.type = QDeclarativeInstruction::StoreVariantBool; + instr.storeBool.propertyIndex = prop.propertyIndex(); + instr.storeBool.value = v->value.asBoolean(); } else { instr.type = QDeclarativeInstruction::StoreVariant; instr.storeString.propertyIndex = prop.propertyIndex(); diff --git a/src/declarative/qml/qdeclarativeinstruction.cpp b/src/declarative/qml/qdeclarativeinstruction.cpp index 99f1cc8..0236950 100644 --- a/src/declarative/qml/qdeclarativeinstruction.cpp +++ b/src/declarative/qml/qdeclarativeinstruction.cpp @@ -136,6 +136,9 @@ void QDeclarativeCompiledData::dump(QDeclarativeInstruction *instr, int idx) case QDeclarativeInstruction::StoreVariantDouble: qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_VARIANT_DOUBLE\t\t" << instr->storeDouble.propertyIndex << "\t" << instr->storeDouble.value; break; + case QDeclarativeInstruction::StoreVariantBool: + qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_VARIANT_BOOL\t\t" << instr->storeBool.propertyIndex << "\t" << instr->storeBool.value; + break; case QDeclarativeInstruction::StoreObject: qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_OBJECT\t\t" << instr->storeObject.propertyIndex; break; diff --git a/src/declarative/qml/qdeclarativeinstruction_p.h b/src/declarative/qml/qdeclarativeinstruction_p.h index c09b157..dc5f2f8 100644 --- a/src/declarative/qml/qdeclarativeinstruction_p.h +++ b/src/declarative/qml/qdeclarativeinstruction_p.h @@ -116,6 +116,7 @@ public: StoreVariant, /* storeString */ StoreVariantInteger, /* storeInteger */ StoreVariantDouble, /* storeDouble */ + StoreVariantBool, /* storeBool */ StoreObject, /* storeObject */ StoreVariantObject, /* storeObject */ StoreInterface, /* storeObject */ diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp index 3e63e24..8ba79a6 100644 --- a/src/declarative/qml/qdeclarativevme.cpp +++ b/src/declarative/qml/qdeclarativevme.cpp @@ -360,6 +360,16 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack, } break; + case QDeclarativeInstruction::StoreVariantBool: + { + QObject *target = stack.top(); + QVariant v(instr.storeBool.value); + void *a[] = { &v, 0, &status, &flags }; + QMetaObject::metacall(target, QMetaObject::WriteProperty, + instr.storeString.propertyIndex, a); + } + break; + case QDeclarativeInstruction::StoreString: { QObject *target = stack.top(); diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml index 5af3d6e..bac704e 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml @@ -10,5 +10,7 @@ QtObject { property variant test7: "10x10" property variant test8: "100,100,100" property variant test9: String("#FF008800") + property variant test10: true + property variant test11: false } diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index ff03005..6b070f5 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -536,6 +536,8 @@ void tst_qdeclarativelanguage::assignLiteralToVariant() QCOMPARE(object->property("test7").userType(), (int)QVariant::SizeF); QCOMPARE(object->property("test8").userType(), (int)QVariant::Vector3D); QCOMPARE(object->property("test9").userType(), (int)QVariant::String); + QCOMPARE(object->property("test10").userType(), (int)QVariant::Bool); + QCOMPARE(object->property("test11").userType(), (int)QVariant::Bool); QVERIFY(object->property("test1") == QVariant(1)); QVERIFY(object->property("test2") == QVariant((double)1.7)); @@ -546,6 +548,8 @@ void tst_qdeclarativelanguage::assignLiteralToVariant() QVERIFY(object->property("test7") == QVariant(QSizeF(10, 10))); QVERIFY(object->property("test8") == QVariant(QVector3D(100, 100, 100))); QVERIFY(object->property("test9") == QVariant(QString(QLatin1String("#FF008800")))); + QVERIFY(object->property("test10") == QVariant(bool(true))); + QVERIFY(object->property("test11") == QVariant(bool(false))); delete object; } -- cgit v0.12 From a81cc0add7f9517dfbd31bb9988ab6bdc08c2b96 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 12 May 2010 10:36:18 +0300 Subject: Provide a way to specify the final sis name with createpackage/make sis The -n parameter can be used to specify the final sis name when using createpackage script or "make sis" with QT_SIS_OPTIONS. Task-number: QTBUG-9400 Reviewed-by: Janne Koskinen --- bin/createpackage.pl | 29 ++++++++++++++++++++++------- doc/src/platforms/symbian-introduction.qdoc | 5 ++++- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index e844767..7453ba5 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -69,15 +69,17 @@ Convenience script for creating signed packages you can install on your phone. Usage: createpackage.pl [options] templatepkg [target]-[platform] [certificate key [passphrase]] Where supported options are as follows: - [-i|install] = Install the package right away using PC suite + [-i|install] = Install the package right away using PC suite. [-p|preprocess] = Only preprocess the template .pkg file. - [-c|certfile=] = The file containing certificate information for signing. + [-c|certfile ] = The file containing certificate information for signing. The file can have several certificates, each specified in separate line. The certificate, key and passphrase in line must be ';' separated. Lines starting with '#' are treated as a comments. Also empty lines are ignored. The paths in can be absolute or relative to . - [-u|unsigned] = Preserves the unsigned package + [-u|unsigned] = Preserves the unsigned package. + [-s|stub] = Generates stub sis for ROM. + [-n|sisname ] = Specifies the final sis name. Where parameters are as follows: templatepkg = Name of .pkg file template target = Either debug or release @@ -118,12 +120,14 @@ my $preprocessonly = ""; my $certfile = ""; my $preserveUnsigned = ""; my $stub = ""; +my $signed_sis_name = ""; unless (GetOptions('i|install' => \$install, 'p|preprocess' => \$preprocessonly, 'c|certfile=s' => \$certfile, 'u|unsigned' => \$preserveUnsigned, - 's|stub' => \$stub,)){ + 's|stub' => \$stub, + 'n|sisname=s' => \$signed_sis_name,)) { Usage(); } @@ -162,10 +166,21 @@ $pkgoutputbasename = $pkgoutputbasename; # Store output file names to variables my $pkgoutput = $pkgoutputbasename.".pkg"; -my $sisoutputbasename = $pkgoutputbasename; -$sisoutputbasename =~ s/_$targetplatform//g; +my $sisoutputbasename; +if ($signed_sis_name eq "") { + $sisoutputbasename = $pkgoutputbasename; + $sisoutputbasename =~ s/_$targetplatform//g; + $signed_sis_name = $sisoutputbasename.".sis"; +} else { + $sisoutputbasename = $signed_sis_name; + if ($sisoutputbasename =~ m/(\.sis$|\.sisx$)/i) { + $sisoutputbasename =~ s/$1//i; + } else { + $signed_sis_name = $signed_sis_name.".sis"; + } +} + my $unsigned_sis_name = $sisoutputbasename."_unsigned.sis"; -my $signed_sis_name = $sisoutputbasename.".sis"; my $stub_sis_name = $sisoutputbasename."_stub.sis"; # Store some utility variables diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index 591d6f1..6ffc568 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -191,7 +191,10 @@ \table \row \o -i \o Install the package right away using PC suite. \row \o -p \o Only preprocess the template \c .pkg file. - \row \o -c= \o Read certificate information from a file. + \row \o -c \o Read certificate information from a file. + \row \o -u \o Preserves unsigned package. + \row \o -s \o Generates stub sis for ROM. + \row \o -n \o Specifies the final sis name. \endtable Execute the \c{createpackage.pl} script without any -- cgit v0.12 From 7894bbb901a2ba74284bd6c0544b06c6a41f6b6f Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 12 May 2010 14:44:06 +0200 Subject: Possibly fix autotest It's unclear why the autotest failed on a platform I can't test on right now, but this might clear it up. --- .../declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp b/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp index 2207635..c0c5abc 100644 --- a/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp +++ b/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp @@ -75,7 +75,7 @@ void tst_qdeclarativelayoutitem::test_resizing() view.setScene(&scene); //Add the QML snippet into the layout QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, QUrl(SRCDIR "/data/layoutItem.qml")); + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/layoutItem.qml")); QDeclarativeLayoutItem* obj = static_cast(c.create()); layout->addItem(obj); layout->setContentsMargins(0,0,0,0); -- cgit v0.12 From 386b658ce39bfab16ea14b232c61ad4703f11619 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 13 May 2010 10:08:48 +1000 Subject: Fix broken benchmarks. --- src/declarative/qml/qdeclarativeengine.cpp | 11 ++++++----- tests/benchmarks/declarative/creation/tst_creation.cpp | 4 ++-- tests/benchmarks/declarative/painting/painting.pro | 1 + .../qdeclarativeimage/tst_qdeclarativeimage.cpp | 6 +++--- .../benchmarks/declarative/script/data/slot_complex_js.js | 8 ++++++++ .../benchmarks/declarative/script/data/slot_complex_js.qml | 14 ++------------ tests/benchmarks/declarative/script/data/slot_simple_js.js | 3 +++ .../benchmarks/declarative/script/data/slot_simple_js.qml | 10 ++-------- 8 files changed, 27 insertions(+), 30 deletions(-) create mode 100644 tests/benchmarks/declarative/script/data/slot_complex_js.js create mode 100644 tests/benchmarks/declarative/script/data/slot_simple_js.js diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 9f5cafe..94e6771 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -327,11 +327,12 @@ Q_GLOBAL_STATIC(QDeclarativeEngineDebugServer, qmlEngineDebugServer); void QDeclarativePrivate::qdeclarativeelement_destructor(QObject *o) { QObjectPrivate *p = QObjectPrivate::get(o); - Q_ASSERT(p->declarativeData); - QDeclarativeData *d = static_cast(p->declarativeData); - if (d->ownContext && d->context) { - d->context->destroy(); - d->context = 0; + if (p->declarativeData) { + QDeclarativeData *d = static_cast(p->declarativeData); + if (d->ownContext && d->context) { + d->context->destroy(); + d->context = 0; + } } } diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp index 6f00473..99324f4 100644 --- a/tests/benchmarks/declarative/creation/tst_creation.cpp +++ b/tests/benchmarks/declarative/creation/tst_creation.cpp @@ -203,7 +203,7 @@ void tst_creation::qobject_10tree_cpp() void tst_creation::qobject_qmltype() { - QDeclarativeType *t = QDeclarativeMetaType::qmlType("Qt/QtObject", 4, 6); + QDeclarativeType *t = QDeclarativeMetaType::qmlType("Qt/QtObject", 4, 7); QBENCHMARK { QObject *obj = t->create(); @@ -347,7 +347,7 @@ void tst_creation::elements_data() void tst_creation::elements() { QFETCH(QByteArray, type); - QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 4, 6); + QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 4, 7); if (!t || !t->isCreatable()) QSKIP("Non-creatable type", SkipSingle); diff --git a/tests/benchmarks/declarative/painting/painting.pro b/tests/benchmarks/declarative/painting/painting.pro index 2f98e8b..a228ea7 100644 --- a/tests/benchmarks/declarative/painting/painting.pro +++ b/tests/benchmarks/declarative/painting/painting.pro @@ -11,3 +11,4 @@ INCLUDEPATH += . SOURCES += paintbenchmark.cpp QT += opengl CONFIG += console +macx:CONFIG -= app_bundle diff --git a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index 4bba022..e2e8c8a 100644 --- a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -68,7 +68,7 @@ private: void tst_qmlgraphicsimage::qmlgraphicsimage() { int x = 0; - QUrl url("image.png"); + QUrl url(SRCDIR "/image.png"); QBENCHMARK { QUrl url2("http://localhost/image" + QString::number(x++) + ".png"); QDeclarativeImage *image = new QDeclarativeImage; @@ -80,7 +80,7 @@ void tst_qmlgraphicsimage::qmlgraphicsimage() void tst_qmlgraphicsimage::qmlgraphicsimage_file() { int x = 0; - QUrl url("image.png"); + QUrl url(SRCDIR "/image.png"); QBENCHMARK { QUrl url2("http://localhost/image" + QString::number(x++) + ".png"); QDeclarativeImage *image = new QDeclarativeImage; @@ -93,7 +93,7 @@ void tst_qmlgraphicsimage::qmlgraphicsimage_file() void tst_qmlgraphicsimage::qmlgraphicsimage_url() { int x = 0; - QUrl url("image.png"); + QUrl url(SRCDIR "/image.png"); QBENCHMARK { QUrl url2("http://localhost/image" + QString::number(x++) + ".png"); QDeclarativeImage *image = new QDeclarativeImage; diff --git a/tests/benchmarks/declarative/script/data/slot_complex_js.js b/tests/benchmarks/declarative/script/data/slot_complex_js.js new file mode 100644 index 0000000..64a1f65 --- /dev/null +++ b/tests/benchmarks/declarative/script/data/slot_complex_js.js @@ -0,0 +1,8 @@ +function myCustomFunction(n) { + var a = 1; + while (n > 0) { + a = a * n; + n--; + } + return a; +} diff --git a/tests/benchmarks/declarative/script/data/slot_complex_js.qml b/tests/benchmarks/declarative/script/data/slot_complex_js.qml index ed4f78b..7bda48b 100644 --- a/tests/benchmarks/declarative/script/data/slot_complex_js.qml +++ b/tests/benchmarks/declarative/script/data/slot_complex_js.qml @@ -1,18 +1,8 @@ import Qt.test 1.0 +import "slot_complex_js.js" as Logic TestObject { - Script { - function myCustomFunction(n) { - var a = 1; - while (n > 0) { - a = a * n; - n--; - } - return a; - } - } - - onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(10); } } + onMySignal: { for (var ii = 0; ii < 10000; ++ii) { Logic.myCustomFunction(10); } } } diff --git a/tests/benchmarks/declarative/script/data/slot_simple_js.js b/tests/benchmarks/declarative/script/data/slot_simple_js.js new file mode 100644 index 0000000..d6e6060 --- /dev/null +++ b/tests/benchmarks/declarative/script/data/slot_simple_js.js @@ -0,0 +1,3 @@ +function myCustomFunction() { + return 0; +} diff --git a/tests/benchmarks/declarative/script/data/slot_simple_js.qml b/tests/benchmarks/declarative/script/data/slot_simple_js.qml index a88265c..7ea3177 100644 --- a/tests/benchmarks/declarative/script/data/slot_simple_js.qml +++ b/tests/benchmarks/declarative/script/data/slot_simple_js.qml @@ -1,13 +1,7 @@ import Qt.test 1.0 +import "slot_simple_js.js" as Logic TestObject { - - Script { - function myCustomFunction() { - return 0; - } - } - - onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(); } } + onMySignal: { for (var ii = 0; ii < 10000; ++ii) { Logic.myCustomFunction(); } } } -- cgit v0.12 From f17c706db16aae93f024e88208e139063f5b2c7c Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Wed, 12 May 2010 16:28:57 +1000 Subject: Fix for graphics widget in the background stealing declarative item's focus Task-number: QTBUG-10584 Reviewed-by: Warwick Allison --- src/gui/graphicsview/qgraphicsscene.cpp | 4 +-- .../qdeclarativeitem/data/mouseFocus.qml | 20 ++++++++++++ .../qdeclarativeitem/tst_qdeclarativeitem.cpp | 37 ++++++++++++++++++++++ 3 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index dacdbfe..7abd5f6 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -1320,10 +1320,10 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou setFocus = true; break; } - if (item->isEnabled() && ((item->flags() & QGraphicsItem::ItemIsFocusable) && item->d_ptr->mouseSetsFocus)) { + if (item->isEnabled() && ((item->flags() & QGraphicsItem::ItemIsFocusable))) { if (!item->isWidget() || ((QGraphicsWidget *)item)->focusPolicy() & Qt::ClickFocus) { setFocus = true; - if (item != q->focusItem()) + if (item != q->focusItem() && item->d_ptr->mouseSetsFocus) q->setFocusItem(item, Qt::MouseFocusReason); break; } diff --git a/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml b/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml new file mode 100644 index 0000000..a562b8b --- /dev/null +++ b/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml @@ -0,0 +1,20 @@ +import Qt 4.7 + +QGraphicsWidget { + size: "200x100" + focusPolicy: QGraphicsWidget.ClickFocus + Item { + objectName: "declarativeItem" + id: item + width: 200 + height: 100 + MouseArea { + anchors.fill: parent + onPressed: { + if (!item.focus) { + item.focus = true; + } + } + } + } +} diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp index e0ca746..f4edeb2 100644 --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp @@ -45,6 +45,7 @@ #include #include #include +#include "../../../shared/util.h" class tst_QDeclarativeItem : public QObject @@ -67,6 +68,7 @@ private slots: void childrenProperty(); void resourcesProperty(); + void mouseFocus(); private: template @@ -466,6 +468,41 @@ void tst_QDeclarativeItem::resourcesProperty() delete o; } +void tst_QDeclarativeItem::mouseFocus() +{ + QDeclarativeView *canvas = new QDeclarativeView(0); + QVERIFY(canvas); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/mouseFocus.qml")); + canvas->show(); + QVERIFY(canvas->rootObject()); + QApplication::setActiveWindow(canvas); + QTest::qWaitForWindowShown(canvas); + QTRY_COMPARE(QApplication::activeWindow(), static_cast(canvas)); + + QDeclarativeItem *item = findItem(canvas->rootObject(), "declarativeItem"); + QVERIFY(item); + QSignalSpy focusSpy(item, SIGNAL(focusChanged(bool))); + + QTest::mouseClick(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(item->scenePos())); + QApplication::processEvents(); + QCOMPARE(focusSpy.count(), 1); + QVERIFY(item->hasFocus()); + + // make sure focusable graphics widget underneath does not steal focus + QTest::mouseClick(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(item->scenePos())); + QApplication::processEvents(); + QCOMPARE(focusSpy.count(), 1); + QVERIFY(item->hasFocus()); + + item->setFocus(false); + QVERIFY(!item->hasFocus()); + QCOMPARE(focusSpy.count(), 2); + item->setFocus(true); + QCOMPARE(focusSpy.count(), 3); + + delete canvas; +} + void tst_QDeclarativeItem::propertyChanges() { QDeclarativeView *canvas = new QDeclarativeView(0); -- cgit v0.12 From d45c45432ccd0a74c67e70ce5fc3a09f35923c26 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Wed, 12 May 2010 18:20:18 +1000 Subject: Fix TextEdit and TextInput input panel support for mode RSIP_OnMouseClickAndAlreadyFocused Task-number: Reviewed-by: Warwick Allison --- src/declarative/graphicsitems/qdeclarativetextedit.cpp | 11 ++++++++--- src/declarative/graphicsitems/qdeclarativetextedit_p_p.h | 3 ++- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 16 ++++++++++++---- .../graphicsitems/qdeclarativetextinput_p_p.h | 3 ++- .../qdeclarativelistview/tst_qdeclarativelistview.cpp | 2 -- .../qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 11 ++++++++--- .../qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 11 ++++++++--- 7 files changed, 40 insertions(+), 17 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 6d86e58..db20da8 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -899,6 +899,7 @@ Handles the given mouse \a event. void QDeclarativeTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_D(QDeclarativeTextEdit); + bool hadFocus = hasFocus(); if (d->focusOnPress){ QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope? while(p) { @@ -910,6 +911,8 @@ void QDeclarativeTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event) } setFocus(true); } + if (!hadFocus && hasFocus()) + d->clickCausedFocus = true; d->control->processEvent(event, QPointF(0, 0)); if (!event->isAccepted()) QDeclarativePaintedItem::mousePressEvent(event); @@ -924,11 +927,12 @@ void QDeclarativeTextEdit::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_D(QDeclarativeTextEdit); QWidget *widget = event->widget(); if (widget && (d->control->textInteractionFlags() & Qt::TextEditable) && boundingRect().contains(event->pos())) - qt_widget_private(widget)->handleSoftwareInputPanel(event->button(), d->focusOnPress); + qt_widget_private(widget)->handleSoftwareInputPanel(event->button(), d->clickCausedFocus); + d->clickCausedFocus = false; d->control->processEvent(event, QPointF(0, 0)); if (!event->isAccepted()) - QDeclarativePaintedItem::mousePressEvent(event); + QDeclarativePaintedItem::mouseReleaseEvent(event); } /*! @@ -952,7 +956,8 @@ void QDeclarativeTextEdit::mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_D(QDeclarativeTextEdit); d->control->processEvent(event, QPointF(0, 0)); if (!event->isAccepted()) - QDeclarativePaintedItem::mousePressEvent(event); + QDeclarativePaintedItem::mouseMoveEvent(event); + event->setAccepted(true); } /*! diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h index 8d4b611..5e19c3d 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h @@ -70,7 +70,7 @@ public: QDeclarativeTextEditPrivate() : color("black"), hAlign(QDeclarativeTextEdit::AlignLeft), vAlign(QDeclarativeTextEdit::AlignTop), imgDirty(true), dirty(false), richText(false), cursorVisible(false), focusOnPress(true), - persistentSelection(true), textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0), + persistentSelection(true), clickCausedFocus(false), textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0), cursorComponent(0), cursor(0), format(QDeclarativeTextEdit::AutoText), document(0), wrapMode(QDeclarativeTextEdit::NoWrap) { @@ -100,6 +100,7 @@ public: bool cursorVisible : 1; bool focusOnPress : 1; bool persistentSelection : 1; + bool clickCausedFocus : 1; qreal textMargin; int lastSelectionStart; int lastSelectionEnd; diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 8f86aa0..afbaaac 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -882,6 +882,7 @@ void QDeclarativeTextInput::keyPressEvent(QKeyEvent* ev) void QDeclarativeTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_D(QDeclarativeTextInput); + bool hadFocus = hasFocus(); if(d->focusOnPress){ QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope? while(p) { @@ -893,15 +894,20 @@ void QDeclarativeTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event) } setFocus(true); } + if (!hadFocus && hasFocus()) + d->clickCausedFocus = true; + bool mark = event->modifiers() & Qt::ShiftModifier; int cursor = d->xToPos(event->pos().x()); d->control->moveCursor(cursor, mark); + event->setAccepted(true); } void QDeclarativeTextInput::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { Q_D(QDeclarativeTextInput); d->control->moveCursor(d->xToPos(event->pos().x()), true); + event->setAccepted(true); } /*! @@ -913,8 +919,10 @@ void QDeclarativeTextInput::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_D(QDeclarativeTextInput); QWidget *widget = event->widget(); if (widget && !d->control->isReadOnly() && boundingRect().contains(event->pos())) - qt_widget_private(widget)->handleSoftwareInputPanel(event->button(), d->focusOnPress); - d->control->processEvent(event); + qt_widget_private(widget)->handleSoftwareInputPanel(event->button(), d->clickCausedFocus); + d->clickCausedFocus = false; + if (!event->isAccepted()) + QDeclarativePaintedItem::mouseReleaseEvent(event); } bool QDeclarativeTextInput::event(QEvent* ev) @@ -935,8 +943,8 @@ bool QDeclarativeTextInput::event(QEvent* ev) updateSize(); } if(!handled) - return QDeclarativePaintedItem::event(ev); - return true; + handled = QDeclarativePaintedItem::event(ev); + return handled; } void QDeclarativeTextInput::geometryChanged(const QRectF &newGeometry, diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h index 26cf78c..99866b8 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h @@ -72,7 +72,7 @@ public: color((QRgb)0), style(QDeclarativeText::Normal), styleColor((QRgb)0), hAlign(QDeclarativeTextInput::AlignLeft), hscroll(0), oldScroll(0), focused(false), focusOnPress(true), - cursorVisible(false), autoScroll(true) + cursorVisible(false), autoScroll(true), clickCausedFocus(false) { } @@ -116,6 +116,7 @@ public: bool focusOnPress; bool cursorVisible; bool autoScroll; + bool clickCausedFocus; }; QT_END_NAMESPACE diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index 22eb734..ec2afae 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -1432,8 +1432,6 @@ void tst_QDeclarativeListView::QTBUG_9791() { QDeclarativeView *canvas = createView(); - QDeclarativeContext *ctxt = canvas->rootContext(); - canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/strictlyenforcerange.qml")); qApp->processEvents(); diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index b92024f..c65c883 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -793,8 +793,6 @@ void tst_qdeclarativetextedit::sendRequestSoftwareInputPanelEvent() view.viewport()->setInputContext(&ic); QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel( view.style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); - if ((behavior != QStyle::RSIP_OnMouseClick)) - QSKIP("This test need to have a style with RSIP_OnMouseClick", SkipSingle); QDeclarativeTextEdit edit; edit.setText("Hello world"); edit.setPos(0, 0); @@ -806,7 +804,14 @@ void tst_qdeclarativetextedit::sendRequestSoftwareInputPanelEvent() QTRY_COMPARE(QApplication::activeWindow(), static_cast(&view)); QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos())); QApplication::processEvents(); - QCOMPARE(ic.softwareInputPanelEventReceived, true); + if (behavior == QStyle::RSIP_OnMouseClickAndAlreadyFocused) { + QCOMPARE(ic.softwareInputPanelEventReceived, false); + QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos())); + QApplication::processEvents(); + QCOMPARE(ic.softwareInputPanelEventReceived, true); + } else if (behavior == QStyle::RSIP_OnMouseClick) { + QCOMPARE(ic.softwareInputPanelEventReceived, true); + } } void tst_qdeclarativetextedit::geometrySignals() diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index c00390d..ac80edb 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -743,8 +743,6 @@ void tst_qdeclarativetextinput::sendRequestSoftwareInputPanelEvent() view.viewport()->setInputContext(&ic); QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel( view.style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); - if ((behavior != QStyle::RSIP_OnMouseClick)) - QSKIP("This test need to have a style with RSIP_OnMouseClick", SkipSingle); QDeclarativeTextInput input; input.setText("Hello world"); input.setPos(0, 0); @@ -756,7 +754,14 @@ void tst_qdeclarativetextinput::sendRequestSoftwareInputPanelEvent() QTRY_COMPARE(QApplication::activeWindow(), static_cast(&view)); QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos())); QApplication::processEvents(); - QCOMPARE(ic.softwareInputPanelEventReceived, true); + if (behavior == QStyle::RSIP_OnMouseClickAndAlreadyFocused) { + QCOMPARE(ic.softwareInputPanelEventReceived, false); + QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos())); + QApplication::processEvents(); + QCOMPARE(ic.softwareInputPanelEventReceived, true); + } else if (behavior == QStyle::RSIP_OnMouseClick) { + QCOMPARE(ic.softwareInputPanelEventReceived, true); + } } class MyTextInput : public QDeclarativeTextInput -- cgit v0.12 From 6c19bdb8552f3cc6ced2a20868f1f1952f94a69c Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 13 May 2010 13:19:35 +1000 Subject: Dates and variants are not considered nested objects --- src/declarative/util/qdeclarativelistmodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 0985a6b..a8a445a 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -999,7 +999,8 @@ bool FlatListModel::addValue(const QScriptValue &value, QHash *ro QScriptValueIterator it(value); while (it.hasNext()) { it.next(); - if (it.value().isObject()) { + QScriptValue value = it.value(); + if (!value.isVariant() && !value.isRegExp() && !value.isDate() && value.isObject()) { qmlInfo(m_listModel) << "Cannot add nested list values when modifying or after modification from a worker script"; return false; } -- cgit v0.12