增加vld检测memleak
parent
9a5d784283
commit
b28c28f425
|
@ -33,6 +33,13 @@ FORMS += \
|
||||||
|
|
||||||
LIBS += -lws2_32
|
LIBS += -lws2_32
|
||||||
|
|
||||||
|
INCLUDEPATH += $$PWD/../../SDK/include
|
||||||
|
|
||||||
|
CONFIG(debug, debug|debug) {
|
||||||
|
INCLUDEPATH += "D:/Visual Leak Detector/include"
|
||||||
|
win32:LIBS += "D:/Visual Leak Detector/lib/Win64/vld.lib"
|
||||||
|
}
|
||||||
|
|
||||||
TRANSLATIONS += \
|
TRANSLATIONS += \
|
||||||
EmsShower_en_US.ts
|
EmsShower_en_US.ts
|
||||||
CONFIG += lrelease
|
CONFIG += lrelease
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#include <vld.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
@ -10,9 +14,11 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
QTranslator translator;
|
QTranslator translator;
|
||||||
const QStringList uiLanguages = QLocale::system().uiLanguages();
|
const QStringList uiLanguages = QLocale::system().uiLanguages();
|
||||||
for (const QString &locale : uiLanguages) {
|
for (const QString &locale : uiLanguages)
|
||||||
|
{
|
||||||
const QString baseName = "EmsShower_" + QLocale(locale).name();
|
const QString baseName = "EmsShower_" + QLocale(locale).name();
|
||||||
if (translator.load(":/i18n/" + baseName)) {
|
if (translator.load(":/i18n/" + baseName))
|
||||||
|
{
|
||||||
a.installTranslator(&translator);
|
a.installTranslator(&translator);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,6 +116,12 @@ MainWindow::~MainWindow()
|
||||||
ptr = nullptr;
|
ptr = nullptr;
|
||||||
}
|
}
|
||||||
m_SlaveData.clear();
|
m_SlaveData.clear();
|
||||||
|
|
||||||
|
if (m_pSettings!=nullptr)
|
||||||
|
{
|
||||||
|
delete m_pSettings;
|
||||||
|
m_pSettings = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::getConfiguration(QString iniFilePath)
|
void MainWindow::getConfiguration(QString iniFilePath)
|
||||||
|
@ -311,6 +317,7 @@ bool MainWindow::readRegister(int addr,int nb,uint16_t* dest)
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "同步读取地址" << pItem->start_address;
|
qDebug() << "同步读取地址" << pItem->start_address;
|
||||||
|
delete pDevice;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue