summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-08-07 11:46:07 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-15 20:55:31 +0200
commitf741a12de11c9b06d971795cf34b26afc08e3f59 (patch)
tree91084bd3a88a7674d65806dd2d068ebcc372e5cd /src/corelib/io/qdebug.h
parent5e3b7effbd7f70682d5a15ccd277e7f49c1e259e (diff)
Disentangle QIODevice dependencies
Move the QIODevice::OpenMode enum into a base class, so that we can remove the full QIODevice (and thus QObject) dependency from qdatastream.h and qtextstream.h. This is required so that we can include QDataStream in qmetatype.h without getting circular dependencies. As a nice side effect, QDataStream and QTextStream can now inherit QIODeviceBase and provide the OpenMode enum directly in their class scope. Change-Id: Ifa68b7b1d8d95687ed032f6c9206f92e63bfacdf Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/corelib/io/qdebug.h')
-rw-r--r--src/corelib/io/qdebug.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 130ceccc44..2463095743 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -60,7 +60,7 @@
QT_BEGIN_NAMESPACE
-class Q_CORE_EXPORT QDebug
+class Q_CORE_EXPORT QDebug : public QIODeviceBase
{
friend class QMessageLogger;
friend class QDebugStateSaver;
@@ -70,9 +70,9 @@ class Q_CORE_EXPORT QDebug
Stream(QIODevice *device) : ts(device), ref(1), type(QtDebugMsg),
space(true), message_output(false), flags(DefaultVerbosity << VerbosityShift) {}
- Stream(QString *string) : ts(string, QIODevice::WriteOnly), ref(1), type(QtDebugMsg),
+ Stream(QString *string) : ts(string, WriteOnly), ref(1), type(QtDebugMsg),
space(true), message_output(false), flags(DefaultVerbosity << VerbosityShift) {}
- Stream(QtMsgType t) : ts(&buffer, QIODevice::WriteOnly), ref(1), type(t),
+ Stream(QtMsgType t) : ts(&buffer, WriteOnly), ref(1), type(t),
space(true), message_output(true), flags(DefaultVerbosity << VerbosityShift) {}
QTextStream ts;
QString buffer;