diff options
Diffstat (limited to 'src/corelib/io/qdebug.h')
-rw-r--r-- | src/corelib/io/qdebug.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index be8252fbb2..ce72fcd26d 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -53,14 +53,13 @@ #include <QtCore/qset.h> #include <QtCore/qcontiguouscache.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class Q_CORE_EXPORT QDebug { friend class QMessageLogger; + friend class QDebugStateSaverPrivate; struct Stream { Stream(QIODevice *device) : ts(device), ref(1), type(QtDebugMsg), space(true), message_output(false) {} Stream(QString *string) : ts(string, QIODevice::WriteOnly), ref(1), type(QtDebugMsg), space(true), message_output(false) {} @@ -132,6 +131,17 @@ public: Q_DECLARE_SHARED(QDebug) +class QDebugStateSaverPrivate; +class Q_CORE_EXPORT QDebugStateSaver +{ +public: + QDebugStateSaver(QDebug &dbg); + ~QDebugStateSaver(); +private: + Q_DISABLE_COPY(QDebugStateSaver) + QScopedPointer<QDebugStateSaverPrivate> d; +}; + class QNoDebug { public: @@ -279,6 +289,4 @@ inline QDebug operator<<(QDebug debug, const QFlags<T> &flags) QT_END_NAMESPACE -QT_END_HEADER - #endif // QDEBUG_H |