diff options
-rwxr-xr-x | bin/createpackage.pl | 27 | ||||
-rw-r--r-- | dist/changes-4.7.1 | 12 | ||||
-rw-r--r-- | doc/src/platforms/symbian-introduction.qdoc | 2 | ||||
-rw-r--r-- | mkspecs/features/symbian/sis_targets.prf | 24 | ||||
-rw-r--r-- | src/activeqt/shared/qaxtypes.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 3 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_x11.cpp | 4 | ||||
-rw-r--r-- | src/gui/styles/qs60style.cpp | 2 | ||||
-rw-r--r-- | src/script/api/qscriptengine.cpp | 7 | ||||
-rw-r--r-- | tests/auto/qscriptengine/tst_qscriptengine.cpp | 60 |
10 files changed, 134 insertions, 13 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 85be5d3..41ba2e3 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -148,6 +148,10 @@ my $certfilepath = abs_path(dirname($certfile)); my $templatepkg = $ARGV[0]; my $targetplatform = lc $ARGV[1]; +if ($targetplatform eq "") { + $targetplatform = "-"; +} + my @tmpvalues = split('-', $targetplatform); my $target; $target = $tmpvalues[0] or $target = ""; @@ -179,11 +183,11 @@ $passphrase = $ARGV[4] or $passphrase = ""; my $pkgoutputbasename = $templatepkg; my $preservePkgOutput = ""; $pkgoutputbasename =~ s/_template/_$targetplatform/g; +$pkgoutputbasename =~ s/_installer\.pkg/_installer___temp\.pkg/g; if ($pkgoutputbasename eq $templatepkg) { $preservePkgOutput = "1"; } $pkgoutputbasename =~ s/\.pkg//g; -$pkgoutputbasename = $pkgoutputbasename; # Store output file names to variables my $pkgoutput = $pkgoutputbasename.".pkg"; @@ -191,6 +195,7 @@ my $sisoutputbasename; if ($signed_sis_name eq "") { $sisoutputbasename = $pkgoutputbasename; $sisoutputbasename =~ s/_$targetplatform//g; + $sisoutputbasename =~ s/_installer___temp/_installer/g; $signed_sis_name = $sisoutputbasename.".sis"; } else { $sisoutputbasename = $signed_sis_name; @@ -201,6 +206,16 @@ if ($signed_sis_name eq "") { } } +my $installer_unsigned_app_sis_name = ""; +my $installer_app_sis_name = ""; + +if ($templatepkg =~ m/_installer\.pkg$/i && $onlyUnsigned) { + $installer_unsigned_app_sis_name = $templatepkg; + $installer_unsigned_app_sis_name =~ s/_installer.pkg$/_unsigned.sis/i; + $installer_app_sis_name = $installer_unsigned_app_sis_name; + $installer_app_sis_name =~ s/_unsigned.sis$/.sis/; +} + my $unsigned_sis_name = $sisoutputbasename."_unsigned.sis"; my $stub_sis_name = $sisoutputbasename.".sis"; @@ -271,7 +286,9 @@ if (length($certfile)) { # Remove any existing .sis packages unlink $unsigned_sis_name; -unlink $signed_sis_name; +if (!$onlyUnsigned) { + unlink $signed_sis_name; +} if (!$preservePkgOutput) { unlink $pkgoutput; } @@ -296,6 +313,10 @@ if (m/\$\(PLATFORM\)/) { s/\$\(PLATFORM\)/$platform/gm; s/\$\(TARGET\)/$target/gm; +if ($installer_unsigned_app_sis_name ne "") { + s/$installer_app_sis_name\"/$installer_unsigned_app_sis_name\"/; +} + #write the output open( OUTPUT, ">$pkgoutput" ) or die "ERROR: '$pkgoutput' $!"; print OUTPUT $_; @@ -347,6 +368,7 @@ if($stub) { if (!$preservePkgOutput) { unlink $pkgoutput; } + print ("\n"); exit; } @@ -388,6 +410,7 @@ if($stub) { # Lets leave the generated PKG for problem solving purposes print ("\nSIS creation failed!\n"); } + print ("\n"); } #end of file diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 9a3e543..2d79ac1 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -62,6 +62,16 @@ QtGui - QGraphicsWidget * [QTBUG-13188] Make sure a font that has propagated from a parent can be set on a QPainter. + * [QT-3808] Issues when applying effects in combination with ItemHasNoContents flag. + + - QGraphicsItem + * [QTBUG-3633, QT-3828] Wrong children bounding rect when applying effects. + + - QGraphicsEffect + * [QT-3633] Wrong bounding rect. + + - QGraphicsScene + * [QT-3674] Spurious assert triggered from render(). - QPainter * [QTBUG-13429] Fixed scale point drawing with square cap in the raster @@ -90,6 +100,8 @@ QtGui - QTreeView * [QTBUG-13567] Do not scroll to top if last item is removed + - QGtkStyle + * [QTBUG-13125] Fixed a regression with custom itemview background color. QtDBus ------ diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index fafe007..9bf5c72 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -144,6 +144,8 @@ Smart installer will attempt to download missing dependencies in addition to just installing the application. + \row \o \c unsigned_installer_sis \o Create unsigned \l{Smart Installer}{smart installer} + \c .sis file for project. \row \o \c stub_sis \o Create a stub sis to allow upgradability of projects that are deployed in ROM \endtable diff --git a/mkspecs/features/symbian/sis_targets.prf b/mkspecs/features/symbian/sis_targets.prf index 1f1acf9..e838e10 100644 --- a/mkspecs/features/symbian/sis_targets.prf +++ b/mkspecs/features/symbian/sis_targets.prf @@ -73,6 +73,17 @@ equals(GENERATE_SIS_TARGETS, true) { ok_installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + unsigned_installer_sis_target.target = unsigned_installer_sis + unsigned_installer_sis_target.commands = $(if $(wildcard $${baseTarget}_installer.pkg), \ + $(MAKE) -f $(MAKEFILE) ok_unsigned_installer_sis \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ + ) + unsigned_installer_sis_target.depends = unsigned_sis + + ok_unsigned_installer_sis_target.target = ok_unsigned_installer_sis + ok_unsigned_installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg + fail_sis_nopkg_target.target = fail_sis_nopkg fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)" @@ -105,6 +116,8 @@ equals(GENERATE_SIS_TARGETS, true) { target_sis_target \ installer_sis_target \ ok_installer_sis_target \ + unsigned_installer_sis_target \ + ok_unsigned_installer_sis_target \ fail_sis_nopkg_target \ fail_sis_nocache_target \ stub_sis_target \ @@ -155,15 +168,22 @@ equals(GENERATE_SIS_TARGETS, true) { $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) installer_sis_target.depends = sis + unsigned_installer_sis_target.target = unsigned_installer_sis + unsigned_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg + unsigned_installer_sis_target.depends = unsigned_sis + !isEmpty(sis_destdir):!equals(sis_destdir, "."):!equals(sis_destdir, "./") { sis_target.commands += && $$QMAKE_MOVE $${baseTarget}.sis $$sis_destdir - installer_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}.sis $$sis_destdir + unsigned_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}_unsigned.sis $$sis_destdir + installer_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}_installer.sis $$sis_destdir + unsigned_installer_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}_unsigned_installer.sis $$sis_destdir } QMAKE_EXTRA_TARGETS += sis_target \ unsigned_sis_target \ target_sis_target \ - installer_sis_target + installer_sis_target \ + unsigned_installer_sis_target QMAKE_DISTCLEAN += $${sis_destdir}/$${baseTarget}.sis } diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp index 957733e..ff21a9f 100644 --- a/src/activeqt/shared/qaxtypes.cpp +++ b/src/activeqt/shared/qaxtypes.cpp @@ -1376,8 +1376,10 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint } QVariant::Type proptype = (QVariant::Type)type; - if (proptype == QVariant::Invalid && !typeName.isEmpty()) - proptype = QVariant::nameToType(typeName); + if (proptype == QVariant::Invalid && !typeName.isEmpty()) { + if (typeName != "QVariant") + proptype = QVariant::nameToType(typeName); + } if (proptype != QVariant::LastType && proptype != QVariant::Invalid && var.type() != proptype) { if (var.canConvert(proptype)) { QVariant oldvar = var; diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 2be3ed3..1127c84 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -673,6 +673,9 @@ void QSymbianControl::HandleStatusPaneSizeChange() { QS60MainAppUi *s60AppUi = static_cast<QS60MainAppUi *>(S60->appUi()); s60AppUi->HandleStatusPaneSizeChange(); + // Send resize event to trigger desktopwidget workAreaResized signal + QResizeEvent e(qt_desktopWidget->size(), qt_desktopWidget->size()); + QApplication::sendEvent(qt_desktopWidget, &e); } #endif diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index e01489f..8d80e10 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -889,8 +889,10 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO q->setWindowOpacity(maybeTopData()->opacity/255.); } - } else if (q->testAttribute(Qt::WA_SetCursor) && q->internalWinId()) { + } else if (q->internalWinId()) { qt_x11_enforce_cursor(q); + if (QWidget *p = q->parentWidget()) // reset the cursor on the native parent + qt_x11_enforce_cursor(p); } if (extra && !extra->mask.isEmpty() && q->internalWinId()) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index bafc5f3..3a01f3f 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2001,7 +2001,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, case CE_ShapedFrame: if (const QTextEdit *textEdit = qobject_cast<const QTextEdit *>(widget)) { const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(option); - if (QS60StylePrivate::canDrawThemeBackground(frame->palette.base(), widget)) + if (frame && QS60StylePrivate::canDrawThemeBackground(frame->palette.base(), widget)) QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_Editor, painter, option->rect, flags); else QCommonStyle::drawControl(element, option, painter, widget); diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 07aced4..128e9c3 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -46,6 +46,7 @@ #include "Error.h" #include "Interpreter.h" +#include "ExceptionHelpers.h" #include "PrototypeFunction.h" #include "InitializeThreading.h" #include "ObjectPrototype.h" @@ -4116,9 +4117,11 @@ bool QScriptEngine::isEvaluating() const void QScriptEngine::abortEvaluation(const QScriptValue &result) { Q_D(QScriptEngine); - - d->timeoutChecker()->setShouldAbort(true); + if (!isEvaluating()) + return; d->abortResult = result; + d->timeoutChecker()->setShouldAbort(true); + JSC::throwError(d->currentFrame, JSC::createInterruptedExecutionException(&d->currentFrame->globalData()).toObject(d->currentFrame)); } #ifndef QT_NO_QOBJECT diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index f96aea6..26eb1af 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -134,6 +134,7 @@ private slots: void numberParsing(); void automaticSemicolonInsertion(); void abortEvaluation(); + void abortEvaluation_QTBUG9433(); void isEvaluating(); void printFunctionWithCustomHandler(); void printThrowsException(); @@ -3007,7 +3008,8 @@ public: enum AbortionResult { None = 0, String = 1, - Error = 2 + Error = 2, + Number = 3 }; EventReceiver3(QScriptEngine *eng) { @@ -3027,6 +3029,8 @@ public: case Error: engine->abortEvaluation(engine->currentContext()->throwError("AbortedWithError")); break; + case Number: + engine->abortEvaluation(QScriptValue(1234)); } } return QObject::event(e); @@ -3059,7 +3063,7 @@ void tst_QScriptEngine::abortEvaluation() EventReceiver3 receiver(&eng); eng.setProcessEventsInterval(100); - for (int x = 0; x < 3; ++x) { + for (int x = 0; x < 4; ++x) { QCoreApplication::postEvent(&receiver, new QEvent(QEvent::Type(QEvent::User+1))); receiver.resultType = EventReceiver3::AbortionResult(x); QScriptValue ret = eng.evaluate(QString::fromLatin1("while (1) { }")); @@ -3068,6 +3072,11 @@ void tst_QScriptEngine::abortEvaluation() QVERIFY(!eng.hasUncaughtException()); QVERIFY(!ret.isValid()); break; + case EventReceiver3::Number: + QVERIFY(!eng.hasUncaughtException()); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 1234); + break; case EventReceiver3::String: QVERIFY(!eng.hasUncaughtException()); QVERIFY(ret.isString()); @@ -3082,7 +3091,7 @@ void tst_QScriptEngine::abortEvaluation() } // scripts cannot intercept the abortion with try/catch - for (int y = 0; y < 3; ++y) { + for (int y = 0; y < 4; ++y) { QCoreApplication::postEvent(&receiver, new QEvent(QEvent::Type(QEvent::User+1))); receiver.resultType = EventReceiver3::AbortionResult(y); QScriptValue ret = eng.evaluate(QString::fromLatin1( @@ -3098,6 +3107,11 @@ void tst_QScriptEngine::abortEvaluation() QVERIFY(!eng.hasUncaughtException()); QVERIFY(!ret.isValid()); break; + case EventReceiver3::Number: + QVERIFY(!eng.hasUncaughtException()); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 1234); + break; case EventReceiver3::String: QVERIFY(!eng.hasUncaughtException()); QVERIFY(ret.isString()); @@ -3118,6 +3132,46 @@ void tst_QScriptEngine::abortEvaluation() } } +class ThreadedEngine : public QThread { + Q_OBJECT; + +private: + QScriptEngine* m_engine; +protected: + void run() { + m_engine = new QScriptEngine(); + m_engine->setGlobalObject(m_engine->newQObject(this)); + m_engine->evaluate("while(1) { sleep(); }"); + delete m_engine; + } + +public slots: + void sleep() + { + QTest::qSleep(25); + m_engine->abortEvaluation(); + } +}; + +void tst_QScriptEngine::abortEvaluation_QTBUG9433() +{ + ThreadedEngine engine; + engine.start(); + QVERIFY(engine.isRunning()); + QTest::qSleep(50); + for (uint i = 0; i < 50; ++i) { // up to ~2500 ms + if (engine.isFinished()) + return; + QTest::qSleep(50); + } + if (!engine.isFinished()) { + engine.terminate(); + engine.wait(7000); + QFAIL("abortEvaluation doesn't work"); + } + +} + static QScriptValue myFunctionReturningIsEvaluating(QScriptContext *, QScriptEngine *eng) { return QScriptValue(eng, eng->isEvaluating()); |