diff options
-rw-r--r-- | tests/auto/qabstractprintdialog/tst_qabstractprintdialog.cpp | 8 | ||||
-rw-r--r-- | 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 |