diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2012-07-25 10:04:58 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-18 06:15:14 +0200 |
commit | 3d3c5dc44e28f1e9cfef12f6ccb881a3c0060c7a (patch) | |
tree | 74db688d9949151e8c8d7a778eaadb3c1d2de13a /src/corelib/global/qlogging.h | |
parent | 24bc6342cae364ad5d1e74497d64c569916eaf48 (diff) |
QMessageLogger: make member functions const
Just because we can :)
It looks a bit weird that QMessageLogger has a constexpr
constructor, but no const methods...
Change-Id: I794dd2b3326c45be17b29decb47c9cac4778d397
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/global/qlogging.h')
-rw-r--r-- | src/corelib/global/qlogging.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h index f1f9643753..fe0a7df79a 100644 --- a/src/corelib/global/qlogging.h +++ b/src/corelib/global/qlogging.h @@ -93,22 +93,22 @@ public: Q_DECL_CONSTEXPR QMessageLogger(const char *file, int line, const char *function, const char *category) : context(file, line, function, category) {} - void debug(const char *msg, ...) + void debug(const char *msg, ...) const #if defined(Q_CC_GNU) && !defined(__INSURE__) __attribute__ ((format (printf, 2, 3))) #endif ; - void noDebug(const char *, ...) + void noDebug(const char *, ...) const #if defined(Q_CC_GNU) && !defined(__INSURE__) __attribute__ ((format (printf, 2, 3))) #endif {} - void warning(const char *msg, ...) + void warning(const char *msg, ...) const #if defined(Q_CC_GNU) && !defined(__INSURE__) __attribute__ ((format (printf, 2, 3))) #endif ; - void critical(const char *msg, ...) + void critical(const char *msg, ...) const #if defined(Q_CC_GNU) && !defined(__INSURE__) __attribute__ ((format (printf, 2, 3))) #endif @@ -117,18 +117,18 @@ public: #ifndef Q_CC_MSVC Q_NORETURN #endif - void fatal(const char *msg, ...) Q_DECL_NOTHROW + void fatal(const char *msg, ...) const Q_DECL_NOTHROW #if defined(Q_CC_GNU) && !defined(__INSURE__) __attribute__ ((format (printf, 2, 3))) #endif ; #ifndef QT_NO_DEBUG_STREAM - QDebug debug(); - QDebug warning(); - QDebug critical(); + QDebug debug() const; + QDebug warning() const; + QDebug critical() const; - QNoDebug noDebug(); + QNoDebug noDebug() const; #endif // QT_NO_DEBUG_STREAM private: |