diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2010-12-01 09:31:19 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-12-20 15:14:15 (GMT) |
commit | 2cf77579cf41594e036beeacf3dc3b6aa9f05cfa (patch) | |
tree | 9bc096c8ee45e139fd912e9f6af5ae7880b884a7 /src/gui/painting/qprinterinfo.h | |
parent | f725c90032b83df62432018af362830e899e71c1 (diff) | |
download | Qt-2cf77579cf41594e036beeacf3dc3b6aa9f05cfa.zip Qt-2cf77579cf41594e036beeacf3dc3b6aa9f05cfa.tar.gz Qt-2cf77579cf41594e036beeacf3dc3b6aa9f05cfa.tar.bz2 |
refactoring of QPrinterInfo
move QPrinterInfoPrivate to it's own header file;
rename qprinterinfo.qdoc to qprinterinfo.cpp to make it consistent with others;
squash the duplicated code into qprinterinfo.cpp;
avoid extra d_ptr assignments in the QPrinterInfo copying c-tor;
simplify the QPrinterInfo from QPrinter c-tor code;
fix styling and few method param names;
remove the `m_` prefix of QPrinterInfoPrivate's members (as they are members
of a private class anyway ;P)
remove the boilerplates
Merge-request: 2516
Signed-off-by: axis
Diffstat (limited to 'src/gui/painting/qprinterinfo.h')
-rw-r--r-- | src/gui/painting/qprinterinfo.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/painting/qprinterinfo.h b/src/gui/painting/qprinterinfo.h index 063c6b9..c8c9534 100644 --- a/src/gui/painting/qprinterinfo.h +++ b/src/gui/painting/qprinterinfo.h @@ -42,9 +42,10 @@ #ifndef QPRINTERINFO_H #define QPRINTERINFO_H -#include <QtGui/QPrinter> #include <QtCore/QList> +#include <QtGui/QPrinter> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -56,15 +57,13 @@ class QPrinterInfoPrivate; class QPrinterInfoPrivateDeleter; class Q_GUI_EXPORT QPrinterInfo { -Q_DECLARE_PRIVATE(QPrinterInfo) - public: QPrinterInfo(); - QPrinterInfo(const QPrinterInfo& src); - QPrinterInfo(const QPrinter& printer); + QPrinterInfo(const QPrinterInfo &other); + QPrinterInfo(const QPrinter &printer); ~QPrinterInfo(); - QPrinterInfo& operator=(const QPrinterInfo& src); + QPrinterInfo &operator=(const QPrinterInfo &other); QString printerName() const; bool isNull() const; @@ -75,8 +74,10 @@ public: static QPrinterInfo defaultPrinter(); private: - QPrinterInfo(const QString& name); + QPrinterInfo(const QString &name); +private: + Q_DECLARE_PRIVATE(QPrinterInfo) QScopedPointer<QPrinterInfoPrivate, QPrinterInfoPrivateDeleter> d_ptr; }; |