RESOLVED FIXED 65315
[Qt] Make QDesktopWebView/QTouchWebView loadProgress property more usable in QML.
https://bugs.webkit.org/show_bug.cgi?id=65315
Summary [Qt] Make QDesktopWebView/QTouchWebView loadProgress property more usable in ...
Alexis Menard (darktears)
Reported 2011-07-28 07:19:01 PDT
[Qt] Make QDesktopWebView loadProgress property more usable in QML.
Attachments
Patch (3.37 KB, patch)
2011-07-28 07:21 PDT, Alexis Menard (darktears)
no flags
Patch (7.41 KB, patch)
2011-07-28 07:56 PDT, Alexis Menard (darktears)
no flags
Patch (13.12 KB, patch)
2011-07-28 10:08 PDT, Alexis Menard (darktears)
no flags
Alexis Menard (darktears)
Comment 1 2011-07-28 07:21:55 PDT
Noam Rosenthal
Comment 2 2011-07-28 07:26:11 PDT
Comment on attachment 102254 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=102254&action=review > Source/WebKit2/UIProcess/API/qt/qdesktopwebview.h:54 > + Q_PROPERTY(int loadProgress READ loadProgress NOTIFY loadProgress) Shouldn't NOTIFY point to a signal?
Benjamin Poulain
Comment 3 2011-07-28 07:34:15 PDT
Comment on attachment 102254 [details] Patch I am pretty sure the other view could enjoy the same kind of love :) Please update both view together when they provide the same API. Storing the loadProgress should probably be done on QtWebPageProxy.
Caio Marcelo de Oliveira Filho
Comment 4 2011-07-28 07:43:22 PDT
Comment on attachment 102254 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=102254&action=review >> Source/WebKit2/UIProcess/API/qt/qdesktopwebview.h:54 >> + Q_PROPERTY(int loadProgress READ loadProgress NOTIFY loadProgress) > > Shouldn't NOTIFY point to a signal? Yes, and it does :-)... The problem here is that the signal and the getter have the same name. Alexis, what about changing the signal name to loadProgressChanged?
Alexis Menard (darktears)
Comment 5 2011-07-28 07:56:49 PDT
Benjamin Poulain
Comment 6 2011-07-28 09:10:33 PDT
Comment on attachment 102259 [details] Patch QTouchWebPage already has the property. qtouchwebview_p.h is not the implementation of ViewInterface like on the desktop case. The update should be on QTouchWebPage :) Would you mind addind an API test on the way? :-D
Alexis Menard (darktears)
Comment 7 2011-07-28 10:08:28 PDT
Benjamin Poulain
Comment 8 2011-07-29 04:02:05 PDT
Comment on attachment 102267 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=102267&action=review > Source/WebKit2/UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:160 > + QVERIFY(waitForSignal(viewAbstraction.data(), SIGNAL(loadProgressChanged(int)))); > + I think this should be a signal spy over loadProgressChanged(), then you check that you got the signal. The wait for signal should be on the loadSucceeded only, like the next line. This is just for robustness, in case a future refactoring make it simultaneous to have loadProgressChanged(100) and loadSucceeded() for local file.
Alexis Menard (darktears)
Comment 9 2011-07-29 04:55:24 PDT
Note You need to log in before you can comment on or make changes to this bug.