From 3d3c5dc44e28f1e9cfef12f6ccb881a3c0060c7a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 25 Jul 2012 10:04:58 +0200 Subject: 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 --- src/corelib/global/qlogging.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/corelib/global/qlogging.h') 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: -- cgit v1.2.3