RESOLVED FIXED Bug 109562
[Qt][WK2] Layer QtDownloadManager on the C API
https://bugs.webkit.org/show_bug.cgi?id=109562
Summary [Qt][WK2] Layer QtDownloadManager on the C API
Jocelyn Turcotte
Reported 2013-02-12 03:51:14 PST
[Qt][WK2] Layer QtDownloadManager on the C API
Attachments
Patch (11.45 KB, patch)
2013-02-12 03:52 PST, Jocelyn Turcotte
no flags
Patch (11.62 KB, patch)
2013-02-15 02:58 PST, Jocelyn Turcotte
no flags
Patch (14.02 KB, patch)
2013-03-11 06:54 PDT, Jocelyn Turcotte
hausmann: review+
Jocelyn Turcotte
Comment 1 2013-02-12 03:52:15 PST
Kenneth Rohde Christiansen
Comment 2 2013-02-12 05:54:12 PST
Comment on attachment 187828 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=187828&action=review > Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:65 > + QtDownloadManager* q = toQtDownloadManager(clientInfo); manager? > Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:72 > + downloadItem->d->sourceUrl = WKURLCopyQUrl(WKURLResponseCopyURL(response)); > + downloadItem->d->mimeType = WKStringCopyQString(WKURLResponseCopyMIMEType(response)); I get confused when I see a Copy method and no adopt :-) but I get it, Qt types! > Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:101 > + QtDownloadManager* q = toQtDownloadManager(clientInfo); s/q/self/ ? that is what we use for EFL
Jocelyn Turcotte
Comment 3 2013-02-12 06:00:50 PST
(In reply to comment #2) > (From update of attachment 187828 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=187828&action=review > > > Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:65 > > + QtDownloadManager* q = toQtDownloadManager(clientInfo); > > manager? > > > Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:101 > > + QtDownloadManager* q = toQtDownloadManager(clientInfo); > > s/q/self/ ? that is what we use for EFL The goal is to mimic the effect of the Q_Q and Q_D macros, q for a main class, d if clientInfo is a private class. This is the convention we agreed on ATM.
Jocelyn Turcotte
Comment 4 2013-02-15 02:58:28 PST
Created attachment 188523 [details] Patch Add some missing adoptWK(<WK*Copy*()>).get(). Also use the new WKURLCopyQString in QtWebError instead of doing WKStringCopyQString(WKURLCopyString(...)).
Kenneth Rohde Christiansen
Comment 5 2013-02-15 04:15:32 PST
Comment on attachment 188523 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=188523&action=review LGTM > Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:63 > +void QtDownloadManager::didReceiveResponse(WKContextRef, WKDownloadRef download, WKURLResponseRef response, const void *clientInfo) * alignment > Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:79 > +void QtDownloadManager::didCreateDestination(WKContextRef, WKDownloadRef download, WKStringRef path, const void *clientInfo) same
Simon Hausmann
Comment 6 2013-03-06 06:04:28 PST
Comment on attachment 188523 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=188523&action=review LGTM, too > Source/WebKit2/UIProcess/qt/QtWebError.cpp:60 > - return WKStringCopyQString(WKURLCopyString(WKErrorCopyFailingURL(error.get()))); > + return WKURLCopyQString(adoptWK(WKErrorCopyFailingURL(error.get())).get()); Nice catch :)
Benjamin Poulain
Comment 7 2013-03-07 13:48:25 PST
Comment on attachment 188523 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=188523&action=review Good for WebKit2. > Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:71 > + downloadItem->d->sourceUrl = WKURLCopyQUrl(adoptWK(WKURLResponseCopyURL(response)).get()); a new adoptToQURL? > Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:72 > + downloadItem->d->mimeType = WKStringCopyQString(adoptWK(WKURLResponseCopyMIMEType(response)).get()); adoptToQString? > Source/WebKit2/UIProcess/qt/QtDownloadManager.cpp:74 > + downloadItem->d->suggestedFilename = WKStringCopyQString(adoptWK(WKURLResponseCopySuggestedFilename(response)).get()); adoptToQString? > Source/WebKit2/UIProcess/qt/QtWebError.cpp:65 > - return WKStringCopyQString(WKErrorCopyLocalizedDescription(error.get())); > + return WKStringCopyQString(adoptWK(WKErrorCopyLocalizedDescription(error.get())).get()); adoptToQString instead of adoptWK().get()?
Jocelyn Turcotte
Comment 8 2013-03-11 06:54:45 PDT
Created attachment 192459 [details] Patch Added adoptToQURL(WKURLRef) and adoptToQString(WKURLRef).
Jocelyn Turcotte
Comment 9 2013-03-12 04:20:54 PDT
Note You need to log in before you can comment on or make changes to this bug.