From 224ef35105fa29d124ac7c8d6f35210a583d9179 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Thu, 17 Feb 2011 13:39:00 +1000 Subject: Make QtQuickTest compile with qtestlib in Qt --- src/quicktestlib/qtestoptions_p.h | 67 +++++++++++++++++++++++++++++++ src/quicktestlib/quicktest.cpp | 2 +- src/quicktestlib/quicktestevent.cpp | 2 +- src/quicktestlib/quicktestlib.pro | 7 ++-- src/quicktestlib/quicktestlib_dep.pri | 2 +- src/quicktestlib/quicktestresult.cpp | 14 +++---- src/quicktestlib/testlib/qtestoptions_p.h | 67 ------------------------------- 7 files changed, 80 insertions(+), 81 deletions(-) create mode 100644 src/quicktestlib/qtestoptions_p.h delete mode 100644 src/quicktestlib/testlib/qtestoptions_p.h diff --git a/src/quicktestlib/qtestoptions_p.h b/src/quicktestlib/qtestoptions_p.h new file mode 100644 index 0000000..167f906 --- /dev/null +++ b/src/quicktestlib/qtestoptions_p.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** 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 QtTest module 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$ +** +****************************************************************************/ + +#ifndef QTESTOPTIONS_P_H +#define QTESTOPTIONS_P_H + +#include + +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Test) + +namespace QTest +{ + extern Q_TESTLIB_EXPORT bool printAvailableFunctions; + extern Q_TESTLIB_EXPORT QStringList testFunctions; + extern Q_TESTLIB_EXPORT QStringList testTags; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif diff --git a/src/quicktestlib/quicktest.cpp b/src/quicktestlib/quicktest.cpp index 147f4fb..ffb269d 100644 --- a/src/quicktestlib/quicktest.cpp +++ b/src/quicktestlib/quicktest.cpp @@ -41,7 +41,7 @@ #include "quicktest.h" #include "quicktestresult_p.h" -#include "qtestsystem.h" +#include #include "qtestoptions_p.h" #include #include diff --git a/src/quicktestlib/quicktestevent.cpp b/src/quicktestlib/quicktestevent.cpp index 83aff91..894e29e 100644 --- a/src/quicktestlib/quicktestevent.cpp +++ b/src/quicktestlib/quicktestevent.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "quicktestevent_p.h" -#include "qtestkeyboard.h" +#include #include #include #include diff --git a/src/quicktestlib/quicktestlib.pro b/src/quicktestlib/quicktestlib.pro index 9a1c3e0..f29d1a2 100644 --- a/src/quicktestlib/quicktestlib.pro +++ b/src/quicktestlib/quicktestlib.pro @@ -1,7 +1,7 @@ TEMPLATE = lib TARGET = QtQuickTest$${QT_LIBINFIX} CONFIG += dll warn_on -QT += declarative script +QT += declarative script testlib DESTDIR = ../../lib win32 { @@ -35,13 +35,12 @@ HEADERS += \ QtQuickTest/quicktest.h PRIVATE_HEADERS += \ quicktestevent_p.h \ - quicktestresult_p.h + quicktestresult_p.h \ + qtestoptions_p.h PUBLIC_HEADERS += $$HEADERS HEADERS += $$PRIVATE_HEADERS -include(testlib/testlib.pri) - DEFINES += QT_BUILD_QUICK_TEST_LIB !symbian { diff --git a/src/quicktestlib/quicktestlib_dep.pri b/src/quicktestlib/quicktestlib_dep.pri index 9f60c4a..543d5af 100644 --- a/src/quicktestlib/quicktestlib_dep.pri +++ b/src/quicktestlib/quicktestlib_dep.pri @@ -1,5 +1,5 @@ -QT += declarative +QT += declarative testlib INCLUDEPATH += $$PWD LIBS += -L../../lib -L../../bin diff --git a/src/quicktestlib/quicktestresult.cpp b/src/quicktestlib/quicktestresult.cpp index 0ceb191..59fea96 100644 --- a/src/quicktestlib/quicktestresult.cpp +++ b/src/quicktestlib/quicktestresult.cpp @@ -40,14 +40,14 @@ ****************************************************************************/ #include "quicktestresult_p.h" -#include "qtestcase.h" -#include "qtestsystem.h" -#include "qtestresult_p.h" -#include "qtesttable_p.h" -#include "qtestlog_p.h" +#include +#include +#include +#include +#include #include "qtestoptions_p.h" -#include "qbenchmark.h" -#include "qbenchmark_p.h" +#include +#include #include #include #include diff --git a/src/quicktestlib/testlib/qtestoptions_p.h b/src/quicktestlib/testlib/qtestoptions_p.h deleted file mode 100644 index 2af40ef..0000000 --- a/src/quicktestlib/testlib/qtestoptions_p.h +++ /dev/null @@ -1,67 +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 QtTest module 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$ -** -****************************************************************************/ - -#ifndef QTESTOPTIONS_P_H -#define QTESTOPTIONS_P_H - -#include "qtest_global.h" - -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Test) - -namespace QTest -{ - extern Q_TESTLIB_EXPORT bool printAvailableFunctions; - extern Q_TESTLIB_EXPORT QStringList testFunctions; - extern Q_TESTLIB_EXPORT QStringList testTags; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif -- cgit v1.2.3