From f39a71a6c44e5011a169dfa6840a33a9b5075c77 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 30 Mar 2010 15:33:13 +0200 Subject: Autotest: don't allow choosing between debug/release mode. You can't build for debug mode on Windows if Qt wasn't built in debug mode. So force the selection to be exactly what Qt was built. Reviewed-by: Trust Me --- tests/auto/qsharedpointer/externaltests.cpp | 17 +++-------------- tests/auto/qsharedpointer/externaltests.h | 3 --- tests/auto/qsharedpointer/tst_qsharedpointer.cpp | 2 +- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/tests/auto/qsharedpointer/externaltests.cpp b/tests/auto/qsharedpointer/externaltests.cpp index eb2f27d..0b1ef19 100644 --- a/tests/auto/qsharedpointer/externaltests.cpp +++ b/tests/auto/qsharedpointer/externaltests.cpp @@ -140,7 +140,6 @@ namespace QTest { QExternalTestPrivate() : qtModules(QExternalTest::QtCore | QExternalTest::QtGui | QExternalTest::QtTest), appType(QExternalTest::AutoApplication), - debugMode(true), exitCode(-1) { } @@ -156,7 +155,6 @@ namespace QTest { QByteArray programHeader; QExternalTest::QtModules qtModules; QExternalTest::ApplicationType appType; - bool debugMode; QString temporaryDir; QByteArray sourceCode; @@ -190,16 +188,6 @@ namespace QTest { delete d; } - bool QExternalTest::isDebugMode() const - { - return d->debugMode; - } - - void QExternalTest::setDebugMode(bool enable) - { - d->debugMode = enable; - } - QList QExternalTest::qmakeSettings() const { return d->qmakeLines; @@ -524,10 +512,11 @@ namespace QTest { "INCLUDEPATH += . "); projectFile.write(QFile::encodeName(QDir::currentPath())); - if (debugMode) +#ifndef QT_NO_DEBUG projectFile.write("\nCONFIG += debug\n"); - else +#else projectFile.write("\nCONFIG += release\n"); +#endif QByteArray extraSources = QFile::encodeName(extraProgramSources.join(" ")); if (!extraSources.isEmpty()) { diff --git a/tests/auto/qsharedpointer/externaltests.h b/tests/auto/qsharedpointer/externaltests.h index 5e79a7d..1170cd5 100644 --- a/tests/auto/qsharedpointer/externaltests.h +++ b/tests/auto/qsharedpointer/externaltests.h @@ -91,9 +91,6 @@ namespace QTest { QApplicationGuiServer }; - bool isDebugMode() const; - void setDebugMode(bool enable); - QList qmakeSettings() const; void setQmakeSettings(const QList &settings); diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp index 7cfa868..cb32c9a 100644 --- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp @@ -1717,11 +1717,11 @@ void tst_QSharedPointer::invalidConstructs() #endif QTest::QExternalTest test; - test.setDebugMode(true); test.setQtModules(QTest::QExternalTest::QtCore); test.setExtraProgramSources(QStringList() << SRCDIR "forwarddeclared.cpp"); test.setProgramHeader( "#define QT_SHAREDPOINTER_TRACK_POINTERS\n" + "#define QT_DEBUG\n" "#include \n" "#include \n" "\n" -- cgit v0.12