diff options
author | Paul Olav Tvete <paul.tvete@digia.com> | 2013-02-18 15:59:14 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-26 13:31:45 +0100 |
commit | 4b1332783e16423b3b2c54125b130247ee6bc5b2 (patch) | |
tree | 670a1384b261f621958a69ecaf76a1522746831d /examples/widgets/richtext | |
parent | f6af0dad5be9aba5b0da5a8307a67334f044ec45 (diff) |
Compile fix when QT_NO_PRINTDIALOG is defined
...but QT_NO_PRINTER isn't.
Change-Id: I888c177cfdd2245eb55de766dfd93f6acd4293e9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'examples/widgets/richtext')
-rw-r--r-- | examples/widgets/richtext/orderform/mainwindow.cpp | 2 | ||||
-rw-r--r-- | examples/widgets/richtext/textedit/textedit.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
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<QTextEdit*>(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*))); |