From 1786d7e8f8881ba0e5fd61f39cd69b34997fb79f Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Thu, 28 Feb 2019 21:35:48 +0000 Subject: [PATCH 1/6] Bunp version for v2.0.2 hot fix branch --- Versions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Versions.cmake b/Versions.cmake index 450a98894..5019b0765 100644 --- a/Versions.cmake +++ b/Versions.cmake @@ -1,6 +1,6 @@ # Version number components set (WSJTX_VERSION_MAJOR 2) set (WSJTX_VERSION_MINOR 0) -set (WSJTX_VERSION_PATCH 1) +set (WSJTX_VERSION_PATCH 2) set (WSJTX_RC 1) # release candidate number, comment out or zero for development versions set (WSJTX_VERSION_IS_RELEASE 1) # set to 1 for final release build From f63c5e14bba9b17827306c54a7d0d1716dc10037 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sat, 2 Mar 2019 13:22:42 +0000 Subject: [PATCH 2/6] Load LoTW Users data if CSV file exists at startup --- Configuration.cpp | 5 ++++- LotWUsers.cpp | 18 +++++++++++------- LotWUsers.hpp | 2 +- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index 8fcb5cee1..c7884113d 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -1012,6 +1012,9 @@ Configuration::impl::impl (Configuration * self, QNetworkAccessManager * network }); lotw_users_.set_local_file_path (writeable_data_dir_.absoluteFilePath ("lotw-user-activity.csv")); + // load the dictionary if it exists + lotw_users_.load (ui_->LotW_CSV_URL_line_edit->text (), false); + // // validation ui_->callsign_line_edit->setValidator (new CallsignValidator {this}); @@ -2155,7 +2158,7 @@ void Configuration::impl::on_rescan_log_push_button_clicked (bool /*clicked*/) void Configuration::impl::on_LotW_CSV_fetch_push_button_clicked (bool /*checked*/) { - lotw_users_.load (ui_->LotW_CSV_URL_line_edit->text (), true); + lotw_users_.load (ui_->LotW_CSV_URL_line_edit->text (), true, true); ui_->LotW_CSV_fetch_push_button->setEnabled (false); } diff --git a/LotWUsers.cpp b/LotWUsers.cpp index 877e70549..fd1b5746c 100644 --- a/LotWUsers.cpp +++ b/LotWUsers.cpp @@ -42,11 +42,12 @@ public: { } - void load (QString const& url, bool forced_fetch) + void load (QString const& url, bool fetch, bool forced_fetch) { - auto csv_file_name = csv_file_.fileName (); abort (); // abort any active download - if (!QFileInfo::exists (csv_file_name) || forced_fetch) + auto csv_file_name = csv_file_.fileName (); + auto exists = QFileInfo::exists (csv_file_name); + if (fetch && (!exists || forced_fetch)) { current_url_.setUrl (url); if (current_url_.isValid () && !QSslSocket::supportsSsl ()) @@ -58,8 +59,11 @@ public: } else { - // load the database asynchronously - future_load_ = std::async (std::launch::async, &LotWUsers::impl::load_dictionary, this, csv_file_name); + if (exists) + { + // load the database asynchronously + future_load_ = std::async (std::launch::async, &LotWUsers::impl::load_dictionary, this, csv_file_name); + } } } @@ -254,9 +258,9 @@ void LotWUsers::set_local_file_path (QString const& path) m_->csv_file_.setFileName (path); } -void LotWUsers::load (QString const& url, bool force_download) +void LotWUsers::load (QString const& url, bool fetch, bool force_download) { - m_->load (url, force_download); + m_->load (url, fetch, force_download); } void LotWUsers::set_age_constraint (qint64 uploaded_since_days) diff --git a/LotWUsers.hpp b/LotWUsers.hpp index e088b151e..238c57402 100644 --- a/LotWUsers.hpp +++ b/LotWUsers.hpp @@ -23,7 +23,7 @@ public: void set_local_file_path (QString const&); - Q_SLOT void load (QString const& url, bool force_download = false); + Q_SLOT void load (QString const& url, bool fetch = true, bool force_download = false); Q_SLOT void set_age_constraint (qint64 uploaded_since_days); // returns true if the specified call sign 'call' has uploaded their From d4aa208b151d93d94ea8f585ee8e70a3b673f2f1 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sun, 3 Mar 2019 11:48:43 +0000 Subject: [PATCH 3/6] Updated OpenSSL package download link --- doc/common/links.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/common/links.adoc b/doc/common/links.adoc index b81743fc4..85fdb1064 100644 --- a/doc/common/links.adoc +++ b/doc/common/links.adoc @@ -91,7 +91,7 @@ d). Edit lines as needed. Keeping them in alphabetic order help see dupes. :sourceforge-jtsdk: https://sourceforge.net/projects/jtsdk[SourceForge JTSDK] :ubuntu_sdk: https://launchpad.net/~ubuntu-sdk-team/+archive/ppa[Ubuntu SDK Notice] :win_openssl_packages: https://slproweb.com/products/Win32OpenSSL.html[Windows OpenSSL Packages] -:win32_openssl: https://slproweb.com/download/Win32OpenSSL_Light-1_0_2q.exe[Win32 OpenSSL Lite Package] +:win32_openssl: https://slproweb.com/download/Win32OpenSSL_Light-1_0_2r.exe[Win32 OpenSSL Lite Package] :writelog: https://writelog.com/[Writelog] :wsjt_yahoo_group: https://groups.yahoo.com/neo/groups/wsjtgroup/info[WSJT Group] :wsjtx: http://physics.princeton.edu/pulsar/K1JT/wsjtx.html[WSJT-X] From 4f57cc7fdb717b80b313b5e2e0717bfa22fe4104 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 5 Mar 2019 22:46:04 +0000 Subject: [PATCH 4/6] Fix a thread safety issue in diagnostic trace to file code --- TraceFile.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/TraceFile.cpp b/TraceFile.cpp index 2329b425f..87d4a82bb 100644 --- a/TraceFile.cpp +++ b/TraceFile.cpp @@ -3,6 +3,8 @@ #include #include +#include +#include #include #include #include @@ -28,10 +30,11 @@ private: QTextStream * original_stream_; QtMessageHandler original_handler_; static QTextStream * current_stream_; + static QMutex mutex_; }; QTextStream * TraceFile::impl::current_stream_; - +QMutex TraceFile::impl::mutex_; // delegate to implementation class TraceFile::TraceFile (QString const& trace_file_path) @@ -73,7 +76,10 @@ TraceFile::impl::~impl () void TraceFile::impl::message_handler (QtMsgType type, QMessageLogContext const& context, QString const& msg) { Q_ASSERT_X (current_stream_, "TraceFile:message_handler", "no stream to write to"); - *current_stream_ << qFormatLogMessage (type, context, msg) << endl; + { + QMutexLocker lock {&mutex_}; // thread safety - serialize writes to the trace file + *current_stream_ << qFormatLogMessage (type, context, msg) << endl; + } if (QtFatalMsg == type) { From 09ee9d3dc05fb1c2e0a71f545e936f02732066b9 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 13 Mar 2019 00:08:50 +0000 Subject: [PATCH 5/6] Add helpful tool tips to serial port drop down list items --- Configuration.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Configuration.cpp b/Configuration.cpp index c7884113d..a937dcfcd 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -1073,6 +1073,7 @@ Configuration::impl::impl (Configuration * self, QNetworkAccessManager * network // fill_port_combo_box (ui_->PTT_port_combo_box); ui_->PTT_port_combo_box->addItem ("CAT"); + ui_->PTT_port_combo_box->setItemData (ui_->PTT_port_combo_box->count () - 1, "Delegate to proxy CAT service", Qt::ToolTipRole); // // setup hooks to keep audio channels aligned with devices @@ -2922,9 +2923,15 @@ void Configuration::impl::fill_port_combo_box (QComboBox * cb) // remove possibly confusing Windows device path (OK because // it gets added back by Hamlib) cb->addItem (p.systemLocation ().remove (QRegularExpression {R"(^\\\\\.\\)"})); + auto tip = QString {"%1 %2 %3"}.arg (p.manufacturer ()).arg (p.serialNumber ()).arg (p.description ()).trimmed (); + if (tip.size ()) + { + cb->setItemData (cb->count () - 1, tip, Qt::ToolTipRole); + } } } - cb->addItem("USB"); + cb->addItem ("USB"); + cb->setItemData (cb->count () - 1, "Custom USB device", Qt::ToolTipRole); cb->setEditText (current_text); } From 0dc43a069398c0e731944f58ac7fe6731cc5ddb3 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Fri, 15 Mar 2019 17:39:06 +0000 Subject: [PATCH 6/6] Add FAQ item explaining how to fix configurations on KDE Linux desktops --- doc/user_guide/en/faq.adoc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/user_guide/en/faq.adoc b/doc/user_guide/en/faq.adoc index 9240f3436..27751a493 100644 --- a/doc/user_guide/en/faq.adoc +++ b/doc/user_guide/en/faq.adoc @@ -95,3 +95,19 @@ QT_QPA_PLATFORMTHEME set to empty (the space after the '=' character is necessary): QT_QPA_PLATFORMTHEME= wsjtx + +I am running _WSJT-X_ on Linux using a KDE desktop. Why does *Menu->Configurations* misbehave?:: + +The KDE development team have added code to Qt that tries to +automatically add shortcut accelerator keys to all buttons including +pop up menu buttons, this interferes with operation of the application +(many other Qt applications have similar issues with KDE). Until this +is fixed by the KDE team you must disable this misfeature. Edit the +file ~/.config/kdeglobals and add a section containing the following: + + [Development] + AutoCheckAccelerators=false + ++ +See https://stackoverflow.com/a/32711483 and +https://bugs.kde.org/show_bug.cgi?id=337491 for more details.