summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2013-12-08 00:16:45 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-08 16:54:43 +0100
commit77cd033e44f9b899749994b17fc0bbfa7a164a3b (patch)
tree88fb69b112d497bf14116c38c66058c074d666c1
parent5bf67f5f41ab110eb41ab74f2a87e649735af435 (diff)
QPrintDialog - Fix setting of PageOrder
The print dialog was setting the PageOrder on the QPrinter as soon as the check box was toggled and not when the Print button was pressed, meaning the change is not forgotten when Cancel is pressed. Change-Id: I19637b7efacfb5388c70d2e7d9d05a05ecc5b2ea Reviewed-by: Andy Shaw <andy.shaw@digia.com>
-rw-r--r--src/printsupport/dialogs/qprintdialog.h1
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp14
2 files changed, 1 insertions, 14 deletions
diff --git a/src/printsupport/dialogs/qprintdialog.h b/src/printsupport/dialogs/qprintdialog.h
index c822aa0533..886cd1e08d 100644
--- a/src/printsupport/dialogs/qprintdialog.h
+++ b/src/printsupport/dialogs/qprintdialog.h
@@ -106,7 +106,6 @@ Q_SIGNALS:
private:
#if defined (Q_OS_UNIX) && !defined(Q_OS_MAC)
- Q_PRIVATE_SLOT(d_func(), void _q_chbPrintLastFirstToggled(bool))
Q_PRIVATE_SLOT(d_func(), void _q_togglePageSetCombo(bool))
Q_PRIVATE_SLOT(d_func(), void _q_collapseOrExpandDialog())
# if !defined(QT_NO_MESSAGEBOX)
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index fe7e43814c..41a01abf3b 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -203,7 +203,6 @@ public:
void selectPrinter(const QPrinter::OutputFormat outputFormat);
- void _q_chbPrintLastFirstToggled(bool);
void _q_togglePageSetCombo(bool);
#ifndef QT_NO_MESSAGEBOX
void _q_checkFields();
@@ -363,9 +362,6 @@ void QPrintDialogPrivate::init()
#endif
QObject::connect(buttons, SIGNAL(rejected()), q, SLOT(reject()));
- QObject::connect(options.reverse, SIGNAL(toggled(bool)),
- q, SLOT(_q_chbPrintLastFirstToggled(bool)));
-
QObject::connect(options.printSelection, SIGNAL(toggled(bool)),
q, SLOT(_q_togglePageSetCombo(bool)));
@@ -429,6 +425,7 @@ void QPrintDialogPrivate::setupPrinter()
}
p->setColorMode(options.color->isChecked() ? QPrinter::Color : QPrinter::GrayScale);
+ p->setPageOrder(options.reverse->isChecked() ? QPrinter::LastPageFirst : QPrinter::FirstPageFirst);
// print range
if (options.printAll->isChecked()) {
@@ -486,15 +483,6 @@ void QPrintDialogPrivate::setupPrinter()
top->d->setupPrinter();
}
-void QPrintDialogPrivate::_q_chbPrintLastFirstToggled(bool checked)
-{
- Q_Q(QPrintDialog);
- if (checked)
- q->printer()->setPageOrder(QPrinter::LastPageFirst);
- else
- q->printer()->setPageOrder(QPrinter::FirstPageFirst);
-}
-
void QPrintDialogPrivate::_q_togglePageSetCombo(bool checked)
{
if (printerOutputFormat == QPrinter::PdfFormat)