From 37c46fee300d265ea17fafdb7f9f9e75caded16a Mon Sep 17 00:00:00 2001 From: Debao Zhang Date: Thu, 8 Mar 2012 18:37:30 -0800 Subject: [PATCH] Clean up for some auto tests of the gui/kernel. They are not dependent on QtWidgets. Change-Id: Icbc0b0b6f0b72537fd3058cc038a1f5c4bf2aba7 Reviewed-by: Friedemann Kleint --- tests/auto/gui/kernel/qdrag/qdrag.pro | 2 +- .../qfileopeneventexternal/qfileopeneventexternal.cpp | 7 +++---- .../qfileopeneventexternal/qfileopeneventexternal.pro | 2 +- tests/auto/gui/kernel/qkeysequence/qkeysequence.pro | 2 +- tests/auto/gui/kernel/qpalette/qpalette.pro | 2 +- tests/auto/gui/kernel/qpalette/tst_qpalette.cpp | 1 - 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/auto/gui/kernel/qdrag/qdrag.pro b/tests/auto/gui/kernel/qdrag/qdrag.pro index 0173b57215..ac3fde8028 100644 --- a/tests/auto/gui/kernel/qdrag/qdrag.pro +++ b/tests/auto/gui/kernel/qdrag/qdrag.pro @@ -4,7 +4,7 @@ CONFIG += testcase TARGET = tst_qdrag -QT += widgets testlib +QT += testlib SOURCES += tst_qdrag.cpp diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp index 9d138f6a2e..a9f9c8db08 100644 --- a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp +++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp @@ -40,13 +40,12 @@ ****************************************************************************/ #include -#include #include -struct MyApplication : public QApplication +struct MyApplication : public QGuiApplication { MyApplication(int& argc, char** argv) - : QApplication(argc, argv) + : QGuiApplication(argc, argv) {} bool event(QEvent * event) @@ -59,7 +58,7 @@ struct MyApplication : public QApplication file.write(QByteArray("+external")); return true; } else { - return QApplication::event(event); + return QGuiApplication::event(event); } } }; diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro index 7de7b2ec57..b84ff760ca 100644 --- a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro +++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro @@ -1,4 +1,4 @@ TEMPLATE = app TARGET = qfileopeneventexternal -QT += core gui widgets +QT += core gui SOURCES += qfileopeneventexternal.cpp diff --git a/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro b/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro index cf4337b156..9f79fe9ab7 100644 --- a/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro +++ b/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro @@ -1,7 +1,7 @@ CONFIG += testcase TARGET = tst_qkeysequence -QT += widgets testlib +QT += testlib QT += core-private gui-private SOURCES += tst_qkeysequence.cpp diff --git a/tests/auto/gui/kernel/qpalette/qpalette.pro b/tests/auto/gui/kernel/qpalette/qpalette.pro index 8975704f0f..9dd3f3e715 100644 --- a/tests/auto/gui/kernel/qpalette/qpalette.pro +++ b/tests/auto/gui/kernel/qpalette/qpalette.pro @@ -1,6 +1,6 @@ CONFIG += testcase TARGET = tst_qpalette -QT += widgets testlib +QT += testlib SOURCES += tst_qpalette.cpp diff --git a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp index cc46831965..dc393fc2c3 100644 --- a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp +++ b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp @@ -43,7 +43,6 @@ #include #include "qpalette.h" -#include class tst_QPalette : public QObject {