From 5e9fd297dc7fdc0a96809d3533e6fada4a31fb62 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 8 Apr 2010 16:26:11 +1000 Subject: Add running of examples to quality gate. Fix broken examples too. --- demos/declarative/photoviewer/photoviewer.qml | 2 +- demos/declarative/samegame/samegame.qml | 2 +- examples/declarative/focus/Core/qmldir | 2 +- examples/declarative/focus/focus.qml | 2 +- tests/auto/declarative/declarative.pro | 3 ++- tests/auto/declarative/examples/tst_examples.cpp | 4 ++-- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/demos/declarative/photoviewer/photoviewer.qml b/demos/declarative/photoviewer/photoviewer.qml index 569e1ba..4094294 100644 --- a/demos/declarative/photoviewer/photoviewer.qml +++ b/demos/declarative/photoviewer/photoviewer.qml @@ -1,5 +1,5 @@ import Qt 4.7 -import "PhotoViewerCore" 1.0 +import "PhotoViewerCore" Rectangle { id: mainWindow diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index 9c3e26d..94f5c24 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -1,5 +1,5 @@ import Qt 4.7 -import "SamegameCore" 1.0 +import "SamegameCore" import "SamegameCore/samegame.js" as Logic Rectangle { diff --git a/examples/declarative/focus/Core/qmldir b/examples/declarative/focus/Core/qmldir index 0460d9c..e25d63c 100644 --- a/examples/declarative/focus/Core/qmldir +++ b/examples/declarative/focus/Core/qmldir @@ -1,4 +1,4 @@ ContextMenu ContextMenu.qml GridMenu GridMenu.qml -ListViews Listviews.qml +ListViews ListViews.qml ListViewDelegate ListViewDelegate.qml diff --git a/examples/declarative/focus/focus.qml b/examples/declarative/focus/focus.qml index b9a11a6..d9b6549 100644 --- a/examples/declarative/focus/focus.qml +++ b/examples/declarative/focus/focus.qml @@ -1,5 +1,5 @@ import Qt 4.7 -import "Core" 1.0 +import "Core" Rectangle { id: window; width: 800; height: 480; color: "#3E606F" diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index 11d7c13..5441311 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -1,5 +1,6 @@ TEMPLATE = subdirs SUBDIRS += \ + examples \ graphicswidgets \ # Cover parserstress \ # Cover qmetaobjectbuilder \ # Cover @@ -62,7 +63,7 @@ SUBDIRS += \ qdeclarativeimageprovider \ # Cover qdeclarativestyledtext \ # Cover sql \ # Cover - qmlvisual + qmlvisual # Cover contains(QT_CONFIG, webkit) { SUBDIRS += \ diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp index 678dd59..dbd1f92 100644 --- a/tests/auto/declarative/examples/tst_examples.cpp +++ b/tests/auto/declarative/examples/tst_examples.cpp @@ -185,10 +185,10 @@ void tst_examples::examples() QFileInfo fi(file); QFileInfo dir(fi.path()); - QString script = "data/"+dir.baseName()+"/"+fi.baseName(); + QString script = SRCDIR "/data/"+dir.baseName()+"/"+fi.baseName(); QFileInfo testdata(script+".qml"); QStringList arguments; - arguments << "-script" << (testdata.exists() ? script : QLatin1String("data/dummytest")) + arguments << "-script" << (testdata.exists() ? script : QLatin1String(SRCDIR "/data/dummytest")) << "-scriptopts" << "play,testerror,exitoncomplete,exitonfailure" << file; QProcess p; -- cgit v0.12