void QtDownloadManager::didReceiveResponse(WKContextRef, WKDownloadRef download, WKURLResponseRef response, const void* clientInfo) { QtDownloadManager* q = toQtDownloadManager(clientInfo); // Will be called when the headers are read by WebProcess. QWebDownloadItem* downloadItem = q->m_downloads.value(WKDownloadGetID(download)); ASSERT(downloadItem); downloadItem->d->sourceUrl = adoptToQUrl(WKURLResponseCopyURL(response)); downloadItem->d->mimeType = adoptToQString(WKURLResponseCopyMIMEType(response)); downloadItem->d->expectedContentLength = WKURLResponseGetExpectedContentLength(response); downloadItem->d->suggestedFilename = WKStringCopyQString(adoptWK(WKURLResponseCopySuggestedFilename(response)).get()); downloadItem->d->didReceiveResponse(downloadItem); }
QString QWebPreferencesPrivate::fontFamily(QWebPreferencesPrivate::FontFamily which) const { WKPreferencesRef preferencesRef = WKPageGroupGetPreferences(webViewPrivate->pageGroup.get()); switch (which) { case StandardFont: return adoptToQString(WKPreferencesCopyStandardFontFamily(preferencesRef)); case FixedFont: return adoptToQString(WKPreferencesCopyFixedFontFamily(preferencesRef)); case SerifFont: return adoptToQString(WKPreferencesCopySerifFontFamily(preferencesRef)); case SansSerifFont: return adoptToQString(WKPreferencesCopySansSerifFontFamily(preferencesRef)); case CursiveFont: return adoptToQString(WKPreferencesCopyCursiveFontFamily(preferencesRef)); case FantasyFont: return adoptToQString(WKPreferencesCopyFantasyFontFamily(preferencesRef)); default: return QString(); } }