summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-06-18 11:39:36 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-06-21 17:49:31 +0200
commitb2ecb708e149fe8914d7d0cbfcf9c300e52a029e (patch)
treef9fdc60b8e07d19e69c2cd044649f17b491e33f7 /tests/auto/widgets
parent56186b555b98ed682e88c105a16e47023410f58e (diff)
Add page() and view() back to download-item
Restores a QML type but this time derived from the core type. Pick-to: 6.2 Change-Id: I09ddb6672f7262ae31e4c57f09d019f71abccd41 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp b/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
index f95c4ab33..1f24928ab 100644
--- a/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
+++ b/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
@@ -445,7 +445,7 @@ void tst_QWebEngineDownloadRequest::downloadLink()
QCOMPARE(QDir(item->downloadDirectory()).filePath(item->downloadFileName()), suggestedPath);
QCOMPARE(item->savePageFormat(), QWebEngineDownloadRequest::UnknownSaveFormat);
QCOMPARE(item->url(), downloadUrl);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
connect(item, &QWebEngineDownloadRequest::isFinishedChanged, [&, item]() {
QCOMPARE(item->state(), QWebEngineDownloadRequest::DownloadCompleted);
@@ -458,7 +458,7 @@ void tst_QWebEngineDownloadRequest::downloadLink()
QCOMPARE(QDir(item->downloadDirectory()).filePath(item->downloadFileName()), downloadPath);
QCOMPARE(item->savePageFormat(), QWebEngineDownloadRequest::UnknownSaveFormat);
QCOMPARE(item->url(), downloadUrl);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
finishedCount++;
});
@@ -631,7 +631,7 @@ void tst_QWebEngineDownloadRequest::downloadPage()
QCOMPARE(item->mimeType(), QStringLiteral("application/x-mimearchive"));
QCOMPARE(item->savePageFormat(), savePageFormat);
QCOMPARE(item->url(), downloadUrl);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
if (saveWithPageAction) {
QVERIFY(!item->downloadDirectory().isEmpty());
@@ -654,7 +654,7 @@ void tst_QWebEngineDownloadRequest::downloadPage()
QCOMPARE(QDir(item->downloadDirectory()).filePath(item->downloadFileName()), downloadPath);
QCOMPARE(item->savePageFormat(), savePageFormat);
QCOMPARE(item->url(), downloadUrl);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
finishedCount++;
});
@@ -934,7 +934,7 @@ void tst_QWebEngineDownloadRequest::downloadUniqueFilenameWithTimestamp()
QCOMPARE(item->totalBytes(), item->receivedBytes());
QVERIFY(item->receivedBytes() > 0);
QCOMPARE(item->interruptReason(), QWebEngineDownloadRequest::NoReason);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
downloadFinished = true;
downloadedFilePath = QDir(item->downloadDirectory()).filePath(item->downloadFileName());
});
@@ -1030,7 +1030,7 @@ void tst_QWebEngineDownloadRequest::downloadToNonExistentDir()
QCOMPARE(item->totalBytes(), item->receivedBytes());
QVERIFY(item->receivedBytes() > 0);
QCOMPARE(item->interruptReason(), QWebEngineDownloadRequest::NoReason);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
downloadFinished = true;
downloadedFilePath = QDir(item->downloadDirectory()).filePath(item->downloadFileName());
});
@@ -1179,7 +1179,7 @@ void tst_QWebEngineDownloadRequest::downloadToDirectoryWithFileName()
QCOMPARE(item->totalBytes(), item->receivedBytes());
QVERIFY(item->receivedBytes() > 0);
QCOMPARE(item->interruptReason(), QWebEngineDownloadRequest::NoReason);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
downloadFinished = true;
downloadedFilePath = QDir(item->downloadDirectory()).filePath(item->downloadFileName());
downloadedSuggestedFileName = item->suggestedFileName();