summaryrefslogtreecommitdiffstats
path: root/tests/auto/qprinter
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-09-04 10:13:12 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-09-04 11:04:22 (GMT)
commit1618cbf79921cbeffd99cf5667aa9e3e19d81212 (patch)
tree6ea5e7483b89c2acc596d855ec040650e6d67fe1 /tests/auto/qprinter
parent245c63c306be18442ee9fd1178e30bfb4aad7717 (diff)
downloadQt-1618cbf79921cbeffd99cf5667aa9e3e19d81212.zip
Qt-1618cbf79921cbeffd99cf5667aa9e3e19d81212.tar.gz
Qt-1618cbf79921cbeffd99cf5667aa9e3e19d81212.tar.bz2
Added support for quering a printer for the actual number of copies.
The logic of numCopies() returning 1 to indicate how many times you have to run your printing code is not ideal and prevents the "property" to be used as a placeholder for the value, which was required by KDE. Added QPrinter::actualNumCopies() to ask for the value set through setNumCopies() or through the print dialog. Reviewed-by: Trond
Diffstat (limited to 'tests/auto/qprinter')
-rw-r--r--tests/auto/qprinter/tst_qprinter.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp
index 89be43f..aa64f13 100644
--- a/tests/auto/qprinter/tst_qprinter.cpp
+++ b/tests/auto/qprinter/tst_qprinter.cpp
@@ -105,6 +105,8 @@ private slots:
void testCustomPageSizes();
void printDialogCompleter();
+ void testActualNumCopies();
+
private:
};
@@ -959,5 +961,12 @@ void tst_QPrinter::printDialogCompleter()
#endif
}
+void tst_QPrinter::testActualNumCopies()
+{
+ QPrinter p;
+ p.setNumCopies(15);
+ QCOMPARE(p.actualNumCopies(), 15);
+}
+
QTEST_MAIN(tst_QPrinter)
#include "tst_qprinter.moc"