summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2011-09-16 14:07:05 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-19 10:24:25 +0200
commitb8d656d8787aaa5fd15d9646882a77ca818b80bd (patch)
treec638bd0714cfced7549818a86bc4d46dd085353f /tests/auto/gui
parent39a6ff81bc1d606e078a06316414829221a02024 (diff)
Fix autotest gui/widgets dependencies
This is in preparation of removing testlib's dependency on QtGui and QtWidgets. Autotests that need QtWidgets api must explicitly include it (since the types are no longer provided by the QtGui master header). Autotests that don't need QtGui or QtWidgets api shouldn't link against those libraries. Change-Id: I2808289068514fcac582808828ad4634e2631733 Reviewed-on: http://codereview.qt-project.org/5093 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/qfileopenevent.pro1
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp2
-rw-r--r--tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp1
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp1
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp2
-rw-r--r--tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp4
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp2
7 files changed, 9 insertions, 4 deletions
diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopenevent.pro b/tests/auto/gui/kernel/qfileopenevent/qfileopenevent.pro
index 73724828db..45978d7b7e 100644
--- a/tests/auto/gui/kernel/qfileopenevent/qfileopenevent.pro
+++ b/tests/auto/gui/kernel/qfileopenevent/qfileopenevent.pro
@@ -1,3 +1,2 @@
TEMPLATE = subdirs
-QT += widgets
SUBDIRS = test qfileopeneventexternal
diff --git a/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp b/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
index 69cc4ccc01..3916f420a6 100644
--- a/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
+++ b/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <QtTest/QtTest>
-#include <QEvent>
+#include <QtGui/qevent.h>
#ifdef Q_OS_SYMBIAN
#include <apgcli.h>
diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
index 401f79cbc2..d76265c42a 100644
--- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
+++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include <QtGui>
+#include <QtWidgets>
#include <QtTest>
class tst_QTouchEventWidget : public QWidget
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index c2c9002023..2bb99f6a5f 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -44,6 +44,7 @@
#include "../../../../shared/util.h"
#include <qpainter.h>
+#include <qdrawutil.h>
#include <qapplication.h>
#include <qwidget.h>
#include <qfontmetrics.h>
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
index 1e82431a48..f2ff30f591 100644
--- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
@@ -43,6 +43,8 @@
#if defined(Q_OS_WINCE)
#include <QtGui/QFontDatabase>
#endif
+#include <QtGui/QFontInfo>
+#include <QtGui/QFontMetrics>
//TESTED_CLASS=QCss
//TESTED_FILES=gui/text/qcssparser.cpp gui/text/qcssparser_p.h
diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
index 1df61d0a06..5e3aacf37e 100644
--- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
+++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
@@ -44,6 +44,8 @@
#include <qfontdatabase.h>
+#include <qfontinfo.h>
+#include <qfontmetrics.h>
#ifdef Q_OS_SYMBIAN
#define SRCDIR "."
@@ -232,7 +234,7 @@ void tst_QFontDatabase::addAppFont_data()
void tst_QFontDatabase::addAppFont()
{
QFETCH(bool, useMemoryFont);
- QSignalSpy fontDbChangedSpy(QApplication::instance(), SIGNAL(fontDatabaseChanged()));
+ QSignalSpy fontDbChangedSpy(QGuiApplication::instance(), SIGNAL(fontDatabaseChanged()));
QFontDatabase db;
diff --git a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
index 68c7a285ef..79d01d8842 100644
--- a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
+++ b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
@@ -2469,7 +2469,7 @@ void tst_QTextDocumentFragment::html_anchorColor()
setHtml("<span style=\"color: red;\"><a href=\"http://www.kde.org/\">Blue</a></span>");
cursor.movePosition(QTextCursor::Start);
cursor.movePosition(QTextCursor::NextCharacter);
- QVERIFY(cursor.charFormat().foreground().color() == QApplication::palette().link().color());
+ QVERIFY(cursor.charFormat().foreground().color() == QGuiApplication::palette().link().color());
setHtml("<span style=\"color: red;\"><a href=\"http://www.kde.org/\" style=\"color: yellow;\">Green</a></span>");
cursor.movePosition(QTextCursor::Start);