From c054d7c11a63fb2a916a66abe9afb536bc0cd2b7 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Date: Mon, 15 Jan 2024 10:46:16 -0300 Subject: [PATCH] Adapt to signal names in QWebEngineDownloadRequest They changed from QWebEngineDownloadItem, deprecated in Qt6 --- src/Train/WebPageWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Train/WebPageWindow.cpp b/src/Train/WebPageWindow.cpp index 47dfb775d..ee4db4968 100644 --- a/src/Train/WebPageWindow.cpp +++ b/src/Train/WebPageWindow.cpp @@ -284,8 +284,12 @@ WebPageWindow::downloadRequested(QWebEngineDownloadRequest *item) filenames << QDir(item->downloadDirectory()).absoluteFilePath(item->downloadFileName()); // set save +#if QT_VERSION < 0x060000 connect(item, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadProgress(qint64,qint64))); connect(item, SIGNAL(finished()), this, SLOT(downloadFinished())); +#else + connect(item, SIGNAL(isFinishedChanged()), this, SLOT(downloadFinished())); +#endif // kick off download item->accept(); // lets download it!