From 9c45e510ffb4896f6038d5ff2b15f9438786373a Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 15 Jan 2024 18:34:01 -0500 Subject: [PATCH] Be sure the saveFileName is static. --- qmap/mainwindow.cpp | 10 +++++----- qmap/mainwindow.h | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/qmap/mainwindow.cpp b/qmap/mainwindow.cpp index 774b58cfe..17f17e755 100644 --- a/qmap/mainwindow.cpp +++ b/qmap/mainwindow.cpp @@ -916,16 +916,16 @@ void MainWindow::decode() //decode() decodes_.ncand=0; decodes_.nQDecoderDone=0; - QString saveFileName="NoSave"; + m_saveFileName="NoSave"; if(!m_diskData) { QDateTime t = QDateTime::currentDateTimeUtc(); m_dateTime=t.toString("yyMMdd_hhmm"); QDir dir(m_saveDir); if (!dir.exists()) dir.mkpath("."); - saveFileName=m_saveDir + "/" + m_dateTime + ".qm"; + m_saveFileName=m_saveDir + "/" + m_dateTime + ".qm"; } -// qDebug() << "aa" << m_n60 << datcom_.nhsym << m_revision << saveFileName; +// qDebug() << "aa" << m_n60 << datcom_.nhsym << m_revision << m_saveFileName; //No need to call decoder for first half, if we transmitted in the first half: if((datcom_.nhsym<=200) and (m_nTx30a>5)) return; @@ -933,10 +933,10 @@ void MainWindow::decode() //decode() //No need to call decoder in second half, if we transmitted in that half: if((datcom_.nhsym>200) and (m_nTx30b>5)) return; - int len1=saveFileName.length(); + int len1=m_saveFileName.length(); int len2=m_revision.length(); watcher3.setFuture(QtConcurrent::run (std::bind (q65c_, - saveFileName.toLatin1().constData(), + m_saveFileName.toLatin1().constData(), m_revision.toLatin1().constData(), len1, len2))); decodeBusy(true); } diff --git a/qmap/mainwindow.h b/qmap/mainwindow.h index 2b3c82047..f4a7c5bbf 100644 --- a/qmap/mainwindow.h +++ b/qmap/mainwindow.h @@ -171,6 +171,7 @@ private: QString m_mode; QString m_UTC0=""; QString m_revision; + QString m_saveFileName; QDateTime m_dateTimeSeqStart; //Nominal start time of Rx sequence about to be decoded QHash m_worked;