Merge branch 'release' into stable

Change-Id: Ic270f7814489b2c7df7e0f1ecb46cd516802cac5
This commit is contained in:
Sergio Ahumada 2013-01-31 15:21:52 +01:00
commit 4965130780
13 changed files with 36 additions and 18 deletions

1
dist/changes-5.0.1 vendored
View File

@ -28,6 +28,7 @@ General Improvements
- qmltest: Added the possibility to use QApplication
- [QTBUG-28611] Quick tests: Introduce QQmlMessageHandler.
- Compile with QT_NO_WHEELEVENT.
- Various documentation improvements.
****************************************************************************
* Library *

View File

@ -1,11 +1,26 @@
TEMPLATE=app
TARGET=tst_qmltestexample
CONFIG += qmltestcase
SOURCES += tst_qmltest.cpp
# Note: Normally, tests are auto-installed to a test-specific directory. Overwritten here
# so this one will end up in the examples tree.
target.path = $$[QT_INSTALL_EXAMPLES]/qmltest
!QTDIR_build {
# This is the code actual testcases should use:
CONFIG += qmltestcase
TESTDATA += tst_basic.qml tst_item.qml
} else {
# This code exists solely for the purpose of building this example
# inside the examples/ hierarchy.
QT += qml qmltest
macx: CONFIG -= app_bundle
target.path = $$[QT_INSTALL_EXAMPLES]/qmltest/qmltest
qml.files = tst_basic.qml tst_item.qml
qml.path = $$[QT_INSTALL_EXAMPLES]/qmltest
qml.path = $$[QT_INSTALL_EXAMPLES]/qmltest/qmltest
INSTALLS += target qml
}

View File

@ -38,7 +38,7 @@
\snippet quick/particles/imageparticle/content/allatonce.qml 0
Colored shows a simple ImageParticle with some color variation.
\snippet particles/imageparticle/content/colored.qml 0
\snippet quick/particles/imageparticle/content/colored.qml 0
Color Table sets the color over life on the particles to provide a fixed rainbow effect.
\snippet quick/particles/imageparticle/content/colortable.qml 0

View File

@ -6,6 +6,7 @@ SUBDIRS += affectors \
system
EXAMPLE_FILES = \
images.qrc \
itemparticle
#Install shared images too

View File

@ -52,6 +52,3 @@ void DialogPlugin::registerTypes(const char *uri){
//qRegisterMetaType<QQmlListProperty<QString> > ("QQmlListProperty<QString>");
}
//FileDialog is the plugin name (same as the TARGET in the project file) and DialogPlugin is the plugin classs
Q_EXPORT_PLUGIN2(FileDialog, DialogPlugin);

View File

@ -46,7 +46,7 @@
class DialogPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.QmlExtensionPlugin.FileDialog")
public:
//registerTypes is inherited from QQmlExtensionPlugin
void registerTypes(const char *uri);

View File

@ -4,5 +4,10 @@ QT += qml
SOURCES += window.cpp
RESOURCES += window.qrc
EXAMPLE_FILES = \
nogui.qml \
standalone.qml \
twowindows.qml
target.path = $$[QT_INSTALL_EXAMPLES]/quick/window/window
INSTALLS = target

View File

@ -145,6 +145,4 @@ void QmlOstPlugin::readyRead()
d->debugServer->receiveMessage(content);
}
Q_EXPORT_PLUGIN2(qmlostplugin, QmlOstPlugin)
QT_END_NAMESPACE

View File

@ -53,6 +53,7 @@ class QmlOstPluginPrivate;
class QmlOstPlugin : public QObject, public QQmlDebugServerConnection
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qml.QmlOstPlugin")
Q_DECLARE_PRIVATE(QmlOstPlugin)
Q_DISABLE_COPY(QmlOstPlugin)
Q_INTERFACES(QQmlDebugServerConnection)

View File

@ -58,8 +58,8 @@ QT_BEGIN_NAMESPACE
To write a QML extension plugin:
\list
\li Subclass QQmlExtensionPlugin, implement registerTypes() method
to register types using qmlRegisterType(), and export the class using the Q_EXPORT_PLUGIN2() macro
\li Subclass QQmlExtensionPlugin, implement registerTypes() method to register types
using qmlRegisterType(), and export the class using the Q_PLUGIN_METADATA() macro
\li Write an appropriate project file for the plugin
\li Create a \l{Module Definition qmldir Files}{qmldir file} to describe the plugin
\endlist
@ -140,7 +140,7 @@ QT_BEGIN_NAMESPACE
Constructs a QML extension plugin with the given \a parent.
Note that this constructor is invoked automatically by the
Q_EXPORT_PLUGIN2() macro, so there is no need for calling it
Q_PLUGIN_METADATA() macro, so there is no need for calling it
explicitly.
*/
QQmlExtensionPlugin::QQmlExtensionPlugin(QObject *parent)

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -20,7 +20,7 @@ qhp.QtQuick.customFilters.Qt.filterAttributes = qtquick 5.0.1
qhp.QtQuick.subprojects = qmltypes classes examples
qhp.QtQuick.subprojects.qmltypes.title = QML Types
qhp.QtQuick.subprojects.qmltypes.indexTitle = Qt Quick QML Types
qhp.QtQuick.subprojects.qmltypes.selectors = class fake:headerfile
qhp.QtQuick.subprojects.qmltypes.selectors = fake:qmlclass
qhp.QtQuick.subprojects.qmltypes.sortPages = true
qhp.QtQuick.subprojects.classes.title = Classes
qhp.QtQuick.subprojects.classes.title = C++ Classes

View File

@ -178,6 +178,8 @@ created directly as elements within QML:
\code
class MyModelPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.QmlExtension.MyModel" FILE "mymodel.json")
public:
void registerTypes(const char *uri)
{
@ -185,8 +187,6 @@ public:
"MyModel");
}
}
Q_EXPORT_PLUGIN2(mymodelplugin, MyModelPlugin);
\endcode
\li