Changeset View
Changeset View
Standalone View
Standalone View
src/lib/downloads/downloadmanager.cpp
Show First 20 Lines • Show All 263 Lines • ▼ Show 20 Line(s) | |||||
264 | void DownloadManager::download(QWebEngineDownloadItem *downloadItem) | 264 | void DownloadManager::download(QWebEngineDownloadItem *downloadItem) | ||
265 | { | 265 | { | ||
266 | closeDownloadTab(downloadItem->url()); | 266 | closeDownloadTab(downloadItem->url()); | ||
267 | 267 | | |||
268 | QString downloadPath; | 268 | QString downloadPath; | ||
269 | bool openFile = false; | 269 | bool openFile = false; | ||
270 | 270 | | |||
271 | QString fileName = QFileInfo(downloadItem->path()).fileName(); | 271 | QString fileName = QFileInfo(downloadItem->path()).fileName(); | ||
272 | fileName = QUrl::fromPercentEncoding(fileName.toUtf8()); | 272 | fileName = QUrl::fromPercentEncoding(fileName.toUtf8().toPercentEncoding()); | ||
273 | // Filename may have been percent encoded and actually containing path | 273 | // Filename may have been percent encoded and actually containing path | ||
274 | fileName = QFileInfo(fileName).fileName(); | 274 | fileName = QFileInfo(fileName).fileName(); | ||
275 | 275 | | |||
276 | const bool forceAsk = downloadItem->savePageFormat() != QWebEngineDownloadItem::UnknownSaveFormat | 276 | const bool forceAsk = downloadItem->savePageFormat() != QWebEngineDownloadItem::UnknownSaveFormat | ||
277 | || downloadItem->type() == QWebEngineDownloadItem::UserRequested; | 277 | || downloadItem->type() == QWebEngineDownloadItem::UserRequested; | ||
278 | 278 | | |||
279 | if (m_useExternalManager) { | 279 | if (m_useExternalManager) { | ||
280 | startExternalManager(downloadItem->url()); | 280 | startExternalManager(downloadItem->url()); | ||
▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines |