From 23178283ecc10207cc5742aee9ded42d7cb60c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Wed, 16 Sep 2020 10:36:14 +0200 Subject: Fix downloadable.tar.gz issue in tst_loadsignals No more downloadable.tar.gz in the downloads directory for every run... Task-number: QTBUG-65223 Change-Id: I010bfc7785afca537734298a1618cd7ce05d50cf Reviewed-by: Kirill Burtsev --- tests/auto/widgets/loadsignals/tst_loadsignals.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/widgets/loadsignals') diff --git a/tests/auto/widgets/loadsignals/tst_loadsignals.cpp b/tests/auto/widgets/loadsignals/tst_loadsignals.cpp index 8eeadeeb8..e31cf50ed 100644 --- a/tests/auto/widgets/loadsignals/tst_loadsignals.cpp +++ b/tests/auto/widgets/loadsignals/tst_loadsignals.cpp @@ -240,14 +240,14 @@ void tst_LoadSignals::fileDownloadDoesNotTriggerLoadSignals_qtbug66661() // allow the download QTemporaryDir tempDir; + QVERIFY(tempDir.isValid()); QWebEngineDownloadItem::DownloadState downloadState = QWebEngineDownloadItem::DownloadRequested; connect(view->page()->profile(), &QWebEngineProfile::downloadRequested, [&downloadState, &tempDir](QWebEngineDownloadItem* item){ connect(item, &QWebEngineDownloadItem::stateChanged, [&downloadState](QWebEngineDownloadItem::DownloadState newState){ downloadState = newState; }); - item->setDownloadDirectory(tempDir.filePath(QFileInfo(item->path()).path())); - item->setDownloadFileName(QFileInfo(item->path()).fileName()); + item->setDownloadDirectory(tempDir.path()); item->accept(); }); -- cgit v1.2.3