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

View File

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