diff options
author | John Layt <jlayt@kde.org> | 2013-11-25 17:18:48 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-29 15:59:08 +0100 |
commit | c6cf7520ecaf1c14b28436bafae27f2c52940081 (patch) | |
tree | e7bbdde62ba0fa2a7563dfc4ba9828ca60713a07 /src/printsupport/kernel/qprinter_p.h | |
parent | e8a45152b5e2e99e757e91a5d42a6dce609ff583 (diff) | |
download | qtbase-c6cf7520ecaf1c14b28436bafae27f2c52940081.tar.gz |
QPrinter - Simplify setting manual properties
Change from a list to a set and define a utility method to both set the
property and store that we have set it.
Change-Id: I0cf13f1b0e90942424744316d0d3f699b9ead144
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/printsupport/kernel/qprinter_p.h')
-rw-r--r-- | src/printsupport/kernel/qprinter_p.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/printsupport/kernel/qprinter_p.h b/src/printsupport/kernel/qprinter_p.h index 7e5bc12cd0..2357b9e944 100644 --- a/src/printsupport/kernel/qprinter_p.h +++ b/src/printsupport/kernel/qprinter_p.h @@ -62,6 +62,7 @@ #include "QtPrintSupport/qprinterinfo.h" #include "QtPrintSupport/qprintengine.h" #include "QtCore/qpointer.h" +#include "QtCore/qset.h" #include <limits.h> @@ -106,7 +107,7 @@ public: void setPreviewMode(bool); #endif - void addToManualSetList(QPrintEngine::PrintEnginePropertyKey key); + void setProperty(QPrintEngine::PrintEnginePropertyKey key, const QVariant &value); QPrinter::PrinterMode printerMode; QPrinter::OutputFormat outputFormat; @@ -131,7 +132,7 @@ public: uint hasUserSetPageSize : 1; // Used to remember which properties have been manually set by the user. - QList<QPrintEngine::PrintEnginePropertyKey> manualSetList; + QSet<QPrintEngine::PrintEnginePropertyKey> m_properties; }; QT_END_NAMESPACE |