summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDaniel Molkentin <daniel@molkentin.de>2015-01-27 18:41:32 +0100
committerOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>2015-02-05 14:29:03 +0000
commit3430e7ce7787cf1c1b1472a0ce0e8770dbff0a7c (patch)
tree60c0f6ef5b2c56a59d349eb48fcbea850ce1b762 /tools
parenteb4f183127cb5c73fe84adc296fbc03fa8d61523 (diff)
Add libproxy backend for QNetworkProxyFactory
It will be used on Unix systems if the required dev package is present. (Detected by a configure compile test.) You can configure with -no-libproxy to avoid the dependency. It will not be used on OS X or Windows, as we already implement the native API for getting proxies there. Currently we use whatever PAC runner is provided by the distro for running PAC scripts - if we want to run PAC scripts using Qt, then we would have to implement a pacrunner plugin to libproxy. Note that their webkit pacrunner is using javascriptcore already. Tested using the libproxy 0.4.7 that is included in Ubuntu 12.04. Re-tested using Ubuntu 14.04 which ships libproxy 0.4.11. It works except when both socks and http proxies are configured in the manual settings - in that case libproxy returns only the socks proxy. This seems to be covered by libproxy issue 119. [ChangeLog][QtNetwork] Introduce libproxy backend for Unix platforms, enabled automatically if the required dev package is present Task-number: QTBUG-26295 Change-Id: I521c0a198fcf482386ea8a189114a0077778265c Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index dcbe52b1cf..7735f05989 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -269,6 +269,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "OPENVG" ] = "no";
dictionary[ "SSL" ] = "auto";
dictionary[ "OPENSSL" ] = "auto";
+ dictionary[ "LIBPROXY" ] = "auto";
dictionary[ "DBUS" ] = "auto";
dictionary[ "STYLE_WINDOWS" ] = "yes";
@@ -859,6 +860,10 @@ void Configure::parseCmdLine()
dictionary[ "OPENSSL" ] = "yes";
} else if (configCmdLine.at(i) == "-openssl-linked") {
dictionary[ "OPENSSL" ] = "linked";
+ } else if (configCmdLine.at(i) == "-no-libproxy") {
+ dictionary[ "LIBPROXY"] = "no";
+ } else if (configCmdLine.at(i) == "-libproxy") {
+ dictionary[ "LIBPROXY" ] = "yes";
} else if (configCmdLine.at(i) == "-no-qdbus") {
dictionary[ "DBUS" ] = "no";
} else if (configCmdLine.at(i) == "-qdbus") {
@@ -1973,6 +1978,8 @@ bool Configure::displayHelp()
desc("OPENSSL", "no", "-no-openssl", "Do not compile support for OpenSSL.");
desc("OPENSSL", "yes", "-openssl", "Enable run-time OpenSSL support.");
desc("OPENSSL", "linked","-openssl-linked", "Enable linked OpenSSL support.\n");
+ desc("LIBPROXY", "no", "-no-libproxy", "Do not compile in libproxy support.");
+ desc("LIBPROXY", "yes", "-libproxy", "Compile in libproxy support (for cross compilation targets).\n");
desc("DBUS", "no", "-no-dbus", "Do not compile in D-Bus support.");
desc("DBUS", "yes", "-dbus", "Compile in D-Bus support and load libdbus-1\ndynamically.");
desc("DBUS", "linked", "-dbus-linked", "Compile in D-Bus support and link to libdbus-1.\n");
@@ -2234,6 +2241,8 @@ bool Configure::checkAvailability(const QString &part)
available = tryCompileProject("common/avx2");
else if (part == "OPENSSL")
available = findFile("openssl\\ssl.h");
+ else if (part == "LIBPROXY")
+ available = dictionary.contains("XQMAKESPEC") && tryCompileProject("common/libproxy");
else if (part == "DBUS")
available = findFile("dbus\\dbus.h");
else if (part == "CETEST") {
@@ -2405,6 +2414,8 @@ void Configure::autoDetection()
}
if (dictionary["OPENSSL"] == "auto")
dictionary["OPENSSL"] = checkAvailability("OPENSSL") ? "yes" : "no";
+ if (dictionary["LIBPROXY"] == "auto")
+ dictionary["LIBPROXY"] = checkAvailability("LIBPROXY") ? "yes" : "no";
if (dictionary["DBUS"] == "auto")
dictionary["DBUS"] = checkAvailability("DBUS") ? "yes" : "no";
if (dictionary["QML_DEBUG"] == "auto")
@@ -2841,6 +2852,9 @@ void Configure::generateOutputVars()
else if (dictionary[ "OPENSSL" ] == "linked")
qtConfig += "openssl-linked";
+ if (dictionary[ "LIBPROXY" ] == "yes")
+ qtConfig += "libproxy";
+
if (dictionary[ "DBUS" ] == "yes")
qtConfig += "dbus";
else if (dictionary[ "DBUS" ] == "linked")
@@ -3695,6 +3709,7 @@ void Configure::displayConfig()
sout << "OpenVG support.............." << dictionary[ "OPENVG" ] << endl;
sout << "SSL support................." << dictionary[ "SSL" ] << endl;
sout << "OpenSSL support............." << dictionary[ "OPENSSL" ] << endl;
+ sout << "libproxy support............" << dictionary[ "LIBPROXY" ] << endl;
sout << "Qt D-Bus support............" << dictionary[ "DBUS" ] << endl;
sout << "Qt Widgets module support..." << dictionary[ "WIDGETS" ] << endl;
sout << "Qt GUI module support......." << dictionary[ "GUI" ] << endl;