From 751c105984532f41de4c5f712f36f4c2579a60b7 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 12 Feb 2016 16:37:01 +0100 Subject: consistently put {qt,qml}_{module,plugin} at the end of project files this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: I0cb70c7954b4f23778279d9c6bd8c558b6825d98 Reviewed-by: Simon Hausmann --- src/plugins/script/qtdbus/qtdbus.pro | 8 ++++---- src/script/script.pro | 4 ++-- src/scripttools/scripttools.pro | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/script/qtdbus/qtdbus.pro b/src/plugins/script/qtdbus/qtdbus.pro index e37bf26..1b06f27 100644 --- a/src/plugins/script/qtdbus/qtdbus.pro +++ b/src/plugins/script/qtdbus/qtdbus.pro @@ -1,11 +1,11 @@ TARGET = qtscriptdbus -PLUGIN_TYPE = script -PLUGIN_CLASS_NAME = QtDBusScriptPlugin -load(qt_plugin) - QT = core gui script CONFIG += qdbus SOURCES += main.cpp HEADERS += main.h + +PLUGIN_TYPE = script +PLUGIN_CLASS_NAME = QtDBusScriptPlugin +load(qt_plugin) diff --git a/src/script/script.pro b/src/script/script.pro index e48abac..dec4a4f 100644 --- a/src/script/script.pro +++ b/src/script/script.pro @@ -8,8 +8,6 @@ DEFINES += QLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO QMAKE_DOCS = $$PWD/doc/qtscript.qdocconf -load(qt_module) - CONFIG += building-libs WEBKITDIR = $$PWD/../3rdparty/javascriptcore @@ -76,3 +74,5 @@ integrity { } TR_EXCLUDE = $$WEBKITDIR/* + +load(qt_module) diff --git a/src/scripttools/scripttools.pro b/src/scripttools/scripttools.pro index 9b786ec..fb4343a 100644 --- a/src/scripttools/scripttools.pro +++ b/src/scripttools/scripttools.pro @@ -10,6 +10,6 @@ DEFINES += QT_NO_USING_NAMESPACE QMAKE_DOCS = $$PWD/doc/qtscripttools.qdocconf -load(qt_module) - include(debugging/debugging.pri) + +load(qt_module) -- cgit v1.2.1 From 0a29d74a5e875ad2e0229ed2c8e48344f87a45e0 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 6 Mar 2016 12:20:49 +0100 Subject: Make public headers compile with -Wzero-as-null-pointer-constant ... or equivalent. QtBase 5.6 headers already compile that way, so let the other modules follow suit. Change-Id: I7e007ee907c479320a885af329745563c080467d Task-number: QTBUG-45291 Reviewed-by: Lars Knoll --- src/script/api/qscriptengine.h | 6 +++--- src/script/api/qscriptextensionplugin.h | 2 +- src/script/api/qscriptstring.h | 2 +- src/scripttools/debugging/qscriptenginedebugger.h | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/script/api/qscriptengine.h b/src/script/api/qscriptengine.h index f7f8411..c9c0f7d 100644 --- a/src/script/api/qscriptengine.h +++ b/src/script/api/qscriptengine.h @@ -184,10 +184,10 @@ public: #ifndef QT_NO_QOBJECT QScriptValue newQObject(QObject *object, ValueOwnership ownership = QtOwnership, - const QObjectWrapOptions &options = 0); + const QObjectWrapOptions &options = QObjectWrapOptions()); QScriptValue newQObject(const QScriptValue &scriptObject, QObject *qtObject, ValueOwnership ownership = QtOwnership, - const QObjectWrapOptions &options = 0); + const QObjectWrapOptions &options = QObjectWrapOptions()); QScriptValue newQMetaObject(const QMetaObject *metaObject, const QScriptValue &ctor = QScriptValue()); @@ -264,7 +264,7 @@ protected: QScriptEngine(QScriptEnginePrivate &dd); #else - QScriptEngine(QScriptEnginePrivate &dd, QObject *parent = 0); + QScriptEngine(QScriptEnginePrivate &dd, QObject *parent = Q_NULLPTR); #endif private: diff --git a/src/script/api/qscriptextensionplugin.h b/src/script/api/qscriptextensionplugin.h index a31487a..8fd1618 100644 --- a/src/script/api/qscriptextensionplugin.h +++ b/src/script/api/qscriptextensionplugin.h @@ -39,7 +39,7 @@ class Q_SCRIPT_EXPORT QScriptExtensionPlugin : public QObject, Q_OBJECT Q_INTERFACES(QScriptExtensionInterface:QFactoryInterface) public: - explicit QScriptExtensionPlugin(QObject *parent = 0); + explicit QScriptExtensionPlugin(QObject *parent = Q_NULLPTR); ~QScriptExtensionPlugin(); virtual QStringList keys() const = 0; diff --git a/src/script/api/qscriptstring.h b/src/script/api/qscriptstring.h index c4047f2..eed4a1e 100644 --- a/src/script/api/qscriptstring.h +++ b/src/script/api/qscriptstring.h @@ -47,7 +47,7 @@ public: bool operator==(const QScriptString &other) const; bool operator!=(const QScriptString &other) const; - quint32 toArrayIndex(bool *ok = 0) const; + quint32 toArrayIndex(bool *ok = Q_NULLPTR) const; QString toString() const; operator QString() const; diff --git a/src/scripttools/debugging/qscriptenginedebugger.h b/src/scripttools/debugging/qscriptenginedebugger.h index 0286072..7fd5c77 100644 --- a/src/scripttools/debugging/qscriptenginedebugger.h +++ b/src/scripttools/debugging/qscriptenginedebugger.h @@ -89,7 +89,7 @@ public: SuspendedState }; - QScriptEngineDebugger(QObject *parent = 0); + QScriptEngineDebugger(QObject *parent = Q_NULLPTR); ~QScriptEngineDebugger(); void attachTo(QScriptEngine *engine); @@ -101,8 +101,8 @@ public: #ifndef QT_NO_MAINWINDOW QMainWindow *standardWindow() const; #endif - QToolBar *createStandardToolBar(QWidget *parent = 0); - QMenu *createStandardMenu(QWidget *parent = 0); + QToolBar *createStandardToolBar(QWidget *parent = Q_NULLPTR); + QMenu *createStandardMenu(QWidget *parent = Q_NULLPTR); QWidget *widget(DebuggerWidget widget) const; QAction *action(DebuggerAction action) const; -- cgit v1.2.1 From f5e16ab0e1e153ec86f0d8651571e176ac6caa7c Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 6 Mar 2016 12:21:30 +0100 Subject: Make more ctors explicit Added explicit where it was missing. This is not a source- incompatible change, because code that breaks by this is a bug. Let's not have this sitting around in an LTS. One is even a protected ctor. Change-Id: I114b26332ba0e2752f5d02ebcd6090fc2b562b40 Reviewed-by: Lars Knoll --- src/script/api/qscriptengine.h | 2 +- src/scripttools/debugging/qscriptenginedebugger.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/api/qscriptengine.h b/src/script/api/qscriptengine.h index c9c0f7d..80a2869 100644 --- a/src/script/api/qscriptengine.h +++ b/src/script/api/qscriptengine.h @@ -264,7 +264,7 @@ protected: QScriptEngine(QScriptEnginePrivate &dd); #else - QScriptEngine(QScriptEnginePrivate &dd, QObject *parent = Q_NULLPTR); + explicit QScriptEngine(QScriptEnginePrivate &dd, QObject *parent = Q_NULLPTR); #endif private: diff --git a/src/scripttools/debugging/qscriptenginedebugger.h b/src/scripttools/debugging/qscriptenginedebugger.h index 7fd5c77..a56a833 100644 --- a/src/scripttools/debugging/qscriptenginedebugger.h +++ b/src/scripttools/debugging/qscriptenginedebugger.h @@ -89,7 +89,7 @@ public: SuspendedState }; - QScriptEngineDebugger(QObject *parent = Q_NULLPTR); + explicit QScriptEngineDebugger(QObject *parent = Q_NULLPTR); ~QScriptEngineDebugger(); void attachTo(QScriptEngine *engine); -- cgit v1.2.1 From c22103904bfabc38edab7ac538f30fe74cecd3f0 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 29 Feb 2016 15:46:27 +0100 Subject: Purge sRGB chunks from PNGs in documentation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce -force Change-Id: I3316ed3782abeca59df16f1aa517c134ecb5fa97 Reviewed-by: Jędrzej Nowacki --- src/script/doc/images/qtscript-debugger.png | Bin 127509 -> 96223 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/script/doc/images/qtscript-debugger.png b/src/script/doc/images/qtscript-debugger.png index c417d0b..f0720c8 100644 Binary files a/src/script/doc/images/qtscript-debugger.png and b/src/script/doc/images/qtscript-debugger.png differ -- cgit v1.2.1 From b16873afea798d08799d7a0b255b8d200337f35b Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 29 Feb 2016 15:46:27 +0100 Subject: Purge sRGB chunks from PNGs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce (A couple of them needed -force, but did get smaller.) Change-Id: I216fe2a8163fab11f8b8e8ca0fa92c00a94d68bf Reviewed-by: Jędrzej Nowacki --- src/scripttools/debugging/images/breakpoint.png | Bin 1046 -> 975 bytes src/scripttools/debugging/images/d_breakpoint.png | Bin 1056 -> 956 bytes src/scripttools/debugging/images/location.png | Bin 748 -> 600 bytes src/scripttools/debugging/images/return.png | Bin 694 -> 536 bytes src/scripttools/debugging/images/runtonewscript.png | Bin 534 -> 361 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/src/scripttools/debugging/images/breakpoint.png b/src/scripttools/debugging/images/breakpoint.png index 21c4376..faee3f0 100644 Binary files a/src/scripttools/debugging/images/breakpoint.png and b/src/scripttools/debugging/images/breakpoint.png differ diff --git a/src/scripttools/debugging/images/d_breakpoint.png b/src/scripttools/debugging/images/d_breakpoint.png index 867b30d..aa6bf55 100644 Binary files a/src/scripttools/debugging/images/d_breakpoint.png and b/src/scripttools/debugging/images/d_breakpoint.png differ diff --git a/src/scripttools/debugging/images/location.png b/src/scripttools/debugging/images/location.png index 6c4a4bf..d911c31 100644 Binary files a/src/scripttools/debugging/images/location.png and b/src/scripttools/debugging/images/location.png differ diff --git a/src/scripttools/debugging/images/return.png b/src/scripttools/debugging/images/return.png index 9db255a..5f192b8 100644 Binary files a/src/scripttools/debugging/images/return.png and b/src/scripttools/debugging/images/return.png differ diff --git a/src/scripttools/debugging/images/runtonewscript.png b/src/scripttools/debugging/images/runtonewscript.png index fb5fe5a..182c233 100644 Binary files a/src/scripttools/debugging/images/runtonewscript.png and b/src/scripttools/debugging/images/runtonewscript.png differ -- cgit v1.2.1 From 55f2fe374f0314e87e1ca5618bab6fac94430c78 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 5 Apr 2016 18:24:44 +0200 Subject: purge symbian vestiges Change-Id: I3e66ce25ea21aa846b44b6f99b8afbe0959a6526 Reviewed-by: Lars Knoll --- examples/script/context2d/main.cpp | 2 +- examples/script/context2d/qcontext2dcanvas.cpp | 5 ----- examples/script/defaultprototypes/main.cpp | 4 ---- examples/script/helloscript/main.cpp | 4 ---- tests/auto/qscriptengine/tst_qscriptengine.cpp | 6 ------ tests/auto/qscriptjstestsuite/expect_fail.txt | 9 --------- tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp | 4 ---- tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp | 5 ----- 8 files changed, 1 insertion(+), 38 deletions(-) diff --git a/examples/script/context2d/main.cpp b/examples/script/context2d/main.cpp index c34eaab..178cec1 100644 --- a/examples/script/context2d/main.cpp +++ b/examples/script/context2d/main.cpp @@ -49,7 +49,7 @@ int main(int argc, char **argv) Window win; bool smallScreen = QApplication::arguments().contains("-small-screen"); -#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) +#if defined(Q_WS_MAEMO_5) win.showMaximized(); #else if (!smallScreen) { diff --git a/examples/script/context2d/qcontext2dcanvas.cpp b/examples/script/context2d/qcontext2dcanvas.cpp index 9580b7f..af241b0 100644 --- a/examples/script/context2d/qcontext2dcanvas.cpp +++ b/examples/script/context2d/qcontext2dcanvas.cpp @@ -84,11 +84,6 @@ void QContext2DCanvas::contentsChanged(const QImage &image) void QContext2DCanvas::paintEvent(QPaintEvent *e) { QPainter p(this); -#ifdef Q_OS_SYMBIAN - // Draw white rect first since in with some themes the js-file content will produce black-on-black. - QBrush whiteBgBrush(Qt::white); - p.fillRect(e->rect(), whiteBgBrush); -#endif p.setClipRect(e->rect()); p.drawImage(0, 0, m_image); } diff --git a/examples/script/defaultprototypes/main.cpp b/examples/script/defaultprototypes/main.cpp index 5717f86..f9a135d 100644 --- a/examples/script/defaultprototypes/main.cpp +++ b/examples/script/defaultprototypes/main.cpp @@ -80,10 +80,6 @@ int main(int argc, char **argv) qWarning() << "line" << lineNo << ":" << result.toString(); } -#if defined(Q_OS_SYMBIAN) - listWidget.showMaximized(); -#else listWidget.show(); -#endif return app.exec(); } diff --git a/examples/script/helloscript/main.cpp b/examples/script/helloscript/main.cpp index fafa0f3..2af6e30 100644 --- a/examples/script/helloscript/main.cpp +++ b/examples/script/helloscript/main.cpp @@ -78,10 +78,6 @@ int main(int argc, char *argv[]) scriptFile.close(); //! [3] -#ifdef Q_OS_SYMBIAN - contents.replace("button.show()", "button.showMaximized()"); -#endif - //! [4] QScriptValue result = engine.evaluate(contents, fileName); //! [4] diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index dde048b..19a6f7e 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -51,12 +51,6 @@ Q_DECLARE_METATYPE(QList) Q_DECLARE_METATYPE(QObjectList) Q_DECLARE_METATYPE(QScriptProgram) -#if defined(Q_OS_SYMBIAN) -# define STRINGIFY(x) #x -# define TOSTRING(x) STRINGIFY(x) -# define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) -#endif - class tst_QScriptEngine : public QObject { Q_OBJECT diff --git a/tests/auto/qscriptjstestsuite/expect_fail.txt b/tests/auto/qscriptjstestsuite/expect_fail.txt index b15542e..6fedd4a 100644 --- a/tests/auto/qscriptjstestsuite/expect_fail.txt +++ b/tests/auto/qscriptjstestsuite/expect_fail.txt @@ -197,12 +197,3 @@ ecma/Math/15.8.2.6.js | Infinity/Math.ceil(-0.9) ecma/Math/15.8.2.9.js | Infinity/Math.floor(-0) ecma/TypeConversion/9.3.1-3.js | var z = 0; print(1/-z) ecma/TypeConversion/9.3.1-3.js | 1/-1e-2000 - -[Q_OS_SYMBIAN] -ecma/Math/15.8.2.13.js | Math.pow(-1, 0.5) -ecma/Math/15.8.2.13.js | Math.pow(-1, -0.5) -ecma_3/Operators/order-01.js | operator evaluation order: 11.5.1 * -ecma_3/Operators/order-01.js | operator evaluation order: 11.5.2 / -ecma_3/Operators/order-01.js | operator evaluation order: 11.6.2 - -ecma_3/Operators/order-01.js | operator evaluation order: 11.13.2 *= -ecma_3/Operators/order-01.js | operator evaluation order: 11.13.2 /= diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp index 13668c6..3ce2397 100644 --- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp +++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp @@ -37,10 +37,6 @@ #include -#if defined(Q_OS_SYMBIAN) -# define SRCDIR "." -#endif - struct TestRecord { TestRecord() : lineNumber(-1) { } diff --git a/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp b/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp index 8149d7e..8fa7e04 100644 --- a/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp +++ b/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp @@ -478,13 +478,8 @@ void tst_QScriptEngine::nativeCall() newEngine(); m_engine->globalObject().setProperty("fun", m_engine->newFunction(native_function)); QBENCHMARK{ -#if !defined(Q_OS_SYMBIAN) m_engine->evaluate("var w = 0; for (i = 0; i < 100000; ++i) {\n" " w += fun() + fun(); w -= fun(); fun(); w -= fun(); }"); -#else - m_engine->evaluate("var w = 0; for (i = 0; i < 25000; ++i) {\n" - " w += fun() + fun(); w -= fun(); fun(); w -= fun(); }"); -#endif } } -- cgit v1.2.1