[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
kenneth at webkit.org
kenneth at webkit.org
Thu Feb 4 21:29:17 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 739ed1039910d42ac6d512d60666cd4430af7dde
Author: kenneth at webkit.org <kenneth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 27 11:56:02 2010 +0000
Rubberstamped by Simon Hausmann
[Qt] Refactor the code in the QtLauncher dealing with HTTP proxy.
* QtLauncher/main.cpp:
(MainWindow::MainWindow):
* QtLauncher/webpage.cpp:
(WebPage::WebPage):
(WebPage::applyProxy):
* QtLauncher/webpage.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 8d5e236..8742c0d 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-27 Kenneth Rohde Christiansen <kenneth at webkit.org>
+
+ Rubberstamped by Simon Hausmann
+
+ [Qt] Refactor the code in the QtLauncher dealing with HTTP proxy.
+
+ * QtLauncher/main.cpp:
+ (MainWindow::MainWindow):
+ * QtLauncher/webpage.cpp:
+ (WebPage::WebPage):
+ (WebPage::applyProxy):
+ * QtLauncher/webpage.h:
+
2010-01-26 Jocelyn Turcotte <jocelyn.turcotte at nokia.com>
Reviewed by Tor Arne Vestbø.
diff --git a/WebKitTools/QtLauncher/main.cpp b/WebKitTools/QtLauncher/main.cpp
index e658bfe..629a481 100644
--- a/WebKitTools/QtLauncher/main.cpp
+++ b/WebKitTools/QtLauncher/main.cpp
@@ -31,7 +31,6 @@
*/
#include <QtGui>
-#include <QtNetwork/QNetworkProxy>
#include <QtNetwork/QNetworkRequest>
#if !defined(QT_NO_PRINTER)
#include <QPrintPreviewDialog>
@@ -138,14 +137,6 @@ public:
setupUI();
- // set the proxy to the http_proxy env variable - if present
- QUrl proxyUrl = urlFromUserInput(qgetenv("http_proxy"));
-
- if (proxyUrl.isValid() && !proxyUrl.host().isEmpty()) {
- int proxyPort = (proxyUrl.port() > 0) ? proxyUrl.port() : 8080;
- page->networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, proxyUrl.host(), proxyPort));
- }
-
QFileInfo fi(url);
if (fi.exists() && fi.isRelative())
url = fi.absoluteFilePath();
diff --git a/WebKitTools/QtLauncher/webpage.cpp b/WebKitTools/QtLauncher/webpage.cpp
index f1c7690..2fe1306 100644
--- a/WebKitTools/QtLauncher/webpage.cpp
+++ b/WebKitTools/QtLauncher/webpage.cpp
@@ -35,6 +35,23 @@
#include <QDesktopServices>
#include <QtGui>
#include <QtNetwork/QNetworkRequest>
+#include <QtNetwork/QNetworkProxy>
+
+WebPage::WebPage(QObject* parent)
+ : QWebPage(parent)
+{
+ applyProxy();
+}
+
+void WebPage::applyProxy()
+{
+ QUrl proxyUrl(qgetenv("http_proxy"));
+
+ if (proxyUrl.isValid() && !proxyUrl.host().isEmpty()) {
+ int proxyPort = (proxyUrl.port() > 0) ? proxyUrl.port() : 8080;
+ networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, proxyUrl.host(), proxyPort));
+ }
+}
bool WebPage::supportsExtension(QWebPage::Extension extension) const
{
@@ -85,3 +102,5 @@ void WebPage::openUrlInDefaultBrowser(const QUrl& url)
else
QDesktopServices::openUrl(url);
}
+
+
diff --git a/WebKitTools/QtLauncher/webpage.h b/WebKitTools/QtLauncher/webpage.h
index 4302701..8c1d07d 100644
--- a/WebKitTools/QtLauncher/webpage.h
+++ b/WebKitTools/QtLauncher/webpage.h
@@ -38,7 +38,7 @@
class WebPage : public QWebPage {
public:
- WebPage(QWidget* parent) : QWebPage(parent) {}
+ WebPage(QObject* parent = 0);
virtual QWebPage* createWindow(QWebPage::WebWindowType);
virtual QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&);
@@ -49,6 +49,9 @@ public:
public slots:
void openUrlInDefaultBrowser(const QUrl& url = QUrl());
+
+private:
+ void applyProxy();
};
#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list