Merge msvc compilation fixes from stable branch

This commit is contained in:
Christophe Dumez 2010-06-05 13:43:36 +00:00
parent 656beed82b
commit 682377ff66
12 changed files with 487 additions and 394 deletions

View file

@ -1345,6 +1345,7 @@ void Bittorrent::enableLSD(bool b) {
void Bittorrent::loadSessionState() {
const QString state_path = misc::cacheLocation()+QDir::separator()+QString::fromUtf8("ses_state");
if(!QFile::exists(state_path)) return;
#ifdef LIBTORRENT_0_15
std::vector<char> in;
if (load_file(state_path.toLocal8Bit().constData(), in) == 0)
@ -1865,12 +1866,12 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
}
// We need this for urllib in search engine plugins
#ifdef Q_WS_WIN
char proxystr[512];
QString proxyStr;
if(proxySettings.type == proxy_settings::socks5 || proxySettings.type == proxy_settings::socks5_pw)
snprintf(proxystr, 512, "sock_proxy=%s", proxy_str.toLocal8Bit().constData());
proxyStr = "sock_proxy=" + proxy_str;
else
snprintf(proxystr, 512, "http_proxy=%s", proxy_str.toLocal8Bit().constData());
putenv(proxystr);
proxyStr = "http_proxy=" + proxy_str;
putenv(proxyStr.toLocal8Bit().constData());
#else
qDebug("HTTP communications proxy string: %s", qPrintable(proxy_str));
if(proxySettings.type == proxy_settings::socks5 || proxySettings.type == proxy_settings::socks5_pw)