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>
This commit is contained in:
parent
39a6ff81bc
commit
b8d656d878
@ -45,12 +45,12 @@
|
||||
|
||||
#include <QtCore/QSettings>
|
||||
#include <private/qsettings_p.h>
|
||||
//#include <QtGui/QApplication>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QtGlobal>
|
||||
#include <QtCore/QMetaType>
|
||||
#include <QtCore/QtDebug>
|
||||
#include <QtCore/QString>
|
||||
#include <QtGui/QKeySequence>
|
||||
#include "../../../../shared/util.h"
|
||||
|
||||
#if !defined(Q_OS_SYMBIAN)
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtCore/QtCore>
|
||||
#include <QtSql/QtSql>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
/*
|
||||
|
@ -3313,7 +3313,7 @@ void tst_QObject::deleteQObjectWhenDeletingEvent()
|
||||
};
|
||||
|
||||
QObject o;
|
||||
QApplication::postEvent(&o, new MyEvent);
|
||||
QGuiApplication::postEvent(&o, new MyEvent);
|
||||
QCoreApplication::removePostedEvents(&o); // here you would get a deadlock
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
load(qttest_p4)
|
||||
QT = core
|
||||
SOURCES += tst_qlist.cpp
|
||||
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <stddef.h>
|
||||
|
@ -1,3 +1,2 @@
|
||||
TEMPLATE = subdirs
|
||||
QT += widgets
|
||||
SUBDIRS = test qfileopeneventexternal
|
||||
|
@ -40,7 +40,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QEvent>
|
||||
#include <QtGui/qevent.h>
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#include <apgcli.h>
|
||||
|
@ -40,6 +40,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
#include <QtTest>
|
||||
|
||||
class tst_QTouchEventWidget : public QWidget
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "../../../../shared/util.h"
|
||||
|
||||
#include <qpainter.h>
|
||||
#include <qdrawutil.h>
|
||||
#include <qapplication.h>
|
||||
#include <qwidget.h>
|
||||
#include <qfontmetrics.h>
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
|
||||
#include "modeltest.h"
|
||||
#include "dynamictreemodel.h"
|
||||
|
@ -44,6 +44,7 @@
|
||||
#ifndef Q_OS_WINCE
|
||||
#include "../../shared/util.h"
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
#include <math.h>
|
||||
|
||||
#if defined(Q_OS_WIN) && defined(interface)
|
||||
|
@ -47,6 +47,7 @@
|
||||
|
||||
#include "qabstracteventdispatcher.h"
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
|
||||
#include "private/qapplication_p.h"
|
||||
#include "private/qstylesheetstyle_p.h"
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtWidgets/QColorDialog>
|
||||
|
||||
#include "../../shared/util.h"
|
||||
|
||||
|
@ -38,11 +38,10 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include <QtGui>
|
||||
#include "qcompleter.h"
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
#include <QtDebug>
|
||||
#include <QPair>
|
||||
#include <QList>
|
||||
|
@ -39,6 +39,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
class tst_QDataWidgetMapper: public QObject
|
||||
|
@ -47,6 +47,10 @@
|
||||
#include <qwindowsstyle.h>
|
||||
#include <qsizepolicy.h>
|
||||
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QLineEdit>
|
||||
#include <QtWidgets/QPushButton>
|
||||
#include <QtWidgets/QPlastiqueStyle>
|
||||
#include <QtWidgets/QWindowsStyle>
|
||||
#include <QStyleFactory>
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
#include <math.h>
|
||||
|
||||
#include "../../shared/util.h"
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
#include "../../shared/util.h"
|
||||
#include <private/qgraphicsproxywidget_p.h>
|
||||
#include <private/qlayoutengine_p.h> // qSmartMin functions...
|
||||
|
@ -46,6 +46,7 @@
|
||||
#endif
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
#include <private/qgraphicsscene_p.h>
|
||||
#include <private/qgraphicssceneindex_p.h>
|
||||
#include <math.h>
|
||||
|
@ -48,6 +48,9 @@
|
||||
#include <qsizepolicy.h>
|
||||
//#include <QtGui>
|
||||
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QLineEdit>
|
||||
#include <QtWidgets/QRadioButton>
|
||||
#include <QtWidgets/QWindowsStyle>
|
||||
#include <QStyleFactory>
|
||||
|
||||
|
@ -45,6 +45,7 @@
|
||||
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
|
||||
#include "dynamictreemodel.h"
|
||||
#include "qidentityproxymodel.h"
|
||||
|
@ -39,6 +39,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
class tst_QItemEditorFactory: public QObject
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtCore/QtCore>
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
|
||||
/*
|
||||
To add a view to be tested add the header file to the includes
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include <qeventloop.h>
|
||||
#include <qlist.h>
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
#include <QtCore>
|
||||
#include <QtNetwork/QNetworkAccessManager>
|
||||
#include <QtNetwork/QNetworkRequest>
|
||||
|
@ -41,6 +41,10 @@
|
||||
|
||||
|
||||
#include <QtGui/private/qopenglcontext_p.h>
|
||||
#include <QtGui/QOpenGLFramebufferObject>
|
||||
#include <QtGui/QOpenGLPaintDevice>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QScreen>
|
||||
#include <QtGui/QWindow>
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
@ -40,6 +40,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
#include <QtTest>
|
||||
// #include <QDebug>
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
#include <QtWidgets/QSortFilterProxyModel>
|
||||
#include <QtWidgets>
|
||||
|
||||
#include <qdebug.h>
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
****************************************************************************/
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtDebug>
|
||||
#include <QMetaObject>
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include <private/qtablewidget_p.h>
|
||||
#include <QtTest/QtTest>
|
||||
#include "../../shared/util.h"
|
||||
|
@ -45,6 +45,7 @@
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include "../../shared/util.h"
|
||||
|
||||
//TESTED_CLASS=
|
||||
|
@ -1,7 +1,7 @@
|
||||
load(qttest_p4)
|
||||
SOURCES += tst_qsqldatabase.cpp
|
||||
|
||||
QT += sql
|
||||
QT = core sql
|
||||
|
||||
win32: {
|
||||
!wince*: LIBS += -lws2_32
|
||||
|
@ -1,7 +1,7 @@
|
||||
load(qttest_p4)
|
||||
SOURCES += tst_qsqldriver.cpp
|
||||
|
||||
QT += sql
|
||||
QT = core sql
|
||||
|
||||
wince*: {
|
||||
plugFiles.files = ../../../plugins/sqldrivers
|
||||
|
@ -1,7 +1,7 @@
|
||||
load(qttest_p4)
|
||||
SOURCES += tst_qsqlfield.cpp
|
||||
|
||||
QT += sql
|
||||
QT = core sql
|
||||
|
||||
symbian {
|
||||
qt_not_deployed {
|
||||
|
@ -14,7 +14,7 @@ symbian {
|
||||
TARGET.EPOCHEAPSIZE=50000 5000000
|
||||
}
|
||||
|
||||
QT += sql
|
||||
QT = core sql
|
||||
|
||||
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
|
||||
#include <qsqldriver.h>
|
||||
#include <qsqldatabase.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
load(qttest_p4)
|
||||
SOURCES += tst_qsqlrelationaltablemodel.cpp
|
||||
|
||||
QT += sql
|
||||
QT = core sql
|
||||
|
||||
wince*: {
|
||||
plugFiles.files = ../../../plugins/sqldrivers
|
||||
|
@ -1,7 +1,7 @@
|
||||
load(qttest_p4)
|
||||
SOURCES += tst_qsqltablemodel.cpp
|
||||
|
||||
QT += sql
|
||||
QT = core sql
|
||||
|
||||
wince*: {
|
||||
plugFiles.files = ../../../plugins/sqldrivers
|
||||
|
@ -1,6 +1,6 @@
|
||||
load(qttest_p4)
|
||||
SOURCES += ../tst_selftests.cpp
|
||||
QT += core xml testlib-private
|
||||
QT = core xml testlib-private
|
||||
|
||||
TARGET = ../tst_selftests
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
load(qttest_p4)
|
||||
QT = core
|
||||
|
||||
# this is not a real testcase ('make check' should not run it)
|
||||
CONFIG -= testcase
|
||||
|
@ -20,6 +20,7 @@ HEADERS += using-namespaces.h no-keywords.h task87883.h c-comments.h backslash-n
|
||||
if(*-g++*|*-icc*|*-clang|*-llvm):!irix-*:!win32-*: HEADERS += os9-newlines.h win-newlines.h
|
||||
SOURCES += tst_moc.cpp
|
||||
|
||||
QT -= gui
|
||||
QT += sql network
|
||||
contains(QT_CONFIG, dbus){
|
||||
DEFINES += WITH_DBUS
|
||||
|
@ -1,5 +1,6 @@
|
||||
CONFIG += qttest_p4
|
||||
|
||||
QT = core
|
||||
TARGET = tst_rcc
|
||||
|
||||
SOURCES += tst_rcc.cpp
|
||||
|
@ -1,5 +1,6 @@
|
||||
load(qttest_p4)
|
||||
|
||||
QT = core
|
||||
SOURCES += tst_uic.cpp
|
||||
TARGET = tst_uic
|
||||
|
||||
|
@ -6,4 +6,4 @@ HEADERS += v8test.h
|
||||
|
||||
CONFIG += parallel_test
|
||||
|
||||
QT += v8-private
|
||||
QT = core v8-private
|
||||
|
Loading…
Reference in New Issue
Block a user