summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-05-07 04:41:00 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-05-07 04:41:23 (GMT)
commit32c2d17680a04fced714aa103b40d7de24d9eb26 (patch)
tree3cf2eae8c3038a4800f033b05cf43b88e1b33163
parent60a06af7200217aa16c8c130a1ed0afce31812ed (diff)
downloadQt-32c2d17680a04fced714aa103b40d7de24d9eb26.zip
Qt-32c2d17680a04fced714aa103b40d7de24d9eb26.tar.gz
Qt-32c2d17680a04fced714aa103b40d7de24d9eb26.tar.bz2
Fix autotests
-rw-r--r--src/imports/imports.pro2
-rw-r--r--tests/auto/declarative/declarative.pro1
-rw-r--r--tests/auto/declarative/examples/tst_examples.cpp23
-rw-r--r--tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml52
-rw-r--r--tests/auto/declarative/graphicswidgets/graphicswidgets.pro10
-rw-r--r--tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp74
6 files changed, 9 insertions, 153 deletions
diff --git a/src/imports/imports.pro b/src/imports/imports.pro
index 1754908..a9d600e 100644
--- a/src/imports/imports.pro
+++ b/src/imports/imports.pro
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
-SUBDIRS += particles
+SUBDIRS += particles gestures
contains(QT_CONFIG, webkit): SUBDIRS += webkit
contains(QT_CONFIG, mediaservices): SUBDIRS += multimedia
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 05c4c26..a9b069c 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -1,7 +1,6 @@
TEMPLATE = subdirs
SUBDIRS += \
examples \
- graphicswidgets \ # Cover
parserstress \ # Cover
qmetaobjectbuilder \ # Cover
qdeclarativeanimations \ # Cover
diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp
index 4f10a98..3759cb5 100644
--- a/tests/auto/declarative/examples/tst_examples.cpp
+++ b/tests/auto/declarative/examples/tst_examples.cpp
@@ -80,16 +80,6 @@ tst_examples::tst_examples()
// Add directories you want excluded here
- excludedDirs << "examples/declarative/extending";
- excludedDirs << "examples/declarative/tutorials/extending";
- excludedDirs << "examples/declarative/plugins";
- excludedDirs << "examples/declarative/proxywidgets";
- excludedDirs << "examples/declarative/gestures";
-
- excludedDirs << "examples/declarative/imageprovider";
- excludedDirs << "examples/declarative/layouts/graphicsLayouts";
- excludedDirs << "demos/declarative/minehunt";
-
excludedDirs << "doc/src/snippets/declarative/graphicswidgets";
#ifdef QT_NO_WEBKIT
@@ -160,11 +150,14 @@ QStringList tst_examples::findQmlFiles(const QDir &d)
QStringList rv;
- QStringList files = d.entryList(QStringList() << QLatin1String("*.qml"),
- QDir::Files);
- foreach (const QString &file, files) {
- if (file.at(0).isLower()) {
- rv << d.absoluteFilePath(file);
+ QStringList cppfiles = d.entryList(QStringList() << QLatin1String("*.cpp"), QDir::Files);
+ if (cppfiles.isEmpty()) {
+ QStringList files = d.entryList(QStringList() << QLatin1String("*.qml"),
+ QDir::Files);
+ foreach (const QString &file, files) {
+ if (file.at(0).isLower()) {
+ rv << d.absoluteFilePath(file);
+ }
}
}
diff --git a/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml b/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
deleted file mode 100644
index d6cf4de..0000000
--- a/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-import Qt 4.7
-import Qt.widgets 4.7
-
-QGraphicsWidget {
- geometry: "20,0,600x400"
- layout: QGraphicsLinearLayout {
- orientation: Qt.Horizontal
- QGraphicsWidget {
- layout: QGraphicsLinearLayout {
- spacing: 10; orientation: Qt.Vertical
- LayoutItem {
- QGraphicsLinearLayout.stretchFactor: 1
- QGraphicsLinearLayout.spacing: 1
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "yellow"; anchors.fill: parent }
- }
- LayoutItem {
- QGraphicsLinearLayout.stretchFactor: 10
- QGraphicsLinearLayout.spacing: 10
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "blue"; anchors.fill: parent }
- }
- }
- }
- QGraphicsWidget {
- layout: QGraphicsLinearLayout {
- spacing: 10; orientation: Qt.Horizontal; contentsMargin: 10
- LayoutItem {
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "red"; anchors.fill: parent }
- }
- LayoutItem {
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "green"; anchors.fill: parent }
- }
- }
- }
- }
-}
-
diff --git a/tests/auto/declarative/graphicswidgets/graphicswidgets.pro b/tests/auto/declarative/graphicswidgets/graphicswidgets.pro
deleted file mode 100644
index b77b430..0000000
--- a/tests/auto/declarative/graphicswidgets/graphicswidgets.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-load(qttest_p4)
-contains(QT_CONFIG,declarative): QT += declarative gui
-macx:CONFIG -= app_bundle
-
-SOURCES += tst_graphicswidgets.cpp
-
-# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
-
-CONFIG += parallel_test
diff --git a/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp b/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp
deleted file mode 100644
index f1a71d5..0000000
--- a/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <qtest.h>
-#include <QFile>
-#include <QtDeclarative/qdeclarativeengine.h>
-#include <QtDeclarative/qdeclarativecomponent.h>
-#include <QtGui/qgraphicswidget.h>
-
-class tst_graphicswidgets : public QObject
-
-{
- Q_OBJECT
-public:
- tst_graphicswidgets();
-
-private slots:
- void widgets();
-};
-
-tst_graphicswidgets::tst_graphicswidgets()
-{
-}
-
-void tst_graphicswidgets::widgets()
-{
- QDeclarativeEngine engine;
- QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/graphicswidgets.qml"));
- QGraphicsWidget *obj = qobject_cast<QGraphicsWidget*>(c.create());
-
- QVERIFY(obj != 0);
- delete obj;
-}
-
-QTEST_MAIN(tst_graphicswidgets)
-
-#include "tst_graphicswidgets.moc"