summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-07-29 09:55:17 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-07-29 14:01:08 +0200
commit9ba14ed272a22c9eff1f81664e2a02c617b90828 (patch)
tree56c51b69ea0f8fe8971a1fc6409b4db7d7cab751
parent1f2cb419ac2f776ee5bae1bcd877ea14e5a27a38 (diff)
parent3f515dcae3d5e4cd5571d3ae054fc64fc57e3c96 (diff)
downloadqtscript-9ba14ed272a22c9eff1f81664e2a02c617b90828.tar.gz
Merge remote branch 'gerrit/master' into refactor
Change-Id: I4e9fc2e2b8f53a7b20831225093126167030a382
-rw-r--r--examples/script/README33
-rw-r--r--examples/script/context2d/context2d.pro2
-rw-r--r--examples/script/qstetrix/qstetrix.pro4
-rw-r--r--src/plugins/script/qtdbus/qtdbus.pro2
-rw-r--r--src/script/api/qscriptcontextinfo.cpp5
-rw-r--r--src/script/api/qscriptengine.cpp6
-rw-r--r--src/script/api/qscriptprogram.cpp1
-rw-r--r--src/script/api/qscriptprogram_p.h5
-rw-r--r--src/script/api/qscriptstring_p.h5
-rw-r--r--src/script/api/qscriptvalue_p.h6
-rw-r--r--src/script/script.pro2
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata.cpp6
-rw-r--r--src/scripttools/debugging/qscriptdebuggervalue.cpp6
-rw-r--r--src/scripttools/debugging/qscriptdebuggervalueproperty.cpp7
-rw-r--r--src/scripttools/debugging/qscriptscriptdata.cpp6
-rw-r--r--src/scripttools/debugging/qscriptvalueproperty.cpp7
-rw-r--r--src/scripttools/scripttools.pro2
-rw-r--r--sync.profile18
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp4
-rw-r--r--tests/auto/qscriptextensionplugin/qscriptextensionplugin.pro1
20 files changed, 37 insertions, 91 deletions
diff --git a/examples/script/README b/examples/script/README
index 089a7fa..60fe33c 100644
--- a/examples/script/README
+++ b/examples/script/README
@@ -5,36 +5,5 @@ These examples demonstrate the fundamental aspects of scripting applications
with Qt.
-The example launcher provided with Qt can be used to explore each of the
-examples in this directory.
-
-Documentation for these examples can be found via the Tutorial and Examples
+Documentation for these examples can be found via the Examples
link in the main Qt documentation.
-
-
-Finding the Qt Examples and Demos launcher
-==========================================
-
-On Windows:
-
-The launcher can be accessed via the Windows Start menu. Select the menu
-entry entitled "Qt Examples and Demos" entry in the submenu containing
-the Qt tools.
-
-On Mac OS X:
-
-For the binary distribution, the qtdemo executable is installed in the
-/Developer/Applications/Qt directory. For the source distribution, it is
-installed alongside the other Qt tools on the path specified when Qt is
-configured.
-
-On Unix/Linux:
-
-The qtdemo executable is installed alongside the other Qt tools on the path
-specified when Qt is configured.
-
-On all platforms:
-
-The source code for the launcher can be found in the demos/qtdemo directory
-in the Qt package. This example is built at the same time as the Qt libraries,
-tools, examples, and demonstrations.
diff --git a/examples/script/context2d/context2d.pro b/examples/script/context2d/context2d.pro
index 7ce9623..d2bc25d 100644
--- a/examples/script/context2d/context2d.pro
+++ b/examples/script/context2d/context2d.pro
@@ -30,5 +30,5 @@ symbian:{
contextScripts.files = scripts
DEPLOYMENT += contextScripts
}
-maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+maemo5: CONFIG += qt_example
diff --git a/examples/script/qstetrix/qstetrix.pro b/examples/script/qstetrix/qstetrix.pro
index fad66ce..10ac34f 100644
--- a/examples/script/qstetrix/qstetrix.pro
+++ b/examples/script/qstetrix/qstetrix.pro
@@ -15,7 +15,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qstetrix.pro *.js
sources.path = $$[QT_INSTALL_EXAMPLES]/qtscript/script/qstetrix
INSTALLS += target sources
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
-maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
symbian: warning(This example does not work on Symbian platform)
diff --git a/src/plugins/script/qtdbus/qtdbus.pro b/src/plugins/script/qtdbus/qtdbus.pro
index d3b5dfd..5db52ab 100644
--- a/src/plugins/script/qtdbus/qtdbus.pro
+++ b/src/plugins/script/qtdbus/qtdbus.pro
@@ -1,7 +1,7 @@
load(qt_module)
TARGET = qtscriptdbus
-include($$QT_SOURCE_TREE/src/plugins/qpluginbase.pri)
+load(qt_plugin)
QT = core gui script
CONFIG += qdbus
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp
index 182bc4a..41f4f83 100644
--- a/src/script/api/qscriptcontextinfo.cpp
+++ b/src/script/api/qscriptcontextinfo.cpp
@@ -30,6 +30,7 @@
#include "../bridge/qscriptqobject_p.h"
#include <QtCore/qdatastream.h>
#include <QtCore/qmetaobject.h>
+#include <QtCore/qshareddata.h>
#include "CodeBlock.h"
#include "JSFunction.h"
#if ENABLE(JIT)
@@ -81,7 +82,7 @@ QT_BEGIN_NAMESPACE
\value NativeFunction The function is a built-in Qt Script function, or it was defined through a call to QScriptEngine::newFunction().
*/
-class QScriptContextInfoPrivate
+class QScriptContextInfoPrivate : public QSharedData
{
Q_DECLARE_PUBLIC(QScriptContextInfo)
public:
@@ -103,8 +104,6 @@ public:
QStringList parameterNames;
- QBasicAtomicInt ref;
-
QScriptContextInfo *q_ptr;
};
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 1c4f110..cbf48a9 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -38,6 +38,7 @@
#include "qdebug.h"
#include <QtCore/qstringlist.h>
+#include <QtCore/qshareddata.h>
#include <QtCore/qmetaobject.h>
#include <math.h>
@@ -326,17 +327,16 @@ QT_BEGIN_NAMESPACE
\value SkipMethodsInEnumeration Don't include methods (signals and slots) when enumerating the object's properties.
*/
-class QScriptSyntaxCheckResultPrivate
+class QScriptSyntaxCheckResultPrivate : public QSharedData
{
public:
- QScriptSyntaxCheckResultPrivate() { ref = 0; }
+ QScriptSyntaxCheckResultPrivate() {}
~QScriptSyntaxCheckResultPrivate() {}
QScriptSyntaxCheckResult::State state;
int errorColumnNumber;
int errorLineNumber;
QString errorMessage;
- QBasicAtomicInt ref;
};
class QScriptTypeInfo
diff --git a/src/script/api/qscriptprogram.cpp b/src/script/api/qscriptprogram.cpp
index c0e2656..b641a5a 100644
--- a/src/script/api/qscriptprogram.cpp
+++ b/src/script/api/qscriptprogram.cpp
@@ -57,7 +57,6 @@ QScriptProgramPrivate::QScriptProgramPrivate(const QString &src,
: sourceCode(src), fileName(fn), firstLineNumber(ln),
engine(0), _executable(0), sourceId(-1), isCompiled(false)
{
- ref = 0;
}
QScriptProgramPrivate::~QScriptProgramPrivate()
diff --git a/src/script/api/qscriptprogram_p.h b/src/script/api/qscriptprogram_p.h
index e7809ab..ce9fb08 100644
--- a/src/script/api/qscriptprogram_p.h
+++ b/src/script/api/qscriptprogram_p.h
@@ -36,6 +36,7 @@
//
#include <QtCore/qobjectdefs.h>
+#include <QtCore/qshareddata.h>
#include "RefPtr.h"
@@ -49,7 +50,7 @@ QT_BEGIN_NAMESPACE
class QScriptEnginePrivate;
-class QScriptProgramPrivate
+class QScriptProgramPrivate : public QSharedData
{
public:
QScriptProgramPrivate(const QString &sourceCode,
@@ -63,8 +64,6 @@ public:
QScriptEnginePrivate *engine);
void detachFromEngine();
- QBasicAtomicInt ref;
-
QString sourceCode;
QString fileName;
int firstLineNumber;
diff --git a/src/script/api/qscriptstring_p.h b/src/script/api/qscriptstring_p.h
index b632140..bb361c7 100644
--- a/src/script/api/qscriptstring_p.h
+++ b/src/script/api/qscriptstring_p.h
@@ -36,13 +36,14 @@
//
#include <QtCore/qobjectdefs.h>
+#include <QtCore/qshareddata.h>
#include "Identifier.h"
QT_BEGIN_NAMESPACE
class QScriptEnginePrivate;
-class QScriptStringPrivate
+class QScriptStringPrivate : public QSharedData
{
public:
enum AllocationType {
@@ -61,7 +62,6 @@ public:
static inline bool isValid(const QScriptString &q);
- QBasicAtomicInt ref;
QScriptEnginePrivate *engine;
JSC::Identifier identifier;
AllocationType type;
@@ -75,7 +75,6 @@ inline QScriptStringPrivate::QScriptStringPrivate(QScriptEnginePrivate *e, const
AllocationType tp)
: engine(e), identifier(id), type(tp), prev(0), next(0)
{
- ref = 0;
}
inline QScriptStringPrivate::~QScriptStringPrivate()
diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h
index c996ed3..d6b76c2 100644
--- a/src/script/api/qscriptvalue_p.h
+++ b/src/script/api/qscriptvalue_p.h
@@ -36,6 +36,7 @@
//
#include <QtCore/qobjectdefs.h>
+#include <QtCore/qshareddata.h>
#include "wtf/Platform.h"
#include "JSValue.h"
@@ -46,7 +47,7 @@ class QString;
class QScriptEnginePrivate;
class QScriptValue;
-class QScriptValuePrivate
+class QScriptValuePrivate : public QSharedData
{
Q_DISABLE_COPY(QScriptValuePrivate)
public:
@@ -118,14 +119,11 @@ public:
// linked list of engine's script values
QScriptValuePrivate *prev;
QScriptValuePrivate *next;
-
- QBasicAtomicInt ref;
};
inline QScriptValuePrivate::QScriptValuePrivate(QScriptEnginePrivate *e)
: engine(e), prev(0), next(0)
{
- ref = 0;
}
inline bool QScriptValuePrivate::isJSC() const
diff --git a/src/script/script.pro b/src/script/script.pro
index 95a9b79..80e9b8a 100644
--- a/src/script/script.pro
+++ b/src/script/script.pro
@@ -15,7 +15,7 @@ DEFINES += QLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO
unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
-include($$QT_SOURCE_TREE/src/qbase.pri)
+load(qt_module_config)
HEADERS += qtscriptversion.h
diff --git a/src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata.cpp b/src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata.cpp
index 672372e..4d9c041 100644
--- a/src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata.cpp
@@ -42,6 +42,7 @@
#include "qscriptdebuggerconsolecommandgroupdata_p.h"
#include <QtCore/qstring.h>
+#include <QtCore/qshareddata.h>
QT_BEGIN_NAMESPACE
@@ -53,7 +54,7 @@ QT_BEGIN_NAMESPACE
\brief The QScriptDebuggerConsoleCommandGroupData class holds data associated with a console command group.
*/
-class QScriptDebuggerConsoleCommandGroupDataPrivate
+class QScriptDebuggerConsoleCommandGroupDataPrivate : public QSharedData
{
public:
QScriptDebuggerConsoleCommandGroupDataPrivate();
@@ -61,13 +62,10 @@ public:
QString shortDescription;
QString longDescription;
-
- QBasicAtomicInt ref;
};
QScriptDebuggerConsoleCommandGroupDataPrivate::QScriptDebuggerConsoleCommandGroupDataPrivate()
{
- ref = 0;
}
QScriptDebuggerConsoleCommandGroupDataPrivate::~QScriptDebuggerConsoleCommandGroupDataPrivate()
diff --git a/src/scripttools/debugging/qscriptdebuggervalue.cpp b/src/scripttools/debugging/qscriptdebuggervalue.cpp
index 3882070..a19a190 100644
--- a/src/scripttools/debugging/qscriptdebuggervalue.cpp
+++ b/src/scripttools/debugging/qscriptdebuggervalue.cpp
@@ -45,6 +45,7 @@
#include <QtScript/qscriptengine.h>
#include <QtCore/qdatastream.h>
#include <QtCore/qdebug.h>
+#include <QtCore/qshareddata.h>
QT_BEGIN_NAMESPACE
@@ -56,7 +57,7 @@ QT_BEGIN_NAMESPACE
\brief The QScriptDebuggerValue class represents a script value.
*/
-class QScriptDebuggerValuePrivate
+class QScriptDebuggerValuePrivate : public QSharedData
{
public:
QScriptDebuggerValuePrivate();
@@ -69,14 +70,11 @@ public:
double numberValue;
qint64 objectId;
};
-
- QBasicAtomicInt ref;
};
QScriptDebuggerValuePrivate::QScriptDebuggerValuePrivate()
: type(QScriptDebuggerValue::NoValue)
{
- ref = 0;
}
QScriptDebuggerValuePrivate::~QScriptDebuggerValuePrivate()
diff --git a/src/scripttools/debugging/qscriptdebuggervalueproperty.cpp b/src/scripttools/debugging/qscriptdebuggervalueproperty.cpp
index ab8f040..d06f34f 100644
--- a/src/scripttools/debugging/qscriptdebuggervalueproperty.cpp
+++ b/src/scripttools/debugging/qscriptdebuggervalueproperty.cpp
@@ -43,7 +43,7 @@
#include "qscriptdebuggervalue_p.h"
#include "qscriptdebuggerobjectsnapshotdelta_p.h"
-#include <QtCore/qatomic.h>
+#include <QtCore/qshareddata.h>
#include <QtCore/qdatastream.h>
#include <QtCore/qstring.h>
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
\class QScriptDebuggerValueProperty
*/
-class QScriptDebuggerValuePropertyPrivate
+class QScriptDebuggerValuePropertyPrivate : public QSharedData
{
public:
QScriptDebuggerValuePropertyPrivate();
@@ -64,13 +64,10 @@ public:
QScriptDebuggerValue value;
QString valueAsString;
QScriptValue::PropertyFlags flags;
-
- QBasicAtomicInt ref;
};
QScriptDebuggerValuePropertyPrivate::QScriptDebuggerValuePropertyPrivate()
{
- ref = 0;
}
QScriptDebuggerValuePropertyPrivate::~QScriptDebuggerValuePropertyPrivate()
diff --git a/src/scripttools/debugging/qscriptscriptdata.cpp b/src/scripttools/debugging/qscriptscriptdata.cpp
index f58d754..074c1e5 100644
--- a/src/scripttools/debugging/qscriptscriptdata.cpp
+++ b/src/scripttools/debugging/qscriptscriptdata.cpp
@@ -44,6 +44,7 @@
#include <QtCore/qdatastream.h>
#include <QtCore/qstring.h>
#include <QtCore/qstringlist.h>
+#include <QtCore/qshareddata.h>
QT_BEGIN_NAMESPACE
@@ -55,7 +56,7 @@ QT_BEGIN_NAMESPACE
\brief The QScriptScriptData class holds data associated with a script.
*/
-class QScriptScriptDataPrivate
+class QScriptScriptDataPrivate : public QSharedData
{
public:
QScriptScriptDataPrivate();
@@ -65,13 +66,10 @@ public:
QString fileName;
int baseLineNumber;
QDateTime timeStamp;
-
- QBasicAtomicInt ref;
};
QScriptScriptDataPrivate::QScriptScriptDataPrivate()
{
- ref = 0;
}
QScriptScriptDataPrivate::~QScriptScriptDataPrivate()
diff --git a/src/scripttools/debugging/qscriptvalueproperty.cpp b/src/scripttools/debugging/qscriptvalueproperty.cpp
index 91a59e5..4e16f9c 100644
--- a/src/scripttools/debugging/qscriptvalueproperty.cpp
+++ b/src/scripttools/debugging/qscriptvalueproperty.cpp
@@ -41,12 +41,12 @@
#include "qscriptvalueproperty_p.h"
-#include <QtCore/qatomic.h>
+#include <QtCore/qshareddata.h>
#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE
-class QScriptValuePropertyPrivate
+class QScriptValuePropertyPrivate : public QSharedData
{
public:
QScriptValuePropertyPrivate();
@@ -55,13 +55,10 @@ public:
QString name;
QScriptValue value;
QScriptValue::PropertyFlags flags;
-
- QBasicAtomicInt ref;
};
QScriptValuePropertyPrivate::QScriptValuePropertyPrivate()
{
- ref = 0;
}
QScriptValuePropertyPrivate::~QScriptValuePropertyPrivate()
diff --git a/src/scripttools/scripttools.pro b/src/scripttools/scripttools.pro
index 9ced50b..4384ed4 100644
--- a/src/scripttools/scripttools.pro
+++ b/src/scripttools/scripttools.pro
@@ -13,7 +13,7 @@ DEFINES += QT_NO_USING_NAMESPACE
unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui QtScript
-include($$QT_SOURCE_TREE/src/qbase.pri)
+load(qt_module_config)
HEADERS += qtscripttoolsversion.h
diff --git a/sync.profile b/sync.profile
index 70339db..c17ef56 100644
--- a/sync.profile
+++ b/sync.profile
@@ -17,19 +17,13 @@
"QtScript" => "$basedir/modules/qt_script.pri",
"QtScriptTools" => "$basedir/modules/qt_scripttools.pri",
);
-# Modules and programs, and their dependencies.
+# Module dependencies.
+# Every module that is required to build this module should have one entry.
# Each of the module version specifiers can take one of the following values:
# - A specific Git revision.
-# - "LATEST_REVISION", to always test against the latest revision.
-# - "LATEST_RELEASE", to always test against the latest public release.
-# - "THIS_REPOSITORY", to indicate that the module is in this repository.
+# - any git symbolic ref resolvable from the module's repository (e.g. "refs/heads/master" to track master branch)
+#
%dependencies = (
- "QtScript" => {
- "QtCore" => "0c637cb07ba3c9b353e7e483a209537485cc4e2a",
- },
- "QtScriptTools" => {
- "QtCore" => "0c637cb07ba3c9b353e7e483a209537485cc4e2a",
- "QtGui" => "0c637cb07ba3c9b353e7e483a209537485cc4e2a",
- "QtScript" => "THIS_REPOSITORY",
- },
+ "qtbase" => "refs/heads/master",
);
+
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 66cb5bf..fffb7ea 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -5817,7 +5817,7 @@ void tst_QScriptEngine::dateConversionJSQt()
QDateTime qtDate = jsDate.toDateTime();
QString qtUTCDateStr = qtDate.toUTC().toString(Qt::ISODate);
QString jsUTCDateStr = jsDate.property("toISOString").call(jsDate).toString();
- jsUTCDateStr.chop(5); // get rid of milliseconds (".000Z")
+ jsUTCDateStr.remove(jsUTCDateStr.length() - 5, 4); // get rid of milliseconds (".000")
if (qtUTCDateStr != jsUTCDateStr)
QFAIL(qPrintable(jsDate.toString()));
secs += 2*60*60;
@@ -5831,7 +5831,7 @@ void tst_QScriptEngine::dateConversionQtJS()
for (int i = 0; i < 8000; ++i) {
QScriptValue jsDate = eng.newDate(qtDate);
QString jsUTCDateStr = jsDate.property("toISOString").call(jsDate).toString();
- jsUTCDateStr.chop(5); // get rid of milliseconds (".000Z")
+ jsUTCDateStr.remove(jsUTCDateStr.length() - 5, 4); // get rid of milliseconds (".000")
QString qtUTCDateStr = qtDate.toUTC().toString(Qt::ISODate);
if (jsUTCDateStr != qtUTCDateStr)
QFAIL(qPrintable(qtDate.toString()));
diff --git a/tests/auto/qscriptextensionplugin/qscriptextensionplugin.pro b/tests/auto/qscriptextensionplugin/qscriptextensionplugin.pro
index d4671c8..48f0eb9 100644
--- a/tests/auto/qscriptextensionplugin/qscriptextensionplugin.pro
+++ b/tests/auto/qscriptextensionplugin/qscriptextensionplugin.pro
@@ -1,3 +1,4 @@
TEMPLATE = subdirs
CONFIG -= app_bundle
+test.depends = simpleplugin staticplugin
SUBDIRS = simpleplugin staticplugin test