diff options
| author | Tomasz Sterna <tomek@xiaoka.com> | 2015-06-18 22:26:10 +0200 |
|---|---|---|
| committer | Tomasz Sterna <tomek@xiaoka.com> | 2015-06-18 22:26:10 +0200 |
| commit | 4716453e97602e60f58865692f7dc714f5f992e9 (patch) | |
| tree | eea4e4e04e5b0defaae53af0368f1903f28db8ef /daemon/daemon.cpp | |
| parent | ff461247fe6416540f3e211aba40d61c1e359221 (diff) | |
Implemented togglable debug mode
Diffstat (limited to 'daemon/daemon.cpp')
| -rw-r--r-- | daemon/daemon.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/daemon/daemon.cpp b/daemon/daemon.cpp index 85af751..78050d3 100644 --- a/daemon/daemon.cpp +++ b/daemon/daemon.cpp @@ -50,18 +50,14 @@ int main(int argc, char *argv[]) app.setApplicationName("pebble"); // Use the same appname as the UI. app.setOrganizationName(""); - QStringList filterRules; - - filterRules << (argc > 1 and QString("-d") == argv[0] ? - "*.debug=false" : "*.debug=true"); - - // Init logging should be called after app object creation - QLoggingCategory::setFilterRules(filterRules.join("\n")); - QLoggingCategory l("main"); qCDebug(l) << argv[0] << APP_VERSION; Settings settings; + + QLoggingCategory::setFilterRules(settings.property("debug").toBool() ? + "*.debug=true" : "*.debug=false"); + Manager manager(&settings); Q_UNUSED(manager); |
