diff options
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/ftw/qintrusivelist.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlcomponent.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlextensionplugin.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qquicklistmodel.cpp | 20 | ||||
-rw-r--r-- | src/qml/qml/qquickworkerscript.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/v8/qjsengine.cpp | 12 | ||||
-rw-r--r-- | src/qml/qml/v8/qjsvalue.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/v8/qjsvalueiterator.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 14 |
10 files changed, 34 insertions, 34 deletions
diff --git a/src/qml/qml/ftw/qintrusivelist.cpp b/src/qml/qml/ftw/qintrusivelist.cpp index 5a1624f1f4..4a4b131c9c 100644 --- a/src/qml/qml/ftw/qintrusivelist.cpp +++ b/src/qml/qml/ftw/qintrusivelist.cpp @@ -147,7 +147,7 @@ Returns an STL-style iterator pointing to the imaginary item after the last item */ /*! -iterator &QInplacelist::iterator::erase() +\fn iterator &QInplacelist::iterator::erase() Remove the current object from the list, and return an iterator to the next element. */ diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 1ade6988f7..d31b4d4773 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -205,7 +205,7 @@ static inline QString buildTypeNameForDebug(const QMetaObject *metaObject) For example, here is a component that is used by multiple \l Loader objects. It contains a single item, a \l Rectangle: - \snippet doc/snippets/qml/component.qml 0 + \snippet qml/component.qml 0 Notice that while a \l Rectangle by itself would be automatically rendered and displayed, this is not the case for the above rectangle diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index beaa6d78dc..6b1c869ee8 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -120,7 +120,7 @@ void qmlRegisterBaseTypes(const char *uri, int versionMajor, int versionMinor) It can be useful to create a QtObject if you need an extremely lightweight element to enclose a set of custom properties: - \snippet doc/snippets/qml/qtobject.qml 0 + \snippet qml/qtobject.qml 0 It can also be useful for C++ integration, as it is just a plain QObject. See the QObject documentation for further details. @@ -360,7 +360,7 @@ The following functions are also on the Qt object. The following example uses the \c application object to indicate whether the application is currently active: - \snippet doc/snippets/qml/application.qml document + \snippet qml/application.qml document */ /*! diff --git a/src/qml/qml/qqmlextensionplugin.cpp b/src/qml/qml/qqmlextensionplugin.cpp index 73d74f9e21..667e50a6bf 100644 --- a/src/qml/qml/qqmlextensionplugin.cpp +++ b/src/qml/qml/qqmlextensionplugin.cpp @@ -110,12 +110,12 @@ QT_BEGIN_NAMESPACE should be bundled with the plugin, so it needs to be specified in the \c qmldir file: - \quotefile examples/declarative/cppextensions/plugins/com/nokia/TimeExample/qmldir + \quotefile examples/qml/cppextensions/plugins/com/nokia/TimeExample/qmldir Once the project is built and installed, the new \c Time element can be used by any QML component that imports the \c com.nokia.TimeExample module: - \snippet examples/declarative/cppextensions/plugins/plugins.qml 0 + \snippet examples/qml/cppextensions/plugins/plugins.qml 0 The full source code is available in the \l {declarative/cppextensions/plugins}{plugins example}. diff --git a/src/qml/qml/qquicklistmodel.cpp b/src/qml/qml/qquicklistmodel.cpp index 389394652a..8e1155bae8 100644 --- a/src/qml/qml/qquicklistmodel.cpp +++ b/src/qml/qml/qquicklistmodel.cpp @@ -1380,7 +1380,7 @@ QQuickListModelParser::ListInstruction *QQuickListModelParser::ListModelData::in \inlineimage listmodel.png \enddiv - \snippet doc/snippets/qml/listmodel.qml 0 + \snippet qml/listmodel/listmodel.qml 0 Roles (properties) in each element must begin with a lower-case letter and should be common to all elements in a model. The ListElement documentation @@ -1389,14 +1389,14 @@ QQuickListModelParser::ListInstruction *QQuickListModelParser::ListModelData::in Since the example model contains an \c id property, it can be referenced by views, such as the ListView in this example: - \snippet doc/snippets/qml/listmodel-simple.qml 0 + \snippet qml/listmodel/listmodel-simple.qml 0 \dots 8 - \snippet doc/snippets/qml/listmodel-simple.qml 1 + \snippet qml/listmodel/listmodel-simple.qml 1 It is possible for roles to contain list data. In the following example we create a list of fruit attributes: - \snippet doc/snippets/qml/listmodel-nested.qml model + \snippet qml/listmodel/listmodel-nested.qml model The delegate displays all the fruit attributes: @@ -1404,14 +1404,14 @@ QQuickListModelParser::ListInstruction *QQuickListModelParser::ListModelData::in \inlineimage listmodel-nested.png \enddiv - \snippet doc/snippets/qml/listmodel-nested.qml delegate + \snippet qml/listmodel/listmodel-nested.qml delegate \section1 Modifying List Models The content of a ListModel may be created and modified using the clear(), append(), set(), insert() and setProperty() methods. For example: - \snippet doc/snippets/qml/listmodel-modify.qml delegate + \snippet qml/listmodel/listmodel-modify.qml delegate Note that when creating content dynamically the set of available properties cannot be changed once set. Whatever properties are first added to the model @@ -1427,11 +1427,11 @@ QQuickListModelParser::ListInstruction *QQuickListModelParser::ListModelData::in Here is an example that uses WorkerScript to periodically append the current time to a list model: - \snippet examples/declarative/threading/threadedlistmodel/timedisplay.qml 0 + \snippet examples/quick/threading/threadedlistmodel/timedisplay.qml 0 The included file, \tt dataloader.js, looks like this: - \snippet examples/declarative/threading/threadedlistmodel/dataloader.js 0 + \snippet examples/quick/threading/threadedlistmodel/dataloader.js 0 The timer in the main example sends messages to the worker script by calling \l WorkerScript::sendMessage(). When this message is received, @@ -2456,12 +2456,12 @@ bool QQuickListModelParser::definesEmptyList(const QString &s) The following model defines a series of list elements, each of which contain "name" and "cost" roles and their associated values. - \snippet doc/snippets/qml/qml-data-models/listelements.qml model + \snippet qml/listmodel/listelements.qml model The delegate obtains the name and cost for each element by simply referring to \c name and \c cost: - \snippet doc/snippets/qml/qml-data-models/listelements.qml view + \snippet qml/listmodel/listelements.qml view \sa ListModel */ diff --git a/src/qml/qml/qquickworkerscript.cpp b/src/qml/qml/qquickworkerscript.cpp index 81ebb1fed4..53eb60eab3 100644 --- a/src/qml/qml/qquickworkerscript.cpp +++ b/src/qml/qml/qquickworkerscript.cpp @@ -574,12 +574,12 @@ void QQuickWorkerScriptEngine::run() An example: - \snippet doc/snippets/qml/workerscript.qml 0 + \snippet qml/workerscript/workerscript.qml 0 The above worker script specifies a JavaScript file, "script.js", that handles the operations to be performed in the new thread. Here is \c script.js: - \quotefile doc/src/snippets/qml/script.js + \quotefile qml/workerscript/script.js When the user clicks anywhere within the rectangle, \c sendMessage() is called, triggering the \tt WorkerScript.onMessage() handler in diff --git a/src/qml/qml/v8/qjsengine.cpp b/src/qml/qml/v8/qjsengine.cpp index 03cd51eab9..080540eeef 100644 --- a/src/qml/qml/v8/qjsengine.cpp +++ b/src/qml/qml/v8/qjsengine.cpp @@ -84,7 +84,7 @@ Q_DECLARE_METATYPE(QList<int>) Use evaluate() to evaluate script code. - \snippet doc/snippets/code/src_script_qjsengine.cpp 0 + \snippet code/src_script_qjsengine.cpp 0 evaluate() returns a QJSValue that holds the result of the evaluation. The QJSValue class provides functions for converting @@ -94,13 +94,13 @@ Q_DECLARE_METATYPE(QList<int>) The following code snippet shows how a script function can be defined and then invoked from C++ using QJSValue::call(): - \snippet doc/snippets/code/src_script_qjsengine.cpp 1 + \snippet code/src_script_qjsengine.cpp 1 As can be seen from the above snippets, a script is provided to the engine in the form of a string. One common way of loading scripts is by reading the contents of a file and passing it to evaluate(): - \snippet doc/snippets/code/src_script_qjsengine.cpp 2 + \snippet code/src_script_qjsengine.cpp 2 Here we pass the name of the file as the second argument to evaluate(). This does not affect evaluation in any way; the second @@ -116,7 +116,7 @@ Q_DECLARE_METATYPE(QList<int>) want to configure a script engine by adding one or more properties to the Global Object: - \snippet doc/snippets/code/src_script_qjsengine.cpp 3 + \snippet code/src_script_qjsengine.cpp 3 Adding custom properties to the scripting environment is one of the standard means of providing a scripting API that is specific to your @@ -132,7 +132,7 @@ Q_DECLARE_METATYPE(QList<int>) value. If isError() returns true, you can call toString() on the error object to obtain an error message. - \snippet doc/snippets/code/src_script_qjsengine.cpp 4 + \snippet code/src_script_qjsengine.cpp 4 \section1 Script Object Creation @@ -150,7 +150,7 @@ Q_DECLARE_METATYPE(QList<int>) properties of the proxy object. No binding code is needed because it is done dynamically using the Qt meta object system. - \snippet doc/snippets/code/src_script_qjsengine.cpp 5 + \snippet code/src_script_qjsengine.cpp 5 \sa QJSValue, {Making Applications Scriptable} diff --git a/src/qml/qml/v8/qjsvalue.cpp b/src/qml/qml/v8/qjsvalue.cpp index 58732f2df8..514572ca71 100644 --- a/src/qml/qml/v8/qjsvalue.cpp +++ b/src/qml/qml/v8/qjsvalue.cpp @@ -77,7 +77,7 @@ QJSValues. Use setProperty() to set a property of an object, and call property() to retrieve the value of a property. - \snippet doc/snippets/code/src_script_qjsvalue.cpp 0 + \snippet code/src_script_qjsvalue.cpp 0 If you want to iterate over the properties of a script object, use the QJSValueIterator class. diff --git a/src/qml/qml/v8/qjsvalueiterator.cpp b/src/qml/qml/v8/qjsvalueiterator.cpp index 921d359f4e..6be892a40e 100644 --- a/src/qml/qml/v8/qjsvalueiterator.cpp +++ b/src/qml/qml/v8/qjsvalueiterator.cpp @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE beginning of the sequence of properties. Here's how to iterate over all the properties of a QJSValue: - \snippet doc/snippets/code/src_script_qjsvalueiterator.cpp 0 + \snippet code/src_script_qjsvalueiterator.cpp 0 The next() advances the iterator. The name() and value() functions return the name and value of the last item that was @@ -72,7 +72,7 @@ QT_BEGIN_NAMESPACE own properties; i.e. it does not follow the prototype chain. You can use a loop like this to follow the prototype chain: - \snippet doc/snippets/code/src_script_qjsvalueiterator.cpp 1 + \snippet code/src_script_qjsvalueiterator.cpp 1 \sa QJSValue::property() */ diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index f6c7a5969d..787197d1d7 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -978,7 +978,7 @@ If \a filepath is specified, it will be used for error reporting for the created Example (where \c parentItem is the id of an existing QML item): -\snippet doc/snippets/qml/createQmlObject.qml 0 +\snippet qml/createQmlObject.qml 0 In the case of an error, a QtScript Error object is thrown. This object has an additional property, \c qmlErrors, which is an array of the errors encountered. @@ -1109,7 +1109,7 @@ component to create an object instance of the component. For example: -\snippet doc/snippets/qml/createComponent-simple.qml 0 +\snippet qml/createComponent-simple.qml 0 See \l {Dynamic Object Management in QML} for more information on using this function. @@ -1329,20 +1329,20 @@ v8::Handle<v8::Value> locale(const v8::Arguments &args) There are two main use-cases for the function: firstly, in imperative JavaScript code to cause a binding assignment: - \snippet doc/snippets/declarative/qtBinding.1.qml 0 + \snippet qml/qtBinding.1.qml 0 and secondly, when defining initial property values of dynamically constructed objects (via Component.createObject() or Loader.setSource()) as being bound to the result of an expression. For example, assuming the existence of a DynamicText component: - \snippet doc/snippets/declarative/DynamicText.qml 0 + \snippet qml/DynamicText.qml 0 the output from: - \snippet doc/snippets/declarative/qtBinding.2.qml 0 + \snippet qml/qtBinding.2.qml 0 and from: - \snippet doc/snippets/declarative/qtBinding.3.qml 0 + \snippet qml/qtBinding.3.qml 0 should both be: \code @@ -1357,7 +1357,7 @@ v8::Handle<v8::Value> locale(const v8::Arguments &args) declarations and binding assignments}) except when the result is stored in an array bound to a var property. - \snippet doc/snippets/declarative/qtBinding.4.qml 0 + \snippet qml/qtBinding.4.qml 0 Note: in QtQuick 1.x, all function assignment was treated as binding assignment, so the Qt.binding() function is new in |