From 6db08d1cfeb70bff5a114579fb2bfbde81310b64 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 10 Mar 2010 15:26:57 +1000 Subject: Use no-version-specified to mean any version (used to work, fixed again, was only working with -1.-1 which looks silly) --- demos/declarative/flickr/common/qmldir | 20 ++++++++++---------- demos/declarative/samegame/SamegameCore/qmldir | 6 +++--- src/declarative/qml/qdeclarativedirparser.cpp | 5 ++++- .../qtest/declarative/qmllanguage/qmldir | 6 +++--- .../qtest/declarative/qmllanguage/subdir/qmldir | 2 +- 5 files changed, 21 insertions(+), 18 deletions(-) diff --git a/demos/declarative/flickr/common/qmldir b/demos/declarative/flickr/common/qmldir index 0c94f60..adc2479 100644 --- a/demos/declarative/flickr/common/qmldir +++ b/demos/declarative/flickr/common/qmldir @@ -1,10 +1,10 @@ -ImageDetails 0.0 ImageDetails.qml -LikeOMeter 0.0 LikeOMeter.qml -Loading 0.0 Loading.qml -MediaButton 0.0 MediaButton.qml -MediaLineEdit 0.0 MediaLineEdit.qml -Progress 0.0 Progress.qml -RssModel 0.0 RssModel.qml -ScrollBar 0.0 ScrollBar.qml -Slider 0.0 Slider.qml -Star 0.0 Star.qml +ImageDetails ImageDetails.qml +LikeOMeter LikeOMeter.qml +Loading Loading.qml +MediaButton MediaButton.qml +MediaLineEdit MediaLineEdit.qml +Progress Progress.qml +RssModel RssModel.qml +ScrollBar ScrollBar.qml +Slider Slider.qml +Star Star.qml diff --git a/demos/declarative/samegame/SamegameCore/qmldir b/demos/declarative/samegame/SamegameCore/qmldir index a8f8a98..e17b1f5 100644 --- a/demos/declarative/samegame/SamegameCore/qmldir +++ b/demos/declarative/samegame/SamegameCore/qmldir @@ -1,3 +1,3 @@ -BoomBlock 0.0 BoomBlock.qml -Button 0.0 Button.qml -Dialog 0.0 Dialog.qml +BoomBlock BoomBlock.qml +Button Button.qml +Dialog Dialog.qml diff --git a/src/declarative/qml/qdeclarativedirparser.cpp b/src/declarative/qml/qdeclarativedirparser.cpp index e730b92..b6d2115 100644 --- a/src/declarative/qml/qdeclarativedirparser.cpp +++ b/src/declarative/qml/qdeclarativedirparser.cpp @@ -151,13 +151,16 @@ bool QDeclarativeDirParser::parse() _plugins.append(entry); + } else if (sectionCount == 2) { + // No version specified (should only be used for relative qmldir files) + const Component entry(sections[0], sections[1], -1, -1); + _components.append(entry); } else if (sectionCount == 3) { const QString &version = sections[1]; const int dotIndex = version.indexOf(QLatin1Char('.')); if (dotIndex == -1) { qWarning() << "expected '.'"; // ### use reportError - } else if (version.indexOf(QLatin1Char('.'), dotIndex + 1) != -1) { qWarning() << "unexpected '.'"; // ### use reportError diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir index b32f82b..303c5c8 100644 --- a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir +++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir @@ -1,3 +1,3 @@ -Test 0.0 Test.qml -TestSubDir 0.0 TestSubDir.qml -TestLocal 0.0 TestLocal.qml +Test Test.qml +TestSubDir TestSubDir.qml +TestLocal TestLocal.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/qmldir b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/qmldir index f7016c7..a54f7df 100644 --- a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/qmldir +++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/qmldir @@ -1 +1 @@ -SubTest 0.0 SubTest.qml +SubTest SubTest.qml -- cgit v0.12