Take advantage of the new KVASD v1.12

Pass the  temporary directory to  jt9 and use  it to give  the correct
paths  to  temporary files.  Also  jt9  passes  the absolute  path  to
kvasd.dat in the temporary directory to kvasd.

Clear out all the annoying cruft that has accumulated due to having to
run with $CWD as the temporary directory.

Use QStandardPaths  to find the  writable data directory  where needed
rather than passing it around  between objects. This now works because
the $CWD hasn't been changed.

Do away with the CMake option WSJT_STANDARD_FILE_LOCATIONS as it is no
longer needed.

Fix astro status file azel.dat formatting.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4732 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville
2014-12-03 00:06:54 +00:00
parent 9ba26ce902
commit 935bacd2df
22 changed files with 535 additions and 571 deletions
+5 -6
View File
@@ -5,6 +5,8 @@
#include <QRegExp>
#include <QTcpSocket>
#include <QThread>
#include <QStandardPaths>
#include <QDir>
#include "NetworkServerLookup.hpp"
@@ -66,13 +68,11 @@ qint32 const HRDMessage::magic_2_value_ (0xABCD1234);
HRDTransceiver::HRDTransceiver (std::unique_ptr<TransceiverBase> wrapped
, QString const& server
, bool use_for_ptt
, int poll_interval
, QDir const& data_path)
, int poll_interval)
: PollingTransceiver {poll_interval}
, wrapped_ {std::move (wrapped)}
, use_for_ptt_ {use_for_ptt}
, server_ {server}
, data_path_ {data_path}
, hrd_ {0}
, protocol_ {none}
, current_radio_ {0}
@@ -158,11 +158,10 @@ void HRDTransceiver::do_start ()
send_command ("get context", false, false);
}
QString HRD_info_path {data_path_.absoluteFilePath ("HRD Interface Information.txt")};
QFile HRD_info_file {HRD_info_path};
QFile HRD_info_file {QDir {QStandardPaths::writableLocation (QStandardPaths::DataLocation)}.absoluteFilePath ("HRD Interface Information.txt")};
if (!HRD_info_file.open (QFile::WriteOnly | QFile::Text | QFile::Truncate))
{
throw error {tr ("Failed to open file \"%1\".").arg (HRD_info_path)};
throw error {tr ("Failed to open file \"%1\".").arg (HRD_info_file.fileName ())};
}
QTextStream HRD_info {&HRD_info_file};