Remove hard-coded disabling of debug logs

Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2018-10-12 09:33:30 +03:00
committed by Orgad Shaneh
parent a27d4e9455
commit bdc2b4b59f
87 changed files with 84 additions and 98 deletions

View File

@@ -414,8 +414,6 @@ int main(int argc, char **argv)
Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath() + "/" + Core::Constants::IDE_CASED_ID + "-XXXXXX"); Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath() + "/" + Core::Constants::IDE_CASED_ID + "-XXXXXX");
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false\nqtc.*.info=false"));
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
// increase the number of file that can be opened in Qt Creator. // increase the number of file that can be opened in Qt Creator.
struct rlimit rl; struct rlimit rl;

View File

@@ -37,7 +37,7 @@
namespace { namespace {
Q_LOGGING_CATEGORY(timersLog, "qtc.clangbackend.timers"); Q_LOGGING_CATEGORY(timersLog, "qtc.clangbackend.timers", QtWarningMsg);
class DebugInspectionDir : public QTemporaryDir class DebugInspectionDir : public QTemporaryDir
{ {

View File

@@ -61,7 +61,7 @@
#include <functional> #include <functional>
Q_LOGGING_CATEGORY(pluginLog, "qtc.extensionsystem") Q_LOGGING_CATEGORY(pluginLog, "qtc.extensionsystem", QtWarningMsg)
const char C_IGNORED_PLUGINS[] = "Plugins/Ignored"; const char C_IGNORED_PLUGINS[] = "Plugins/Ignored";
const char C_FORCEENABLED_PLUGINS[] = "Plugins/ForceEnabled"; const char C_FORCEENABLED_PLUGINS[] = "Plugins/ForceEnabled";

View File

@@ -30,7 +30,7 @@
#include <QTextBlock> #include <QTextBlock>
#include <QTextDocument> #include <QTextDocument>
static Q_LOGGING_CATEGORY(formatterLog, "qtc.qmljs.formatter") static Q_LOGGING_CATEGORY(formatterLog, "qtc.qmljs.formatter", QtWarningMsg)
namespace QmlJS { namespace QmlJS {

View File

@@ -40,7 +40,7 @@ enum {
debug = false debug = false
}; };
static Q_LOGGING_CATEGORY(iconsLog, "qtc.qmljs.icons") static Q_LOGGING_CATEGORY(iconsLog, "qtc.qmljs.icons", QtWarningMsg)
namespace QmlJS { namespace QmlJS {

View File

@@ -35,7 +35,7 @@
#include <algorithm> #include <algorithm>
static Q_LOGGING_CATEGORY(importsLog, "qtc.qmljs.imports") static Q_LOGGING_CATEGORY(importsLog, "qtc.qmljs.imports", QtWarningMsg)
namespace QmlJS { namespace QmlJS {

View File

@@ -54,7 +54,7 @@
namespace QmlJS { namespace QmlJS {
QMLJS_EXPORT Q_LOGGING_CATEGORY(qmljsLog, "qtc.qmljs.common") QMLJS_EXPORT Q_LOGGING_CATEGORY(qmljsLog, "qtc.qmljs.common", QtWarningMsg)
/*! /*!
\class QmlJS::ModelManagerInterface \class QmlJS::ModelManagerInterface

View File

@@ -34,7 +34,7 @@
#include <QFile> #include <QFile>
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(simpleReaderLog, "qtc.qmljs.simpleReader") static Q_LOGGING_CATEGORY(simpleReaderLog, "qtc.qmljs.simpleReader", QtWarningMsg)
namespace QmlJS{ namespace QmlJS{

View File

@@ -27,6 +27,6 @@
namespace QSsh { namespace QSsh {
namespace Internal { namespace Internal {
Q_LOGGING_CATEGORY(sshLog, "qtc.ssh") Q_LOGGING_CATEGORY(sshLog, "qtc.ssh", QtWarningMsg)
} // namespace Internal } // namespace Internal
} // namespace QSsh } // namespace QSsh

View File

@@ -29,7 +29,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QTimer> #include <QTimer>
static Q_LOGGING_CATEGORY(benchmarksLog, "qtc.benchmark"); static Q_LOGGING_CATEGORY(benchmarksLog, "qtc.benchmark", QtWarningMsg);
namespace Utils { namespace Utils {

View File

@@ -37,7 +37,7 @@
#include <algorithm> #include <algorithm>
namespace { namespace {
Q_LOGGING_CATEGORY(finderLog, "qtc.utils.fileinprojectfinder"); Q_LOGGING_CATEGORY(finderLog, "qtc.utils.fileinprojectfinder", QtWarningMsg);
} }
namespace Utils { namespace Utils {

View File

@@ -42,7 +42,7 @@
#include <functional> #include <functional>
namespace { namespace {
Q_LOGGING_CATEGORY(avdManagerLog, "qtc.android.avdManager") Q_LOGGING_CATEGORY(avdManagerLog, "qtc.android.avdManager", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -68,7 +68,7 @@ using namespace ProjectExplorer;
using namespace Android::Internal; using namespace Android::Internal;
namespace { namespace {
Q_LOGGING_CATEGORY(buildapkstepLog, "qtc.android.build.androidbuildapkstep") Q_LOGGING_CATEGORY(buildapkstepLog, "qtc.android.build.androidbuildapkstep", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -77,7 +77,7 @@ using namespace ProjectExplorer;
using namespace Utils; using namespace Utils;
namespace { namespace {
Q_LOGGING_CATEGORY(avdConfigLog, "qtc.android.androidconfig") Q_LOGGING_CATEGORY(avdConfigLog, "qtc.android.androidconfig", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -48,7 +48,7 @@
#include <QHostAddress> #include <QHostAddress>
namespace { namespace {
Q_LOGGING_CATEGORY(androidDebugSupportLog, "qtc.android.run.androiddebugsupport") Q_LOGGING_CATEGORY(androidDebugSupportLog, "qtc.android.run.androiddebugsupport", QtWarningMsg)
} }
using namespace Debugger; using namespace Debugger;

View File

@@ -64,7 +64,7 @@ using namespace Android;
using namespace Android::Internal; using namespace Android::Internal;
namespace { namespace {
Q_LOGGING_CATEGORY(deployStepLog, "qtc.android.build.androiddeployqtstep") Q_LOGGING_CATEGORY(deployStepLog, "qtc.android.build.androiddeployqtstep", QtWarningMsg)
} }
const QLatin1String UninstallPreviousPackageKey("UninstallPreviousPackage"); const QLatin1String UninstallPreviousPackageKey("UninstallPreviousPackage");

View File

@@ -39,7 +39,7 @@
using namespace ProjectExplorer; using namespace ProjectExplorer;
namespace { namespace {
Q_LOGGING_CATEGORY(androidDeviceLog, "qtc.android.build.androiddevice") Q_LOGGING_CATEGORY(androidDeviceLog, "qtc.android.build.androiddevice", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -77,7 +77,7 @@ namespace {
const QString apkVersionRegEx("package: name=([\\=a-z\\d_\\.\\'\\s]*)" const QString apkVersionRegEx("package: name=([\\=a-z\\d_\\.\\'\\s]*)"
"\\sversionName='([\\d\\.]*)'"); "\\sversionName='([\\d\\.]*)'");
Q_LOGGING_CATEGORY(androidManagerLog, "qtc.android.androidManager") Q_LOGGING_CATEGORY(androidManagerLog, "qtc.android.androidManager", QtWarningMsg)
bool runCommand(const QString &executable, const QStringList &args, bool runCommand(const QString &executable, const QStringList &args,
QString *output = nullptr, int timeoutS = 30) QString *output = nullptr, int timeoutS = 30)

View File

@@ -45,7 +45,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
namespace { namespace {
Q_LOGGING_CATEGORY(androidRunnerLog, "qtc.android.run.androidrunner") Q_LOGGING_CATEGORY(androidRunnerLog, "qtc.android.run.androidrunner", QtWarningMsg)
} }
using namespace ProjectExplorer; using namespace ProjectExplorer;

View File

@@ -52,7 +52,7 @@
#include <chrono> #include <chrono>
namespace { namespace {
Q_LOGGING_CATEGORY(androidRunWorkerLog, "qtc.android.run.androidrunnerworker") Q_LOGGING_CATEGORY(androidRunWorkerLog, "qtc.android.run.androidrunnerworker", QtWarningMsg)
} }
using namespace std; using namespace std;

View File

@@ -41,7 +41,7 @@
#include <QSettings> #include <QSettings>
namespace { namespace {
Q_LOGGING_CATEGORY(sdkManagerLog, "qtc.android.sdkManager") Q_LOGGING_CATEGORY(sdkManagerLog, "qtc.android.sdkManager", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -44,7 +44,7 @@
#include <QSortFilterProxyModel> #include <QSortFilterProxyModel>
namespace { namespace {
Q_LOGGING_CATEGORY(androidSdkMgrUiLog, "qtc.android.sdkManagerUi") Q_LOGGING_CATEGORY(androidSdkMgrUiLog, "qtc.android.sdkManagerUi", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -35,7 +35,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
namespace { namespace {
Q_LOGGING_CATEGORY(androidToolLog, "qtc.android.sdkManager") Q_LOGGING_CATEGORY(androidToolLog, "qtc.android.sdkManager", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -49,7 +49,7 @@
#include <QFutureInterface> #include <QFutureInterface>
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testcodeparser") static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testcodeparser", QtWarningMsg)
namespace Autotest { namespace Autotest {
namespace Internal { namespace Internal {

View File

@@ -41,7 +41,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testconfiguration") static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testconfiguration", QtWarningMsg)
using namespace ProjectExplorer; using namespace ProjectExplorer;

View File

@@ -40,7 +40,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QSettings> #include <QSettings>
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.frameworkmanager") static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.frameworkmanager", QtWarningMsg)
namespace Autotest { namespace Autotest {
namespace Internal { namespace Internal {

View File

@@ -28,7 +28,7 @@
namespace ClangCodeModel { namespace ClangCodeModel {
namespace Internal { namespace Internal {
Q_LOGGING_CATEGORY(ipcLog, "qtc.clangcodemodel.ipc") Q_LOGGING_CATEGORY(ipcLog, "qtc.clangcodemodel.ipc", QtWarningMsg)
} // namespace Internal } // namespace Internal
} // namespace ClangCodeModel } // namespace ClangCodeModel

View File

@@ -40,7 +40,7 @@
#include <QTextCodec> #include <QTextCodec>
#include <QVBoxLayout> #include <QVBoxLayout>
Q_LOGGING_CATEGORY(hoverLog, "qtc.clangcodemodel.hover"); Q_LOGGING_CATEGORY(hoverLog, "qtc.clangcodemodel.hover", QtWarningMsg);
using namespace TextEditor; using namespace TextEditor;

View File

@@ -61,7 +61,7 @@ using namespace ClangCodeModel;
using namespace ClangCodeModel::Internal; using namespace ClangCodeModel::Internal;
using namespace ProjectExplorer; using namespace ProjectExplorer;
static Q_LOGGING_CATEGORY(debug, "qtc.clangcodemodel.batch"); static Q_LOGGING_CATEGORY(debug, "qtc.clangcodemodel.batch", QtWarningMsg);
static int timeOutFromEnvironmentVariable() static int timeOutFromEnvironmentVariable()
{ {

View File

@@ -35,7 +35,7 @@
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
Q_LOGGING_CATEGORY(fixitsLog, "qtc.clangtools.fixits"); Q_LOGGING_CATEGORY(fixitsLog, "qtc.clangtools.fixits", QtWarningMsg);
using namespace Utils; using namespace Utils;

View File

@@ -37,7 +37,7 @@
#include <QDir> #include <QDir>
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner") static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner", QtWarningMsg)
namespace ClangTools { namespace ClangTools {
namespace Internal { namespace Internal {

View File

@@ -70,7 +70,7 @@ using namespace CppTools;
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace Utils; using namespace Utils;
static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runcontrol") static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runcontrol", QtWarningMsg)
static QStringList splitArgs(QString &argsString) static QStringList splitArgs(QString &argsString)
{ {

View File

@@ -38,7 +38,7 @@
#include <QFileInfo> #include <QFileInfo>
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner") static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner", QtWarningMsg)
namespace ClangTools { namespace ClangTools {
namespace Internal { namespace Internal {

View File

@@ -60,7 +60,7 @@ int distance(const FileName &targetDirectory, const FileName &fileName)
// compiler flags // compiler flags
void CMakeCbpParser::sortFiles() void CMakeCbpParser::sortFiles()
{ {
QLoggingCategory log("qtc.cmakeprojectmanager.filetargetmapping"); QLoggingCategory log("qtc.cmakeprojectmanager.filetargetmapping", QtWarningMsg);
FileNameList fileNames = transform<QList>(m_fileList, &FileNode::filePath); FileNameList fileNames = transform<QList>(m_fileList, &FileNode::filePath);
sort(fileNames); sort(fileNames);

View File

@@ -50,7 +50,7 @@ using namespace QtSupport;
namespace { namespace {
Q_LOGGING_CATEGORY(cmInputLog, "qtc.cmake.import"); Q_LOGGING_CATEGORY(cmInputLog, "qtc.cmake.import", QtWarningMsg);
struct CMakeToolChainData struct CMakeToolChainData
{ {

View File

@@ -57,7 +57,7 @@ const char HANDSHAKE_TYPE[] = "handshake";
const char START_MAGIC[] = "\n[== \"CMake Server\" ==[\n"; const char START_MAGIC[] = "\n[== \"CMake Server\" ==[\n";
const char END_MAGIC[] = "\n]== \"CMake Server\" ==]\n"; const char END_MAGIC[] = "\n]== \"CMake Server\" ==]\n";
Q_LOGGING_CATEGORY(cmakeServerMode, "qtc.cmake.serverMode"); Q_LOGGING_CATEGORY(cmakeServerMode, "qtc.cmake.serverMode", QtWarningMsg);
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// Helpers: // Helpers:

View File

@@ -65,7 +65,7 @@
#include <QMenu> #include <QMenu>
#include <QMessageBox> #include <QMessageBox>
Q_LOGGING_CATEGORY(log, "qtc.core.documentmanager") Q_LOGGING_CATEGORY(log, "qtc.core.documentmanager", QtWarningMsg)
/*! /*!
\class Core::DocumentManager \class Core::DocumentManager

View File

@@ -47,7 +47,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QTextBlock> #include <QTextBlock>
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.builtineditordocumentprocessor") static Q_LOGGING_CATEGORY(log, "qtc.cpptools.builtineditordocumentprocessor", QtWarningMsg)
namespace { namespace {

View File

@@ -42,7 +42,7 @@ enum { debug = 0 };
using namespace CPlusPlus; using namespace CPlusPlus;
using namespace CppTools; using namespace CppTools;
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semanticinfoupdater") static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semanticinfoupdater", QtWarningMsg)
namespace CppTools { namespace CppTools {

View File

@@ -58,7 +58,7 @@ using namespace CppTools::Internal;
typedef Document::DiagnosticMessage Message; typedef Document::DiagnosticMessage Message;
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.sourceprocessor") static Q_LOGGING_CATEGORY(log, "qtc.cpptools.sourceprocessor", QtWarningMsg)
namespace { namespace {

View File

@@ -73,7 +73,7 @@ GeneratedCodeModelSupport::GeneratedCodeModelSupport(CppModelManager *modelmanag
CppTools::AbstractEditorSupport(modelmanager, generator), m_generatedFileName(generatedFile), CppTools::AbstractEditorSupport(modelmanager, generator), m_generatedFileName(generatedFile),
m_generator(generator) m_generator(generator)
{ {
QLoggingCategory log("qtc.cpptools.generatedcodemodelsupport"); QLoggingCategory log("qtc.cpptools.generatedcodemodelsupport", QtWarningMsg);
qCDebug(log) << "ctor GeneratedCodeModelSupport for" << m_generator->source() qCDebug(log) << "ctor GeneratedCodeModelSupport for" << m_generator->source()
<< generatedFile; << generatedFile;
@@ -86,7 +86,7 @@ GeneratedCodeModelSupport::~GeneratedCodeModelSupport()
{ {
CppTools::CppModelManager::instance()->emitAbstractEditorSupportRemoved( CppTools::CppModelManager::instance()->emitAbstractEditorSupportRemoved(
m_generatedFileName.toString()); m_generatedFileName.toString());
QLoggingCategory log("qtc.cpptools.generatedcodemodelsupport"); QLoggingCategory log("qtc.cpptools.generatedcodemodelsupport", QtWarningMsg);
qCDebug(log) << "dtor ~generatedcodemodelsupport for" << m_generatedFileName; qCDebug(log) << "dtor ~generatedcodemodelsupport for" << m_generatedFileName;
} }

View File

@@ -40,7 +40,7 @@ using namespace TextEditor;
using SemanticHighlighter::incrementalApplyExtraAdditionalFormats; using SemanticHighlighter::incrementalApplyExtraAdditionalFormats;
using SemanticHighlighter::clearExtraAdditionalFormatsUntilEnd; using SemanticHighlighter::clearExtraAdditionalFormatsUntilEnd;
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semantichighlighter") static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semantichighlighter", QtWarningMsg)
namespace CppTools { namespace CppTools {

View File

@@ -59,7 +59,7 @@ using namespace QmlDebug::Constants;
namespace Debugger { namespace Debugger {
namespace Internal { namespace Internal {
Q_LOGGING_CATEGORY(qmlInspectorLog, "qtc.dbg.qmlinspector") Q_LOGGING_CATEGORY(qmlInspectorLog, "qtc.dbg.qmlinspector", QtWarningMsg)
/*! /*!
* DebuggerAgent updates the watchhandler with the object tree data. * DebuggerAgent updates the watchhandler with the object tree data.

View File

@@ -47,7 +47,7 @@ namespace Ios {
namespace Internal { namespace Internal {
namespace { namespace {
Q_LOGGING_CATEGORY(iosSettingsLog, "qtc.ios.common") Q_LOGGING_CATEGORY(iosSettingsLog, "qtc.ios.common", QtWarningMsg)
} }
static const int IdentifierRole = Qt::UserRole+1; static const int IdentifierRole = Qt::UserRole+1;

View File

@@ -71,8 +71,8 @@ using namespace Utils;
using namespace Debugger; using namespace Debugger;
namespace { namespace {
Q_LOGGING_CATEGORY(kitSetupLog, "qtc.ios.kitSetup") Q_LOGGING_CATEGORY(kitSetupLog, "qtc.ios.kitSetup", QtWarningMsg)
Q_LOGGING_CATEGORY(iosCommonLog, "qtc.ios.common") Q_LOGGING_CATEGORY(iosCommonLog, "qtc.ios.common", QtWarningMsg)
} }
using ToolChainPair = std::pair<ClangToolChain *, ClangToolChain *>; using ToolChainPair = std::pair<ClangToolChain *, ClangToolChain *>;

View File

@@ -49,7 +49,7 @@
using namespace ProjectExplorer; using namespace ProjectExplorer;
namespace { namespace {
Q_LOGGING_CATEGORY(detectLog, "qtc.ios.deviceDetect") Q_LOGGING_CATEGORY(detectLog, "qtc.ios.deviceDetect", QtWarningMsg)
} }
#ifdef Q_OS_MAC #ifdef Q_OS_MAC

View File

@@ -53,7 +53,7 @@ using namespace QtSupport;
namespace Ios { namespace Ios {
namespace Internal { namespace Internal {
Q_LOGGING_CATEGORY(iosLog, "qtc.ios.common") Q_LOGGING_CATEGORY(iosLog, "qtc.ios.common", QtWarningMsg)
class IosPluginPrivate class IosPluginPrivate
{ {

View File

@@ -33,7 +33,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QProcess> #include <QProcess>
static Q_LOGGING_CATEGORY(probeLog, "qtc.ios.probe") static Q_LOGGING_CATEGORY(probeLog, "qtc.ios.probe", QtWarningMsg)
namespace Ios { namespace Ios {

View File

@@ -58,7 +58,7 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
static Q_LOGGING_CATEGORY(toolHandlerLog, "qtc.ios.toolhandler") static Q_LOGGING_CATEGORY(toolHandlerLog, "qtc.ios.toolhandler", QtWarningMsg)
namespace Ios { namespace Ios {

View File

@@ -47,7 +47,7 @@
using namespace std; using namespace std;
namespace { namespace {
Q_LOGGING_CATEGORY(simulatorLog, "qtc.ios.simulator") Q_LOGGING_CATEGORY(simulatorLog, "qtc.ios.simulator", QtWarningMsg)
} }
namespace Ios { namespace Ios {

View File

@@ -34,7 +34,7 @@
#include <QPushButton> #include <QPushButton>
namespace { namespace {
Q_LOGGING_CATEGORY(iosCommon, "qtc.ios.common") Q_LOGGING_CATEGORY(iosCommon, "qtc.ios.common", QtWarningMsg)
} }
namespace Ios { namespace Ios {

View File

@@ -58,8 +58,8 @@ using namespace Utils;
namespace LanguageClient { namespace LanguageClient {
static Q_LOGGING_CATEGORY(LOGLSPCLIENT, "qtc.languageclient.client"); static Q_LOGGING_CATEGORY(LOGLSPCLIENT, "qtc.languageclient.client", QtWarningMsg);
static Q_LOGGING_CATEGORY(LOGLSPCLIENTV, "qtc.languageclient.messages"); static Q_LOGGING_CATEGORY(LOGLSPCLIENTV, "qtc.languageclient.messages", QtWarningMsg);
BaseClient::BaseClient() BaseClient::BaseClient()
: m_id(Core::Id::fromString(QUuid::createUuid().toString())) : m_id(Core::Id::fromString(QUuid::createUuid().toString()))

View File

@@ -43,7 +43,7 @@
#include <QTextDocument> #include <QTextDocument>
#include <QTime> #include <QTime>
static Q_LOGGING_CATEGORY(LOGLSPCOMPLETION, "qtc.languageclient.completion"); static Q_LOGGING_CATEGORY(LOGLSPCOMPLETION, "qtc.languageclient.completion", QtWarningMsg);
using namespace LanguageServerProtocol; using namespace LanguageServerProtocol;

View File

@@ -551,7 +551,7 @@ void ModelIndexer::removeDiagramReferenceFile(const QString &file,
const QLoggingCategory &ModelIndexer::logger() const QLoggingCategory &ModelIndexer::logger()
{ {
static const QLoggingCategory category("qtc.modeleditor.modelindexer"); static const QLoggingCategory category("qtc.modeleditor.modelindexer", QtWarningMsg);
return category; return category;
} }

View File

@@ -56,7 +56,7 @@
#include <memory> #include <memory>
namespace { namespace {
Q_LOGGING_CATEGORY(gccLog, "qtc.projectexplorer.toolchain.gcc"); Q_LOGGING_CATEGORY(gccLog, "qtc.projectexplorer.toolchain.gcc", QtWarningMsg);
} // namespace } // namespace
using namespace Utils; using namespace Utils;

View File

@@ -88,7 +88,7 @@ QList<BuildInfo *> ProjectImporter::import(const Utils::FileName &importPath, bo
{ {
QList<BuildInfo *> result; QList<BuildInfo *> result;
const QLoggingCategory log("qtc.projectexplorer.import"); const QLoggingCategory log("qtc.projectexplorer.import", QtWarningMsg);
qCDebug(log) << "ProjectImporter::import" << importPath << silent; qCDebug(log) << "ProjectImporter::import" << importPath << silent;
QFileInfo fi = importPath.toFileInfo(); QFileInfo fi = importPath.toFileInfo();

View File

@@ -470,7 +470,7 @@ Node *FlatModel::nodeForIndex(const QModelIndex &index) const
const QLoggingCategory &FlatModel::logger() const QLoggingCategory &FlatModel::logger()
{ {
static QLoggingCategory logger("qtc.projectexplorer.flatmodel"); static QLoggingCategory logger("qtc.projectexplorer.flatmodel", QtWarningMsg);
return logger; return logger;
} }

View File

@@ -66,7 +66,7 @@ using namespace Utils;
using namespace ProjectExplorer::Internal; using namespace ProjectExplorer::Internal;
namespace { namespace {
Q_LOGGING_CATEGORY(statesLog, "qtc.projectmanager.states") Q_LOGGING_CATEGORY(statesLog, "qtc.projectmanager.states", QtWarningMsg)
} }
namespace ProjectExplorer { namespace ProjectExplorer {

View File

@@ -27,6 +27,6 @@
namespace QbsProjectManager { namespace QbsProjectManager {
namespace Internal { namespace Internal {
Q_LOGGING_CATEGORY(qbsPmLog, "qtc.qbspm") Q_LOGGING_CATEGORY(qbsPmLog, "qtc.qbspm", QtWarningMsg)
} }
} }

View File

@@ -349,7 +349,7 @@ BaseQtVersion::QmakeBuildConfigs MakeFileParse::effectiveBuildConfig(BaseQtVersi
const QLoggingCategory &MakeFileParse::logging() const QLoggingCategory &MakeFileParse::logging()
{ {
static const QLoggingCategory category("qtc.qmakeprojectmanager.import"); static const QLoggingCategory category("qtc.qmakeprojectmanager.import", QtWarningMsg);
return category; return category;
} }

View File

@@ -96,7 +96,7 @@ private:
namespace QmakeProjectManager { namespace QmakeProjectManager {
Q_LOGGING_CATEGORY(qmakeParse, "qtc.qmake.parsing"); Q_LOGGING_CATEGORY(qmakeParse, "qtc.qmake.parsing", QtWarningMsg);
uint qHash(Variable key, uint seed) { return ::qHash(static_cast<int>(key), seed); } uint qHash(Variable key, uint seed) { return ::qHash(static_cast<int>(key), seed); }

View File

@@ -38,7 +38,7 @@
#include <QTimer> #include <QTimer>
#include <QWidget> #include <QWidget>
static Q_LOGGING_CATEGORY(dragToolInfo, "qtc.qmldesigner.formeditor"); static Q_LOGGING_CATEGORY(dragToolInfo, "qtc.qmldesigner.formeditor", QtWarningMsg);
namespace QmlDesigner { namespace QmlDesigner {

View File

@@ -42,7 +42,7 @@
#include <limits> #include <limits>
static Q_LOGGING_CATEGORY(moveManipulatorInfo, "qtc.qmldesigner.formeditor"); static Q_LOGGING_CATEGORY(moveManipulatorInfo, "qtc.qmldesigner.formeditor", QtWarningMsg);
namespace QmlDesigner { namespace QmlDesigner {

View File

@@ -42,7 +42,7 @@
#include <QPen> #include <QPen>
#include <qdebug.h> #include <qdebug.h>
static Q_LOGGING_CATEGORY(itemlibraryPopulate, "qtc.itemlibrary.populate") static Q_LOGGING_CATEGORY(itemlibraryPopulate, "qtc.itemlibrary.populate", QtWarningMsg)
static bool inline registerItemLibrarySortedModel() { static bool inline registerItemLibrarySortedModel() {
qmlRegisterType<QmlDesigner::ItemLibrarySectionModel>(); qmlRegisterType<QmlDesigner::ItemLibrarySectionModel>();

View File

@@ -49,7 +49,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(propertyEditorBenchmark, "qtc.propertyeditor.load") static Q_LOGGING_CATEGORY(propertyEditorBenchmark, "qtc.propertyeditor.load", QtWarningMsg)
static QmlJS::SimpleReaderNode::Ptr s_templateConfiguration = QmlJS::SimpleReaderNode::Ptr(); static QmlJS::SimpleReaderNode::Ptr s_templateConfiguration = QmlJS::SimpleReaderNode::Ptr();

View File

@@ -34,7 +34,7 @@
#include <typeinfo> #include <typeinfo>
static Q_LOGGING_CATEGORY(qmlRewriter, "qtc.rewriter.qmlrewriter") static Q_LOGGING_CATEGORY(qmlRewriter, "qtc.rewriter.qmlrewriter", QtWarningMsg)
using namespace QmlDesigner::Internal; using namespace QmlDesigner::Internal;

View File

@@ -85,7 +85,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static Q_LOGGING_CATEGORY(instanceViewBenchmark, "qtc.nodeinstances.init") static Q_LOGGING_CATEGORY(instanceViewBenchmark, "qtc.nodeinstances.init", QtWarningMsg)
void NodeInstanceServerProxy::showCannotConnectToPuppetWarningAndSwitchToEditMode() void NodeInstanceServerProxy::showCannotConnectToPuppetWarningAndSwitchToEditMode()
{ {

View File

@@ -65,8 +65,8 @@
#include <QThread> #include <QThread>
#include <QSettings> #include <QSettings>
static Q_LOGGING_CATEGORY(puppetStart, "qtc.puppet.start") static Q_LOGGING_CATEGORY(puppetStart, "qtc.puppet.start", QtWarningMsg)
static Q_LOGGING_CATEGORY(puppetBuild, "qtc.puppet.build") static Q_LOGGING_CATEGORY(puppetBuild, "qtc.puppet.build", QtWarningMsg)
namespace QmlDesigner { namespace QmlDesigner {

View File

@@ -64,7 +64,7 @@
using namespace LanguageUtils; using namespace LanguageUtils;
using namespace QmlJS; using namespace QmlJS;
static Q_LOGGING_CATEGORY(rewriterBenchmark, "qtc.rewriter.load") static Q_LOGGING_CATEGORY(rewriterBenchmark, "qtc.rewriter.load", QtWarningMsg)
namespace { namespace {

View File

@@ -52,7 +52,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static Q_LOGGING_CATEGORY(viewBenchmark, "qtc.viewmanager.attach") static Q_LOGGING_CATEGORY(viewBenchmark, "qtc.viewmanager.attach", QtWarningMsg)
class ViewManagerData class ViewManagerData
{ {

View File

@@ -54,7 +54,7 @@
namespace QmlDesigner { namespace QmlDesigner {
Q_LOGGING_CATEGORY(documentManagerLog, "qtc.qtquickdesigner.documentmanager") Q_LOGGING_CATEGORY(documentManagerLog, "qtc.qtquickdesigner.documentmanager", QtWarningMsg)
static inline QmlDesigner::DesignDocument* designDocument() static inline QmlDesigner::DesignDocument* designDocument()
{ {

View File

@@ -70,7 +70,7 @@
#include <QScreen> #include <QScreen>
#include <QWindow> #include <QWindow>
Q_LOGGING_CATEGORY(qmldesignerLog, "qtc.qmldesigner") Q_LOGGING_CATEGORY(qmldesignerLog, "qtc.qmldesigner", QtWarningMsg)
using namespace QmlDesigner::Internal; using namespace QmlDesigner::Internal;

View File

@@ -38,7 +38,7 @@ using namespace ProjectExplorer;
namespace QtSupport { namespace QtSupport {
static QLoggingCategory log("qtc.qscxmlcgenerator"); static QLoggingCategory log("qtc.qscxmlcgenerator", QtWarningMsg);
static const char TaskCategory[] = "Task.Category.ExtraCompiler.QScxmlc"; static const char TaskCategory[] = "Task.Category.ExtraCompiler.QScxmlc";
QScxmlcGenerator::QScxmlcGenerator(const Project *project, QScxmlcGenerator::QScxmlcGenerator(const Project *project,

View File

@@ -59,9 +59,9 @@ using namespace Utils;
using namespace ProjectExplorer; using namespace ProjectExplorer;
namespace { namespace {
Q_LOGGING_CATEGORY(baseLog, "qtc.vcs.base") Q_LOGGING_CATEGORY(baseLog, "qtc.vcs.base", QtWarningMsg)
Q_LOGGING_CATEGORY(findRepoLog, "qtc.vcs.find-repo") Q_LOGGING_CATEGORY(findRepoLog, "qtc.vcs.find-repo", QtWarningMsg)
Q_LOGGING_CATEGORY(stateLog, "qtc.vcs.state") Q_LOGGING_CATEGORY(stateLog, "qtc.vcs.state", QtWarningMsg)
} }
/*! /*!

View File

@@ -69,8 +69,6 @@ int main(int argc, char *argv[])
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
qInstallMessageHandler(messageOutput); qInstallMessageHandler(messageOutput);
#endif #endif
QLoggingCategory::setFilterRules(QStringLiteral("qtc.*.debug=false"));
QCoreApplication::setOrganizationName(QStringLiteral("QtProject")); QCoreApplication::setOrganizationName(QStringLiteral("QtProject"));
QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org")); QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
QCoreApplication::setApplicationName(QStringLiteral("ClangBackend")); QCoreApplication::setApplicationName(QStringLiteral("ClangBackend"));

View File

@@ -44,7 +44,7 @@
#include <QDebug> #include <QDebug>
#include <QLoggingCategory> #include <QLoggingCategory>
Q_LOGGING_CATEGORY(serverLog, "qtc.clangbackend.server"); Q_LOGGING_CATEGORY(serverLog, "qtc.clangbackend.server", QtWarningMsg);
static bool useSupportiveTranslationUnit() static bool useSupportiveTranslationUnit()
{ {

View File

@@ -25,7 +25,7 @@
#include "clangiasyncjob.h" #include "clangiasyncjob.h"
Q_LOGGING_CATEGORY(jobsLog, "qtc.clangbackend.jobs"); Q_LOGGING_CATEGORY(jobsLog, "qtc.clangbackend.jobs", QtWarningMsg);
namespace ClangBackEnd { namespace ClangBackEnd {

View File

@@ -35,7 +35,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QUuid> #include <QUuid>
Q_LOGGING_CATEGORY(tuLog, "qtc.clangbackend.translationunits"); Q_LOGGING_CATEGORY(tuLog, "qtc.clangbackend.translationunits", QtWarningMsg);
namespace ClangBackEnd { namespace ClangBackEnd {

View File

@@ -32,7 +32,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(verboseLibLog, "qtc.clangbackend.verboselib"); static Q_LOGGING_CATEGORY(verboseLibLog, "qtc.clangbackend.verboselib", QtWarningMsg);
static bool isVerboseModeEnabled() static bool isVerboseModeEnabled()
{ {

View File

@@ -182,8 +182,6 @@ struct Data // because we have a cycle dependency
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
try { try {
//QLoggingCategory::setFilterRules(QStringLiteral("*.debug=false"));
QCoreApplication::setOrganizationName(QStringLiteral("QtProject")); QCoreApplication::setOrganizationName(QStringLiteral("QtProject"));
QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org")); QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
QCoreApplication::setApplicationName(QStringLiteral("ClangPchManagerBackend")); QCoreApplication::setApplicationName(QStringLiteral("ClangPchManagerBackend"));

View File

@@ -86,8 +86,6 @@ public:
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
try { try {
//QLoggingCategory::setFilterRules(QStringLiteral("*.debug=false"));
QCoreApplication::setOrganizationName(QStringLiteral("QtProject")); QCoreApplication::setOrganizationName(QStringLiteral("QtProject"));
QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org")); QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
QCoreApplication::setApplicationName(QStringLiteral("ClangRefactoringBackend")); QCoreApplication::setApplicationName(QStringLiteral("ClangRefactoringBackend"));

View File

@@ -76,7 +76,6 @@ static QString pluginFolder(const QLatin1String &folder)
void tst_PluginManager::init() void tst_PluginManager::init()
{ {
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
m_pm = new PluginManager; m_pm = new PluginManager;
m_pm->setPluginIID(QLatin1String("plugin")); m_pm->setPluginIID(QLatin1String("plugin"));
m_objectAdded = new QSignalSpy(m_pm, SIGNAL(objectAdded(QObject*))); m_objectAdded = new QSignalSpy(m_pm, SIGNAL(objectAdded(QObject*)));

View File

@@ -90,7 +90,6 @@ private:
void tst_PluginSpec::init() void tst_PluginSpec::init()
{ {
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
QVERIFY(QDir::setCurrent(QLatin1String(PLUGINSPEC_DIR))); QVERIFY(QDir::setCurrent(QLatin1String(PLUGINSPEC_DIR)));
} }

View File

@@ -112,7 +112,6 @@ private:
void tst_Dependencies::initTestCase() void tst_Dependencies::initTestCase()
{ {
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
m_path = QLatin1Literal(TESTSRCDIR "/samples"); m_path = QLatin1Literal(TESTSRCDIR "/samples");
m_basePaths.append(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)); m_basePaths.append(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath));

View File

@@ -100,7 +100,6 @@ QString resourcePath()
void tst_ImportCheck::initTestCase() void tst_ImportCheck::initTestCase()
{ {
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
if (!ModelManagerInterface::instance()) if (!ModelManagerInterface::instance())
new ModelManagerInterface; new ModelManagerInterface;

View File

@@ -681,7 +681,7 @@ void extremeFunction3(int parameter1,
// Misc // Misc
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.builtineditordocumentprocessor") static Q_LOGGING_CATEGORY(log, "qtc.cpptools.builtineditordocumentprocessor", QtWarningMsg)
int hello; // NOTE: Ops, awkward placement of next token after Q_LOGGING_CATEGORY (semicolon helps) int hello; // NOTE: Ops, awkward placement of next token after Q_LOGGING_CATEGORY (semicolon helps)

View File

@@ -45,8 +45,6 @@ int main(int argc, char *argv[])
QCoreApplication application(argc, argv); QCoreApplication application(argc, argv);
QLoggingCategory::setFilterRules(QStringLiteral("*.info=false\n*.debug=false\n*.warning=true"));
testing::InitGoogleTest(&argc, argv); testing::InitGoogleTest(&argc, argv);
#ifdef WITH_BENCHMARKS #ifdef WITH_BENCHMARKS
benchmark::Initialize(&argc, argv); benchmark::Initialize(&argc, argv);