aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-10-02 14:41:35 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-10-02 14:41:35 +0200
commit4653217c3f36e7914f2cc0573347a078dd11768f (patch)
tree7c7e862bdec55ae7ea0e2b6816bda189febbe4d1 /src/qml
parentc5dcabeb6a07ed358e64f26cd8475bfe5daae0e4 (diff)
parentad125bd18ef5c98a264b9e4fac258dd07511035d (diff)
Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: I3e2326bc86a9d3adaafbe3830b75ce9afa81c45b
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/doc/src/javascript/qmlglobalobject.qdoc4
-rw-r--r--src/qml/doc/src/qtqml.qdoc4
-rw-r--r--src/qml/jsruntime/qv4managed_p.h10
-rw-r--r--src/qml/jsruntime/qv4object_p.h3
-rw-r--r--src/qml/qml/qqmlcomponent.cpp4
-rw-r--r--src/qml/qml/qqmlengine.cpp2
-rw-r--r--src/qml/qml/qqmlinfo.h4
-rw-r--r--src/qml/qml/qqmlxmlhttprequest.cpp4
-rw-r--r--src/qml/types/qqmlitemselectionmodel.qdoc2
9 files changed, 23 insertions, 14 deletions
diff --git a/src/qml/doc/src/javascript/qmlglobalobject.qdoc b/src/qml/doc/src/javascript/qmlglobalobject.qdoc
index c9e018525a..b3d8a2b2a5 100644
--- a/src/qml/doc/src/javascript/qmlglobalobject.qdoc
+++ b/src/qml/doc/src/javascript/qmlglobalobject.qdoc
@@ -45,7 +45,9 @@ additional imports:
\li \l{XMLHttpRequest}, DOMException: These objects implement a subset of the \l{http://www.w3.org/TR/XMLHttpRequest/}{W3C XMLHttpRequest specification}.
\endlist
-
+\note The \l {QJSEngine::}{globalObject()} function cannot be used to modify
+the global object of a \l QQmlEngine. For more information about this, see
+\l {JavaScript Environment Restrictions}.
\target XMLHttpRequest
\section1 XMLHttpRequest
diff --git a/src/qml/doc/src/qtqml.qdoc b/src/qml/doc/src/qtqml.qdoc
index 64d6bb9ac4..33bb0c0750 100644
--- a/src/qml/doc/src/qtqml.qdoc
+++ b/src/qml/doc/src/qtqml.qdoc
@@ -106,8 +106,8 @@ JavaScript expressions allow QML code to contain application logic. Qt QML
provides the framework for running JavaScript expressions in QML and from C++.
These sections are from \l{The QML Reference}.
-\l{qtqml-javascript-topic.html}{Integrating QML and JavaScript}
\list
+ \li \l{qtqml-javascript-topic.html}{Integrating QML and JavaScript}
\li \l{qtqml-javascript-expressions.html}{Using JavaScript Expressions with QML}
\li \l{qtqml-javascript-dynamicobjectcreation.html}{Dynamic QML Object Creation from JavaScript}
\li \l{qtqml-javascript-resources.html}{Defining JavaScript Resources In QML}
@@ -140,8 +140,6 @@ Further information for writing QML applications:
- essential information for application development with QML and Qt Quick
\li \l{Qt Quick} - a module which provides a set of QML types and C++ classes
for building user interfaces and applications with QML
-\li \l{Qt QML Release Notes} - list of changes and
- additions in the Qt QML module
\endlist
\section2 Reference
diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h
index 6f5564300f..413181309f 100644
--- a/src/qml/jsruntime/qv4managed_p.h
+++ b/src/qml/jsruntime/qv4managed_p.h
@@ -60,7 +60,7 @@ inline void qYouForgotTheQ_MANAGED_Macro(T1, T2) {}
#define V4_NEEDS_DESTROY static void destroy(QV4::Heap::Base *b) { static_cast<Data *>(b)->~Data(); }
-#define V4_MANAGED(DataClass, superClass) \
+#define V4_MANAGED_ITSELF(DataClass, superClass) \
public: \
Q_MANAGED_CHECK \
typedef QV4::Heap::DataClass Data; \
@@ -70,6 +70,12 @@ inline void qYouForgotTheQ_MANAGED_Macro(T1, T2) {}
V4_MANAGED_SIZE_TEST \
QV4::Heap::DataClass *d() const { return static_cast<QV4::Heap::DataClass *>(m()); }
+#define V4_MANAGED(DataClass, superClass) \
+ private: \
+ DataClass() Q_DECL_EQ_DELETE; \
+ Q_DISABLE_COPY(DataClass) \
+ V4_MANAGED_ITSELF(DataClass, superClass)
+
#define Q_MANAGED_TYPE(type) \
public: \
enum { MyType = Type_##type };
@@ -100,7 +106,7 @@ const QV4::VTable classname::static_vtbl = DEFINE_MANAGED_VTABLE_INT(classname,
struct Q_QML_PRIVATE_EXPORT Managed : Value
{
- V4_MANAGED(Base, Managed)
+ V4_MANAGED_ITSELF(Base, Managed)
enum {
IsExecutionContext = false,
IsString = false,
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 58dab9691f..b87e8fe0ad 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -73,6 +73,9 @@ struct Object : Base {
Data *d() const { return static_cast<Data *>(m()); }
#define V4_OBJECT2(DataClass, superClass) \
+ private: \
+ DataClass() Q_DECL_EQ_DELETE; \
+ Q_DISABLE_COPY(DataClass) \
public: \
Q_MANAGED_CHECK \
typedef QV4::Heap::DataClass Data; \
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index be482b4639..040089db20 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -777,8 +777,8 @@ QObject *QQmlComponent::create(QQmlContext *context)
/*!
This method provides advanced control over component instance creation.
- In general, programmers should use QQmlComponent::create() to create a
- component.
+ In general, programmers should use QQmlComponent::create() to create object
+ instances.
Create an object instance from this component. Returns 0 if creation
failed. \a publicContext specifies the context within which to create the object
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 9c5e48ae32..0c003790dd 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -912,7 +912,7 @@ QQuickWorkerScriptEngine *QQmlEnginePrivate::getWorkerScriptEngine()
Note that the \l {Qt Quick 1} version is called QDeclarativeEngine.
- \sa QQmlComponent, QQmlContext
+ \sa QQmlComponent, QQmlContext, {QML Global Object}
*/
/*!
diff --git a/src/qml/qml/qqmlinfo.h b/src/qml/qml/qqmlinfo.h
index b56f74198c..90ac1dd777 100644
--- a/src/qml/qml/qqmlinfo.h
+++ b/src/qml/qml/qqmlinfo.h
@@ -48,7 +48,11 @@ namespace QtQml {
Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QQmlError &error);
Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QList<QQmlError> &errors);
}
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_CLANG("-Wheader-hygiene")
+// This is necessary to allow for QtQuick1 and QtQuick2 scenes in a single application.
using namespace QtQml;
+QT_WARNING_POP
class QQmlInfoPrivate;
class Q_QML_EXPORT QQmlInfo : public QDebug
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp
index 8666c0db01..043113bc31 100644
--- a/src/qml/qml/qqmlxmlhttprequest.cpp
+++ b/src/qml/qml/qqmlxmlhttprequest.cpp
@@ -314,10 +314,6 @@ struct Node : public Object
static ReturnedValue create(ExecutionEngine *v4, NodeImpl *);
bool isNull() const;
-
-private:
- Node &operator=(const Node &);
- Node(const Node &o);
};
Heap::Node::Node(NodeImpl *data)
diff --git a/src/qml/types/qqmlitemselectionmodel.qdoc b/src/qml/types/qqmlitemselectionmodel.qdoc
index 441d219de8..b4da0c63f3 100644
--- a/src/qml/types/qqmlitemselectionmodel.qdoc
+++ b/src/qml/types/qqmlitemselectionmodel.qdoc
@@ -38,7 +38,7 @@
This page only enumerates the properties, methods, and signals available in QML.
See \l QItemSelectionModel for the actual documentation of this class.
- \sa ItemModels
+ \sa QItemSelectionModel, {Models and Views in Qt Quick}
*/