diff options
Diffstat (limited to 'src/qml/doc/src')
-rw-r--r-- | src/qml/doc/src/cppintegration/data.qdoc | 12 | ||||
-rw-r--r-- | src/qml/doc/src/cppintegration/definetypes.qdoc | 2 | ||||
-rw-r--r-- | src/qml/doc/src/qmlfunctions.qdoc | 37 | ||||
-rw-r--r-- | src/qml/doc/src/qmllanguageref/syntax/imports.qdoc | 1 | ||||
-rw-r--r-- | src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc | 2 | ||||
-rw-r--r-- | src/qml/doc/src/qmltypereference.qdoc | 2 |
6 files changed, 13 insertions, 43 deletions
diff --git a/src/qml/doc/src/cppintegration/data.qdoc b/src/qml/doc/src/cppintegration/data.qdoc index ff30bffa83..7bb4d701e2 100644 --- a/src/qml/doc/src/cppintegration/data.qdoc +++ b/src/qml/doc/src/cppintegration/data.qdoc @@ -112,7 +112,7 @@ when passed from C++ to QML and vice-versa: \li QVector2D, QVector3D, QVector4D \li \l vector2d, \l vector3d, \l vector4d \row - \li Enums declared with Q_ENUMS() + \li Enums declared with Q_ENUM() or Q_ENUMS() \li \l enumeration \endtable @@ -261,6 +261,9 @@ In particular, QML currently supports: \li \c {QList<bool>} \li \c {QList<QString>} and \c{QStringList} \li \c {QList<QUrl>} + \li \c {QVector<int>} + \li \c {QVector<qreal>} + \li \c {QVector<bool>} \endlist These sequence types are implemented directly in terms of the underlying C++ @@ -303,6 +306,9 @@ The default-constructed values for each sequence type are as follows: \row \li QList<bool> \li boolean value \c {false} \row \li QList<QString> and QStringList \li empty QString \row \li QList<QUrl> \li empty QUrl +\row \li QVector<int> \li integer value 0 +\row \li QVector<qreal> \li real value 0.0 +\row \li QVector<bool> \li boolean value \c {false} \endtable If you wish to remove elements from a sequence rather than simply replace @@ -341,7 +347,7 @@ properties: \section1 Enumeration Types To use a custom enumeration as a data type, its class must be registered and -the enumeration must also be declared with Q_ENUMS() to register it with Qt's +the enumeration must also be declared with Q_ENUM() to register it with Qt's meta object system. For example, the \c Message class below has a \c Status enum: @@ -349,7 +355,6 @@ enum: class Message : public QObject { Q_OBJECT - Q_ENUMS(Status) Q_PROPERTY(Status status READ status NOTIFY statusChanged) public: enum Status { @@ -357,6 +362,7 @@ enum: Loading, Error }; + Q_ENUM(Status) Status status() const; signals: void statusChanged(); diff --git a/src/qml/doc/src/cppintegration/definetypes.qdoc b/src/qml/doc/src/cppintegration/definetypes.qdoc index 593feb49e7..e06451b2bc 100644 --- a/src/qml/doc/src/cppintegration/definetypes.qdoc +++ b/src/qml/doc/src/cppintegration/definetypes.qdoc @@ -603,7 +603,7 @@ public: RandomNumberGenerator(QObject *parent) : QObject(parent), m_maxValue(100) { - qsrand(QDateTime::currentDateTime().toTime_t()); + qsrand(QDateTime::currentMSecsSinceEpoch() / 1000); QObject::connect(&m_timer, SIGNAL(timeout()), SLOT(updateProperty())); m_timer.start(500); } diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc index 6fc82eb554..26fc40ff37 100644 --- a/src/qml/doc/src/qmlfunctions.qdoc +++ b/src/qml/doc/src/qmlfunctions.qdoc @@ -30,8 +30,6 @@ \relates QQmlEngine Equivalent to \c Q_DECLARE_METATYPE(TYPE *) and \c Q_DECLARE_METATYPE(QQmlListProperty<TYPE>) - - #include <QtQml> to use this macro. */ /*! @@ -44,8 +42,6 @@ Current the only supported type info is \c QML_HAS_ATTACHED_PROPERTIES which declares that the \a Type supports \l {Attached Properties and Attached Signal Handlers} {attached properties}. - - #include <QtQml> to use this macro. */ /*! @@ -58,8 +54,6 @@ Any existing QQmlEngines must be deleted before calling this function. This function only affects the application global cache. Delete the QQmlEngine to clear all cached data relating to that engine. - - #include <QtQml> to use this method. */ @@ -93,10 +87,6 @@ "com.mycompany.qmlcomponents": \code - #include <QtQml> - - ... - qmlRegisterType<MySliderItem>("com.mycompany.qmlcomponents", 1, 0, "Slider"); \endcode @@ -151,8 +141,6 @@ Returns the QML type id. - #include <QtQml> to use this function. - \sa qmlRegisterTypeNotAvailable() */ @@ -167,8 +155,6 @@ Returns the QML type id. - #include <QtQml> to use this function. - \sa qmlRegisterType(), {Registering Extension Objects} */ @@ -190,8 +176,6 @@ Returns the QML type id. - #include <QtQml> to use this function. - \sa qmlRegisterUncreatableType() */ @@ -208,8 +192,6 @@ the \a parser provided. Returns the QML type id. - - #include <QtQml> to use this function. */ /*! @@ -244,8 +226,6 @@ Without this, a generic "Game is not a type" message would be given. - #include <QtQml> to use this function. - \sa qmlRegisterUncreatableType() */ @@ -258,8 +238,6 @@ system. Instances of this type cannot be created from the QML system. - #include <QtQml> to use this function. - Returns the QML type id. */ @@ -270,8 +248,6 @@ This template function registers the C++ type in the QML system under the name \a typeName. - #include <QtQml> to use this function. - Returns the QML type id. */ @@ -305,10 +281,7 @@ } // Second, register the singleton type provider with QML by calling this function in an initialization function. - #include <QtQml> - ... qmlRegisterSingletonType("Qt.example.qjsvalueApi", 1, 0, "MyApi", example_qjsvalue_singletontype_provider); - ... \endcode In order to use the registered singleton type in QML, you must import the singleton type. @@ -407,10 +380,7 @@ } // Third, register the singleton type provider with QML by calling this function in an initialization function. - #include <QtQml> - ... qmlRegisterSingletonType<SingletonTypeExample>("Qt.example.qobjectSingleton", 1, 0, "MyApi", example_qobject_singletontype_provider); - ... \endcode In order to use the registered singleton type in QML, you must import the singleton type. @@ -480,10 +450,7 @@ \code // Second, register the QML singleton type by calling this function in an initialization function. - #include <QtQml> - ... qmlRegisterSingletonType(QUrl("file:///absolute/path/SingletonType.qml"), "Qt.example.qobjectSingleton", 1, 0, "RegisteredSingleton"); - ... \endcode In order to use the registered singleton type in QML, you must import the singleton type. @@ -513,8 +480,6 @@ Normally QML files can be loaded as types directly from other QML files, or using a qmldir file. This function allows registration of files to types from C++ code, such as when the type mapping needs to be procedurally determined at startup. - #include <QtQml> to use this function. - Returns -1 if the registration was not successful. */ @@ -537,8 +502,6 @@ uri, major version combination will lead to a runtime error. Call this after you have registered all of your types with the engine. - #include <QtQml> to use this function. - Returns true if the module with \a uri as a \l{Identified Modules} {module identifier} and \a majVersion as a major version number was found and locked, otherwise returns false. The module must contain exported types diff --git a/src/qml/doc/src/qmllanguageref/syntax/imports.qdoc b/src/qml/doc/src/qmllanguageref/syntax/imports.qdoc index 9eb792bd2e..71db34695c 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/imports.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/imports.qdoc @@ -291,6 +291,7 @@ default locations to be searched by the engine. By default, this list contains: \li The directory of the current file \li The location specified by QLibraryInfo::Qml2ImportsPath \li Paths specified by the \c QML2_IMPORT_PATH environment variable +\li The qrc:/qt-project.org/imports path inside the resources. \endlist Additional import paths can be added through QQmlEngine::addImportPath() or the diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc index 04d0d0ed2e..de0515e5d0 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc @@ -729,7 +729,7 @@ Rectangle { MouseArea { anchors.fill: parent onPressed: root.activated(mouse.x, mouse.y) - onRelased: root.deactivated() + onReleased: root.deactivated() } } \endqml diff --git a/src/qml/doc/src/qmltypereference.qdoc b/src/qml/doc/src/qmltypereference.qdoc index 31133c862f..f32574fcc1 100644 --- a/src/qml/doc/src/qmltypereference.qdoc +++ b/src/qml/doc/src/qmltypereference.qdoc @@ -55,7 +55,7 @@ are also provided by the \c QtQuick namespace which may be imported as follows: \qml -import QtQuick 2.5 +import QtQuick 2.7 \endqml See the \l{Qt Quick} module documentation for more information about the \c |