mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-13 02:39:37 +00:00
Merge with develop
--HG-- branch : compatibility-develop
This commit is contained in:
commit
119bbe1f71
4 changed files with 28 additions and 1 deletions
|
@ -124,6 +124,7 @@ bool CHttpClient::sendRequest(const std::string& methodWB, const std::string &ur
|
||||||
std::string request;
|
std::string request;
|
||||||
request += methodWB + " " + path + " HTTP/1.1\r\n";
|
request += methodWB + " " + path + " HTTP/1.1\r\n";
|
||||||
request += "Host: " + host + "\r\n";
|
request += "Host: " + host + "\r\n";
|
||||||
|
request += "Connection: close\r\n";
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
if (cookieName.empty() && postParams.empty())
|
if (cookieName.empty() && postParams.empty())
|
||||||
|
|
|
@ -82,10 +82,13 @@ bool CConfigFile::load(const QString &filename)
|
||||||
server.clientDownloadFilename = settings.value("client_download_filename").toString();
|
server.clientDownloadFilename = settings.value("client_download_filename").toString();
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
server.clientFilename = settings.value("client_filename_windows").toString();
|
server.clientFilename = settings.value("client_filename_windows").toString();
|
||||||
|
server.configurationFilename = settings.value("configuration_filename_windows").toString();
|
||||||
#elif defined(Q_OS_MAC)
|
#elif defined(Q_OS_MAC)
|
||||||
server.clientFilename = settings.value("client_filename_osx").toString();
|
server.clientFilename = settings.value("client_filename_osx").toString();
|
||||||
|
server.configurationFilename = settings.value("configuration_filename_osx").toString();
|
||||||
#else
|
#else
|
||||||
server.clientFilename = settings.value("client_filename_linux").toString();
|
server.clientFilename = settings.value("client_filename_linux").toString();
|
||||||
|
server.configurationFilename = settings.value("configuration_filename_linux").toString();
|
||||||
#endif
|
#endif
|
||||||
server.comments = settings.value("comments").toString();
|
server.comments = settings.value("comments").toString();
|
||||||
|
|
||||||
|
@ -154,10 +157,13 @@ bool CConfigFile::save() const
|
||||||
settings.setValue("client_download_filename", server.clientDownloadFilename);
|
settings.setValue("client_download_filename", server.clientDownloadFilename);
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
settings.setValue("client_filename_windows", server.clientFilename);
|
settings.setValue("client_filename_windows", server.clientFilename);
|
||||||
|
settings.setValue("configuration_filename_windows", server.configurationFilename);
|
||||||
#elif defined(Q_OS_MAC)
|
#elif defined(Q_OS_MAC)
|
||||||
settings.setValue("client_filename_osx", server.clientFilename);
|
settings.setValue("client_filename_osx", server.clientFilename);
|
||||||
|
settings.setValue("configuration_filename_osx", server.configurationFilename);
|
||||||
#else
|
#else
|
||||||
settings.setValue("client_filename_linux", server.clientFilename);
|
settings.setValue("client_filename_linux", server.clientFilename);
|
||||||
|
settings.setValue("configuration_filename_linux", server.configurationFilename);
|
||||||
#endif
|
#endif
|
||||||
settings.setValue("comments", server.comments);
|
settings.setValue("comments", server.comments);
|
||||||
|
|
||||||
|
@ -342,7 +348,7 @@ QString CConfigFile::getClientArch() const
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
return QString("win%1").arg(m_use64BitsClient ? 64:32);
|
return QString("win%1").arg(m_use64BitsClient ? 64:32);
|
||||||
#elif defined(Q_OS_MAC)
|
#elif defined(Q_OS_MAC)
|
||||||
// only 64 bits clients under OS X, becure there not any 32 bits OS X version anymore
|
// only 64 bits clients under OS X, because there not any 32 bits OS X version anymore
|
||||||
return "osx";
|
return "osx";
|
||||||
#else
|
#else
|
||||||
return QString("linux%1").arg(m_use64BitsClient ? 64:32);
|
return QString("linux%1").arg(m_use64BitsClient ? 64:32);
|
||||||
|
|
|
@ -35,6 +35,7 @@ struct CServer
|
||||||
QString clientDownloadUrl;
|
QString clientDownloadUrl;
|
||||||
QString clientDownloadFilename;
|
QString clientDownloadFilename;
|
||||||
QString clientFilename;
|
QString clientFilename;
|
||||||
|
QString configurationFilename;
|
||||||
QString comments;
|
QString comments;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,25 @@ void CMainWindow::onPlayClicked()
|
||||||
|
|
||||||
void CMainWindow::onConfigureClicked()
|
void CMainWindow::onConfigureClicked()
|
||||||
{
|
{
|
||||||
|
int profileIndex = profilesComboBox->currentIndex();
|
||||||
|
|
||||||
|
if (profileIndex < 0) return;
|
||||||
|
|
||||||
|
CProfile profile = CConfigFile::getInstance()->getProfile(profileIndex);
|
||||||
|
|
||||||
|
if (profile.server.isEmpty()) return;
|
||||||
|
|
||||||
|
CServer server = CConfigFile::getInstance()->getServer(profile.server);
|
||||||
|
|
||||||
|
if (server.configurationFilename.isEmpty()) return;
|
||||||
|
|
||||||
|
QStringList arguments;
|
||||||
|
arguments << "-p";
|
||||||
|
arguments << QString::number(profileIndex);
|
||||||
|
|
||||||
|
bool started = QProcess::startDetached(server.configurationFilename, arguments);
|
||||||
|
|
||||||
|
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainWindow::onProfiles()
|
void CMainWindow::onProfiles()
|
||||||
|
|
Loading…
Reference in a new issue