From 4b1332783e16423b3b2c54125b130247ee6bc5b2 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 18 Feb 2013 15:59:14 +0100 Subject: Compile fix when QT_NO_PRINTDIALOG is defined ...but QT_NO_PRINTER isn't. Change-Id: I888c177cfdd2245eb55de766dfd93f6acd4293e9 Reviewed-by: Eskil Abrahamsen Blomfeldt --- examples/touch/fingerpaint/scribblearea.cpp | 2 +- examples/widgets/dialogs/licensewizard/licensewizard.cpp | 2 +- examples/widgets/graphicsview/chip/view.cpp | 2 +- examples/widgets/itemviews/pixelator/mainwindow.cpp | 2 +- examples/widgets/itemviews/spreadsheet/spreadsheet.cpp | 2 +- examples/widgets/painting/fontsampler/mainwindow.cpp | 2 +- examples/widgets/painting/fontsampler/mainwindow.h | 4 ++-- examples/widgets/richtext/orderform/mainwindow.cpp | 2 +- examples/widgets/richtext/textedit/textedit.cpp | 4 ++-- examples/widgets/widgets/imageviewer/imageviewer.cpp | 2 +- examples/widgets/widgets/scribble/scribblearea.cpp | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) (limited to 'examples') diff --git a/examples/touch/fingerpaint/scribblearea.cpp b/examples/touch/fingerpaint/scribblearea.cpp index f672a3fdd1..0d13e4579d 100644 --- a/examples/touch/fingerpaint/scribblearea.cpp +++ b/examples/touch/fingerpaint/scribblearea.cpp @@ -154,7 +154,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize) //! [21] void ScribbleArea::print() { -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) QPrinter printer(QPrinter::HighResolution); QPrintDialog printDialog(&printer, this); diff --git a/examples/widgets/dialogs/licensewizard/licensewizard.cpp b/examples/widgets/dialogs/licensewizard/licensewizard.cpp index e6bb506494..8f63583a7c 100644 --- a/examples/widgets/dialogs/licensewizard/licensewizard.cpp +++ b/examples/widgets/dialogs/licensewizard/licensewizard.cpp @@ -352,7 +352,7 @@ void ConclusionPage::setVisible(bool visible) void ConclusionPage::printButtonClicked() { -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) QPrinter printer; QPrintDialog dialog(&printer, this); if (dialog.exec()) diff --git a/examples/widgets/graphicsview/chip/view.cpp b/examples/widgets/graphicsview/chip/view.cpp index aa3082d5e8..c80c8be66c 100644 --- a/examples/widgets/graphicsview/chip/view.cpp +++ b/examples/widgets/graphicsview/chip/view.cpp @@ -250,7 +250,7 @@ void View::toggleAntialiasing() void View::print() { -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) QPrinter printer; QPrintDialog dialog(&printer, this); if (dialog.exec() == QDialog::Accepted) { diff --git a/examples/widgets/itemviews/pixelator/mainwindow.cpp b/examples/widgets/itemviews/pixelator/mainwindow.cpp index dec9ee4084..0d34dbf190 100644 --- a/examples/widgets/itemviews/pixelator/mainwindow.cpp +++ b/examples/widgets/itemviews/pixelator/mainwindow.cpp @@ -154,7 +154,7 @@ void MainWindow::openImage(const QString &fileName) void MainWindow::printImage() { -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) if (model->rowCount(QModelIndex())*model->columnCount(QModelIndex()) > 90000) { QMessageBox::StandardButton answer; answer = QMessageBox::question(this, tr("Large Image Size"), diff --git a/examples/widgets/itemviews/spreadsheet/spreadsheet.cpp b/examples/widgets/itemviews/spreadsheet/spreadsheet.cpp index 39dd35e342..59d29f0e61 100644 --- a/examples/widgets/itemviews/spreadsheet/spreadsheet.cpp +++ b/examples/widgets/itemviews/spreadsheet/spreadsheet.cpp @@ -627,7 +627,7 @@ QString encode_pos(int row, int col) void SpreadSheet::print() { -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) QPrinter printer(QPrinter::ScreenResolution); QPrintPreviewDialog dlg(&printer); PrintView view; diff --git a/examples/widgets/painting/fontsampler/mainwindow.cpp b/examples/widgets/painting/fontsampler/mainwindow.cpp index 645a2b1a9a..516ba5e2bc 100644 --- a/examples/widgets/painting/fontsampler/mainwindow.cpp +++ b/examples/widgets/painting/fontsampler/mainwindow.cpp @@ -241,7 +241,7 @@ QMap MainWindow::currentPageMap() return pageMap; } -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) void MainWindow::on_printAction_triggered() { pageMap = currentPageMap(); diff --git a/examples/widgets/painting/fontsampler/mainwindow.h b/examples/widgets/painting/fontsampler/mainwindow.h index f9e06c8b89..f4ad448480 100644 --- a/examples/widgets/painting/fontsampler/mainwindow.h +++ b/examples/widgets/painting/fontsampler/mainwindow.h @@ -62,12 +62,12 @@ public: public slots: void on_clearAction_triggered(); void on_markAction_triggered(); -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) void on_printAction_triggered(); void on_printPreviewAction_triggered(); #endif void on_unmarkAction_triggered(); -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) void printDocument(QPrinter *printer); void printPage(int index, QPainter *painter, QPrinter *printer); #endif diff --git a/examples/widgets/richtext/orderform/mainwindow.cpp b/examples/widgets/richtext/orderform/mainwindow.cpp index b99dfd86df..7c0aa666fd 100644 --- a/examples/widgets/richtext/orderform/mainwindow.cpp +++ b/examples/widgets/richtext/orderform/mainwindow.cpp @@ -235,7 +235,7 @@ void MainWindow::openDialog() //! [17] void MainWindow::printFile() { -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) QTextEdit *editor = static_cast(letters->currentWidget()); //! [18] QPrinter printer; diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp index 0398493250..c7edd1b550 100644 --- a/examples/widgets/richtext/textedit/textedit.cpp +++ b/examples/widgets/richtext/textedit/textedit.cpp @@ -511,7 +511,7 @@ bool TextEdit::fileSaveAs() void TextEdit::filePrint() { -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) QPrinter printer(QPrinter::HighResolution); QPrintDialog *dlg = new QPrintDialog(&printer, this); if (textEdit->textCursor().hasSelection()) @@ -525,7 +525,7 @@ void TextEdit::filePrint() void TextEdit::filePrintPreview() { -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) QPrinter printer(QPrinter::HighResolution); QPrintPreviewDialog preview(&printer, this); connect(&preview, SIGNAL(paintRequested(QPrinter*)), SLOT(printPreview(QPrinter*))); diff --git a/examples/widgets/widgets/imageviewer/imageviewer.cpp b/examples/widgets/widgets/imageviewer/imageviewer.cpp index ef200bc15f..77ec92d57a 100644 --- a/examples/widgets/widgets/imageviewer/imageviewer.cpp +++ b/examples/widgets/widgets/imageviewer/imageviewer.cpp @@ -99,7 +99,7 @@ void ImageViewer::print() //! [5] //! [6] { Q_ASSERT(imageLabel->pixmap()); -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) //! [6] //! [7] QPrintDialog dialog(&printer, this); //! [7] //! [8] diff --git a/examples/widgets/widgets/scribble/scribblearea.cpp b/examples/widgets/widgets/scribble/scribblearea.cpp index 2492476d38..24e2b2b159 100644 --- a/examples/widgets/widgets/scribble/scribblearea.cpp +++ b/examples/widgets/widgets/scribble/scribblearea.cpp @@ -200,7 +200,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize) //! [21] void ScribbleArea::print() { -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) QPrinter printer(QPrinter::HighResolution); QPrintDialog printDialog(&printer, this); -- cgit v1.2.3