Commit 784e08a1 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

mainapplication: do not show log from daemon by default

logs from the daemon should not be shown by default, but only in
debug mode, so makes --quiet usable, but only with --debug

Change-Id: Ia7da32e31e034650d184dfae06c9157e13102906
parent 1a50d110
......@@ -187,7 +187,7 @@ MainApplication::init()
initLrc(results[opts::UPDATEURL].toString(),
connectivityMonitor_.get(),
results[opts::MUTEDAEMON].toBool());
results[opts::DEBUG].toBool() && !results[opts::MUTEDAEMON].toBool());
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
using namespace Interfaces;
......@@ -309,7 +309,7 @@ MainApplication::loadTranslations()
}
void
MainApplication::initLrc(const QString& downloadUrl, ConnectivityMonitor* cm, bool muteDaemon)
MainApplication::initLrc(const QString& downloadUrl, ConnectivityMonitor* cm, bool logDaemon)
{
/*
* Init mainwindow and finish splash when mainwindow shows up.
......@@ -333,7 +333,7 @@ MainApplication::initLrc(const QString& downloadUrl, ConnectivityMonitor* cm, bo
},
downloadUrl,
cm,
muteDaemon));
!logDaemon));
lrcInstance_->subscribeToDebugReceived();
}
......@@ -377,7 +377,7 @@ MainApplication::parseArguments()
parser.addOption(updateUrlOption);
#endif
QCommandLineOption muteDaemonOption({"q", "quiet"}, "Mute daemon logging.");
QCommandLineOption muteDaemonOption({"q", "quiet"}, "Mute daemon logging. (only if debug)");
parser.addOption(muteDaemonOption);
parser.process(*this);
......
......@@ -70,7 +70,7 @@ private:
void fileDebug(QFile* debugFile);
void loadTranslations();
void initLrc(const QString& downloadUrl, ConnectivityMonitor* cm, bool muteDaemon);
void initLrc(const QString& downloadUrl, ConnectivityMonitor* cm, bool logDaemon);
const QVariantMap parseArguments();
void setApplicationFont();
void initQmlLayer();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment