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