summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qdeclarativecontext_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp34
-rw-r--r--src/declarative/qml/qdeclarativepropertycache_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp6
4 files changed, 29 insertions, 15 deletions
diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/declarative/qml/qdeclarativecontext_p.h
index 6b6cd0a..1f5aaf1 100644
--- a/src/declarative/qml/qdeclarativecontext_p.h
+++ b/src/declarative/qml/qdeclarativecontext_p.h
@@ -108,7 +108,7 @@ public:
class QDeclarativeComponentAttached;
class QDeclarativeGuardedContextData;
-class QDeclarativeContextData
+class Q_AUTOTEST_EXPORT QDeclarativeContextData
{
public:
QDeclarativeContextData();
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 2f2ee08..39b0802 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -155,14 +155,26 @@ void QDeclarativeEnginePrivate::defineModule()
\qmlclass Qt QDeclarativeEnginePrivate
\brief The QML global Qt object provides useful enums and functions from Qt.
-The Qt object provides useful enums and functions from Qt, for use in all QML files.
+The \c Qt object provides useful enums and functions from Qt, for use in all QML files.
+
+The \c Qt object is not a QML element; it cannot be instantiated. It is a global object
+with enums and functions. To use it, call the members of the global \c Qt object directly.
+For example:
+
+\qml
+import Qt 4.7
+
+Text {
+ color: Qt.rgba(255, 0, 0, 1)
+ text: Qt.md5("hello, world")
+}
+\endqml
-You do not create instances of this type, but instead use the members of the global "Qt" object.
\section1 Enums
The Qt object contains all enums in the Qt namespace. For example, you can
-access the AlignLeft member of the Qt::AlignmentFlag enum with \c Qt.AlignLeft.
+access the \c AlignLeft member of the \c Qt::AlignmentFlag enum with \c Qt.AlignLeft.
For a full list of enums, see the \l{Qt Namespace} documentation.
@@ -172,7 +184,7 @@ data types. This is primarily useful when setting the properties of an item
when the property has one of the following types:
\list
-\o \c color - use \l{Qt::rgba()}{Qt.rgba()}, \l{Qt::darker()}{Qt.darker()}, \l{Qt::lighter()}{Qt.lighter()} or \l{Qt::tint()}{Qt.tint()}
+\o \c color - use \l{Qt::rgba()}{Qt.rgba()}, \l{Qt::hsla()}{Qt.hsla()}, \l{Qt::darker()}{Qt.darker()}, \l{Qt::lighter()}{Qt.lighter()} or \l{Qt::tint()}{Qt.tint()}
\o \c rect - use \l{Qt::rect()}{Qt.rect()}
\o \c point - use \l{Qt::point()}{Qt.point()}
\o \c size - use \l{Qt::size()}{Qt.size()}
@@ -200,8 +212,8 @@ items from files or strings. See \l{Dynamic Object Management} for an overview
of their use.
\list
- \o \l{Qt::createComponent}{object Qt.createComponent(url)}
- \o \l{Qt::createQmlObject}{object Qt.createQmlObject(string qml, object parent, string filepath)}
+ \o \l{Qt::createComponent()}{object Qt.createComponent(url)}
+ \o \l{Qt::createQmlObject()}{object Qt.createQmlObject(string qml, object parent, string filepath)}
\endlist
*/
@@ -1036,7 +1048,7 @@ QString QDeclarativeEnginePrivate::urlToLocalFileOrQrc(const QUrl& url)
/*!
\qmlmethod object Qt::createComponent(url)
-Returns a \l Component object created from the QML file at the specified \a url,
+Returns a \l Component object created using the QML file at the specified \a url,
or \c null if there was an error in creating the component.
Call \l {Component::createObject()}{Component.createObject()} on the returned
@@ -1364,7 +1376,7 @@ QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScr
/*!
\qmlmethod color Qt::rgba(real red, real green, real blue, real alpha)
-Returns a Color with the specified \c red, \c green, \c blue and \c alpha components.
+Returns a color with the specified \c red, \c green, \c blue and \c alpha components.
All components should be in the range 0-1 inclusive.
*/
QScriptValue QDeclarativeEnginePrivate::rgba(QScriptContext *ctxt, QScriptEngine *engine)
@@ -1392,7 +1404,7 @@ QScriptValue QDeclarativeEnginePrivate::rgba(QScriptContext *ctxt, QScriptEngine
/*!
\qmlmethod color Qt::hsla(real hue, real saturation, real lightness, real alpha)
-Returns a Color with the specified \c hue, \c saturation, \c lightness and \c alpha components.
+Returns a color with the specified \c hue, \c saturation, \c lightness and \c alpha components.
All components should be in the range 0-1 inclusive.
*/
QScriptValue QDeclarativeEnginePrivate::hsla(QScriptContext *ctxt, QScriptEngine *engine)
@@ -1420,7 +1432,9 @@ QScriptValue QDeclarativeEnginePrivate::hsla(QScriptContext *ctxt, QScriptEngine
/*!
\qmlmethod rect Qt::rect(int x, int y, int width, int height)
-Returns a Rect with the top-left corner at \c x, \c y and the specified \c width and \c height.
+Returns a \c rect with the top-left corner at \c x, \c y and the specified \c width and \c height.
+
+The returned object has \c x, \c y, \c width and \c height attributes with the given values.
*/
QScriptValue QDeclarativeEnginePrivate::rect(QScriptContext *ctxt, QScriptEngine *engine)
{
diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h
index b01e5cc..72cfeba 100644
--- a/src/declarative/qml/qdeclarativepropertycache_p.h
+++ b/src/declarative/qml/qdeclarativepropertycache_p.h
@@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
class QDeclarativeEngine;
class QMetaProperty;
-class QDeclarativePropertyCache : public QDeclarativeRefCount, public QDeclarativeCleanup
+class Q_AUTOTEST_EXPORT QDeclarativePropertyCache : public QDeclarativeRefCount, public QDeclarativeCleanup
{
public:
QDeclarativePropertyCache(QDeclarativeEngine *);
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp
index 2ca030e..e0ee84f 100644
--- a/src/declarative/qml/qdeclarativeworkerscript.cpp
+++ b/src/declarative/qml/qdeclarativeworkerscript.cpp
@@ -521,7 +521,7 @@ void QDeclarativeWorkerScriptEngine::run()
that the main GUI thread is not blocked.
Messages can be passed between the new thread and the parent thread
- using sendMessage() and the onMessage() handler.
+ using \l sendMessage() and the \l {WorkerScript::onMessage}{onMessage()} handler.
Here is an example:
@@ -555,7 +555,7 @@ QDeclarativeWorkerScript::~QDeclarativeWorkerScript()
/*!
\qmlproperty url WorkerScript::source
- This holds the url of the javascript file that implements the
+ This holds the url of the JavaScript file that implements the
\tt WorkerScript.onMessage() handler for threaded operations.
*/
QUrl QDeclarativeWorkerScript::source() const
@@ -576,7 +576,7 @@ void QDeclarativeWorkerScript::setSource(const QUrl &source)
emit sourceChanged();
}
-/*
+/*!
\qmlmethod WorkerScript::sendMessage(jsobject message)
Sends the given \a message to a worker script handler in another