Removed notify log level in settings #4745

This commit is contained in:
Xinyu Hou 2015-06-30 22:45:48 +01:00
parent 85dc7a566e
commit 00734c15b1
4 changed files with 5 additions and 17 deletions

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>368</width>
<height>377</height>
<height>439</height>
</rect>
</property>
<property name="windowTitle">
@ -208,11 +208,6 @@
</item>
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="m_pComboLogLevel">
<item>
<property name="text">
<string>Notify</string>
</property>
</item>
<item>
<property name="text">
<string>Info</string>

View File

@ -37,7 +37,6 @@ const char AppConfig::m_SynergyLogDir[] = "/var/log/";
static const char* logLevelNames[] =
{
"NOTIFY",
"INFO",
"DEBUG",
"DEBUG1",
@ -117,7 +116,7 @@ void AppConfig::loadSettings()
m_ScreenName = settings().value("screenName", QHostInfo::localHostName()).toString();
m_Port = settings().value("port", 24800).toInt();
m_Interface = settings().value("interface").toString();
m_LogLevel = settings().value("logLevel", 1).toInt(); // level 1: INFO
m_LogLevel = settings().value("logLevel", 0).toInt(); // level 0: INFO
m_LogToFile = settings().value("logToFile", false).toBool();
m_LogFilename = settings().value("logFilename", synergyLogDir() + "synergy.log").toString();
m_WizardLastRun = settings().value("wizardLastRun", 0).toInt();
@ -134,7 +133,7 @@ void AppConfig::loadSettings()
m_ResetLogLevel = settings().value("resetLogLevel", true).toBool();
if (m_ResetLogLevel) {
m_LogLevel = 1;
m_LogLevel = 0;
m_ResetLogLevel = false;
}
}

View File

@ -373,13 +373,8 @@ void MainWindow::appendLogInfo(const QString& text)
appendLogRaw("INFO: " + text);
}
void MainWindow::appendLogNotify(const QString& text)
{
appendLogRaw("NOTIFY: " + text);
}
void MainWindow::appendLogDebug(const QString& text) {
if (appConfig().logLevel() >= 2) {
if (appConfig().logLevel() >= 1) {
appendLogRaw("DEBUG: " + text);
}
}
@ -586,7 +581,7 @@ void MainWindow::startSynergy()
qDebug() << args;
// show command if debug log level...
if (appConfig().logLevel() >= 2) {
if (appConfig().logLevel() >= 1) {
appendLogInfo(QString("command: %1 %2").arg(app, args.join(" ")));
}

View File

@ -112,7 +112,6 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
public slots:
void appendLogRaw(const QString& text);
void appendLogInfo(const QString& text);
void appendLogNotify(const QString& text);
void appendLogDebug(const QString& text);
void appendLogError(const QString& text);
void startSynergy();