From afe3c2e741b372f88bf37c1df95ad30b468931e8 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Tue, 25 May 2010 17:49:43 +0200 Subject: Fix the compilation for tst_qabstractprintdialog and tst_qprinter on symbian. --- tests/auto/qabstractprintdialog/tst_qabstractprintdialog.cpp | 8 ++++++++ tests/auto/qprinter/tst_qprinter.cpp | 11 +++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/auto/qabstractprintdialog/tst_qabstractprintdialog.cpp b/tests/auto/qabstractprintdialog/tst_qabstractprintdialog.cpp index 15f427c..0700e9e 100644 --- a/tests/auto/qabstractprintdialog/tst_qabstractprintdialog.cpp +++ b/tests/auto/qabstractprintdialog/tst_qabstractprintdialog.cpp @@ -50,6 +50,8 @@ //TESTED_CLASS= //TESTED_FILES= +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) + class tst_QAbstractPrintDialog : public QObject { Q_OBJECT @@ -141,3 +143,9 @@ void tst_QAbstractPrintDialog::setFromTo() QTEST_MAIN(tst_QAbstractPrintDialog) #include "tst_qabstractprintdialog.moc" + +#else + +QTEST_NOOP_MAIN + +#endif diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp index b1ff425..e52e1b5 100644 --- a/tests/auto/qprinter/tst_qprinter.cpp +++ b/tests/auto/qprinter/tst_qprinter.cpp @@ -64,11 +64,13 @@ Q_DECLARE_METATYPE(QRect) - +QT_FORWARD_DECLARE_CLASS(QPrinter) //TESTED_CLASS= //TESTED_FILES= +#ifndef QT_NO_PRINTER + class tst_QPrinter : public QObject { Q_OBJECT @@ -215,7 +217,6 @@ tst_QPrinter::tst_QPrinter() tst_QPrinter::~tst_QPrinter() { - } // initTestCase will be executed once before the first testfunction is executed. @@ -1007,3 +1008,9 @@ void tst_QPrinter::taskQTBUG4497_reusePrinterOnDifferentFiles() QTEST_MAIN(tst_QPrinter) #include "tst_qprinter.moc" + +#else //QT_NO_PRINTER + +QTEST_NOOP_MAIN + +#endif //QT_NO_PRINTER -- cgit v0.12