summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-04-14 15:19:16 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-04-14 15:26:14 (GMT)
commit4174dd5dca647bfbe5ff5db1d495b7f887833323 (patch)
tree1fc2e851d38ac85824ddb691944972304c15c27f
parentdac9ed4cb0e11c71b70e84341fbd3c4db31e48aa (diff)
parentbd062a4532cb9ffc3539093da0adf3be6fdc8fc9 (diff)
downloadQt-4174dd5dca647bfbe5ff5db1d495b7f887833323.zip
Qt-4174dd5dca647bfbe5ff5db1d495b7f887833323.tar.gz
Qt-4174dd5dca647bfbe5ff5db1d495b7f887833323.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
-rw-r--r--doc/src/declarative/qtdeclarative.qdoc7
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp4
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.cpp12
4 files changed, 19 insertions, 6 deletions
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
index 8013b92..cbb2146 100644
--- a/doc/src/declarative/qtdeclarative.qdoc
+++ b/doc/src/declarative/qtdeclarative.qdoc
@@ -69,6 +69,10 @@
/*!
\macro QML_DECLARE_TYPE()
\relates QDeclarativeEngine
+
+ Declares a C++ type to be usable in the QML system. In addition
+ to this, a type must also be registered with the QML system using
+ qmlRegisterType().
*/
@@ -79,6 +83,7 @@
This template function registers the C++ type in the QML system with
the name \a qmlName. in the library imported from \a uri having the
version number composed from \a versionMajor and \a versionMinor.
+ The type should also haved been declared with the QML_DECLARE_TYPE() macro.
Returns the QML type id.
@@ -109,6 +114,8 @@
This template function registers the C++ type in the QML system
under the name \a typeName.
+ The type should also haved been declared with the QML_DECLARE_TYPE() macro.
+
Returns the QML type id.
*/
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index ff79256..e00d333 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -611,8 +611,8 @@ void QDeclarativeTextInput::setAutoScroll(bool b)
This element provides a validator, which counts as valid any string which
matches a specified regular expression.
*/
-/*
- \qmlproperty string RegExpValidator::regExp
+/*!
+ \qmlproperty regExp RegExpValidator::regExp
This property holds the regular expression used for validation.
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index f621af5..c5afe92 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -1949,6 +1949,8 @@ void QDeclarativeEngine::setPluginPathList(const QStringList &paths)
/*!
Imports the plugin named \a filePath with the \a uri provided.
Returns true if the plugin was successfully imported; otherwise returns false.
+
+ The plugin has to be a Qt plugin which implements the QDeclarativeExtensionPlugin interface.
*/
bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &uri, QString *errorString)
{
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.cpp b/src/declarative/qml/qdeclarativeextensionplugin.cpp
index 5b7f1e8..762c642d 100644
--- a/src/declarative/qml/qdeclarativeextensionplugin.cpp
+++ b/src/declarative/qml/qdeclarativeextensionplugin.cpp
@@ -55,17 +55,21 @@ QT_BEGIN_NAMESPACE
applications using the QDeclarativeEngine class.
Writing a QML extension plugin is achieved by subclassing this
- base class, reimplementing the pure virtual initialize()
+ base class, reimplementing the pure virtual registerTypes()
function, and exporting the class using the Q_EXPORT_PLUGIN2()
- macro. See \l {How to Create Qt Plugins} for details.
+ macro.
- \sa QDeclarativeEngine::importExtension()
+ See \l {Extending QML in C++} for details how to write a QML extension plugin.
+ See \l {How to Create Qt Plugins} for general Qt plugin documentation.
+
+ \sa QDeclarativeEngine::importPlugin()
*/
/*!
\fn void QDeclarativeExtensionPlugin::registerTypes(const char *uri)
- Registers the QML types in the given \a uri.
+ Registers the QML types in the given \a uri. Here you call qmlRegisterType() for
+ all types which are provided by the extension plugin.
*/
/*!