Fixed: Compile errors on Linux #4168

This commit is contained in:
Nick Bolton 2015-03-03 17:29:52 +00:00
parent b8a5abc19f
commit 7add4f4d3f
1 changed files with 8 additions and 8 deletions

View File

@ -108,11 +108,12 @@ void PluginManager::saveOpenSslSetup()
dir.mkpath(".");
}
QString filename = m_ProfileDir;
#if defined(Q_OS_WIN)
filename.append("\\").append(kWinOpenSslSetup);
#endif
QString filename =
QString("%1\\%2")
.arg(m_ProfileDir)
.arg(kWinOpenSslSetup);
QFile file(filename);
if (!file.open(QIODevice::WriteOnly)) {
@ -125,19 +126,18 @@ void PluginManager::saveOpenSslSetup()
file.write(m_DataDownloader.data());
file.close();
QString openSslSetupFile = m_ProfileDir;
openSslSetupFile.append("\\").append(kWinOpenSslSetup);
QStringList installArgs;
installArgs.append("-s");
installArgs.append("-y");
if (!runProgram(openSslSetupFile, installArgs, QStringList())) {
if (!runProgram(filename, installArgs, QStringList())) {
return;
}
// openssl installer no longer needed
QFile::remove(openSslSetupFile);
QFile::remove(filename);
#endif
emit openSslBinaryReady();
}