diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:49 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:49 +0200 |
| commit | 76956486fa7ef52a51d4e56df1e13a9f19a6c93c (patch) | |
| tree | fe0c394439fdc167d1970372e8998874090854dd /SampleDownloader/RemoteFile.cpp | |
| parent | 0685fcada9f95fe90f70b387cd7d757da8209624 (diff) | |
| parent | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (diff) | |
Update upstream source from tag 'upstream/3.3.0_beta1+dfsg'
Update to upstream version '3.3.0~beta1+dfsg'
with Debian dir 85037bbb9376721108594b59b54ead82ac6924a3
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"); |
