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
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-06-22 03:32:24 +0000
commit3752a3cbcd0cc0742a5b955e925df18395afdb75 (patch)
tree453369210f11bd672441d11ef4065e79109ac260 /tests/auto/widgets
parent15e5ba4bfc920adf56df8dd11cb09ca3a9942963 (diff)
Add page() and view() back to download-item
Restores a QML type but this time derived from the core type. Change-Id: I09ddb6672f7262ae31e4c57f09d019f71abccd41 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> (cherry picked from commit b2ecb708e149fe8914d7d0cbfcf9c300e52a029e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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();