summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qloggingcategory.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2014-07-11 11:11:46 +0200
committerKai Koehne <kai.koehne@digia.com>2014-07-30 16:27:26 +0200
commitb795e8d7c2dbb04ed9bde4500a46511339b8df31 (patch)
tree4d88c2e202da1f254b3dafebb52d7911dc1be078 /src/corelib/io/qloggingcategory.cpp
parente968793e81ffcb439210e7eb422c0063834cfdc9 (diff)
Remove normalization of "default" category
Commit d61e774307819 got rid of the special handling of the 'default' category in the qloggingregistry, so we don't need the private header file anymore, nor does it gain us anything to 'normalize' all default categories to one string. Change-Id: I027b4b82ff915428287432f39f76b4e719cf7874 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/corelib/io/qloggingcategory.cpp')
-rw-r--r--src/corelib/io/qloggingcategory.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp
index 63241f6698..a368e92932 100644
--- a/src/corelib/io/qloggingcategory.cpp
+++ b/src/corelib/io/qloggingcategory.cpp
@@ -40,7 +40,6 @@
****************************************************************************/
#include "qloggingcategory.h"
-#include "qloggingcategory_p.h"
#include "qloggingregistry_p.h"
QT_BEGIN_NAMESPACE
@@ -221,15 +220,10 @@ void QLoggingCategory::init(const char *category, QtMsgType severityLevel)
{
enabled.store(0x01010101); // enabledDebug = enabledWarning = enabledCritical = true;
- const bool isDefaultCategory
- = (category == 0) || (strcmp(category, qtDefaultCategoryName) == 0);
-
- // normalize "default" category name, so that we can just do
- // pointer comparison in QLoggingRegistry::updateCategory
- if (isDefaultCategory)
- name = qtDefaultCategoryName;
- else
+ if (category)
name = category;
+ else
+ name = qtDefaultCategoryName;
if (QLoggingRegistry *reg = QLoggingRegistry::instance())
reg->registerCategory(this, severityLevel);