From b8ee80acdadefff927ed2c2884e0e67c9c2fc9a9 Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Fri, 29 Sep 2023 13:18:39 +0200 Subject: Support filePath argument of save() when saving non-HTML files Currently the filePath argument of QWebEnginePage::save() is ignored when the user tries to download anything but HTML; and the requested download path is the Downloads folder of the OS. Fix this and adjust the corresponding test case with checking path and file name of the download request. Pick-to: 6.6 Task-number: QTBUG-117624 Change-Id: Ia1d3afc898b1aad223aab772b775724a50e88bd3 Reviewed-by: Allan Sandfeld Jensen --- tests/auto/quick/qmltests/data/tst_save.qml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/quick/qmltests/data/tst_save.qml b/tests/auto/quick/qmltests/data/tst_save.qml index f07a5f212..08d99022a 100644 --- a/tests/auto/quick/qmltests/data/tst_save.qml +++ b/tests/auto/quick/qmltests/data/tst_save.qml @@ -137,6 +137,8 @@ TestWebEngineView { downLoadRequestedSpy.wait() compare(downLoadRequestedSpy.count, 1) compare(downloadUrl, webEngineView.url) + compare(downloadDir, fileDir) + compare(downloadFileName, fileName) compare(isSavePageDownload, true) compare(downloadState[0], WebEngineDownloadRequest.DownloadRequested) } -- cgit v1.2.3