summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qprinterinfo.cpp
diff options
context:
space:
mode:
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