aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2018-10-12 09:33:30 +0300
committerOrgad Shaneh <orgads@gmail.com>2018-10-13 16:36:58 +0000
commitbdc2b4b59f982eb0a92a19b86b374a669036c913 (patch)
tree2b2b10a01f97c0cfef87995bc990026bdc694964 /tests
parenta27d4e9455fd0bd865a5b72f2ea3636ab5dfed6e (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/extensionsystem/pluginmanager/tst_pluginmanager.cpp1
-rw-r--r--tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp1
-rw-r--r--tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp1
-rw-r--r--tests/auto/qml/codemodel/importscheck/tst_importscheck.cpp1
-rw-r--r--tests/manual/clang-format-for-qtc/test.cpp2
-rw-r--r--tests/unit/unittest/unittests-main.cpp2
6 files changed, 1 insertions, 7 deletions
diff --git a/tests/auto/extensionsystem/pluginmanager/tst_pluginmanager.cpp b/tests/auto/extensionsystem/pluginmanager/tst_pluginmanager.cpp
index 28696e7349..14722c6d57 100644
--- a/tests/auto/extensionsystem/pluginmanager/tst_pluginmanager.cpp
+++ b/tests/auto/extensionsystem/pluginmanager/tst_pluginmanager.cpp
@@ -76,7 +76,6 @@ static QString pluginFolder(const QLatin1String &folder)
void tst_PluginManager::init()
{
- QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
m_pm = new PluginManager;
m_pm->setPluginIID(QLatin1String("plugin"));
m_objectAdded = new QSignalSpy(m_pm, SIGNAL(objectAdded(QObject*)));
diff --git a/tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp b/tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp
index b277d77d80..c846458615 100644
--- a/tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp
+++ b/tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp
@@ -90,7 +90,6 @@ private:
void tst_PluginSpec::init()
{
- QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
QVERIFY(QDir::setCurrent(QLatin1String(PLUGINSPEC_DIR)));
}
diff --git a/tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp b/tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp
index ef3575d77f..842cec7e4e 100644
--- a/tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp
+++ b/tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp
@@ -112,7 +112,6 @@ private:
void tst_Dependencies::initTestCase()
{
- QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
m_path = QLatin1Literal(TESTSRCDIR "/samples");
m_basePaths.append(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath));
diff --git a/tests/auto/qml/codemodel/importscheck/tst_importscheck.cpp b/tests/auto/qml/codemodel/importscheck/tst_importscheck.cpp
index 447363de72..dcedd6df69 100644
--- a/tests/auto/qml/codemodel/importscheck/tst_importscheck.cpp
+++ b/tests/auto/qml/codemodel/importscheck/tst_importscheck.cpp
@@ -100,7 +100,6 @@ QString resourcePath()
void tst_ImportCheck::initTestCase()
{
- QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
if (!ModelManagerInterface::instance())
new ModelManagerInterface;
diff --git a/tests/manual/clang-format-for-qtc/test.cpp b/tests/manual/clang-format-for-qtc/test.cpp
index 3edaa85739..e5afaff130 100644
--- a/tests/manual/clang-format-for-qtc/test.cpp
+++ b/tests/manual/clang-format-for-qtc/test.cpp
@@ -681,7 +681,7 @@ void extremeFunction3(int parameter1,
// 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)
diff --git a/tests/unit/unittest/unittests-main.cpp b/tests/unit/unittest/unittests-main.cpp
index d8f0ce3100..f5eaa8846c 100644
--- a/tests/unit/unittest/unittests-main.cpp
+++ b/tests/unit/unittest/unittests-main.cpp
@@ -45,8 +45,6 @@ int main(int argc, char *argv[])
QCoreApplication application(argc, argv);
- QLoggingCategory::setFilterRules(QStringLiteral("*.info=false\n*.debug=false\n*.warning=true"));
-
testing::InitGoogleTest(&argc, argv);
#ifdef WITH_BENCHMARKS
benchmark::Initialize(&argc, argv);