From da2b049e248c1ad7efeb53685158a205335e4e36 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 7 Jul 2016 22:23:49 +0200 Subject: A new debug system. Instead of a single #define as debug area the new system allows for an identifier for each debug message with the structure component.area. The component is a dot separated identifier of the runtime component, such as the process or the plugin. The area is the code component, and can be as such defined at compiletime. The idea of this system is that it becomes possible to i.e. look at the output of all messages in the query subsystem of a specific resource (something that happens in the client process, but in the resource-specific subcomponent). The new macros are supposed to be less likely to clash with other names, hence the new names. --- common/specialpurposepreprocessor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'common/specialpurposepreprocessor.cpp') diff --git a/common/specialpurposepreprocessor.cpp b/common/specialpurposepreprocessor.cpp index 2892105..0985880 100644 --- a/common/specialpurposepreprocessor.cpp +++ b/common/specialpurposepreprocessor.cpp @@ -5,6 +5,8 @@ using namespace Sink; +SINK_DEBUG_AREA("SpecialPurposeProcessor") + static QHash specialPurposeFolders() { QHash hash; @@ -53,7 +55,7 @@ QByteArray SpecialPurposeProcessor::ensureFolder(Sink::Storage::Transaction &tra return false; }); if (!mSpecialPurposeFolders.contains(specialPurpose)) { - Trace() << "Failed to find a drafts folder, creating a new one"; + SinkTrace() << "Failed to find a drafts folder, creating a new one"; auto folder = ApplicationDomain::Folder::create(mResourceInstanceIdentifier); folder.setSpecialPurpose(QByteArrayList() << specialPurpose); folder.setName(sSpecialPurposeFolders.value(specialPurpose)); -- cgit v1.2.3