Changeset 46367 in webkit
- Timestamp:
- Jul 24, 2009 11:05:58 AM (15 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/Api/qwebframe.cpp
r46366 r46367 283 283 The QWebFrame class also offers methods to retrieve both the URL currently 284 284 loaded by the frame (see url()) as well as the URL originally requested 285 to be loaded (see originalUrl()). These methods make possible the retrieval285 to be loaded (see requestedUrl()). These methods make possible the retrieval 286 286 of the URL before and after a DNS resolution or a redirection occurs during 287 the load process. The originalUrl() also matches to the URL added to the287 the load process. The requestedUrl() also matches to the URL added to the 288 288 frame history (\l{QwebHistory}) if load is successful. 289 289 … … 530 530 /*! 531 531 \since 4.6 532 \property QWebFrame:: originalUrl533 534 The original urlloaded by the frame currently viewed. The URL may differ from532 \property QWebFrame::requestedUrl 533 534 The URL requested to loaded by the frame currently viewed. The URL may differ from 535 535 the one returned by url() if a DNS resolution or a redirection occurs. 536 536 537 537 \sa url(), setUrl() 538 538 */ 539 QUrl QWebFrame:: originalUrl() const539 QUrl QWebFrame::requestedUrl() const 540 540 { 541 541 if (!d->frame->loader()->activeDocumentLoader() -
trunk/WebKit/qt/Api/qwebframe.h
r46366 r46367 108 108 Q_PROPERTY(QString title READ title) 109 109 Q_PROPERTY(QUrl url READ url WRITE setUrl) 110 Q_PROPERTY(QUrl originalUrl READ originalUrl)110 Q_PROPERTY(QUrl requestedUrl READ requestedUrl) 111 111 Q_PROPERTY(QUrl baseUrl READ baseUrl) 112 112 Q_PROPERTY(QIcon icon READ icon) … … 143 143 void setUrl(const QUrl &url); 144 144 QUrl url() const; 145 QUrl originalUrl() const;145 QUrl requestedUrl() const; 146 146 QUrl baseUrl() const; 147 147 QIcon icon() const; -
trunk/WebKit/qt/ChangeLog
r46366 r46367 1 2009-07-24 Antonio Gomes <antonio.gomes@openbossa.org> 2 3 Reviewed by Adam Treat. 4 5 As per discussion on IRC, changed originalUrl by requestedUrl. 6 7 * Api/qwebframe.cpp: 8 (QWebFrame::requestedUrl): 9 * Api/qwebframe.h: 10 * tests/qwebframe/tst_qwebframe.cpp: 11 1 12 2009-07-24 Andre Pedralho <andre.pedralho@openbossa.org> 2 13 -
trunk/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
r46366 r46367 576 576 void urlChange(); 577 577 void domCycles(); 578 void originalUrl();578 void requestedUrl(); 579 579 void setHtml(); 580 580 void setHtmlWithResource(); … … 2222 2222 }; 2223 2223 2224 void tst_QWebFrame:: originalUrl()2224 void tst_QWebFrame::requestedUrl() 2225 2225 { 2226 2226 QWebPage page; … … 2235 2235 QTest::qWait(200); 2236 2236 QCOMPARE(spy.count(), 1); 2237 QCOMPARE(frame-> originalUrl(), QUrl("qrc:/test1.html"));2237 QCOMPARE(frame->requestedUrl(), QUrl("qrc:/test1.html")); 2238 2238 QCOMPARE(frame->url(), QUrl("qrc:/test2.html")); 2239 2239 … … 2241 2241 QTest::qWait(200); 2242 2242 QCOMPARE(spy.count(), 2); 2243 QCOMPARE(frame-> originalUrl(), QUrl("qrc:/non-existent.html"));2243 QCOMPARE(frame->requestedUrl(), QUrl("qrc:/non-existent.html")); 2244 2244 QCOMPARE(frame->url(), QUrl("qrc:/non-existent.html")); 2245 2245 … … 2247 2247 QTest::qWait(200); 2248 2248 QCOMPARE(spy.count(), 3); 2249 QCOMPARE(frame-> originalUrl(), QUrl("http://abcdef.abcdef/"));2249 QCOMPARE(frame->requestedUrl(), QUrl("http://abcdef.abcdef/")); 2250 2250 QCOMPARE(frame->url(), QUrl("http://abcdef.abcdef/")); 2251 2251 }
Note: See TracChangeset
for help on using the changeset viewer.