Commit d83c45d3 authored by hausmann's avatar hausmann
Browse files

Added a QWebNetworkRequest convenience constructor.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ccd61240
......@@ -118,6 +118,13 @@ QWebNetworkRequest::QWebNetworkRequest()
{
}
QWebNetworkRequest::QWebNetworkRequest(const QUrl &url, Method method, const QByteArray &postData)
: d(new QWebNetworkRequestPrivate)
{
d->init(method == Get ? "GET" : "POST", url);
d->postData = postData;
}
QWebNetworkRequest::QWebNetworkRequest(const QWebNetworkRequest &other)
: d(new QWebNetworkRequestPrivate(*other.d))
{
......
......@@ -50,6 +50,7 @@ public:
};
QWebNetworkRequest();
explicit QWebNetworkRequest(const QUrl &url, Method method = Get, const QByteArray &postData = QByteArray());
QWebNetworkRequest(const QWebNetworkRequest &other);
QWebNetworkRequest &operator=(const QWebNetworkRequest &other);
......
......@@ -131,9 +131,7 @@ QWebFrame *QWebPage::createFrame(QWebFrame *parentFrame, QWebFrameData *frameDat
void QWebPage::open(const QUrl &url)
{
QWebNetworkRequest request;
request.setUrl(url);
open(request);
open(QWebNetworkRequest(url));
}
void QWebPage::open(const QWebNetworkRequest &req)
......
2007-06-13 Simon Hausmann <hausmann@kde.org>
Reviewed by Lars.
Added a QWebNetworkRequest convenience constructor.
* Api/qwebnetworkinterface.cpp:
* Api/qwebnetworkinterface.h:
* Api/qwebpage.cpp:
(QWebPage::open):
2007-06-13 Simon Hausmann <hausmann@kde.org>
Reviewed by Lars.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment