From 4ab33394b259e5bc8d8ffccf35cf183fc4d4bf9c Mon Sep 17 00:00:00 2001 From: Sune Vuorela Date: Sat, 30 Jun 2018 18:06:33 +0200 Subject: Ownership is unclear, so document it to avoid crashes for users Change-Id: I708b04fcdf4f118526317f3aea2401f5dafd2e87 Reviewed-by: Mitch Curtis Reviewed-by: Kai Koehne --- src/corelib/io/qloggingcategory.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/corelib/io/qloggingcategory.cpp') diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp index a6c27d19c0..d8402c4eb6 100644 --- a/src/corelib/io/qloggingcategory.cpp +++ b/src/corelib/io/qloggingcategory.cpp @@ -221,6 +221,8 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift) All message types for this category are enabled by default. If \a category is \c{0}, the category name is changed to \c "default". + + Note that \a category must be kept valid during the lifetime of this object. */ QLoggingCategory::QLoggingCategory(const char *category) : d(0), @@ -235,6 +237,8 @@ QLoggingCategory::QLoggingCategory(const char *category) If \a category is \c{0}, the category name is changed to \c "default". + Note that \a category must be kept valid during the lifetime of this object. + \since 5.4 */ QLoggingCategory::QLoggingCategory(const char *category, QtMsgType enableForLevel) -- cgit v1.2.3