mirror of
https://github.com/ea4k/klog.git
synced 2024-09-21 02:18:32 +00:00
Fix double free in mainwindow.cpp (#726)
This commit is contained in:
parent
cdb354f86b
commit
f7f324ad43
@ -192,8 +192,7 @@ MainWindow::MainWindow(const QString &tversion)
|
||||
mainWidget = new QWidget(this);
|
||||
//qDebug() << Q_FUNC_INFO << ": 60 " << QTime::currentTime().toString("hh:mm:ss") ;
|
||||
|
||||
dateTime = new QDateTime();
|
||||
dateTimeTemp = new QDateTime();
|
||||
dateTime = std::make_unique<QDateTime>();
|
||||
// UI DX
|
||||
infoLabel2 = new QLabel(tr("DX Entity"));
|
||||
loggWinAct = new QAction(tr("&Log Window"), this);
|
||||
@ -251,8 +250,7 @@ MainWindow::~MainWindow()
|
||||
delete(locator);
|
||||
delete(qso);
|
||||
delete(backupQSO);
|
||||
delete(dateTime);
|
||||
delete(dateTimeTemp);
|
||||
dateTime.reset();
|
||||
delete(awards);
|
||||
delete(softUpdate);
|
||||
delete(filemanager);
|
||||
@ -2214,7 +2212,6 @@ void MainWindow::slotClearButtonClicked(const QString &_func)
|
||||
setModifying(false);
|
||||
|
||||
currentEntity = -1;
|
||||
dateTimeTemp = dateTime;
|
||||
modifyingQSO = -1;
|
||||
|
||||
QSOTabWidget->setRSTToMode(mainQSOEntryWidget->getMode(), readingTheUI);
|
||||
@ -4682,8 +4679,6 @@ void MainWindow::qsoToEdit (const int _qso)
|
||||
|
||||
mainQSOEntryWidget->setDateTime(qsoE.getDateTimeOn());
|
||||
|
||||
dateTimeTemp->setDate(qsoE.getDate());
|
||||
|
||||
mainQSOEntryWidget->setBand(qsoE.getBand());
|
||||
|
||||
//qDebug() << Q_FUNC_INFO << " - RST" ;
|
||||
|
@ -81,6 +81,8 @@
|
||||
#include "updatesettings.h"
|
||||
#include "klogdefinitions.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
class QTimer;
|
||||
class QDateTime;
|
||||
|
||||
@ -625,7 +627,7 @@ private:
|
||||
// </UI>
|
||||
int infoTimeout; // timeout that temporary info will stay in the infobars
|
||||
QTimer *timer, *timerInfoBars;
|
||||
QDateTime *dateTime, *dateTimeTemp;
|
||||
std::unique_ptr<QDateTime> dateTime;
|
||||
bool yearChangedDuringModification;
|
||||
QString infoLabel1T, infoLabel2T;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user