aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktest.cpp
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-01-31 16:52:36 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-03 00:39:18 +0100
commit01dc7e2ea476e0e6dcdce2e72979bbc858f4057d (patch)
treed8796f7695bbf8ad42abf47cd84c1b5e000ef795 /src/qmltest/quicktest.cpp
parent5e07b57b818326da47a46d384415041fa4cea0ba (diff)
Remove QtQuick1 elements from qtdeclarative
QtQuick1 is now contained in a separate repository. Task-number: QTBUG-23737 Change-Id: I09eae67af5693a22b896b916f816f73ccc3a89b1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/qmltest/quicktest.cpp')
-rw-r--r--src/qmltest/quicktest.cpp44
1 files changed, 2 insertions, 42 deletions
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp
index dbc4fc75a1..28033785ba 100644
--- a/src/qmltest/quicktest.cpp
+++ b/src/qmltest/quicktest.cpp
@@ -45,7 +45,6 @@
#include "qtestoptions_p.h"
#include <QApplication>
#include <QtDeclarative/qdeclarative.h>
-#include <QtQuick1/qdeclarativeview.h>
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecontext.h>
#if defined(QML_VERSION) && QML_VERSION >= 0x020000
@@ -331,47 +330,8 @@ int quick_test_main(int argc, char **argv, const char *name, quick_test_viewport
} else
#endif
{
- foreach (QString file, files) {
- QFileInfo fi(file);
- if (!fi.exists())
- continue;
- QDeclarativeView view;
- QTestRootObject rootobj;
- QEventLoop eventLoop;
- QObject::connect(view.engine(), SIGNAL(quit()),
- &rootobj, SLOT(quit()));
- QObject::connect(view.engine(), SIGNAL(quit()),
- &eventLoop, SLOT(quit()));
- if (createViewport)
- view.setViewport((*createViewport)());
- view.rootContext()->setContextProperty
- (QLatin1String("qtest"), &rootobj);
- foreach (QString path, imports)
- view.engine()->addImportPath(path);
- QString path = fi.absoluteFilePath();
- if (path.startsWith(QLatin1String(":/")))
- view.setSource(QUrl(QLatin1String("qrc:") + path.mid(2)));
- else
- view.setSource(QUrl::fromLocalFile(path));
- if (QTest::printAvailableFunctions)
- continue;
- if (view.status() == QDeclarativeView::Error) {
- // Error compiling the test - flag failure in the log and continue.
- handleCompileErrors(fi, view);
- continue;
- }
- if (!rootobj.hasQuit) {
- // If the test already quit, then it was performed
- // synchronously during setSource(). Otherwise it is
- // an asynchronous test and we need to show the window
- // and wait for the quit indication.
- view.show();
- QTest::qWaitForWindowShown(&view);
- rootobj.setWindowShown(true);
- if (!rootobj.hasQuit)
- eventLoop.exec();
- }
- }
+ qWarning("No suitable QtQuick1 implementation is available!");
+ return 1;
}
// Flush the current logging stream.