diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
| commit | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch) | |
| tree | 1269efa852935b183daae4bb33a58d1b4d2ffb53 /SampleDownloader/RemoteFile.cpp | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
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"); |
