summaryrefslogtreecommitdiffstats
path: root/examples/widgets/richtext/textedit/textedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/richtext/textedit/textedit.cpp')
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp
index 0398493250..ae2bdedf13 100644
--- a/examples/widgets/richtext/textedit/textedit.cpp
+++ b/examples/widgets/richtext/textedit/textedit.cpp
@@ -197,7 +197,7 @@ void TextEdit::setupFileActions()
#ifndef QT_NO_PRINTER
a = new QAction(QIcon::fromTheme("document-print", QIcon(rsrcPath + "/fileprint.png")),
tr("&Print..."), this);
- a->setPriority(QAction::LowPriority);
+ a->setPriority(QAction::LowPriority);
a->setShortcut(QKeySequence::Print);
connect(a, SIGNAL(triggered()), this, SLOT(filePrint()));
tb->addAction(a);
@@ -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*)));