diff options
| author | Dave Hibberd <hibby@debian.org> | 2026-10-20 22:35:06 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2026-10-20 22:35:06 +0100 |
| commit | 82ebb1ed1af30cee4dfbb1c628431d32885a00e0 (patch) | |
| tree | 1a1f782d3e576b758be0bc61171574a7cd8f2376 /SampleDownloader/RemoteFile.cpp | |
| parent | 061658210acb6425517733ea012dda803a7f72a1 (diff) | |
| parent | 61d684922b0f1c8455cc60eb3d123df058c9e1f5 (diff) | |
Merge tag 'debian/3.3.0_beta2+dfsg-1' into hibbian/trixie-backports
tagging wsjtx 3.3.0~beta2+dfsg-1
Diffstat (limited to 'SampleDownloader/RemoteFile.cpp')
| -rw-r--r-- | SampleDownloader/RemoteFile.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/SampleDownloader/RemoteFile.cpp b/SampleDownloader/RemoteFile.cpp index 72d1ddbd..98ec74fa 100644 --- a/SampleDownloader/RemoteFile.cpp +++ b/SampleDownloader/RemoteFile.cpp @@ -10,12 +10,11 @@ #include "moc_RemoteFile.cpp" RemoteFile::RemoteFile (ListenerInterface * listener, QNetworkAccessManager * network_manager - , QString const& local_file_path, bool http_only, QObject * parent) + , QString const& local_file_path, QObject * parent) : QObject {parent} , listener_ {listener} , network_manager_ {network_manager} , local_file_ {local_file_path} - , http_only_ {http_only} , is_valid_ {false} , redirect_count_ {0} , file_ {local_file_path} @@ -128,9 +127,17 @@ void RemoteFile::download (QUrl url) } #endif - if (url.isValid () && (!QSslSocket::supportsSsl () || http_only_)) + if ("https" == url.scheme () && !network_manager_->supportedSchemes ().contains ("https")) { - url.setScheme ("http"); + if (listener_) + { + listener_->download_finished (false); + listener_->error (tr ("Network Error") + , tr ("SSL/TLS support not installed, cannot fetch:\n\"%1\"") + .arg (url.toDisplayString ())); + } + is_valid_ = false; + return; } QNetworkRequest request {url}; request.setRawHeader ("User-Agent", "WSJT Sample Downloader"); |
