Fixed compiler warning on non-windows systems.

This commit is contained in:
Adam Potolsky 2015-02-14 19:22:08 -08:00
parent 226f2c966a
commit b9e178a9ee
2 changed files with 8 additions and 2 deletions

View File

@ -997,9 +997,9 @@ void MainWindow::on_m_pButtonApply_clicked()
startSynergy();
}
#if defined(Q_OS_WIN)
bool MainWindow::isServiceRunning(QString name)
{
#if defined(Q_OS_WIN)
SC_HANDLE hSCManager;
hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT);
if (hSCManager == NULL) {
@ -1029,6 +1029,9 @@ bool MainWindow::isServiceRunning(QString name)
return true;
}
}
#else
bool MainWindow::isServiceRunning()
{
#endif
return false;
}
@ -1066,7 +1069,6 @@ void MainWindow::downloadBonjour()
return;
}
if (m_pDataDownloader == NULL) {
m_pDataDownloader = new DataDownloader(this);
connect(m_pDataDownloader, SIGNAL(isComplete()), SLOT(installBonjour()));

View File

@ -156,7 +156,11 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
void stopDesktop();
void changeEvent(QEvent* event);
void retranslateMenuBar();
#if defined(Q_OS_WIN)
bool isServiceRunning(QString name);
#else
bool isServiceRunning();
#endif
bool isBonjourRunning();
void downloadBonjour();
void promptAutoConfig();