Improved auto connect massage #4237

This commit is contained in:
Xinyu Hou 2014-11-27 10:36:43 +00:00
parent 79f534273f
commit 54e294bffb
2 changed files with 9 additions and 3 deletions

View File

@ -346,6 +346,12 @@ void MainWindow::appendLogNote(const QString& text)
appendLogRaw("NOTE: " + text);
}
void MainWindow::appendLogDebug(const QString& text) {
if (appConfig().logLevel() >= 4) {
appendLogRaw("DEBUG: " + text);
}
}
void MainWindow::appendLogError(const QString& text)
{
appendLogRaw("ERROR: " + text);
@ -967,7 +973,7 @@ void MainWindow::on_m_pCheckBoxAutoConnect_toggled(bool checked)
if (!isBonjourRunning() && checked) {
int r = QMessageBox::information(
this, tr("Synergy"),
tr("Auto connect feature requires Bonjour installed.\n\n"
tr("Auto connect feature requires Bonjour.\n\n"
"Do you want to install Bonjour?"),
QMessageBox::Yes | QMessageBox::No);
@ -1011,8 +1017,7 @@ bool MainWindow::isServiceRunning(QString name)
delete[] array;
if (hService == NULL) {
appendLogNote("failed to open " + name + " service, error: " +
GetLastError());
appendLogDebug("failed to open service: " + name);
return false;
}

View File

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