Made Bonjour install Windows only #4196

This commit is contained in:
Xinyu Hou 2014-11-13 13:28:46 +00:00
parent 6fd8afafbd
commit 6cb589d18e
1 changed files with 4 additions and 3 deletions

View File

@ -50,6 +50,8 @@
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
static const char synergyConfigName[] = "synergy.sgc"; static const char synergyConfigName[] = "synergy.sgc";
static const QString synergyConfigFilter(QObject::tr("Synergy Configurations (*.sgc);;All files (*.*)")); static const QString synergyConfigFilter(QObject::tr("Synergy Configurations (*.sgc);;All files (*.*)"));
static const char bonjourUrl[] = "http://synergy-project.org/bonjour/BonjourPSSetup.exe";
static const char bonjourInstaller[] = "BonjourSetup.exe";
#else #else
static const char synergyConfigName[] = "synergy.conf"; static const char synergyConfigName[] = "synergy.conf";
static const QString synergyConfigFilter(QObject::tr("Synergy Configurations (*.conf);;All files (*.*)")); static const QString synergyConfigFilter(QObject::tr("Synergy Configurations (*.conf);;All files (*.*)"));
@ -62,9 +64,6 @@ static const char* synergyIconFiles[] =
":/res/icons/16x16/synergy-connected.png" ":/res/icons/16x16/synergy-connected.png"
}; };
static const char bonjourUrl[] = "http://synergy-project.org/bonjour/BonjourPSSetup.exe";
static const char bonjourInstaller[] = "BonjourSetup.exe";
MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) : MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) :
m_Settings(settings), m_Settings(settings),
m_AppConfig(appConfig), m_AppConfig(appConfig),
@ -1008,6 +1007,7 @@ void MainWindow::downloadBonjour()
void MainWindow::installBonjour() void MainWindow::installBonjour()
{ {
#if defined(Q_OS_WIN)
QString tempLocation = QDesktopServices::storageLocation( QString tempLocation = QDesktopServices::storageLocation(
QDesktopServices::TempLocation); QDesktopServices::TempLocation);
QString filename = tempLocation; QString filename = tempLocation;
@ -1031,6 +1031,7 @@ void MainWindow::installBonjour()
QDesktopServices::openUrl(QUrl("file:///" + filename)); QDesktopServices::openUrl(QUrl("file:///" + filename));
m_DownloadMessageBox->hide(); m_DownloadMessageBox->hide();
#endif
} }
void MainWindow::promptAutoConnect() void MainWindow::promptAutoConnect()