From 135a035362939b1c80d504e641f7dcb20f33a17b Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 5 Nov 2009 13:46:28 +1000 Subject: Remove "to" limit on minor version. QML_DEFINE_TYPE etc. now define just the initial support version, with support in all future versions being thus implied. QTBUG-5421 --- demos/declarative/minehunt/main.cpp | 2 +- doc/src/declarative/modules.qdoc | 12 ++++--- examples/declarative/extending/adding/person.cpp | 2 +- .../extending/attached/birthdayparty.cpp | 2 +- examples/declarative/extending/attached/person.cpp | 4 +-- .../extending/binding/birthdayparty.cpp | 2 +- .../extending/binding/happybirthday.cpp | 2 +- examples/declarative/extending/binding/person.cpp | 4 +-- .../extending/coercion/birthdayparty.cpp | 2 +- examples/declarative/extending/coercion/person.cpp | 4 +-- .../extending/default/birthdayparty.cpp | 2 +- examples/declarative/extending/default/person.cpp | 4 +-- .../declarative/extending/extended/lineedit.cpp | 2 +- .../extending/grouped/birthdayparty.cpp | 2 +- examples/declarative/extending/grouped/person.cpp | 4 +-- .../extending/properties/birthdayparty.cpp | 2 +- .../declarative/extending/properties/person.cpp | 2 +- .../declarative/extending/signal/birthdayparty.cpp | 2 +- examples/declarative/extending/signal/person.cpp | 4 +-- .../extending/valuesource/birthdayparty.cpp | 2 +- .../extending/valuesource/happybirthday.cpp | 2 +- .../declarative/extending/valuesource/person.cpp | 4 +-- examples/declarative/loader/qmlfolderlistmodel.cpp | 2 +- src/declarative/extra/qmlbehavior.cpp | 2 +- src/declarative/extra/qmldatetimeformatter.cpp | 2 +- src/declarative/extra/qmlfontloader.cpp | 2 +- .../extra/qmlgraphicsanimatedimageitem.cpp | 2 +- src/declarative/extra/qmlgraphicsparticles.cpp | 10 +++--- src/declarative/extra/qmlnumberformatter.cpp | 2 +- src/declarative/extra/qmlxmllistmodel.cpp | 4 +-- .../graphicsitems/qmlgraphicsanchors.cpp | 2 +- .../graphicsitems/qmlgraphicsborderimage.cpp | 2 +- .../graphicsitems/qmlgraphicseffects.cpp | 8 ++--- .../graphicsitems/qmlgraphicsflickable.cpp | 4 +-- .../graphicsitems/qmlgraphicsflipable.cpp | 2 +- .../graphicsitems/qmlgraphicsfocuspanel.cpp | 2 +- .../graphicsitems/qmlgraphicsfocusscope.cpp | 2 +- .../qmlgraphicsgraphicsobjectcontainer.cpp | 2 +- .../graphicsitems/qmlgraphicsgridview.cpp | 2 +- src/declarative/graphicsitems/qmlgraphicsimage.cpp | 2 +- src/declarative/graphicsitems/qmlgraphicsitem.cpp | 10 +++--- .../graphicsitems/qmlgraphicslayoutitem.cpp | 2 +- .../graphicsitems/qmlgraphicslistview.cpp | 2 +- .../graphicsitems/qmlgraphicsloader.cpp | 2 +- .../graphicsitems/qmlgraphicsmouseregion.cpp | 4 +-- src/declarative/graphicsitems/qmlgraphicspath.cpp | 12 +++---- .../graphicsitems/qmlgraphicspathview.cpp | 2 +- .../graphicsitems/qmlgraphicspositioners.cpp | 6 ++-- .../graphicsitems/qmlgraphicsrectangle.cpp | 8 ++--- .../graphicsitems/qmlgraphicsrepeater.cpp | 2 +- src/declarative/graphicsitems/qmlgraphicstext.cpp | 2 +- .../graphicsitems/qmlgraphicstextedit.cpp | 2 +- .../graphicsitems/qmlgraphicstextinput.cpp | 4 +-- .../graphicsitems/qmlgraphicsvisualitemmodel.cpp | 4 +-- .../graphicsitems/qmlgraphicswebview.cpp | 2 +- src/declarative/qml/qml.h | 22 ++++++------- src/declarative/qml/qmlcomponent.cpp | 2 +- src/declarative/qml/qmlcustomparser_p.h | 8 ++--- src/declarative/qml/qmlengine.cpp | 15 +++------ src/declarative/qml/qmlmetatype.cpp | 26 ++++++--------- src/declarative/qml/qmlmetatype.h | 21 ++++++------ src/declarative/qml/qmlprivate.h | 2 +- src/declarative/util/qmlanimation.cpp | 18 +++++------ src/declarative/util/qmlbind.cpp | 2 +- src/declarative/util/qmlconnection.cpp | 2 +- src/declarative/util/qmleasefollow.cpp | 2 +- src/declarative/util/qmllistmodel.cpp | 4 +-- src/declarative/util/qmlpackage.cpp | 2 +- src/declarative/util/qmlpropertychanges.cpp | 2 +- src/declarative/util/qmlspringfollow.cpp | 2 +- src/declarative/util/qmlstate.cpp | 2 +- src/declarative/util/qmlstategroup.cpp | 2 +- src/declarative/util/qmlstateoperations.cpp | 6 ++-- src/declarative/util/qmlsystempalette.cpp | 2 +- src/declarative/util/qmltimer.cpp | 2 +- src/declarative/util/qmltransition.cpp | 2 +- src/declarative/widgets/graphicslayouts.cpp | 6 ++-- src/declarative/widgets/graphicswidgets.cpp | 6 ++-- src/gui/graphicsview/qgraphicsview.cpp | 3 ++ tests/auto/declarative/qmlecmascript/testtypes.cpp | 12 +++---- .../data/lib/com/nokia/installedtest/qmldir | 4 +-- tests/auto/declarative/qmllanguage/testtypes.cpp | 12 +++---- .../declarative/qmllanguage/tst_qmllanguage.cpp | 37 ++++++++-------------- .../qmlmetaproperty/tst_qmlmetaproperty.cpp | 4 +-- tests/auto/declarative/states/tst_states.cpp | 2 +- tools/qmlviewer/qfxtester.cpp | 8 ++--- 86 files changed, 204 insertions(+), 222 deletions(-) diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/main.cpp index f4cd6a5..5e67cc1 100644 --- a/demos/declarative/minehunt/main.cpp +++ b/demos/declarative/minehunt/main.cpp @@ -92,7 +92,7 @@ private: }; QML_DECLARE_TYPE(Tile); -QML_DEFINE_TYPE(0,0,0,0,Tile,Tile); +QML_DEFINE_TYPE(0,0,0,Tile,Tile); class MyWidget : public QWidget { diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc index 2f7cb57..1491fea 100644 --- a/doc/src/declarative/modules.qdoc +++ b/doc/src/declarative/modules.qdoc @@ -91,14 +91,16 @@ mapping from all type names to versioned QML files. It is a list of lines of the \code # - + \endcode - is the type being made available; is either a single version -number like \c 4.0 or a range of minor versions like \c 4.0-2; is the (relative) + is the type being made available; is a version +number like \c 4.0; is the (relative) file name of the QML file defining the type. -The same type can be provided by different files in different versions. -If a type is in multiple major versions, it should be listed on a separate line. + +The same type can be provided by different files in different versions, in which +case later earlier versions (eg. 1.2) must precede earlier versions (eg. 1.0), +since the \e first name-version match is used. Installed files do not need to import the module of which they are a part, as they can refer to the other QML files in the module as relative (local) files. diff --git a/examples/declarative/extending/adding/person.cpp b/examples/declarative/extending/adding/person.cpp index 0035282..832bcdc 100644 --- a/examples/declarative/extending/adding/person.cpp +++ b/examples/declarative/extending/adding/person.cpp @@ -66,5 +66,5 @@ void Person::setShoeSize(int s) m_shoeSize = s; } -QML_DEFINE_TYPE(People, 1, 0, 0, Person, Person); +QML_DEFINE_TYPE(People, 1,0, Person, Person); // ![0] diff --git a/examples/declarative/extending/attached/birthdayparty.cpp b/examples/declarative/extending/attached/birthdayparty.cpp index 58ea6a0..c1f0fe8 100644 --- a/examples/declarative/extending/attached/birthdayparty.cpp +++ b/examples/declarative/extending/attached/birthdayparty.cpp @@ -82,4 +82,4 @@ BirthdayPartyAttached *BirthdayParty::qmlAttachedProperties(QObject *object) return new BirthdayPartyAttached(object); } -QML_DEFINE_TYPE(People, 1, 0, 0, BirthdayParty, BirthdayParty); +QML_DEFINE_TYPE(People, 1,0, BirthdayParty, BirthdayParty); diff --git a/examples/declarative/extending/attached/person.cpp b/examples/declarative/extending/attached/person.cpp index a4138c7..8105ee7 100644 --- a/examples/declarative/extending/attached/person.cpp +++ b/examples/declarative/extending/attached/person.cpp @@ -113,11 +113,11 @@ Boy::Boy(QObject * parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Boy, Boy); +QML_DEFINE_TYPE(People, 1,0, Boy, Boy); Girl::Girl(QObject * parent) : Person(parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Girl, Girl); +QML_DEFINE_TYPE(People, 1,0, Girl, Girl); diff --git a/examples/declarative/extending/binding/birthdayparty.cpp b/examples/declarative/extending/binding/birthdayparty.cpp index cfa35c1..13d6bc8 100644 --- a/examples/declarative/extending/binding/birthdayparty.cpp +++ b/examples/declarative/extending/binding/birthdayparty.cpp @@ -103,4 +103,4 @@ BirthdayPartyAttached *BirthdayParty::qmlAttachedProperties(QObject *object) return new BirthdayPartyAttached(object); } -QML_DEFINE_TYPE(People, 1, 0, 0, BirthdayParty, BirthdayParty); +QML_DEFINE_TYPE(People, 1,0, BirthdayParty, BirthdayParty); diff --git a/examples/declarative/extending/binding/happybirthday.cpp b/examples/declarative/extending/binding/happybirthday.cpp index ffd6de4..9ce5a3d 100644 --- a/examples/declarative/extending/binding/happybirthday.cpp +++ b/examples/declarative/extending/binding/happybirthday.cpp @@ -84,4 +84,4 @@ void HappyBirthday::advance() m_target.write(m_lyrics.at(m_line)); } -QML_DEFINE_TYPE(People, 1, 0, 0, HappyBirthday, HappyBirthday); +QML_DEFINE_TYPE(People, 1,0, HappyBirthday, HappyBirthday); diff --git a/examples/declarative/extending/binding/person.cpp b/examples/declarative/extending/binding/person.cpp index a388452..6ad62e9 100644 --- a/examples/declarative/extending/binding/person.cpp +++ b/examples/declarative/extending/binding/person.cpp @@ -133,11 +133,11 @@ Boy::Boy(QObject * parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Boy, Boy); +QML_DEFINE_TYPE(People, 1,0, Boy, Boy); Girl::Girl(QObject * parent) : Person(parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Girl, Girl); +QML_DEFINE_TYPE(People, 1,0, Girl, Girl); diff --git a/examples/declarative/extending/coercion/birthdayparty.cpp b/examples/declarative/extending/coercion/birthdayparty.cpp index 81303aa..f3e0846 100644 --- a/examples/declarative/extending/coercion/birthdayparty.cpp +++ b/examples/declarative/extending/coercion/birthdayparty.cpp @@ -60,4 +60,4 @@ QmlList *BirthdayParty::guests() return &m_guests; } -QML_DEFINE_TYPE(People, 1, 0, 0, BirthdayParty, BirthdayParty); +QML_DEFINE_TYPE(People, 1,0, BirthdayParty, BirthdayParty); diff --git a/examples/declarative/extending/coercion/person.cpp b/examples/declarative/extending/coercion/person.cpp index 9009612..a897d8d 100644 --- a/examples/declarative/extending/coercion/person.cpp +++ b/examples/declarative/extending/coercion/person.cpp @@ -75,12 +75,12 @@ Boy::Boy(QObject * parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Boy, Boy); +QML_DEFINE_TYPE(People, 1,0, Boy, Boy); Girl::Girl(QObject * parent) : Person(parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Girl, Girl); +QML_DEFINE_TYPE(People, 1,0, Girl, Girl); // ![1] diff --git a/examples/declarative/extending/default/birthdayparty.cpp b/examples/declarative/extending/default/birthdayparty.cpp index 81303aa..f3e0846 100644 --- a/examples/declarative/extending/default/birthdayparty.cpp +++ b/examples/declarative/extending/default/birthdayparty.cpp @@ -60,4 +60,4 @@ QmlList *BirthdayParty::guests() return &m_guests; } -QML_DEFINE_TYPE(People, 1, 0, 0, BirthdayParty, BirthdayParty); +QML_DEFINE_TYPE(People, 1,0, BirthdayParty, BirthdayParty); diff --git a/examples/declarative/extending/default/person.cpp b/examples/declarative/extending/default/person.cpp index 2c93f5b..a5eafc4 100644 --- a/examples/declarative/extending/default/person.cpp +++ b/examples/declarative/extending/default/person.cpp @@ -72,11 +72,11 @@ Boy::Boy(QObject * parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Boy, Boy); +QML_DEFINE_TYPE(People, 1,0, Boy, Boy); Girl::Girl(QObject * parent) : Person(parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Girl, Girl); +QML_DEFINE_TYPE(People, 1,0, Girl, Girl); diff --git a/examples/declarative/extending/extended/lineedit.cpp b/examples/declarative/extending/extended/lineedit.cpp index c6015ff..8a31004 100644 --- a/examples/declarative/extending/extended/lineedit.cpp +++ b/examples/declarative/extending/extended/lineedit.cpp @@ -103,4 +103,4 @@ void LineEditExtension::setBottomMargin(int m) } QML_DECLARE_TYPE(QLineEdit); -QML_DEFINE_EXTENDED_TYPE(People, 1, 0, 0, QLineEdit, QLineEdit, LineEditExtension); +QML_DEFINE_EXTENDED_TYPE(People, 1,0, QLineEdit, QLineEdit, LineEditExtension); diff --git a/examples/declarative/extending/grouped/birthdayparty.cpp b/examples/declarative/extending/grouped/birthdayparty.cpp index 81303aa..f3e0846 100644 --- a/examples/declarative/extending/grouped/birthdayparty.cpp +++ b/examples/declarative/extending/grouped/birthdayparty.cpp @@ -60,4 +60,4 @@ QmlList *BirthdayParty::guests() return &m_guests; } -QML_DEFINE_TYPE(People, 1, 0, 0, BirthdayParty, BirthdayParty); +QML_DEFINE_TYPE(People, 1,0, BirthdayParty, BirthdayParty); diff --git a/examples/declarative/extending/grouped/person.cpp b/examples/declarative/extending/grouped/person.cpp index a4138c7..8105ee7 100644 --- a/examples/declarative/extending/grouped/person.cpp +++ b/examples/declarative/extending/grouped/person.cpp @@ -113,11 +113,11 @@ Boy::Boy(QObject * parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Boy, Boy); +QML_DEFINE_TYPE(People, 1,0, Boy, Boy); Girl::Girl(QObject * parent) : Person(parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Girl, Girl); +QML_DEFINE_TYPE(People, 1,0, Girl, Girl); diff --git a/examples/declarative/extending/properties/birthdayparty.cpp b/examples/declarative/extending/properties/birthdayparty.cpp index 0e82b87..b98a691 100644 --- a/examples/declarative/extending/properties/birthdayparty.cpp +++ b/examples/declarative/extending/properties/birthdayparty.cpp @@ -62,4 +62,4 @@ QmlList *BirthdayParty::guests() } // ![0] -QML_DEFINE_TYPE(People, 1, 0, 0, BirthdayParty, BirthdayParty); +QML_DEFINE_TYPE(People, 1,0, BirthdayParty, BirthdayParty); diff --git a/examples/declarative/extending/properties/person.cpp b/examples/declarative/extending/properties/person.cpp index 764e159..b41d0b6 100644 --- a/examples/declarative/extending/properties/person.cpp +++ b/examples/declarative/extending/properties/person.cpp @@ -65,4 +65,4 @@ void Person::setShoeSize(int s) m_shoeSize = s; } -QML_DEFINE_TYPE(People, 1, 0, 0, Person, Person); +QML_DEFINE_TYPE(People, 1,0, Person, Person); diff --git a/examples/declarative/extending/signal/birthdayparty.cpp b/examples/declarative/extending/signal/birthdayparty.cpp index 49072e0..178ce0e 100644 --- a/examples/declarative/extending/signal/birthdayparty.cpp +++ b/examples/declarative/extending/signal/birthdayparty.cpp @@ -88,4 +88,4 @@ BirthdayPartyAttached *BirthdayParty::qmlAttachedProperties(QObject *object) return new BirthdayPartyAttached(object); } -QML_DEFINE_TYPE(People, 1, 0, 0, BirthdayParty, BirthdayParty); +QML_DEFINE_TYPE(People, 1,0, BirthdayParty, BirthdayParty); diff --git a/examples/declarative/extending/signal/person.cpp b/examples/declarative/extending/signal/person.cpp index a4138c7..8105ee7 100644 --- a/examples/declarative/extending/signal/person.cpp +++ b/examples/declarative/extending/signal/person.cpp @@ -113,11 +113,11 @@ Boy::Boy(QObject * parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Boy, Boy); +QML_DEFINE_TYPE(People, 1,0, Boy, Boy); Girl::Girl(QObject * parent) : Person(parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Girl, Girl); +QML_DEFINE_TYPE(People, 1,0, Girl, Girl); diff --git a/examples/declarative/extending/valuesource/birthdayparty.cpp b/examples/declarative/extending/valuesource/birthdayparty.cpp index c2e8346..b0472d0 100644 --- a/examples/declarative/extending/valuesource/birthdayparty.cpp +++ b/examples/declarative/extending/valuesource/birthdayparty.cpp @@ -98,4 +98,4 @@ BirthdayPartyAttached *BirthdayParty::qmlAttachedProperties(QObject *object) return new BirthdayPartyAttached(object); } -QML_DEFINE_TYPE(People, 1, 0, 0, BirthdayParty, BirthdayParty); +QML_DEFINE_TYPE(People, 1,0, BirthdayParty, BirthdayParty); diff --git a/examples/declarative/extending/valuesource/happybirthday.cpp b/examples/declarative/extending/valuesource/happybirthday.cpp index 8c9763b..b453944 100644 --- a/examples/declarative/extending/valuesource/happybirthday.cpp +++ b/examples/declarative/extending/valuesource/happybirthday.cpp @@ -79,4 +79,4 @@ void HappyBirthday::advance() m_target.write(m_lyrics.at(m_line)); } -QML_DEFINE_TYPE(People, 1, 0, 0, HappyBirthday, HappyBirthday); +QML_DEFINE_TYPE(People, 1,0, HappyBirthday, HappyBirthday); diff --git a/examples/declarative/extending/valuesource/person.cpp b/examples/declarative/extending/valuesource/person.cpp index a4138c7..8105ee7 100644 --- a/examples/declarative/extending/valuesource/person.cpp +++ b/examples/declarative/extending/valuesource/person.cpp @@ -113,11 +113,11 @@ Boy::Boy(QObject * parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Boy, Boy); +QML_DEFINE_TYPE(People, 1,0, Boy, Boy); Girl::Girl(QObject * parent) : Person(parent) { } -QML_DEFINE_TYPE(People, 1, 0, 0, Girl, Girl); +QML_DEFINE_TYPE(People, 1,0, Girl, Girl); diff --git a/examples/declarative/loader/qmlfolderlistmodel.cpp b/examples/declarative/loader/qmlfolderlistmodel.cpp index a90ff61..14d2324 100644 --- a/examples/declarative/loader/qmlfolderlistmodel.cpp +++ b/examples/declarative/loader/qmlfolderlistmodel.cpp @@ -382,7 +382,7 @@ void QmlFolderListModel::setShowOnlyReadable(bool on) } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FolderListModel,QmlFolderListModel) +QML_DEFINE_TYPE(Qt,4,6,FolderListModel,QmlFolderListModel) QT_END_NAMESPACE diff --git a/src/declarative/extra/qmlbehavior.cpp b/src/declarative/extra/qmlbehavior.cpp index d6f4b42..e5d3d35 100644 --- a/src/declarative/extra/qmlbehavior.cpp +++ b/src/declarative/extra/qmlbehavior.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Behavior,QmlBehavior) +QML_DEFINE_TYPE(Qt,4,6,Behavior,QmlBehavior) class QmlBehaviorPrivate : public QObjectPrivate { diff --git a/src/declarative/extra/qmldatetimeformatter.cpp b/src/declarative/extra/qmldatetimeformatter.cpp index 4441850..983287e 100644 --- a/src/declarative/extra/qmldatetimeformatter.cpp +++ b/src/declarative/extra/qmldatetimeformatter.cpp @@ -365,6 +365,6 @@ void QmlDateTimeFormatter::componentComplete() d->updateText(); } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,DateTimeFormatter,QmlDateTimeFormatter) +QML_DEFINE_TYPE(Qt,4,6,DateTimeFormatter,QmlDateTimeFormatter) QT_END_NAMESPACE diff --git a/src/declarative/extra/qmlfontloader.cpp b/src/declarative/extra/qmlfontloader.cpp index e8db649..f51ef98 100644 --- a/src/declarative/extra/qmlfontloader.cpp +++ b/src/declarative/extra/qmlfontloader.cpp @@ -67,7 +67,7 @@ public: QmlFontLoader::Status status; }; -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FontLoader,QmlFontLoader) +QML_DEFINE_TYPE(Qt,4,6,FontLoader,QmlFontLoader) /*! \qmlclass FontLoader QmlFontLoader diff --git a/src/declarative/extra/qmlgraphicsanimatedimageitem.cpp b/src/declarative/extra/qmlgraphicsanimatedimageitem.cpp index ba09279..2405bde 100644 --- a/src/declarative/extra/qmlgraphicsanimatedimageitem.cpp +++ b/src/declarative/extra/qmlgraphicsanimatedimageitem.cpp @@ -76,7 +76,7 @@ Item { \endqml \endtable */ -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,AnimatedImage,QmlGraphicsAnimatedImageItem) +QML_DEFINE_TYPE(Qt,4,6,AnimatedImage,QmlGraphicsAnimatedImageItem) QmlGraphicsAnimatedImageItem::QmlGraphicsAnimatedImageItem(QmlGraphicsItem *parent) : QmlGraphicsImage(*(new QmlGraphicsAnimatedImageItemPrivate), parent) diff --git a/src/declarative/extra/qmlgraphicsparticles.cpp b/src/declarative/extra/qmlgraphicsparticles.cpp index 0349a4e..e96a1d5 100644 --- a/src/declarative/extra/qmlgraphicsparticles.cpp +++ b/src/declarative/extra/qmlgraphicsparticles.cpp @@ -105,7 +105,7 @@ public: //--------------------------------------------------------------------------- -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotion,QmlGraphicsParticleMotion) +QML_DEFINE_TYPE(Qt,4,6,ParticleMotion,QmlGraphicsParticleMotion) /*! \class QmlGraphicsParticleMotion @@ -166,7 +166,7 @@ void QmlGraphicsParticleMotion::destroy(QmlGraphicsParticle &particle) \brief The QmlGraphicsParticleMotionLinear class moves the particles linearly. */ -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotionLinear,QmlGraphicsParticleMotionLinear) +QML_DEFINE_TYPE(Qt,4,6,ParticleMotionLinear,QmlGraphicsParticleMotionLinear) void QmlGraphicsParticleMotionLinear::advance(QmlGraphicsParticle &p, int interval) { @@ -188,7 +188,7 @@ void QmlGraphicsParticleMotionLinear::advance(QmlGraphicsParticle &p, int interv \brief The QmlGraphicsParticleMotionGravity class moves the particles towards a point. */ -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotionGravity,QmlGraphicsParticleMotionGravity) +QML_DEFINE_TYPE(Qt,4,6,ParticleMotionGravity,QmlGraphicsParticleMotionGravity) /*! \qmlproperty int ParticleMotionGravity::xattractor @@ -290,7 +290,7 @@ Rectangle { This property holds how quickly the paricles will move from side to side. */ -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotionWander,QmlGraphicsParticleMotionWander) +QML_DEFINE_TYPE(Qt,4,6,ParticleMotionWander,QmlGraphicsParticleMotionWander) void QmlGraphicsParticleMotionWander::advance(QmlGraphicsParticle &p, int interval) { @@ -534,7 +534,7 @@ void QmlGraphicsParticlesPrivate::updateOpacity(QmlGraphicsParticle &p, int age) } } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Particles,QmlGraphicsParticles) +QML_DEFINE_TYPE(Qt,4,6,Particles,QmlGraphicsParticles) /*! \qmlclass Particles diff --git a/src/declarative/extra/qmlnumberformatter.cpp b/src/declarative/extra/qmlnumberformatter.cpp index 9e599c7..4007d95 100644 --- a/src/declarative/extra/qmlnumberformatter.cpp +++ b/src/declarative/extra/qmlnumberformatter.cpp @@ -210,6 +210,6 @@ void QmlNumberFormatter::componentComplete() d->componentComplete = true; d->updateText(); } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,NumberFormatter,QmlNumberFormatter); +QML_DEFINE_TYPE(Qt,4,6,NumberFormatter,QmlNumberFormatter); QT_END_NAMESPACE diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp index 43d7fb2..4243c45 100644 --- a/src/declarative/extra/qmlxmllistmodel.cpp +++ b/src/declarative/extra/qmlxmllistmodel.cpp @@ -58,8 +58,8 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,XmlRole,QmlXmlListModelRole) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,XmlListModel,QmlXmlListModel) +QML_DEFINE_TYPE(Qt,4,6,XmlRole,QmlXmlListModelRole) +QML_DEFINE_TYPE(Qt,4,6,XmlListModel,QmlXmlListModel) /*! \qmlclass XmlRole QmlXmlListModelRole diff --git a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp index e1d2f43..404daad 100644 --- a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Anchors,QmlGraphicsAnchors) +QML_DEFINE_TYPE(Qt,4,6,Anchors,QmlGraphicsAnchors) //TODO: should we cache relationships, so we don't have to check each time (parent-child or sibling)? //TODO: support non-parent, non-sibling (need to find lowest common ancestor) diff --git a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp index 89bbe91..78b0be4 100644 --- a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,BorderImage,QmlGraphicsBorderImage) +QML_DEFINE_TYPE(Qt,4,6,BorderImage,QmlGraphicsBorderImage) /*! \qmlclass BorderImage QmlGraphicsBorderImage diff --git a/src/declarative/graphicsitems/qmlgraphicseffects.cpp b/src/declarative/graphicsitems/qmlgraphicseffects.cpp index b642e60..2f0aae7 100644 --- a/src/declarative/graphicsitems/qmlgraphicseffects.cpp +++ b/src/declarative/graphicsitems/qmlgraphicseffects.cpp @@ -45,7 +45,7 @@ QML_DECLARE_TYPE(QGraphicsEffect) QML_DEFINE_NOCREATE_TYPE(QGraphicsEffect) QML_DECLARE_TYPE(QGraphicsBlurEffect) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Blur,QGraphicsBlurEffect) +QML_DEFINE_TYPE(Qt,4,6,Blur,QGraphicsBlurEffect) /*! \qmlclass Blur QGraphicsBlurEffect @@ -82,7 +82,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Blur,QGraphicsBlurEffect) */ QML_DECLARE_TYPE(QGraphicsColorizeEffect) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Colorize,QGraphicsColorizeEffect) +QML_DEFINE_TYPE(Qt,4,6,Colorize,QGraphicsColorizeEffect) /*! \qmlclass Colorize QGraphicsColorizeEffect @@ -110,7 +110,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Colorize,QGraphicsColorizeEffect */ QML_DECLARE_TYPE(QGraphicsDropShadowEffect) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,DropShadow,QGraphicsDropShadowEffect) +QML_DEFINE_TYPE(Qt,4,6,DropShadow,QGraphicsDropShadowEffect) /*! \qmlclass DropShadow QGraphicsDropShadowEffect @@ -153,7 +153,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,DropShadow,QGraphicsDropShadowEf */ QML_DECLARE_TYPE(QGraphicsOpacityEffect) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Opacity,QGraphicsOpacityEffect) +QML_DEFINE_TYPE(Qt,4,6,Opacity,QGraphicsOpacityEffect) /*! \qmlclass Opacity QGraphicsOpacityEffect diff --git a/src/declarative/graphicsitems/qmlgraphicsflickable.cpp b/src/declarative/graphicsitems/qmlgraphicsflickable.cpp index 19c5abc..c7332f9 100644 --- a/src/declarative/graphicsitems/qmlgraphicsflickable.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsflickable.cpp @@ -341,7 +341,7 @@ void QmlGraphicsFlickablePrivate::updateBeginningEnd() visibleArea->updateVisible(); } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Flickable,QmlGraphicsFlickable) +QML_DEFINE_TYPE(Qt,4,6,Flickable,QmlGraphicsFlickable) /*! \qmlclass Flickable QmlGraphicsFlickable @@ -1278,6 +1278,6 @@ void QmlGraphicsFlickablePrivate::updateVelocity() QT_END_NAMESPACE QML_DECLARE_TYPE(QmlGraphicsFlickableVisibleArea) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,VisibleArea,QmlGraphicsFlickableVisibleArea) +QML_DEFINE_TYPE(Qt,4,6,VisibleArea,QmlGraphicsFlickableVisibleArea) #include "qmlgraphicsflickable.moc" diff --git a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp index 05cc214..37929fa 100644 --- a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Flipable,QmlGraphicsFlipable) +QML_DEFINE_TYPE(Qt,4,6,Flipable,QmlGraphicsFlipable) class QmlGraphicsFlipablePrivate : public QmlGraphicsItemPrivate { diff --git a/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp b/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp index a19e355..ae7ffda 100644 --- a/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp @@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FocusPanel,QmlGraphicsFocusPanel) +QML_DEFINE_TYPE(Qt,4,6,FocusPanel,QmlGraphicsFocusPanel) /*! \qmlclass FocusPanel QmlGraphicsFocusPanel diff --git a/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp b/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp index f03e3f1..b0ad32f 100644 --- a/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp @@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FocusScope,QmlGraphicsFocusScope) +QML_DEFINE_TYPE(Qt,4,6,FocusScope,QmlGraphicsFocusScope) /*! \qmlclass FocusScope QmlGraphicsFocusScope diff --git a/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp index 2a0d6a6..294a374 100644 --- a/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp @@ -91,7 +91,7 @@ public: */ QML_DEFINE_NOCREATE_TYPE(QGraphicsObject) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,GraphicsObjectContainer,QmlGraphicsGraphicsObjectContainer) +QML_DEFINE_TYPE(Qt,4,6,GraphicsObjectContainer,QmlGraphicsGraphicsObjectContainer) QmlGraphicsGraphicsObjectContainer::QmlGraphicsGraphicsObjectContainer(QmlGraphicsItem *parent) : QmlGraphicsItem(*new QmlGraphicsGraphicsObjectContainerPrivate, parent) diff --git a/src/declarative/graphicsitems/qmlgraphicsgridview.cpp b/src/declarative/graphicsitems/qmlgraphicsgridview.cpp index 1ee4511..9f9b336 100644 --- a/src/declarative/graphicsitems/qmlgraphicsgridview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsgridview.cpp @@ -1578,7 +1578,7 @@ QmlGraphicsGridViewAttached *QmlGraphicsGridView::qmlAttachedProperties(QObject return QmlGraphicsGridViewAttached::properties(obj); } -QML_DEFINE_TYPE(Qt, 4,6, (QT_VERSION&0x00ff00)>>8, GridView, QmlGraphicsGridView) +QML_DEFINE_TYPE(Qt, 4,6, GridView, QmlGraphicsGridView) QT_END_NAMESPACE diff --git a/src/declarative/graphicsitems/qmlgraphicsimage.cpp b/src/declarative/graphicsitems/qmlgraphicsimage.cpp index 938fe2a..89b50a1 100644 --- a/src/declarative/graphicsitems/qmlgraphicsimage.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsimage.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Image,QmlGraphicsImage) +QML_DEFINE_TYPE(Qt,4,6,Image,QmlGraphicsImage) /*! \qmlclass Image QmlGraphicsImage diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp index 51b8365..77e6db8 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp @@ -70,11 +70,11 @@ QT_BEGIN_NAMESPACE #define FLT_MAX 1E+37 #endif -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Item,QmlGraphicsItem) +QML_DEFINE_TYPE(Qt,4,6,Item,QmlGraphicsItem) QML_DEFINE_NOCREATE_TYPE(QGraphicsTransform); -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Scale,QGraphicsScale) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation) +QML_DEFINE_TYPE(Qt,4,6,Scale,QGraphicsScale) +QML_DEFINE_TYPE(Qt,4,6,Rotation,QGraphicsRotation) #include "qmlgraphicseffects.cpp" @@ -2916,7 +2916,7 @@ QT_END_NAMESPACE QML_DECLARE_TYPE(QmlGraphicsKeysAttached) QML_DECLARE_TYPEINFO(QmlGraphicsKeysAttached, QML_HAS_ATTACHED_PROPERTIES) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Keys,QmlGraphicsKeysAttached) +QML_DEFINE_TYPE(Qt,4,6,Keys,QmlGraphicsKeysAttached) QML_DECLARE_TYPE(QmlGraphicsKeyNavigationAttached) QML_DECLARE_TYPEINFO(QmlGraphicsKeyNavigationAttached, QML_HAS_ATTACHED_PROPERTIES) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,KeyNavigation,QmlGraphicsKeyNavigationAttached) +QML_DEFINE_TYPE(Qt,4,6,KeyNavigation,QmlGraphicsKeyNavigationAttached) diff --git a/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp b/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp index 45420ed..fafef0e 100644 --- a/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp +++ b/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp @@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,LayoutItem,QmlGraphicsLayoutItem) +QML_DEFINE_TYPE(Qt,4,6,LayoutItem,QmlGraphicsLayoutItem) /*! \qmlclass LayoutItem QmlGraphicsLayoutItem diff --git a/src/declarative/graphicsitems/qmlgraphicslistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp index efe047a..fd8b8b0 100644 --- a/src/declarative/graphicsitems/qmlgraphicslistview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp @@ -2038,7 +2038,7 @@ QmlGraphicsListViewAttached *QmlGraphicsListView::qmlAttachedProperties(QObject return QmlGraphicsListViewAttached::properties(obj); } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ListView,QmlGraphicsListView) +QML_DEFINE_TYPE(Qt,4,6,ListView,QmlGraphicsListView) QT_END_NAMESPACE diff --git a/src/declarative/graphicsitems/qmlgraphicsloader.cpp b/src/declarative/graphicsitems/qmlgraphicsloader.cpp index 4d463ab..3b10908 100644 --- a/src/declarative/graphicsitems/qmlgraphicsloader.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsloader.cpp @@ -53,7 +53,7 @@ QmlGraphicsLoaderPrivate::~QmlGraphicsLoaderPrivate() { } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Loader,QmlGraphicsLoader) +QML_DEFINE_TYPE(Qt,4,6,Loader,QmlGraphicsLoader) /*! \qmlclass Loader QmlGraphicsLoader diff --git a/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp b/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp index 1a57062..196cdf2 100644 --- a/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE static const qreal DragThreshold = 5; static const int PressAndHoldDelay = 800; -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Drag,QmlGraphicsDrag) +QML_DEFINE_TYPE(Qt,4,6,Drag,QmlGraphicsDrag) QmlGraphicsDrag::QmlGraphicsDrag(QObject *parent) : QObject(parent), _target(0), _axis(XandYAxis), _xmin(0), _xmax(0), _ymin(0), _ymax(0) { @@ -225,7 +225,7 @@ void QmlGraphicsDrag::setYmax(qreal m) The \e accepted property of the MouseEvent parameter is ignored in this handler. */ -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,MouseRegion,QmlGraphicsMouseRegion) +QML_DEFINE_TYPE(Qt,4,6,MouseRegion,QmlGraphicsMouseRegion) /*! \internal diff --git a/src/declarative/graphicsitems/qmlgraphicspath.cpp b/src/declarative/graphicsitems/qmlgraphicspath.cpp index ed0dfaa..a8f571e 100644 --- a/src/declarative/graphicsitems/qmlgraphicspath.cpp +++ b/src/declarative/graphicsitems/qmlgraphicspath.cpp @@ -47,14 +47,14 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Path,QmlGraphicsPath) +QML_DEFINE_TYPE(Qt,4,6,Path,QmlGraphicsPath) QML_DEFINE_NOCREATE_TYPE(QmlGraphicsPathElement) QML_DEFINE_NOCREATE_TYPE(QmlGraphicsCurve) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathAttribute,QmlGraphicsPathAttribute) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathPercent,QmlGraphicsPathPercent) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathLine,QmlGraphicsPathLine) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathQuad,QmlGraphicsPathQuad) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathCubic,QmlGraphicsPathCubic) +QML_DEFINE_TYPE(Qt,4,6,PathAttribute,QmlGraphicsPathAttribute) +QML_DEFINE_TYPE(Qt,4,6,PathPercent,QmlGraphicsPathPercent) +QML_DEFINE_TYPE(Qt,4,6,PathLine,QmlGraphicsPathLine) +QML_DEFINE_TYPE(Qt,4,6,PathQuad,QmlGraphicsPathQuad) +QML_DEFINE_TYPE(Qt,4,6,PathCubic,QmlGraphicsPathCubic) /*! \qmlclass PathElement QmlGraphicsPathElement diff --git a/src/declarative/graphicsitems/qmlgraphicspathview.cpp b/src/declarative/graphicsitems/qmlgraphicspathview.cpp index d2a9be1..f2b8d73 100644 --- a/src/declarative/graphicsitems/qmlgraphicspathview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicspathview.cpp @@ -54,7 +54,7 @@ static const int FlickThreshold = 5; QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathView,QmlGraphicsPathView) +QML_DEFINE_TYPE(Qt,4,6,PathView,QmlGraphicsPathView) class QmlGraphicsPathViewAttached : public QObject { diff --git a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp index f599025..d6f1fb9 100644 --- a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp +++ b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp @@ -331,7 +331,7 @@ void QmlGraphicsBasePositioner::applyRemove(const QList applyTransition(changes,target, d->removeActions); } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Column,QmlGraphicsColumn) +QML_DEFINE_TYPE(Qt,4,6,Column,QmlGraphicsColumn) /*! \qmlclass Column QmlGraphicsColumn \brief The Column item lines up its children vertically. @@ -522,7 +522,7 @@ void QmlGraphicsColumn::doPositioning() } } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Row,QmlGraphicsRow) +QML_DEFINE_TYPE(Qt,4,6,Row,QmlGraphicsRow) /*! \qmlclass Row QmlGraphicsRow \brief The Row item lines up its children horizontally. @@ -678,7 +678,7 @@ void QmlGraphicsRow::doPositioning() } } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Grid,QmlGraphicsGrid) +QML_DEFINE_TYPE(Qt,4,6,Grid,QmlGraphicsGrid) /*! \qmlclass Grid QmlGraphicsGrid diff --git a/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp b/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp index 8ae40b7..caec90c 100644 --- a/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp @@ -46,9 +46,9 @@ #include QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Pen,QmlGraphicsPen) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,GradientStop,QmlGraphicsGradientStop) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Gradient,QmlGraphicsGradient) +QML_DEFINE_TYPE(Qt,4,6,Pen,QmlGraphicsPen) +QML_DEFINE_TYPE(Qt,4,6,GradientStop,QmlGraphicsGradientStop) +QML_DEFINE_TYPE(Qt,4,6,Gradient,QmlGraphicsGradient) /*! \internal @@ -149,7 +149,7 @@ void QmlGraphicsGradient::doUpdate() emit updated(); } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rectangle,QmlGraphicsRectangle) +QML_DEFINE_TYPE(Qt,4,6,Rectangle,QmlGraphicsRectangle) /*! \qmlclass Rectangle QmlGraphicsRectangle diff --git a/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp b/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp index 646374f..82d6da3 100644 --- a/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp @@ -56,7 +56,7 @@ QmlGraphicsRepeaterPrivate::~QmlGraphicsRepeaterPrivate() { } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Repeater,QmlGraphicsRepeater) +QML_DEFINE_TYPE(Qt,4,6,Repeater,QmlGraphicsRepeater) /*! \qmlclass Repeater QmlGraphicsRepeater diff --git a/src/declarative/graphicsitems/qmlgraphicstext.cpp b/src/declarative/graphicsitems/qmlgraphicstext.cpp index d640fc9..374972e 100644 --- a/src/declarative/graphicsitems/qmlgraphicstext.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstext.cpp @@ -52,7 +52,7 @@ #include QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Text,QmlGraphicsText) +QML_DEFINE_TYPE(Qt,4,6,Text,QmlGraphicsText) /*! \qmlclass Text QmlGraphicsText diff --git a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp index e84f514..d8fe5d4 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp @@ -53,7 +53,7 @@ #include QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,TextEdit,QmlGraphicsTextEdit) +QML_DEFINE_TYPE(Qt,4,6,TextEdit,QmlGraphicsTextEdit) /*! \qmlclass TextEdit QmlGraphicsTextEdit diff --git a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp index 42de2b6..e2b1725 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp @@ -49,9 +49,9 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,TextInput,QmlGraphicsTextInput); +QML_DEFINE_TYPE(Qt,4,6,TextInput,QmlGraphicsTextInput); QML_DEFINE_NOCREATE_TYPE(QValidator); -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,QIntValidator,QIntValidator); +QML_DEFINE_TYPE(Qt,4,6,QIntValidator,QIntValidator); /*! \qmlclass TextInput QmlGraphicsTextInput diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp index 80b2458..9964de9 100644 --- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp @@ -1045,8 +1045,8 @@ void QmlGraphicsVisualDataModel::_q_destroyingPackage(QmlPackage *package) } QML_DEFINE_NOCREATE_TYPE(QmlGraphicsVisualModel); -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,VisualItemModel,QmlGraphicsVisualItemModel) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,VisualDataModel,QmlGraphicsVisualDataModel) +QML_DEFINE_TYPE(Qt,4,6,VisualItemModel,QmlGraphicsVisualItemModel) +QML_DEFINE_TYPE(Qt,4,6,VisualDataModel,QmlGraphicsVisualDataModel) QT_END_NAMESPACE diff --git a/src/declarative/graphicsitems/qmlgraphicswebview.cpp b/src/declarative/graphicsitems/qmlgraphicswebview.cpp index d1da0f2..4ac208c 100644 --- a/src/declarative/graphicsitems/qmlgraphicswebview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicswebview.cpp @@ -62,7 +62,7 @@ #include QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,WebView,QmlGraphicsWebView) +QML_DEFINE_TYPE(Qt,4,6,WebView,QmlGraphicsWebView) QML_DEFINE_NOCREATE_TYPE(QAction) static const int MAX_DOUBLECLICK_TIME=500; // XXX need better gesture system diff --git a/src/declarative/qml/qml.h b/src/declarative/qml/qml.h index f6a6371..bb7ae24 100644 --- a/src/declarative/qml/qml.h +++ b/src/declarative/qml/qml.h @@ -91,11 +91,11 @@ QT_BEGIN_NAMESPACE #define QML_DEFINE_INTERFACE(INTERFACE) \ static int defineInterface##INTERFACE = qmlRegisterInterface(#INTERFACE); -#define QML_DEFINE_EXTENDED_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, NAME, TYPE, EXTENSION) \ - static int registerExtended##TYPE = qmlRegisterExtendedType(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, #NAME, #TYPE); +#define QML_DEFINE_EXTENDED_TYPE(URI, VERSION_MAJ, VERS, NAME, TYPE, EXTENSION) \ + static int registerExtended##TYPE = qmlRegisterExtendedType(#URI, VERSION_MAJ, VERSION_MIN, #NAME, #TYPE); -#define QML_DEFINE_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, NAME, TYPE) \ - static int defineType##TYPE = qmlRegisterType(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, #NAME, #TYPE); +#define QML_DEFINE_TYPE(URI, VERSION_MAJ, VERSION_MIN, NAME, TYPE) \ + static int defineType##TYPE = qmlRegisterType(#URI, VERSION_MAJ, VERSION_MIN, #NAME, #TYPE); #define QML_DEFINE_EXTENDED_NOCREATE_TYPE(TYPE, EXTENSION) \ static int registerExtendedNoCreate##TYPE = qmlRegisterExtendedType(#TYPE); @@ -106,19 +106,19 @@ QT_BEGIN_NAMESPACE #else #define QML_DEFINE_INTERFACE(INTERFACE) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterInterface(#INTERFACE)); + template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterInterface(#INTERFACE)); -#define QML_DEFINE_EXTENDED_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, NAME, TYPE, EXTENSION) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterExtendedType(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, #NAME, #TYPE)); +#define QML_DEFINE_EXTENDED_TYPE(URI, VERSION_MAJ, VERSION_MIN, NAME, TYPE, EXTENSION) \ + template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterExtendedType(#URI, VERSION_MAJ, VERSION_MIN, #NAME, #TYPE)); -#define QML_DEFINE_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, NAME, TYPE) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterType(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, #NAME, #TYPE)); +#define QML_DEFINE_TYPE(URI, VERSION_MAJ, VERSION_MIN, NAME, TYPE) \ + template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterType(#URI, VERSION_MAJ, VERSION_MIN, #NAME, #TYPE)); #define QML_DEFINE_EXTENDED_NOCREATE_TYPE(TYPE, EXTENSION) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterExtendedType(#TYPE)); + template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterExtendedType(#TYPE)); #define QML_DEFINE_NOCREATE_TYPE(TYPE) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterType(#TYPE)); + template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterType(#TYPE)); #endif diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index 03f07b3..3c142a7 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -119,7 +119,7 @@ Item { } \endqml */ -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Component,QmlComponent); +QML_DEFINE_TYPE(Qt,4,6,Component,QmlComponent); /*! \enum QmlComponent::Status diff --git a/src/declarative/qml/qmlcustomparser_p.h b/src/declarative/qml/qmlcustomparser_p.h index 89d3be2..74bed25 100644 --- a/src/declarative/qml/qmlcustomparser_p.h +++ b/src/declarative/qml/qmlcustomparser_p.h @@ -128,11 +128,11 @@ private: }; #if defined(Q_OS_SYMBIAN) -# define QML_DEFINE_CUSTOM_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, NAME, TYPE, CUSTOMTYPE) \ - static int defineCustomType##NAME = qmlRegisterCustomType(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, #NAME, #TYPE, new CUSTOMTYPE); +# define QML_DEFINE_CUSTOM_TYPE(URI, VERSION_MAJ, VERSION_MIN, NAME, TYPE, CUSTOMTYPE) \ + static int defineCustomType##NAME = qmlRegisterCustomType(#URI, VERSION_MAJ, VERSION_MIN, #NAME, #TYPE, new CUSTOMTYPE); #else -# define QML_DEFINE_CUSTOM_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, NAME, TYPE, CUSTOMTYPE) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterCustomType(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, #NAME, #TYPE, new CUSTOMTYPE)); +# define QML_DEFINE_CUSTOM_TYPE(URI, VERSION_MAJ, VERSION_MIN, NAME, TYPE, CUSTOMTYPE) \ + template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterCustomType(#URI, VERSION_MAJ, VERSION_MIN, #NAME, #TYPE, new CUSTOMTYPE)); #endif QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index 2926791..3df04b2 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -103,7 +103,7 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(qmlDebugger, QML_DEBUGGER) DEFINE_BOOL_CONFIG_OPTION(qmlImportTrace, QML_IMPORT_TRACE) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Object,QObject) +QML_DEFINE_TYPE(Qt,4,6,Object,QObject) struct StaticQtMetaObject : public QObject { @@ -993,17 +993,13 @@ struct QmlEnginePrivate::ImportedNamespace { if (line.isEmpty() || line.at(0) == QLatin1Char('#')) continue; if (line.startsWith(typespace)) { - // eg. 1.2-5 int space1 = line.indexOf(QLatin1Char(' ')); int space2 = space1 >=0 ? line.indexOf(QLatin1Char(' '),space1+1) : -1; QString mapversions = line.mid(space1+1,space2<0?line.length()-space1-1:space2-space1-1); int dot = mapversions.indexOf(QLatin1Char('.')); - int dash = mapversions.indexOf(QLatin1Char('-')); int mapvmaj = mapversions.left(dot).toInt(); - if (mapvmaj==vmaj) { - int mapvmin_from = (dash <= 0 ? mapversions.mid(dot+1) : mapversions.mid(dot+1,dash-dot-1)).toInt(); - int mapvmin_to = dash <= 0 ? mapvmin_from : mapversions.mid(dash+1).toInt(); - if (vmin >= mapvmin_from && vmin <= mapvmin_to) { + if (mapvmaj<=vmaj) { + if (mapvmaj= mapversions.mid(dot+1).toInt()) { QStringRef mapfile = space2<0 ? QStringRef() : line.midRef(space2+1,line.length()-space2-1); if (url_return) *url_return = url.resolved(mapfile.toString()); @@ -1172,9 +1168,8 @@ static QmlTypeNameCache *cacheForNamespace(QmlEngine *engine, const QmlEnginePri foreach (QmlType *type, types) { if (type->qmlTypeName().startsWith(base) && type->qmlTypeName().lastIndexOf('/') == (base.length() - 1) && - type->majorVersion() == major && type->minMinorVersion() <= minor && - type->maxMinorVersion() >= minor) { - + type->availableInVersion(major,minor)) + { QString name = QString::fromUtf8(type->qmlTypeName().mid(base.length())); cache->add(name, type); diff --git a/src/declarative/qml/qmlmetatype.cpp b/src/declarative/qml/qmlmetatype.cpp index 6ce51bd..6ecaa9f 100644 --- a/src/declarative/qml/qmlmetatype.cpp +++ b/src/declarative/qml/qmlmetatype.cpp @@ -119,8 +119,7 @@ public: const char *m_iid; QByteArray m_name; int m_version_maj; - int m_version_min_from; - int m_version_min_to; + int m_version_min; int m_typeId; int m_listId; int m_qmlListId; QmlPrivate::Func m_opFunc; const QMetaObject *m_baseMetaObject; @@ -160,13 +159,12 @@ QmlType::QmlType(int type, int listType, int qmlListType, d->m_index = index; d->m_isSetup = true; d->m_version_maj = 0; - d->m_version_min_from = 0; - d->m_version_min_to = 0; + d->m_version_min = 0; } QmlType::QmlType(int type, int listType, int qmlListType, QmlPrivate::Func opFunc, const char *qmlName, - int version_maj, int version_min_from, int version_min_to, + int version_maj, int version_min, const QMetaObject *metaObject, QmlAttachedPropertiesFunc attachedPropertiesFunc, const QMetaObject *attachedType, @@ -178,8 +176,7 @@ QmlType::QmlType(int type, int listType, int qmlListType, { d->m_name = qmlName; d->m_version_maj = version_maj; - d->m_version_min_from = version_min_from; - d->m_version_min_to = version_min_to; + d->m_version_min = version_min; d->m_typeId = type; d->m_listId = listType; d->m_qmlListId = qmlListType; @@ -209,19 +206,14 @@ int QmlType::majorVersion() const return d->m_version_maj; } -int QmlType::minMinorVersion() const +int QmlType::minorVersion() const { - return d->m_version_min_from; -} - -int QmlType::maxMinorVersion() const -{ - return d->m_version_min_to; + return d->m_version_min; } bool QmlType::availableInVersion(int vmajor, int vminor) const { - return vmajor == d->m_version_maj && vminor >= d->m_version_min_from && vminor <= d->m_version_min_to; + return vmajor > d->m_version_maj || (vmajor == d->m_version_maj && vminor >= d->m_version_min); } void QmlTypePrivate::init() const @@ -473,7 +465,7 @@ int QmlMetaType::registerInterface(const QmlPrivate::MetaTypeIds &id, } int QmlMetaType::registerType(const QmlPrivate::MetaTypeIds &id, QmlPrivate::Func func, - const char *uri, int version_maj, int version_min_from, int version_min_to, const char *cname, + const char *uri, int version_maj, int version_min, const char *cname, const QMetaObject *mo, QmlAttachedPropertiesFunc attach, const QMetaObject *attachMo, int pStatus, int object, int valueSource, int valueInterceptor, QmlPrivate::CreateFunc extFunc, const QMetaObject *extmo, QmlCustomParser *parser) { @@ -499,7 +491,7 @@ int QmlMetaType::registerType(const QmlPrivate::MetaTypeIds &id, QmlPrivate::Fun name.replace('.','/'); QmlType *type = new QmlType(id.typeId, id.listId, id.qmlListId, - func, name, version_maj, version_min_from, version_min_to, mo, attach, attachMo, pStatus, + func, name, version_maj, version_min, mo, attach, attachMo, pStatus, valueSource, valueInterceptor, extFunc, extmo, index, parser); data->types.append(type); diff --git a/src/declarative/qml/qmlmetatype.h b/src/declarative/qml/qmlmetatype.h index eb5fd28..e90c367 100644 --- a/src/declarative/qml/qmlmetatype.h +++ b/src/declarative/qml/qmlmetatype.h @@ -61,7 +61,7 @@ class QmlCustomParser; class Q_DECLARATIVE_EXPORT QmlMetaType { public: - static int registerType(const QmlPrivate::MetaTypeIds &, QmlPrivate::Func, const char *, int vmaj, int vmin_from, int vmin_to, const char *qmlName, const QMetaObject *, QmlAttachedPropertiesFunc, const QMetaObject *, int pStatus, int object, int valueSource, int valueInterceptor, QmlPrivate::CreateFunc extFunc, const QMetaObject *extmo, QmlCustomParser *); + static int registerType(const QmlPrivate::MetaTypeIds &, QmlPrivate::Func, const char *, int vmaj, int vmin, const char *qmlName, const QMetaObject *, QmlAttachedPropertiesFunc, const QMetaObject *, int pStatus, int object, int valueSource, int valueInterceptor, QmlPrivate::CreateFunc extFunc, const QMetaObject *extmo, QmlCustomParser *); static int registerInterface(const QmlPrivate::MetaTypeIds &, QmlPrivate::Func, const char *); static bool copy(int type, void *data, const void *copy = 0); @@ -118,8 +118,7 @@ public: QByteArray qmlTypeName() const; int majorVersion() const; - int minMinorVersion() const; - int maxMinorVersion() const; + int minorVersion() const; bool availableInVersion(int vmajor, int vminor) const; QByteArray hash() const; @@ -156,7 +155,7 @@ private: friend class QmlTypePrivate; friend class QmlMetaTypeData; QmlType(int, int, int, QmlPrivate::Func, const char *, int); - QmlType(int, int, int, QmlPrivate::Func, const char *, int, int, int, const QMetaObject *, QmlAttachedPropertiesFunc, const QMetaObject *, int, int, int, QmlPrivate::CreateFunc, const QMetaObject *, int, QmlCustomParser *); + QmlType(int, int, int, QmlPrivate::Func, const char *, int, int, const QMetaObject *, QmlAttachedPropertiesFunc, const QMetaObject *, int, int, int, QmlPrivate::CreateFunc, const QMetaObject *, int, QmlCustomParser *); ~QmlType(); QmlTypePrivate *d; @@ -172,7 +171,7 @@ int qmlRegisterType(const char *typeName) qRegisterMetaType(QByteArray("QmlList<" + name + "*>*").constData()) }; - return QmlMetaType::registerType(ids, QmlPrivate::list_nocreate_op, 0, 0, 0, 0, 0, + return QmlMetaType::registerType(ids, QmlPrivate::list_nocreate_op, 0, 0, 0, 0, &T::staticMetaObject, QmlPrivate::attachedPropertiesFunc(), QmlPrivate::attachedPropertiesMetaObject(), @@ -184,7 +183,7 @@ int qmlRegisterType(const char *typeName) } template -int qmlRegisterType(const char *uri, int version_maj, int version_min_from, int version_min_to, const char *qmlName, const char *typeName) +int qmlRegisterType(const char *uri, int version_maj, int version_min, const char *qmlName, const char *typeName) { QByteArray name(typeName); QmlPrivate::MetaTypeIds ids = { @@ -194,7 +193,7 @@ int qmlRegisterType(const char *uri, int version_maj, int version_min_from, int }; return QmlMetaType::registerType(ids, QmlPrivate::list_op, - uri, version_maj, version_min_from, version_min_to, qmlName, + uri, version_maj, version_min, qmlName, &T::staticMetaObject, QmlPrivate::attachedPropertiesFunc(), QmlPrivate::attachedPropertiesMetaObject(), @@ -234,7 +233,7 @@ int qmlRegisterExtendedType(const char *typeName) } template -int qmlRegisterExtendedType(const char *uri, int version_maj, int version_min_from, int version_min_to, const char *qmlName, const char *typeName) +int qmlRegisterExtendedType(const char *uri, int version_maj, int version_min, const char *qmlName, const char *typeName) { QByteArray name(typeName); QmlPrivate::MetaTypeIds ids = { @@ -253,7 +252,7 @@ int qmlRegisterExtendedType(const char *uri, int version_maj, int version_min_fr } return QmlMetaType::registerType(ids, QmlPrivate::list_op, - uri, version_maj, version_min_from, version_min_to, qmlName, + uri, version_maj, version_min, qmlName, &T::staticMetaObject, attached, attachedMo, QmlPrivate::StaticCastSelector::cast(), @@ -280,7 +279,7 @@ int qmlRegisterInterface(const char *typeName) } template -int qmlRegisterCustomType(const char *uri, int version_maj, int version_min_from, int version_min_to, const char *qmlName, const char *typeName, QmlCustomParser *parser) +int qmlRegisterCustomType(const char *uri, int version_maj, int version_min, const char *qmlName, const char *typeName, QmlCustomParser *parser) { QByteArray name(typeName); QmlPrivate::MetaTypeIds ids = { @@ -290,7 +289,7 @@ int qmlRegisterCustomType(const char *uri, int version_maj, int version_min_from }; return QmlMetaType::registerType(ids, QmlPrivate::list_op, - uri, version_maj, version_min_from, version_min_to, qmlName, + uri, version_maj, version_min, qmlName, &T::staticMetaObject, QmlPrivate::attachedPropertiesFunc(), QmlPrivate::attachedPropertiesMetaObject(), diff --git a/src/declarative/qml/qmlprivate.h b/src/declarative/qml/qmlprivate.h index 6ab36a2..e5b1060 100644 --- a/src/declarative/qml/qmlprivate.h +++ b/src/declarative/qml/qmlprivate.h @@ -223,7 +223,7 @@ namespace QmlPrivate InstanceType(int); }; - template + template struct Define { static InstanceType instance; }; diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 051003f..bd4c6f7 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -648,7 +648,7 @@ void QmlAbstractAnimation::timelineComplete() \class QmlPauseAnimation */ -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PauseAnimation,QmlPauseAnimation) +QML_DEFINE_TYPE(Qt,4,6,PauseAnimation,QmlPauseAnimation) QmlPauseAnimation::QmlPauseAnimation(QObject *parent) : QmlAbstractAnimation(*(new QmlPauseAnimationPrivate), parent) { @@ -760,7 +760,7 @@ void QmlColorAnimation::setTo(const QColor &t) QmlPropertyAnimation::setTo(t); } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ColorAnimation,QmlColorAnimation) +QML_DEFINE_TYPE(Qt,4,6,ColorAnimation,QmlColorAnimation) /*! \qmlclass ScriptAction QmlScriptAction @@ -866,7 +866,7 @@ QAbstractAnimation *QmlScriptAction::qtAnimation() return d->rsa; } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ScriptAction,QmlScriptAction) +QML_DEFINE_TYPE(Qt,4,6,ScriptAction,QmlScriptAction) /*! \qmlclass PropertyAction QmlPropertyAction @@ -1073,7 +1073,7 @@ void QmlPropertyAction::transition(QmlStateActions &actions, d->target = 0; } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PropertyAction,QmlPropertyAction) +QML_DEFINE_TYPE(Qt,4,6,PropertyAction,QmlPropertyAction) /*! \qmlclass ParentAction QmlParentAction @@ -1212,7 +1212,7 @@ void QmlParentAction::transition(QmlStateActions &actions, } } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParentAction,QmlParentAction) +QML_DEFINE_TYPE(Qt,4,6,ParentAction,QmlParentAction) /*! \qmlclass NumberAnimation QmlNumberAnimation @@ -1275,7 +1275,7 @@ void QmlNumberAnimation::setTo(qreal t) QmlPropertyAnimation::setTo(t); } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,NumberAnimation,QmlNumberAnimation) +QML_DEFINE_TYPE(Qt,4,6,NumberAnimation,QmlNumberAnimation) QmlAnimationGroup::QmlAnimationGroup(QObject *parent) : QmlAbstractAnimation(*(new QmlAnimationGroupPrivate), parent) @@ -1365,7 +1365,7 @@ void QmlSequentialAnimation::transition(QmlStateActions &actions, } } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,SequentialAnimation,QmlSequentialAnimation) +QML_DEFINE_TYPE(Qt,4,6,SequentialAnimation,QmlSequentialAnimation) /*! \qmlclass ParallelAnimation QmlParallelAnimation @@ -1437,7 +1437,7 @@ void QmlParallelAnimation::transition(QmlStateActions &actions, } } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParallelAnimation,QmlParallelAnimation) +QML_DEFINE_TYPE(Qt,4,6,ParallelAnimation,QmlParallelAnimation) //convert a variant from string type to another animatable type void QmlPropertyAnimationPrivate::convertVariant(QVariant &variant, int type) @@ -2013,6 +2013,6 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions, d->target = 0; } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PropertyAnimation,QmlPropertyAnimation) +QML_DEFINE_TYPE(Qt,4,6,PropertyAnimation,QmlPropertyAnimation) QT_END_NAMESPACE diff --git a/src/declarative/util/qmlbind.cpp b/src/declarative/util/qmlbind.cpp index de6d48a..86c1b8b 100644 --- a/src/declarative/util/qmlbind.cpp +++ b/src/declarative/util/qmlbind.cpp @@ -63,7 +63,7 @@ public: QmlNullableValue value; }; -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Binding,QmlBind) +QML_DEFINE_TYPE(Qt,4,6,Binding,QmlBind) /*! \qmlclass Binding QmlBind \brief The Binding element allows arbitrary property bindings to be created. diff --git a/src/declarative/util/qmlconnection.cpp b/src/declarative/util/qmlconnection.cpp index 27ac374..db744f6 100644 --- a/src/declarative/util/qmlconnection.cpp +++ b/src/declarative/util/qmlconnection.cpp @@ -274,6 +274,6 @@ void QmlConnection::setSignal(const QString& sig) connectIfValid(); } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Connection,QmlConnection) +QML_DEFINE_TYPE(Qt,4,6,Connection,QmlConnection) QT_END_NAMESPACE diff --git a/src/declarative/util/qmleasefollow.cpp b/src/declarative/util/qmleasefollow.cpp index 5447c56..6bf3f82 100644 --- a/src/declarative/util/qmleasefollow.cpp +++ b/src/declarative/util/qmleasefollow.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,EaseFollow,QmlEaseFollow); +QML_DEFINE_TYPE(Qt,4,6,EaseFollow,QmlEaseFollow); class QmlEaseFollowPrivate : public QObjectPrivate { diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp index 17083db..afc6735 100644 --- a/src/declarative/util/qmllistmodel.cpp +++ b/src/declarative/util/qmllistmodel.cpp @@ -809,7 +809,7 @@ void QmlListModelParser::setCustomData(QObject *obj, const QByteArray &d) } } -QML_DEFINE_CUSTOM_TYPE(Qt, 4,6, (QT_VERSION&0x00ff00)>>8, ListModel, QmlListModel, QmlListModelParser) +QML_DEFINE_CUSTOM_TYPE(Qt, 4,6, ListModel, QmlListModel, QmlListModelParser) /*! \qmlclass ListElement @@ -822,7 +822,7 @@ class QmlListElement : public QObject { Q_OBJECT }; -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ListElement,QmlListElement) +QML_DEFINE_TYPE(Qt,4,6,ListElement,QmlListElement) static void dump(ModelNode *node, int ind) { diff --git a/src/declarative/util/qmlpackage.cpp b/src/declarative/util/qmlpackage.cpp index 4d7fa86..908b368 100644 --- a/src/declarative/util/qmlpackage.cpp +++ b/src/declarative/util/qmlpackage.cpp @@ -147,7 +147,7 @@ QmlPackageAttached *QmlPackage::qmlAttachedProperties(QObject *o) return new QmlPackageAttached(o); } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Package,QmlPackage) +QML_DEFINE_TYPE(Qt,4,6,Package,QmlPackage) QT_END_NAMESPACE diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp index 8ba4b25..dbf2bc4 100644 --- a/src/declarative/util/qmlpropertychanges.cpp +++ b/src/declarative/util/qmlpropertychanges.cpp @@ -392,6 +392,6 @@ void QmlPropertyChanges::setIsExplicit(bool e) d->isExplicit = e; } -QML_DEFINE_CUSTOM_TYPE(Qt, 4,6, (QT_VERSION&0x00ff00)>>8, PropertyChanges, QmlPropertyChanges, QmlPropertyChangesParser) +QML_DEFINE_CUSTOM_TYPE(Qt, 4,6, PropertyChanges, QmlPropertyChanges, QmlPropertyChangesParser) QT_END_NAMESPACE diff --git a/src/declarative/util/qmlspringfollow.cpp b/src/declarative/util/qmlspringfollow.cpp index e743aa5..4a7c8b3 100644 --- a/src/declarative/util/qmlspringfollow.cpp +++ b/src/declarative/util/qmlspringfollow.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,SpringFollow,QmlSpringFollow) +QML_DEFINE_TYPE(Qt,4,6,SpringFollow,QmlSpringFollow) class QmlSpringFollowPrivate : public QObjectPrivate { diff --git a/src/declarative/util/qmlstate.cpp b/src/declarative/util/qmlstate.cpp index ce4b540..7cc548f 100644 --- a/src/declarative/util/qmlstate.cpp +++ b/src/declarative/util/qmlstate.cpp @@ -151,7 +151,7 @@ QmlStateOperation::QmlStateOperation(QObjectPrivate &dd, QObject *parent) \sa {states-transitions}{States and Transitions} */ -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,State,QmlState) +QML_DEFINE_TYPE(Qt,4,6,State,QmlState) QmlState::QmlState(QObject *parent) : QObject(*(new QmlStatePrivate), parent) { diff --git a/src/declarative/util/qmlstategroup.cpp b/src/declarative/util/qmlstategroup.cpp index 2eb9dca..3cfc84a 100644 --- a/src/declarative/util/qmlstategroup.cpp +++ b/src/declarative/util/qmlstategroup.cpp @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG); -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,StateGroup,QmlStateGroup) +QML_DEFINE_TYPE(Qt,4,6,StateGroup,QmlStateGroup) class QmlStateGroupPrivate : public QObjectPrivate { diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp index ccb9a41..1b786d2 100644 --- a/src/declarative/util/qmlstateoperations.cpp +++ b/src/declarative/util/qmlstateoperations.cpp @@ -151,7 +151,7 @@ void QmlParentChangePrivate::doChange(QmlGraphicsItem *targetParent, QmlGraphics for the original and new parent). */ -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParentChange,QmlParentChange) +QML_DEFINE_TYPE(Qt,4,6,ParentChange,QmlParentChange) QmlParentChange::QmlParentChange(QObject *parent) : QmlStateOperation(*(new QmlParentChangePrivate), parent) { @@ -293,7 +293,7 @@ public: \qmlclass StateChangeScript QmlStateChangeScript \brief The StateChangeScript element allows you to run a script in a state. */ -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,StateChangeScript,QmlStateChangeScript) +QML_DEFINE_TYPE(Qt,4,6,StateChangeScript,QmlStateChangeScript) QmlStateChangeScript::QmlStateChangeScript(QObject *parent) : QmlStateOperation(*(new QmlStateChangeScriptPrivate), parent) { @@ -360,7 +360,7 @@ QmlStateChangeScript::ActionList QmlStateChangeScript::actions() For more information on anchors see \l {anchor-layout}{Anchor Layouts}. */ -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,AnchorChanges,QmlAnchorChanges) +QML_DEFINE_TYPE(Qt,4,6,AnchorChanges,QmlAnchorChanges) class QmlAnchorChangesPrivate : public QObjectPrivate { diff --git a/src/declarative/util/qmlsystempalette.cpp b/src/declarative/util/qmlsystempalette.cpp index 32cb4cf..bb3ec70 100644 --- a/src/declarative/util/qmlsystempalette.cpp +++ b/src/declarative/util/qmlsystempalette.cpp @@ -52,7 +52,7 @@ public: QPalette::ColorGroup group; }; -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,SystemPalette,QmlSystemPalette) +QML_DEFINE_TYPE(Qt,4,6,SystemPalette,QmlSystemPalette) /*! \qmlclass SystemPalette QmlSystemPalette diff --git a/src/declarative/util/qmltimer.cpp b/src/declarative/util/qmltimer.cpp index 2e844be..0aa0747 100644 --- a/src/declarative/util/qmltimer.cpp +++ b/src/declarative/util/qmltimer.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Timer,QmlTimer) +QML_DEFINE_TYPE(Qt,4,6,Timer,QmlTimer) class QmlTimerPrivate : public QObjectPrivate { diff --git a/src/declarative/util/qmltransition.cpp b/src/declarative/util/qmltransition.cpp index a5f4b67..d61359d 100644 --- a/src/declarative/util/qmltransition.cpp +++ b/src/declarative/util/qmltransition.cpp @@ -137,7 +137,7 @@ void ParallelAnimationWrapper::updateState(QAbstractAnimation::State oldState, Q } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Transition,QmlTransition) +QML_DEFINE_TYPE(Qt,4,6,Transition,QmlTransition) QmlTransition::QmlTransition(QObject *parent) : QObject(*(new QmlTransitionPrivate), parent) { diff --git a/src/declarative/widgets/graphicslayouts.cpp b/src/declarative/widgets/graphicslayouts.cpp index 9c7e919..9658049 100644 --- a/src/declarative/widgets/graphicslayouts.cpp +++ b/src/declarative/widgets/graphicslayouts.cpp @@ -48,9 +48,9 @@ QT_BEGIN_NAMESPACE QML_DEFINE_INTERFACE(QGraphicsLayoutItem) QML_DEFINE_INTERFACE(QGraphicsLayout) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,QGraphicsLinearLayoutStretchItem,QGraphicsLinearLayoutStretchItemObject) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,QGraphicsLinearLayout,QGraphicsLinearLayoutObject) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,QGraphicsGridLayout,QGraphicsGridLayoutObject) +QML_DEFINE_TYPE(Qt,4,6,QGraphicsLinearLayoutStretchItem,QGraphicsLinearLayoutStretchItemObject) +QML_DEFINE_TYPE(Qt,4,6,QGraphicsLinearLayout,QGraphicsLinearLayoutObject) +QML_DEFINE_TYPE(Qt,4,6,QGraphicsGridLayout,QGraphicsGridLayoutObject) class LinearLayoutAttached : public QObject { diff --git a/src/declarative/widgets/graphicswidgets.cpp b/src/declarative/widgets/graphicswidgets.cpp index 8f61999..5678520 100644 --- a/src/declarative/widgets/graphicswidgets.cpp +++ b/src/declarative/widgets/graphicswidgets.cpp @@ -162,9 +162,9 @@ private: QmlConcreteList _data; }; -QML_DEFINE_EXTENDED_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,QGraphicsView,QGraphicsView,QGraphicsViewDeclarativeUI) -QML_DEFINE_EXTENDED_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,QGraphicsScene,QGraphicsScene,QGraphicsSceneDeclarativeUI) -QML_DEFINE_EXTENDED_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,QGraphicsWidget,QGraphicsWidget,QGraphicsWidgetDeclarativeUI) +QML_DEFINE_EXTENDED_TYPE(Qt,4,6,QGraphicsView,QGraphicsView,QGraphicsViewDeclarativeUI) +QML_DEFINE_EXTENDED_TYPE(Qt,4,6,QGraphicsScene,QGraphicsScene,QGraphicsSceneDeclarativeUI) +QML_DEFINE_EXTENDED_TYPE(Qt,4,6,QGraphicsWidget,QGraphicsWidget,QGraphicsWidgetDeclarativeUI) QML_DEFINE_INTERFACE(QGraphicsItem) diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index f72aa8a..9856b1a 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -3251,10 +3251,13 @@ void QGraphicsView::paintEvent(QPaintEvent *event) // Determine the exposed region d->exposedRegion = event->region(); + if (d->exposedRegion.isEmpty()) + d->exposedRegion = viewport()->rect(); QRectF exposedSceneRect = mapToScene(d->exposedRegion.boundingRect()).boundingRect(); // Set up the painter QPainter painter(viewport()); + painter.setClipRect(exposedSceneRect, Qt::IntersectClip); #ifndef QT_NO_RUBBERBAND if (d->rubberBanding && !d->rubberBandRect.isEmpty()) painter.save(); diff --git a/tests/auto/declarative/qmlecmascript/testtypes.cpp b/tests/auto/declarative/qmlecmascript/testtypes.cpp index 9af8ed7..df0cb18 100644 --- a/tests/auto/declarative/qmlecmascript/testtypes.cpp +++ b/tests/auto/declarative/qmlecmascript/testtypes.cpp @@ -72,11 +72,11 @@ private: int m_value; }; -QML_DEFINE_TYPE(Qt.test, 1, 0, 0, MyQmlObject,MyQmlObject); -QML_DEFINE_TYPE(Qt.test, 1, 0, 0, MyDeferredObject,MyDeferredObject); -QML_DEFINE_TYPE(Qt.test, 1, 0, 0, MyQmlContainer,MyQmlContainer); -QML_DEFINE_EXTENDED_TYPE(Qt.test, 1, 0, 0, MyBaseExtendedObject,MyBaseExtendedObject,BaseExtensionObject); -QML_DEFINE_EXTENDED_TYPE(Qt.test, 1, 0, 0, MyExtendedObject,MyExtendedObject,ExtensionObject); -QML_DEFINE_TYPE(Qt.test, 1, 0, 0, MyTypeObject, MyTypeObject); +QML_DEFINE_TYPE(Qt.test, 1,0, MyQmlObject,MyQmlObject); +QML_DEFINE_TYPE(Qt.test, 1,0, MyDeferredObject,MyDeferredObject); +QML_DEFINE_TYPE(Qt.test, 1,0, MyQmlContainer,MyQmlContainer); +QML_DEFINE_EXTENDED_TYPE(Qt.test, 1,0, MyBaseExtendedObject,MyBaseExtendedObject,BaseExtensionObject); +QML_DEFINE_EXTENDED_TYPE(Qt.test, 1,0, MyExtendedObject,MyExtendedObject,ExtensionObject); +QML_DEFINE_TYPE(Qt.test, 1,0, MyTypeObject, MyTypeObject); #include "testtypes.moc" diff --git a/tests/auto/declarative/qmllanguage/data/lib/com/nokia/installedtest/qmldir b/tests/auto/declarative/qmllanguage/data/lib/com/nokia/installedtest/qmldir index ba0b42a..30c2d4e 100644 --- a/tests/auto/declarative/qmllanguage/data/lib/com/nokia/installedtest/qmldir +++ b/tests/auto/declarative/qmllanguage/data/lib/com/nokia/installedtest/qmldir @@ -1,3 +1,3 @@ -InstalledTest 1.0-3 InstalledTest.qml -InstalledTest 1.4 InstalledTest2.qml Rectangle 1.5 InstalledTest2.qml +InstalledTest 1.4 InstalledTest2.qml +InstalledTest 1.0 InstalledTest.qml diff --git a/tests/auto/declarative/qmllanguage/testtypes.cpp b/tests/auto/declarative/qmllanguage/testtypes.cpp index 8b1ab59..c370c09 100644 --- a/tests/auto/declarative/qmllanguage/testtypes.cpp +++ b/tests/auto/declarative/qmllanguage/testtypes.cpp @@ -41,10 +41,10 @@ #include "testtypes.h" QML_DEFINE_INTERFACE(MyInterface); -QML_DEFINE_TYPE(Test,1,0,0,MyQmlObject,MyQmlObject); -QML_DEFINE_TYPE(Test,1,0,0,MyTypeObject,MyTypeObject); -QML_DEFINE_TYPE(Test,1,0,0,MyContainer,MyContainer); -QML_DEFINE_TYPE(Test,1,0,0,MyPropertyValueSource,MyPropertyValueSource); -QML_DEFINE_TYPE(Test,1,0,0,MyDotPropertyObject,MyDotPropertyObject); -QML_DEFINE_TYPE(Test,1,0,0,MyNamespacedType,MyNamespace::MyNamespacedType); +QML_DEFINE_TYPE(Test,1,0,MyQmlObject,MyQmlObject); +QML_DEFINE_TYPE(Test,1,0,MyTypeObject,MyTypeObject); +QML_DEFINE_TYPE(Test,1,0,MyContainer,MyContainer); +QML_DEFINE_TYPE(Test,1,0,MyPropertyValueSource,MyPropertyValueSource); +QML_DEFINE_TYPE(Test,1,0,MyDotPropertyObject,MyDotPropertyObject); +QML_DEFINE_TYPE(Test,1,0,MyNamespacedType,MyNamespace::MyNamespacedType); QML_DEFINE_NOCREATE_TYPE(MyGroupedObject); diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp index c82aa4d..0fa36a1 100644 --- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp +++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp @@ -890,11 +890,11 @@ void tst_qmllanguage::testType(const QString& qml, const QString& type) QML_DECLARE_TYPE(TestType) QML_DECLARE_TYPE(TestType2) -QML_DEFINE_TYPE(com.nokia.Test, 1, 0, 3, Test, TestType) -QML_DEFINE_TYPE(com.nokia.Test, 1, 5, 7, Test, TestType) -QML_DEFINE_TYPE(com.nokia.Test, 1, 8, 9, Test, TestType2) -QML_DEFINE_TYPE(com.nokia.Test, 1, 12, 13, Test, TestType2) -QML_DEFINE_TYPE(com.nokia.Test, 1, 9, 11, OldTest, TestType) +QML_DEFINE_TYPE(com.nokia.Test, 1, 0, Test, TestType) +QML_DEFINE_TYPE(com.nokia.Test, 1, 5, Test, TestType) +QML_DEFINE_TYPE(com.nokia.Test, 1, 8, Test, TestType2) +QML_DEFINE_TYPE(com.nokia.Test, 1, 9, OldTest, TestType) +QML_DEFINE_TYPE(com.nokia.Test, 1, 12, Test, TestType2) // Import tests (QT-558) @@ -937,10 +937,6 @@ void tst_qmllanguage::importsBuiltin_data() << "import com.nokia.Test 1.3\n" "Test {}" << "TestType"; - QTest::newRow("not in version 1.4") - << "import com.nokia.Test 1.4\n" - "Test {}" - << ""; QTest::newRow("in version 1.5") << "import com.nokia.Test 1.5\n" "Test {}" @@ -949,11 +945,7 @@ void tst_qmllanguage::importsBuiltin_data() << "import com.nokia.Test 1.8\n" "Test {}" << "TestType2"; - QTest::newRow("not in version 1.10") - << "import com.nokia.Test 1.10\n" - "Test {}" - << ""; - QTest::newRow("back in version 1.12") + QTest::newRow("in version 1.12") << "import com.nokia.Test 1.12\n" "Test {}" << "TestType2"; @@ -965,10 +957,6 @@ void tst_qmllanguage::importsBuiltin_data() << "import com.nokia.Test 1.11\n" "OldTest {}" << "TestType"; - QTest::newRow("no old in version 1.12") - << "import com.nokia.Test 1.12\n" - "OldTest {}" - << ""; QTest::newRow("multiversion 1") << "import com.nokia.Test 1.11\n" "import com.nokia.Test 1.12\n" @@ -989,11 +977,6 @@ void tst_qmllanguage::importsBuiltin_data() "import com.nokia.Test 1.8 as T8\n" "T8.Test {}" << "TestType2"; - QTest::newRow("qualified multiversion 5") - << "import com.nokia.Test 1.0 as T0\n" - "import com.nokia.Test 1.10 as T10\n" - "T10.Test {}" - << ""; } void tst_qmllanguage::importsBuiltin() @@ -1069,9 +1052,17 @@ void tst_qmllanguage::importsInstalled_data() "InstalledTest {}" << "QmlGraphicsRectangle"; QTest::newRow("installed import 2") + << "import com.nokia.installedtest 1.3\n" + "InstalledTest {}" + << "QmlGraphicsRectangle"; + QTest::newRow("installed import 3") << "import com.nokia.installedtest 1.4\n" "InstalledTest {}" << "QmlGraphicsText"; + QTest::newRow("installed import 4") + << "import com.nokia.installedtest 1.10\n" + "InstalledTest {}" + << "QmlGraphicsText"; QTest::newRow("installed import visibility") // QT-614 << "import com.nokia.installedtest 1.4\n" "PrivateType {}" diff --git a/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp b/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp index 7fbffdb..d6e88b5 100644 --- a/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp +++ b/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp @@ -54,7 +54,7 @@ public: }; QML_DECLARE_TYPE(MyQmlObject); -QML_DEFINE_TYPE(Test,1,0,0,MyQmlObject,MyQmlObject); +QML_DEFINE_TYPE(Test,1,0,MyQmlObject,MyQmlObject); class MyContainer : public QObject { @@ -73,7 +73,7 @@ private: }; QML_DECLARE_TYPE(MyContainer); -QML_DEFINE_TYPE(Test,1,0,0,MyContainer,MyContainer); +QML_DEFINE_TYPE(Test,1,0,MyContainer,MyContainer); class tst_qmlmetaproperty : public QObject { diff --git a/tests/auto/declarative/states/tst_states.cpp b/tests/auto/declarative/states/tst_states.cpp index a215ed8..f67c737 100644 --- a/tests/auto/declarative/states/tst_states.cpp +++ b/tests/auto/declarative/states/tst_states.cpp @@ -317,7 +317,7 @@ Q_SIGNALS: }; QML_DECLARE_TYPE(MyRect) -QML_DEFINE_TYPE(Qt.test, 1, 0, 0, MyRectangle,MyRect); +QML_DEFINE_TYPE(Qt.test, 1, 0, MyRectangle,MyRect); void tst_states::signalOverride() { diff --git a/tools/qmlviewer/qfxtester.cpp b/tools/qmlviewer/qfxtester.cpp index dfa628d..802a927 100644 --- a/tools/qmlviewer/qfxtester.cpp +++ b/tools/qmlviewer/qfxtester.cpp @@ -52,10 +52,10 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt.VisualTest, 4, 6, (QT_VERSION&0x00ff00)>>8, VisualTest, QmlGraphicsVisualTest); -QML_DEFINE_TYPE(Qt.VisualTest, 4, 6, (QT_VERSION&0x00ff00)>>8, Frame, QmlGraphicsVisualTestFrame); -QML_DEFINE_TYPE(Qt.VisualTest, 4, 6, (QT_VERSION&0x00ff00)>>8, Mouse, QmlGraphicsVisualTestMouse); -QML_DEFINE_TYPE(Qt.VisualTest, 4, 6, (QT_VERSION&0x00ff00)>>8, Key, QmlGraphicsVisualTestKey); +QML_DEFINE_TYPE(Qt.VisualTest, 4,6, VisualTest, QmlGraphicsVisualTest); +QML_DEFINE_TYPE(Qt.VisualTest, 4,6, Frame, QmlGraphicsVisualTestFrame); +QML_DEFINE_TYPE(Qt.VisualTest, 4,6, Mouse, QmlGraphicsVisualTestMouse); +QML_DEFINE_TYPE(Qt.VisualTest, 4,6, Key, QmlGraphicsVisualTestKey); QmlGraphicsTester::QmlGraphicsTester(const QString &script, QmlViewer::ScriptOptions opts, QmlView *parent) -- cgit v0.12