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.cpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/printsupport/kernel/qprinterinfo.cpp b/src/printsupport/kernel/qprinterinfo.cpp
index a17da3fdaa..ad488a10ed 100644
--- a/src/printsupport/kernel/qprinterinfo.cpp
+++ b/src/printsupport/kernel/qprinterinfo.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
@@ -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