summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Olav Tvete <[email protected]>2013-02-18 15:59:14 +0100
committerThe Qt Project <[email protected]>2013-02-26 13:31:45 +0100
commit4b1332783e16423b3b2c54125b130247ee6bc5b2 (patch)
tree670a1384b261f621958a69ecaf76a1522746831d
parentf6af0dad5be9aba5b0da5a8307a67334f044ec45 (diff)
Compile fix when QT_NO_PRINTDIALOG is defined
...but QT_NO_PRINTER isn't. Change-Id: I888c177cfdd2245eb55de766dfd93f6acd4293e9 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
-rw-r--r--examples/touch/fingerpaint/scribblearea.cpp2
-rw-r--r--examples/widgets/dialogs/licensewizard/licensewizard.cpp2
-rw-r--r--examples/widgets/graphicsview/chip/view.cpp2
-rw-r--r--examples/widgets/itemviews/pixelator/mainwindow.cpp2
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheet.cpp2
-rw-r--r--examples/widgets/painting/fontsampler/mainwindow.cpp2
-rw-r--r--examples/widgets/painting/fontsampler/mainwindow.h4
-rw-r--r--examples/widgets/richtext/orderform/mainwindow.cpp2
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp4
-rw-r--r--examples/widgets/widgets/imageviewer/imageviewer.cpp2
-rw-r--r--examples/widgets/widgets/scribble/scribblearea.cpp2
11 files changed, 13 insertions, 13 deletions
diff --git a/examples/touch/fingerpaint/scribblearea.cpp b/examples/touch/fingerpaint/scribblearea.cpp
index f672a3fdd15..0d13e4579dc 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 e6bb506494f..8f63583a7c1 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 aa3082d5e8c..c80c8be66c5 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 dec9ee40846..0d34dbf190b 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 39dd35e3420..59d29f0e61e 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 645a2b1a9a4..516ba5e2bc5 100644
--- a/examples/widgets/painting/fontsampler/mainwindow.cpp
+++ b/examples/widgets/painting/fontsampler/mainwindow.cpp
@@ -241,7 +241,7 @@ QMap<QString, StyleItems> 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 f9e06c8b894..f4ad448480b 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 b99dfd86df8..7c0aa666fd1 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<QTextEdit*>(letters->currentWidget());
//! [18]
QPrinter printer;
diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp
index 03984932503..c7edd1b5506 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 ef200bc15f1..77ec92d57ac 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 2492476d388..24e2b2b1590 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);