Merge branch 'develop' into feat-fst280

This commit is contained in:
Bill Somerville 2020-07-26 10:20:55 +01:00
commit 2f700265b9
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
19 changed files with 3960 additions and 2767 deletions

View File

@ -289,6 +289,7 @@ set (wsjt_qt_CXXSRCS
logbook/AD1CCty.cpp
logbook/WorkedBefore.cpp
logbook/Multiplier.cpp
Network/NetworkAccessManager.cpp
)
set (wsjt_qtmm_CXXSRCS
@ -1157,6 +1158,7 @@ if (UPDATE_TRANSLATIONS)
qt5_create_translation (
QM_FILES ${wsjt_qt_UISRCS} ${wsjtx_UISRCS} ${wsjt_qt_CXXSRCS} ${wsjtx_CXXSRCS}
${TS_FILES}
OPTIONS -I${CMAKE_CURRENT_SOURCE_DIR}
)
else ()
qt5_add_translation (QM_FILES ${TS_FILES})

View File

@ -165,7 +165,13 @@ QString DecodedText::call() const
// get the second word, most likely the de call and the third word, most likely grid
void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid) const
{
auto const& match = words_re.match (message_);
auto msg = message_;
auto p = msg.indexOf ("; ");
if (p >= 0)
{
msg = msg.mid (p + 2);
}
auto const& match = words_re.match (msg);
call = match.captured ("word2");
grid = match.captured ("word3");
if ("R" == grid) grid = match.captured ("word4");

View File

@ -292,7 +292,7 @@ EqualizationToolsDialog::impl::impl (EqualizationToolsDialog * self
| QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Close
, Qt::Vertical}
{
setWindowTitle (windowTitle () + ' ' + tr (title));
setWindowTitle (windowTitle () + ' ' + tr ("Equalization Tools"));
resize (500, 600);
{
SettingsGroup g {settings_, title};

View File

@ -4,8 +4,6 @@
#include <QNetworkAccessManager>
#include <QList>
#include <QSslError>
#include <QNetworkReply>
#include <QString>
#include "widgets/MessageBox.hpp"
@ -18,58 +16,18 @@ class QWidget;
class NetworkAccessManager
: public QNetworkAccessManager
{
Q_OBJECT
public:
NetworkAccessManager (QWidget * parent)
: QNetworkAccessManager (parent)
{
// handle SSL errors that have not been cached as allowed
// exceptions and offer them to the user to add to the ignored
// exception cache
connect (this, &QNetworkAccessManager::sslErrors, [this, &parent] (QNetworkReply * reply, QList<QSslError> const& errors) {
QString message;
QList<QSslError> new_errors;
for (auto const& error: errors)
{
if (!allowed_ssl_errors_.contains (error))
{
new_errors << error;
message += '\n' + reply->request ().url ().toDisplayString () + ": "
+ error.errorString ();
}
}
if (new_errors.size ())
{
QString certs;
for (auto const& cert : reply->sslConfiguration ().peerCertificateChain ())
{
certs += cert.toText () + '\n';
}
if (MessageBox::Ignore == MessageBox::query_message (parent, tr ("Network SSL Errors"), message, certs, MessageBox::Abort | MessageBox::Ignore))
{
// accumulate new SSL error exceptions that have been allowed
allowed_ssl_errors_.append (new_errors);
reply->ignoreSslErrors (allowed_ssl_errors_);
}
}
else
{
// no new exceptions so silently ignore the ones already allowed
reply->ignoreSslErrors (allowed_ssl_errors_);
}
});
}
explicit NetworkAccessManager (QWidget * parent);
protected:
QNetworkReply * createRequest (Operation operation, QNetworkRequest const& request, QIODevice * outgoing_data = nullptr) override
{
auto reply = QNetworkAccessManager::createRequest (operation, request, outgoing_data);
// errors are usually certificate specific so passing all cached
// exceptions here is ok
reply->ignoreSslErrors (allowed_ssl_errors_);
return reply;
}
QNetworkReply * createRequest (Operation, QNetworkRequest const&, QIODevice * = nullptr) override;
private:
void filter_SSL_errors (QNetworkReply * reply, QList<QSslError> const& errors);
QWidget * parent_widget_;
QList<QSslError> allowed_ssl_errors_;
};

View File

@ -88,7 +88,7 @@ SampleDownloader::impl::impl (QSettings * settings
, directory_ {configuration, network_manager}
, button_box_ {QDialogButtonBox::Close, Qt::Vertical}
{
setWindowTitle (windowTitle () + ' ' + tr (title));
setWindowTitle (windowTitle () + ' ' + tr ("Download Samples"));
resize (500, 600);
{
SettingsGroup g {settings_, title};
@ -111,7 +111,7 @@ SampleDownloader::impl::impl (QSettings * settings
details_layout_.setMargin (0);
details_layout_.addRow (tr ("Base URL for samples:"), &url_line_edit_);
details_layout_.addRow (tr ("Only use HTTP:"), &http_only_check_box_);
http_only_check_box_.setToolTip (tr ("Check this is you get SSL/TLS errors"));
http_only_check_box_.setToolTip (tr ("Check this if you get SSL/TLS errors"));
details_widget_.setLayout (&details_layout_);
main_layout_.addLayout (&left_layout_, 0, 0);

View File

@ -409,7 +409,7 @@ QString DXLabSuiteCommanderTransceiver::command_with_reply (QString const& cmd,
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", "failed to send command:" << commander_->errorString ());
throw error {
tr ("DX Lab Suite Commander failed to send command \"%1\": %2\n")
tr ("DX Lab Suite Commander send command failed \"%1\": %2\n")
.arg (cmd)
.arg (commander_->errorString ())
};

View File

@ -684,7 +684,7 @@ void HamlibTransceiver::do_stop ()
TRACE_CAT ("HamlibTransceiver", "state:" << state () << "reversed =" << reversed_);
}
auto HamlibTransceiver::get_vfos (bool for_split) const -> std::tuple<vfo_t, vfo_t>
std::tuple<vfo_t, vfo_t> HamlibTransceiver::get_vfos (bool for_split) const
{
if (get_vfo_works_ && rig_->caps->get_vfo)
{

View File

@ -41,12 +41,12 @@ passband, if such control is available.
How should I configure _WSJT-X_ to run multiple instances?::
Start _WSJT-X_ from a command-prompt window, assigning each instance a
unique identifier as in the following two-instance example. This
procedure will isolate the *Settings* file and the writable file
location for each instance of _WSJT-X_.
Start _WSJT-X_ from a command-prompt window, assigning each a unique
identifier as in the following two-instance example. This procedure
will isolate the *Settings* file and the writable file location for
each instance of _WSJT-X_.
wsjtx --rig-name=TS2000
wsjtx --rig-name=TS590
wsjtx --rig-name=FT847
I am getting a "Network Error - SSL/TLS support not installed" message. What should I do?::

View File

@ -12,10 +12,10 @@ namespace
// human readable strings for each Region enumeration value
char const * const region_names[] =
{
"All",
"Region 1",
"Region 2",
"Region 3",
QT_TRANSLATE_NOOP ("IARURegions", "All"),
QT_TRANSLATE_NOOP ("IARURegions", "Region 1"),
QT_TRANSLATE_NOOP ("IARURegions", "Region 2"),
QT_TRANSLATE_NOOP ("IARURegions", "Region 3"),
};
std::size_t constexpr region_names_size = sizeof (region_names) / sizeof (region_names[0]);
}
@ -34,7 +34,7 @@ char const * IARURegions::name (Region r)
return region_names[static_cast<int> (r)];
}
auto IARURegions::value (QString const& s) -> Region
IARURegions::Region IARURegions::value (QString const& s)
{
auto end = region_names + region_names_size;
auto p = std::find_if (region_names, end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4648,6 +4648,13 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
return;
}
// ignore calls by other hounds
if (SpecOp::HOUND == m_config.special_op_id()
&& message.messageWords ().indexOf (QRegularExpression {R"(R\+-[0-9]+)"}) >= 0)
{
return;
}
QString firstcall = message.call();
if(firstcall.length()==5 and firstcall.mid(0,3)=="CQ ") firstcall="CQ";
if(!m_bFastMode and (!m_config.enable_VHF_features() or m_mode=="FT8")) {