summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qprinterinfo.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-04-28 09:16:06 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-04-28 09:16:06 +0000
commita6f7dc521b0491a4e8a163941fedecbfdce26b43 (patch)
tree1b1f7a085ed576892c9c6d7a1e1f0da2d427630d /src/printsupport/kernel/qprinterinfo.cpp
parent73a48c16189fcc1c1dd783e05c51d47711d554e2 (diff)
parent1c8451bdbbd6ca909dfc5b96a24be909810522fc (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.cpp17
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