diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-04-28 09:16:06 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2015-04-28 09:16:06 +0000 |
commit | a6f7dc521b0491a4e8a163941fedecbfdce26b43 (patch) | |
tree | 1b1f7a085ed576892c9c6d7a1e1f0da2d427630d /src/printsupport/kernel/qprinterinfo.cpp | |
parent | 73a48c16189fcc1c1dd783e05c51d47711d554e2 (diff) | |
parent | 1c8451bdbbd6ca909dfc5b96a24be909810522fc (diff) |
Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
Diffstat (limited to 'src/printsupport/kernel/qprinterinfo.cpp')
-rw-r--r-- | src/printsupport/kernel/qprinterinfo.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/printsupport/kernel/qprinterinfo.cpp b/src/printsupport/kernel/qprinterinfo.cpp index 33d67e3a55..ad488a10ed 100644 --- a/src/printsupport/kernel/qprinterinfo.cpp +++ b/src/printsupport/kernel/qprinterinfo.cpp @@ -31,6 +31,8 @@ #ifndef QT_NO_PRINTER +#include <QtCore/qdebug.h> + #include <qpa/qplatformprintplugin.h> #include <qpa/qplatformprintersupport.h> @@ -469,6 +471,21 @@ QPrinterInfo QPrinterInfo::printerInfo(const QString &printerName) return QPrinterInfo(printerName); } +# ifndef QT_NO_DEBUG_STREAM +QDebug operator<<(QDebug debug, const QPrinterInfo &p) +{ + QDebugStateSaver saver(debug); + debug.nospace(); + debug << "QPrinterInfo("; + if (p.isNull()) + debug << "null"; + else + p.d_ptr->m_printDevice.format(debug); + debug << ')'; + return debug; +} +# endif // !QT_NO_DEBUG_STREAM + QT_END_NAMESPACE #endif // QT_NO_PRINTER |