Merge branch 'release-2.3.0' into develop

This commit is contained in:
Bill Somerville 2021-01-28 11:17:51 +00:00
commit 86efe9ec22
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
6 changed files with 24 additions and 21 deletions

View File

@ -116,7 +116,7 @@ public:
void handle_socket_error (QAbstractSocket::SocketError e) void handle_socket_error (QAbstractSocket::SocketError e)
{ {
LOG_LOG_LOCATION (logger_, trace, "err: " << e); LOG_LOG_LOCATION (logger_, warning, "socket error: " << socket_->errorString ());
switch (e) switch (e)
{ {
case QAbstractSocket::RemoteHostClosedError: case QAbstractSocket::RemoteHostClosedError:

View File

@ -149,7 +149,7 @@ void DXLabSuiteCommanderTransceiver::do_stop ()
void DXLabSuiteCommanderTransceiver::do_ptt (bool on) void DXLabSuiteCommanderTransceiver::do_ptt (bool on)
{ {
CAT_TRACE (on << state ()); CAT_TRACE (on << ' ' << state ());
if (use_for_ptt_) if (use_for_ptt_)
{ {
simple_command (on ? "<command:5>CmdTX<parameters:0>" : "<command:5>CmdRX<parameters:0>"); simple_command (on ? "<command:5>CmdTX<parameters:0>" : "<command:5>CmdRX<parameters:0>");
@ -204,7 +204,7 @@ void DXLabSuiteCommanderTransceiver::do_ptt (bool on)
void DXLabSuiteCommanderTransceiver::do_frequency (Frequency f, MODE m, bool /*no_ignore*/) void DXLabSuiteCommanderTransceiver::do_frequency (Frequency f, MODE m, bool /*no_ignore*/)
{ {
CAT_TRACE (f << state ()); CAT_TRACE (f << ' ' << state ());
auto f_string = frequency_to_string (f); auto f_string = frequency_to_string (f);
if (UNK != m && m != get_mode ()) if (UNK != m && m != get_mode ())
{ {
@ -223,7 +223,7 @@ void DXLabSuiteCommanderTransceiver::do_frequency (Frequency f, MODE m, bool /*n
void DXLabSuiteCommanderTransceiver::do_tx_frequency (Frequency tx, MODE mode, bool /*no_ignore*/) void DXLabSuiteCommanderTransceiver::do_tx_frequency (Frequency tx, MODE mode, bool /*no_ignore*/)
{ {
CAT_TRACE (tx << state ()); CAT_TRACE (tx << ' ' << state ());
if (tx) if (tx)
{ {
auto f_string = frequency_to_string (tx); auto f_string = frequency_to_string (tx);
@ -244,7 +244,7 @@ void DXLabSuiteCommanderTransceiver::do_tx_frequency (Frequency tx, MODE mode, b
void DXLabSuiteCommanderTransceiver::do_mode (MODE m) void DXLabSuiteCommanderTransceiver::do_mode (MODE m)
{ {
CAT_TRACE (m << state ()); CAT_TRACE (m << ' ' << state ());
auto m_string = map_mode (m); auto m_string = map_mode (m);
auto params = ("<1:%1>" + m_string).arg (m_string.size ()); auto params = ("<1:%1>" + m_string).arg (m_string.size ());
simple_command (("<command:10>CmdSetMode<parameters:%1>" + params).arg (params.size ())); simple_command (("<command:10>CmdSetMode<parameters:%1>" + params).arg (params.size ()));
@ -444,7 +444,7 @@ QString DXLabSuiteCommanderTransceiver::command_with_reply (QString const& cmd)
// qDebug () << i << ":" << hex << int (result[i]); // qDebug () << i << ":" << hex << int (result[i]);
// } // }
CAT_TRACE (cmd << "->" << QString {result}); CAT_TRACE (cmd << " -> " << QString {result});
return result; // converting raw UTF-8 bytes to QString return result; // converting raw UTF-8 bytes to QString
} }

View File

@ -27,7 +27,7 @@ std::ostream& operator << (std::ostream& os, Transceiver::TransceiverState const
{ {
return os return os
<< "Transceiver::TransceiverState(online: " << (s.online_ ? "yes" : "no") << "Transceiver::TransceiverState(online: " << (s.online_ ? "yes" : "no")
<< " Frequency {" << s.rx_frequency_ << "Hz, " << s.tx_frequency_ << "Hz} " << s.mode_ << " Frequency {" << s.rx_frequency_ << "Hz, " << s.tx_frequency_ << "Hz} Mode: " << s.mode_
<< "; SPLIT: " << (Transceiver::TransceiverState::Split::on == s.split_ ? "on" : Transceiver::TransceiverState::Split::off == s.split_ ? "off" : "unknown") << "; SPLIT: " << (Transceiver::TransceiverState::Split::on == s.split_ ? "on" : Transceiver::TransceiverState::Split::off == s.split_ ? "off" : "unknown")
<< "; PTT: " << (s.ptt_ ? "on" : "off") << "; PTT: " << (s.ptt_ ? "on" : "off")
<< ')'; << ')';

View File

@ -57,7 +57,7 @@ namespace
void operator () (std::logic_error const& e) const void operator () (std::logic_error const& e) const
{ {
std::cout << "std::logic_error: " << e.what () << std::endl; std::cout << "std::logic_error: " << e.what () << std::endl;
//throw; throw;
} }
}; };
@ -103,11 +103,6 @@ namespace
<< boost::log::add_value ("Function", function) << boost::log::add_value ("Function", function)
<< context.category << ": " << msg.toStdWString (); << context.category << ": " << msg.toStdWString ();
} }
if (QtFatalMsg == type)
{
// bail out
throw std::runtime_error {"Fatal Qt Error"};
}
} }
} }

View File

@ -5,7 +5,7 @@
#include <iterator> #include <iterator>
#include <algorithm> #include <algorithm>
#include <ios> #include <ios>
#include <locale.h> #include <locale>
#include <fftw3.h> #include <fftw3.h>
#include <QSharedMemory> #include <QSharedMemory>
@ -115,7 +115,7 @@ int main(int argc, char *argv[])
auto const env = QProcessEnvironment::systemEnvironment (); auto const env = QProcessEnvironment::systemEnvironment ();
QApplication a(argc, argv); ExceptionCatchingApplication a(argc, argv);
try try
{ {
// LOG_INfO ("+++++++++++++++++++++++++++ Resources ++++++++++++++++++++++++++++"); // LOG_INfO ("+++++++++++++++++++++++++++ Resources ++++++++++++++++++++++++++++");
@ -129,10 +129,13 @@ int main(int argc, char *argv[])
// LOG_INFO ("--------------------------- Resources ----------------------------"); // LOG_INFO ("--------------------------- Resources ----------------------------");
QLocale locale; // get the current system locale QLocale locale; // get the current system locale
setlocale (LC_NUMERIC, "C"); // ensure number forms are in
// consistent format, do this after // Set C/C++ locale used for logging etc.
// instantiating QApplication so #if defined (Q_OS_WIN)
// that GUI has correct l18n std::locale::global (std::locale ("C"));
#else
std::locale::global (std::locale ("en_US.UTF-8"));
#endif
// Override programs executable basename as application name. // Override programs executable basename as application name.
a.setApplicationName ("WSJT-X"); a.setApplicationName ("WSJT-X");
@ -397,7 +400,7 @@ int main(int argc, char *argv[])
a.translate ("main", "Unable to create shared memory segment")); a.translate ("main", "Unable to create shared memory segment"));
throw std::runtime_error {"Shared memory error"}; throw std::runtime_error {"Shared memory error"};
} }
LOG_INFO ("shmem size:" << mem_jt9.size ()); LOG_INFO ("shmem size: " << mem_jt9.size ());
} }
else else
{ {

View File

@ -7215,7 +7215,12 @@ void MainWindow::rigFailure (QString const& reason)
{ {
if (m_splash && m_splash->isVisible ()) m_splash->hide (); if (m_splash && m_splash->isVisible ()) m_splash->hide ();
m_rigErrorMessageBox.setDetailedText (reason + "\n\nTimestamp: " m_rigErrorMessageBox.setDetailedText (reason + "\n\nTimestamp: "
+ QDateTime::currentDateTimeUtc ().toString (Qt::ISODateWithMs)); #if QT_VERSION >= QT_VERSION_CHECK (5, 8, 0)
+ QDateTime::currentDateTimeUtc ().toString (Qt::ISODateWithMs)
#else
+ QDateTime::currentDateTimeUtc ().toString ("yyyy-MM-ddTHH:mm:ss.zzzZ")
#endif
);
// don't call slot functions directly to avoid recursion // don't call slot functions directly to avoid recursion
m_rigErrorMessageBox.exec (); m_rigErrorMessageBox.exec ();