From 9c1b1ab4f82d955887fa7eeb2ea2cc0fb84e968e Mon Sep 17 00:00:00 2001 From: srcejon Date: Fri, 5 Apr 2024 21:30:23 +0100 Subject: [PATCH] Fix for Qt 6. --- plugins/feature/map/mapgui.cpp | 8 +++++++- plugins/feature/map/mapgui.h | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/feature/map/mapgui.cpp b/plugins/feature/map/mapgui.cpp index 521a7f826..ea1987642 100644 --- a/plugins/feature/map/mapgui.cpp +++ b/plugins/feature/map/mapgui.cpp @@ -2744,12 +2744,18 @@ void MapGUI::fullScreenRequested(QWebEngineFullScreenRequest fullScreenRequest) ui->splitter->addWidget(ui->web); } } - +#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) +void MapGUI::downloadRequested(QWebEngineDownloadRequest *download) +{ + download->accept(); +} +#else void MapGUI::downloadRequested(QWebEngineDownloadItem *download) { download->accept(); } #endif +#endif void MapGUI::preferenceChanged(int elementType) { diff --git a/plugins/feature/map/mapgui.h b/plugins/feature/map/mapgui.h index daed99762..5e0a12746 100644 --- a/plugins/feature/map/mapgui.h +++ b/plugins/feature/map/mapgui.h @@ -336,8 +336,10 @@ private slots: void renderProcessTerminated(QWebEnginePage::RenderProcessTerminationStatus terminationStatus, int exitCode); #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) void loadingChanged(const QWebEngineLoadingInfo &loadingInfo); -#endif + void downloadRequested(QWebEngineDownloadRequest *download); +#else void downloadRequested(QWebEngineDownloadItem *download); +#endif #endif void statusChanged(QQuickWidget::Status status); void preferenceChanged(int elementType);