parent
507abdcbfb
commit
559237f930
|
@ -93,6 +93,16 @@ void AppConfig::persistLogDir()
|
|||
}
|
||||
}
|
||||
|
||||
const QString logFilenameCmd() const
|
||||
{
|
||||
QString filename = m_LogFilename;
|
||||
#if defined(Q_OS_WIN)
|
||||
// wrap in quotes in case username contains spaces.
|
||||
filename = QString("\"%1\"").arg(filename);
|
||||
#endif
|
||||
return filename;
|
||||
}
|
||||
|
||||
QString AppConfig::logLevelText() const
|
||||
{
|
||||
return logLevelNames[logLevel()];
|
||||
|
|
|
@ -59,6 +59,7 @@ class AppConfig
|
|||
int logLevel() const { return m_LogLevel; }
|
||||
bool logToFile() const { return m_LogToFile; }
|
||||
const QString& logFilename() const { return m_LogFilename; }
|
||||
const QString logFilenameCmd() const;
|
||||
QString logLevelText() const;
|
||||
const QString& cryptoPass() const { return m_CryptoPass; }
|
||||
bool cryptoEnabled() const { return m_CryptoEnabled; }
|
||||
|
|
|
@ -508,7 +508,7 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
|
|||
if (appConfig().logToFile())
|
||||
{
|
||||
appConfig().persistLogDir();
|
||||
args << "--log" << appConfig().logFilename();
|
||||
args << "--log" << appConfig().logFilenameCmd();
|
||||
}
|
||||
|
||||
args << m_pLineEditHostname->text() + ":" + QString::number(appConfig().port());
|
||||
|
@ -581,12 +581,7 @@ bool MainWindow::serverArgs(QStringList& args, QString& app)
|
|||
{
|
||||
appConfig().persistLogDir();
|
||||
|
||||
QString logFilename = appConfig().logFilename();
|
||||
#if defined(Q_OS_WIN)
|
||||
// wrap in quotes in case username contains spaces.
|
||||
logFilename = QString("\"%1\"").arg(logFilename);
|
||||
#endif
|
||||
args << "--log" << logFilename;
|
||||
args << "--log" << appConfig().logFilenameCmd();
|
||||
}
|
||||
|
||||
QString configFilename = this->configFilename();
|
||||
|
|
Loading…
Reference in New Issue