mirror of
https://github.com/x-tools-author/x-tools.git
synced 2025-09-15 15:28:40 +08:00
change nullptr to Q_NULLPTR
This commit is contained in:
parent
b8a0045e4b
commit
8dc13597a1
@ -15,7 +15,7 @@
|
||||
|
||||
#include "QtAppStyleApi.hh"
|
||||
|
||||
QtAppStyleApi *QtAppStyleApi::_this = nullptr;
|
||||
QtAppStyleApi *QtAppStyleApi::_this = Q_NULLPTR;
|
||||
QtAppStyleApi *QtAppStyleApi::instance()
|
||||
{
|
||||
if (_this){
|
||||
@ -36,7 +36,7 @@ QtAppStyleApi::QtAppStyleApi(QObject *parent)
|
||||
{
|
||||
_this = this;
|
||||
|
||||
QAction *styleAction = nullptr;
|
||||
QAction *styleAction = Q_NULLPTR;
|
||||
QActionGroup *styleActionGroup = new QActionGroup(this);
|
||||
QStringList styleKeys = QStyleFactory::keys();
|
||||
for (QString style : styleKeys) {
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
#include "QtStyleSheetApi.hh"
|
||||
|
||||
QtStyleSheetApi *QtStyleSheetApi::_this = nullptr;
|
||||
QtStyleSheetApi *QtStyleSheetApi::_this = Q_NULLPTR;
|
||||
QtStyleSheetApi *QtStyleSheetApi::instance()
|
||||
{
|
||||
if (_this){
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
#include "SAKApplicationInformation.hh"
|
||||
|
||||
SAKApplicationInformation *SAKApplicationInformation::thisInstance = nullptr;
|
||||
SAKApplicationInformation *SAKApplicationInformation::thisInstance = Q_NULLPTR;
|
||||
static const QDate buildDate = QLocale( QLocale::English ).toDate( QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy");
|
||||
SAKApplicationInformation::SAKApplicationInformation(QObject *parent)
|
||||
:QObject (parent)
|
||||
@ -25,7 +25,7 @@ SAKApplicationInformation::SAKApplicationInformation(QObject *parent)
|
||||
|
||||
SAKApplicationInformation::~SAKApplicationInformation()
|
||||
{
|
||||
thisInstance = nullptr;
|
||||
thisInstance = Q_NULLPTR;
|
||||
}
|
||||
|
||||
SAKApplicationInformation* SAKApplicationInformation::instance()
|
||||
|
||||
@ -35,7 +35,7 @@ public:
|
||||
QString copyright();
|
||||
QString business();
|
||||
private:
|
||||
SAKApplicationInformation(QObject *parent = nullptr);
|
||||
SAKApplicationInformation(QObject *parent = Q_NULLPTR);
|
||||
~SAKApplicationInformation();
|
||||
|
||||
static SAKApplicationInformation *thisInstance;
|
||||
|
||||
@ -15,9 +15,9 @@
|
||||
|
||||
SAKCodingStyle::SAKCodingStyle(QObject *parent)
|
||||
:QObject (parent)
|
||||
,obj1 (nullptr)
|
||||
,obj2 (nullptr)
|
||||
,obj3 (nullptr)
|
||||
,obj1 (Q_NULLPTR)
|
||||
,obj2 (Q_NULLPTR)
|
||||
,obj3 (Q_NULLPTR)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ public:
|
||||
* @brief SAKCodingStyle 函数说明,公有函数原则上都需要添加
|
||||
* @param parent 参数parent说明
|
||||
*/
|
||||
SAKCodingStyle(QObject* parent = nullptr);
|
||||
SAKCodingStyle(QObject* parent = Q_NULLPTR);
|
||||
|
||||
private:
|
||||
/*
|
||||
|
||||
@ -49,7 +49,7 @@ public:
|
||||
* @brief SAKGlobal -- 构造函数
|
||||
* @param parent -- 父控件
|
||||
*/
|
||||
SAKGlobal(QObject* parent = nullptr);
|
||||
SAKGlobal(QObject* parent = Q_NULLPTR);
|
||||
|
||||
/**
|
||||
* @brief logFile -- 获取日志文件(全路径)
|
||||
|
||||
@ -169,8 +169,8 @@ void SAKMainWindow::addTab()
|
||||
* 隐藏关闭按钮(必须在调用setTabsClosable()函数后设置,否则不生效)
|
||||
*/
|
||||
for (int i = 0; i < tabWidget->count(); i++){
|
||||
tabWidget->tabBar()->setTabButton(i, QTabBar::RightSide, nullptr);
|
||||
tabWidget->tabBar()->setTabButton(i, QTabBar::LeftSide, nullptr);
|
||||
tabWidget->tabBar()->setTabButton(i, QTabBar::RightSide, Q_NULLPTR);
|
||||
tabWidget->tabBar()->setTabButton(i, QTabBar::LeftSide, Q_NULLPTR);
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ void SAKMainWindow::addTool()
|
||||
addTool(tr("文件校验工具"), new QtCryptographicHashController);
|
||||
#endif
|
||||
|
||||
QAction *action = nullptr;
|
||||
QAction *action = Q_NULLPTR;
|
||||
action = new QAction(tr("CRC计算器"), this);
|
||||
toolsMenu->addAction(action);
|
||||
connect(action, &QAction::triggered, this, &SAKMainWindow::createCRCCalculator);
|
||||
@ -469,7 +469,7 @@ void SAKMainWindow::openIODeviceWindow()
|
||||
|
||||
QWidget *SAKMainWindow::getDebugPage(int type)
|
||||
{
|
||||
QWidget *widget = nullptr;
|
||||
QWidget *widget = Q_NULLPTR;
|
||||
switch (type) {
|
||||
case SAKGlobal::SAKEnumDebugPageTypeUDP:
|
||||
widget = new SAKUdpDebugPage;
|
||||
|
||||
@ -35,20 +35,20 @@ class SAKMainWindow : public QMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SAKMainWindow(QWidget *parent = nullptr);
|
||||
explicit SAKMainWindow(QWidget *parent = Q_NULLPTR);
|
||||
~SAKMainWindow();
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
|
||||
private:
|
||||
QTabWidget *tabWidget = nullptr;
|
||||
Ui::SAKMainWindow *ui = nullptr;
|
||||
QMenu *toolsMenu = nullptr;
|
||||
QAction *defaultStyleSheetAction = nullptr;
|
||||
SAKUpdateManager *updateManager = nullptr;
|
||||
SAKMoreInformation *moreInformation = nullptr;
|
||||
SAKQRCodeDialog *qrCodeDialog = nullptr;
|
||||
QTabWidget *tabWidget = Q_NULLPTR;
|
||||
Ui::SAKMainWindow *ui = Q_NULLPTR;
|
||||
QMenu *toolsMenu = Q_NULLPTR;
|
||||
QAction *defaultStyleSheetAction = Q_NULLPTR;
|
||||
SAKUpdateManager *updateManager = Q_NULLPTR;
|
||||
SAKMoreInformation *moreInformation = Q_NULLPTR;
|
||||
SAKQRCodeDialog *qrCodeDialog = Q_NULLPTR;
|
||||
|
||||
QTranslator qtTranslator;
|
||||
QTranslator qtBaeTranslator;
|
||||
|
||||
@ -23,9 +23,9 @@ class SAKMoreInformation:public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKMoreInformation(QWidget* parent = nullptr);
|
||||
SAKMoreInformation(QWidget* parent = Q_NULLPTR);
|
||||
private:
|
||||
Ui::SAKMoreInformation* ui = nullptr;
|
||||
Ui::SAKMoreInformation* ui = Q_NULLPTR;
|
||||
QTextBrowser *textBrowserHistory;
|
||||
};
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
SAKSettings* SAKSettings::_instance = nullptr;
|
||||
SAKSettings* SAKSettings::_instance = Q_NULLPTR;
|
||||
SAKSettings* SAKSettings::instance()
|
||||
{
|
||||
if (!_instance){
|
||||
@ -39,7 +39,7 @@ SAKSettings::SAKSettings(const QString &fileName, Format format, QObject *parent
|
||||
|
||||
SAKSettings::~SAKSettings()
|
||||
{
|
||||
_instance = nullptr;
|
||||
_instance = Q_NULLPTR;
|
||||
}
|
||||
|
||||
bool SAKSettings::enableAutoCheckForUpdate()
|
||||
|
||||
@ -26,7 +26,7 @@ public:
|
||||
static SAKSettings* instance();
|
||||
private:
|
||||
static SAKSettings* _instance;
|
||||
SAKSettings(const QString &fileName, QSettings::Format format, QObject *parent = nullptr);
|
||||
SAKSettings(const QString &fileName, QSettings::Format format, QObject *parent = Q_NULLPTR);
|
||||
~SAKSettings();
|
||||
|
||||
/// @brief 以下是软件自动更新使能设置的相关成员
|
||||
|
||||
@ -25,7 +25,7 @@ QStringList SAKCRCInterface::supportedParameterModels()
|
||||
modelStrings.clear();
|
||||
QMetaEnum models = QMetaEnum::fromType<CRCModel>();
|
||||
|
||||
const char *ch = nullptr;
|
||||
const char *ch = Q_NULLPTR;
|
||||
for (int i = 0; i < models.keyCount(); i++) {
|
||||
ch = models.valueToKey(i);
|
||||
if (ch){
|
||||
|
||||
@ -19,7 +19,7 @@ class SAKCRCInterface:public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKCRCInterface(QObject *parent = nullptr);
|
||||
SAKCRCInterface(QObject *parent = Q_NULLPTR);
|
||||
|
||||
|
||||
/// crc算法模型(crc参数模型)
|
||||
|
||||
@ -21,7 +21,7 @@ class SAKCommonInterface:public QObject
|
||||
*/
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKCommonInterface(QObject *parent = nullptr);
|
||||
SAKCommonInterface(QObject *parent = Q_NULLPTR);
|
||||
|
||||
QByteArray byteArrayToHex(QByteArray &array, char separator);
|
||||
};
|
||||
|
||||
@ -55,7 +55,7 @@ SAKDebugPage::SAKDebugPage(int type, QWidget *parent)
|
||||
statisticsManager = new SAKStatisticsManager(this, this);
|
||||
debugPageInputManager = new SAKDebugPageInputManager(this, this);
|
||||
#ifdef SAK_IMPORT_CHARTS_MODULE
|
||||
dataVisualizationManager= nullptr;
|
||||
dataVisualizationManager= Q_NULLPTR;
|
||||
#endif
|
||||
|
||||
_readWriteParameters.waitForReadyReadTime = MINI_READ_WRITE_WATINGT_TIME;
|
||||
@ -149,7 +149,7 @@ void SAKDebugPage::refreshDevice()
|
||||
|
||||
QWidget *SAKDebugPage::controllerWidget()
|
||||
{
|
||||
return nullptr;
|
||||
return Q_NULLPTR;
|
||||
}
|
||||
|
||||
void SAKDebugPage::setUpController()
|
||||
@ -368,7 +368,7 @@ void SAKDebugPage::on_dataVisualizationPushButton_clicked()
|
||||
dataVisualizationManager = new SAKDataVisualizationManager(this);
|
||||
dataVisualizationManager->show();
|
||||
connect(dataVisualizationManager, &SAKDataVisualizationManager::destroyed, [&](){
|
||||
dataVisualizationManager = nullptr;
|
||||
dataVisualizationManager = Q_NULLPTR;
|
||||
});
|
||||
}
|
||||
#else
|
||||
|
||||
@ -134,27 +134,27 @@ private:
|
||||
// ------------------------------------------------------------------------
|
||||
// 设备设置
|
||||
protected:
|
||||
QPushButton *refreshPushButton = nullptr; // 刷新按钮
|
||||
QPushButton *switchPushButton = nullptr; // 打开关闭设备按钮
|
||||
QFrame *deviceSettingFrame = nullptr; // 控制面板
|
||||
QPushButton *refreshPushButton = Q_NULLPTR; // 刷新按钮
|
||||
QPushButton *switchPushButton = Q_NULLPTR; // 打开关闭设备按钮
|
||||
QFrame *deviceSettingFrame = Q_NULLPTR; // 控制面板
|
||||
private slots:
|
||||
void on_refreshPushButton_clicked();
|
||||
void on_switchPushButton_clicked();
|
||||
|
||||
// 输入设置组
|
||||
protected:
|
||||
QComboBox *inputModelComboBox = nullptr; // 输入模式预选框
|
||||
QCheckBox *cycleEnableCheckBox = nullptr; // 循环使能复选框
|
||||
QLineEdit *cycleTimeLineEdit = nullptr; // 循环周期输入框
|
||||
QPushButton *readinFilePushButton = nullptr; // 读入文件按钮
|
||||
QPushButton *saveInputDataPushButton = nullptr; // 保存发送输入框数据
|
||||
QCheckBox *addCRCCheckBox = nullptr; // 发送数据添加crc校验
|
||||
QCheckBox *bigeEndianCheckBox = nullptr; // crc值以大端形式添加
|
||||
QPushButton *clearInputPushButton = nullptr; // 清空输入框按钮
|
||||
QPushButton *sendPushButton = nullptr; // 发送数据按钮
|
||||
QTextEdit *inputTextEdit = nullptr; // 数据输入框
|
||||
QComboBox *crcParameterModelsComboBox = nullptr; // crc计算参数模型
|
||||
QLabel *crcLabel = nullptr; // crc显示标签
|
||||
QComboBox *inputModelComboBox = Q_NULLPTR; // 输入模式预选框
|
||||
QCheckBox *cycleEnableCheckBox = Q_NULLPTR; // 循环使能复选框
|
||||
QLineEdit *cycleTimeLineEdit = Q_NULLPTR; // 循环周期输入框
|
||||
QPushButton *readinFilePushButton = Q_NULLPTR; // 读入文件按钮
|
||||
QPushButton *saveInputDataPushButton = Q_NULLPTR; // 保存发送输入框数据
|
||||
QCheckBox *addCRCCheckBox = Q_NULLPTR; // 发送数据添加crc校验
|
||||
QCheckBox *bigeEndianCheckBox = Q_NULLPTR; // crc值以大端形式添加
|
||||
QPushButton *clearInputPushButton = Q_NULLPTR; // 清空输入框按钮
|
||||
QPushButton *sendPushButton = Q_NULLPTR; // 发送数据按钮
|
||||
QTextEdit *inputTextEdit = Q_NULLPTR; // 数据输入框
|
||||
QComboBox *crcParameterModelsComboBox = Q_NULLPTR; // crc计算参数模型
|
||||
QLabel *crcLabel = Q_NULLPTR; // crc显示标签
|
||||
QPushButton *addInputItemPushButton;
|
||||
QPushButton *deleteInputItemPushButton;
|
||||
QListWidget *inputDataItemListWidget;
|
||||
@ -175,24 +175,24 @@ private slots:
|
||||
|
||||
// 消息输出组管理
|
||||
protected:
|
||||
QLabel *infoLabel = nullptr; // 消息输标签
|
||||
QLabel *infoLabel = Q_NULLPTR; // 消息输标签
|
||||
|
||||
// 消息输出组
|
||||
protected:
|
||||
QLabel *rxLabel = nullptr; // 接受指示灯
|
||||
QLabel *txLabel = nullptr; // 发送指示灯
|
||||
QComboBox *outputTextFormatComboBox = nullptr; // 输出模式复选框(接收)
|
||||
QCheckBox *showDateCheckBox = nullptr; // 显示日期使能复选框
|
||||
QCheckBox *autoWrapCheckBox = nullptr; // 自动换行使能复选框
|
||||
QCheckBox *showTimeCheckBox = nullptr; // 显示时间使能复选框
|
||||
QCheckBox *showMsCheckBox = nullptr; // 显示毫秒使能复选框
|
||||
QCheckBox *showRxDataCheckBox = nullptr; // 显示接收数据使能复选框
|
||||
QCheckBox *showTxDataCheckBox = nullptr; // 显示发送数据使能复选框
|
||||
QCheckBox *saveOutputFileToFilecheckBox = nullptr; // 使能输出数据保存
|
||||
QPushButton *outputFilePathPushButton = nullptr; // 显示输出设置面板
|
||||
QPushButton *clearOutputPushButton = nullptr; // 清空输出按钮
|
||||
QPushButton *saveOutputPushButton = nullptr; // 保存输出按钮
|
||||
QTextBrowser *outputTextBroswer = nullptr; // 用于输出显示收发的数据
|
||||
QLabel *rxLabel = Q_NULLPTR; // 接受指示灯
|
||||
QLabel *txLabel = Q_NULLPTR; // 发送指示灯
|
||||
QComboBox *outputTextFormatComboBox = Q_NULLPTR; // 输出模式复选框(接收)
|
||||
QCheckBox *showDateCheckBox = Q_NULLPTR; // 显示日期使能复选框
|
||||
QCheckBox *autoWrapCheckBox = Q_NULLPTR; // 自动换行使能复选框
|
||||
QCheckBox *showTimeCheckBox = Q_NULLPTR; // 显示时间使能复选框
|
||||
QCheckBox *showMsCheckBox = Q_NULLPTR; // 显示毫秒使能复选框
|
||||
QCheckBox *showRxDataCheckBox = Q_NULLPTR; // 显示接收数据使能复选框
|
||||
QCheckBox *showTxDataCheckBox = Q_NULLPTR; // 显示发送数据使能复选框
|
||||
QCheckBox *saveOutputFileToFilecheckBox = Q_NULLPTR; // 使能输出数据保存
|
||||
QPushButton *outputFilePathPushButton = Q_NULLPTR; // 显示输出设置面板
|
||||
QPushButton *clearOutputPushButton = Q_NULLPTR; // 清空输出按钮
|
||||
QPushButton *saveOutputPushButton = Q_NULLPTR; // 保存输出按钮
|
||||
QTextBrowser *outputTextBroswer = Q_NULLPTR; // 用于输出显示收发的数据
|
||||
|
||||
QString settingStringOutputTextFormat;
|
||||
QString settingStringShowDate;
|
||||
@ -253,7 +253,7 @@ private:
|
||||
/**
|
||||
* @brief ui -- 界面文件
|
||||
*/
|
||||
Ui::SAKDebugPage *ui = nullptr;
|
||||
Ui::SAKDebugPage *ui = Q_NULLPTR;
|
||||
|
||||
/**
|
||||
* @brief initUiPointer -- 初始化指向ui控件的数据成员(指针)
|
||||
|
||||
@ -121,7 +121,7 @@ void SAKDebugPageInputManager::changeCycleTime()
|
||||
|
||||
void SAKDebugPageInputManager::saveInputDataToFile()
|
||||
{
|
||||
QString fileName = QFileDialog::getSaveFileName(nullptr,
|
||||
QString fileName = QFileDialog::getSaveFileName(Q_NULLPTR,
|
||||
tr("保存文件"),
|
||||
QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)+QString("input.txt"),
|
||||
QString("Text (*.txt)"));
|
||||
@ -145,7 +145,7 @@ void SAKDebugPageInputManager::saveInputDataToFile()
|
||||
|
||||
void SAKDebugPageInputManager::readinFile()
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName(nullptr, tr("打开文件"));
|
||||
QString fileName = QFileDialog::getOpenFileName(Q_NULLPTR, tr("打开文件"));
|
||||
if (!fileName.isEmpty()){
|
||||
QFile file(fileName);
|
||||
if(file.open(QFile::ReadOnly)){
|
||||
|
||||
@ -30,7 +30,7 @@ class SAKDebugPageInputManager:public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKDebugPageInputManager(SAKDebugPage *debugPage, QObject *parent = nullptr);
|
||||
SAKDebugPageInputManager(SAKDebugPage *debugPage, QObject *parent = Q_NULLPTR);
|
||||
~SAKDebugPageInputManager();
|
||||
|
||||
/**
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
SAKInputDataFactory::SAKInputDataFactory(QObject *parent)
|
||||
:QThread (parent)
|
||||
,crcInterface (nullptr)
|
||||
,crcInterface (Q_NULLPTR)
|
||||
{
|
||||
moveToThread(this);
|
||||
}
|
||||
@ -87,22 +87,22 @@ QByteArray SAKInputDataFactory::rawDataToArray(QString rawData, SAKDebugPageInpu
|
||||
if (parameters.inputModel == SAKGlobal::Ibin){
|
||||
QStringList strList = rawData.split(' ');
|
||||
for (QString str:strList){
|
||||
data.append(static_cast<int8_t>(QString(str).toInt(nullptr, 2)));
|
||||
data.append(static_cast<int8_t>(QString(str).toInt(Q_NULLPTR, 2)));
|
||||
}
|
||||
}else if (parameters.inputModel == SAKGlobal::Ioct){
|
||||
QStringList strList = rawData.split(' ');
|
||||
for (QString str:strList){
|
||||
data.append(static_cast<int8_t>(QString(str).toInt(nullptr, 8)));
|
||||
data.append(static_cast<int8_t>(QString(str).toInt(Q_NULLPTR, 8)));
|
||||
}
|
||||
}else if (parameters.inputModel == SAKGlobal::Idec){
|
||||
QStringList strList = rawData.split(' ');
|
||||
for (QString str:strList){
|
||||
data.append(static_cast<int8_t>(QString(str).toInt(nullptr, 10)));
|
||||
data.append(static_cast<int8_t>(QString(str).toInt(Q_NULLPTR, 10)));
|
||||
}
|
||||
}else if (parameters.inputModel == SAKGlobal::Ihex){
|
||||
QStringList strList = rawData.split(' ');
|
||||
for (QString str:strList){
|
||||
data.append(static_cast<int8_t>(QString(str).toInt(nullptr, 16)));
|
||||
data.append(static_cast<int8_t>(QString(str).toInt(Q_NULLPTR, 16)));
|
||||
}
|
||||
}else if (parameters.inputModel == SAKGlobal::Iascii){
|
||||
data = rawData.toLatin1();
|
||||
|
||||
@ -55,8 +55,8 @@ SAKOtherSettingsManager::~SAKOtherSettingsManager()
|
||||
delete transmissionSettings;
|
||||
delete autoResponseSettingWidget;
|
||||
|
||||
transmissionSettings = nullptr;
|
||||
autoResponseSettingWidget = nullptr;
|
||||
transmissionSettings = Q_NULLPTR;
|
||||
autoResponseSettingWidget = Q_NULLPTR;
|
||||
}
|
||||
|
||||
void SAKOtherSettingsManager::onAutoresponseSettingPushbuttonClicked()
|
||||
|
||||
@ -28,7 +28,7 @@ class SAKOtherSettingsManager:public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKOtherSettingsManager(SAKDebugPage *debugPage, QObject *parent = nullptr);
|
||||
SAKOtherSettingsManager(SAKDebugPage *debugPage, QObject *parent = Q_NULLPTR);
|
||||
~SAKOtherSettingsManager();
|
||||
|
||||
private:
|
||||
|
||||
@ -62,7 +62,7 @@ void SAKAutoResponseItemWidget::setLineEditFormat(QLineEdit *lineEdit, int forma
|
||||
QRegExp regExpAscii("([a-zA-Z0-9`~!@#$%^&*()-_=+\\|;:'\",<.>/?])*");
|
||||
|
||||
if (lineEdit){
|
||||
lineEdit->setValidator(nullptr);
|
||||
lineEdit->setValidator(Q_NULLPTR);
|
||||
lineEdit->clear();
|
||||
switch (format) {
|
||||
case SAKGlobal::Ibin:
|
||||
@ -81,7 +81,7 @@ void SAKAutoResponseItemWidget::setLineEditFormat(QLineEdit *lineEdit, int forma
|
||||
lineEdit->setValidator(new QRegExpValidator(regExpAscii, this));
|
||||
break;
|
||||
case SAKGlobal::Ilocal:
|
||||
lineEdit->setValidator(nullptr);
|
||||
lineEdit->setValidator(Q_NULLPTR);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -125,7 +125,7 @@ QByteArray SAKAutoResponseItemWidget::string2array(QString str, int format)
|
||||
auto stringList2Array = [](QStringList strList, int base) -> QByteArray{
|
||||
QByteArray array;
|
||||
for (auto var:strList){
|
||||
array.append(static_cast<char>(var.toInt(nullptr, base)));
|
||||
array.append(static_cast<char>(var.toInt(Q_NULLPTR, base)));
|
||||
}
|
||||
return array;
|
||||
};
|
||||
|
||||
@ -24,7 +24,7 @@ public:
|
||||
* @brief SAKHighlighter -- 构造函数,nothing to say.
|
||||
* @param parent -- 父控件,用于释放资源
|
||||
*/
|
||||
SAKHighlightSettings(QTextDocument* parent = nullptr);
|
||||
SAKHighlightSettings(QTextDocument* parent = Q_NULLPTR);
|
||||
|
||||
/**
|
||||
* @brief setHighlighterKeyWord -- 设置高亮显示关键字
|
||||
|
||||
@ -115,7 +115,7 @@ bool SAKHighlightSettingsWidget::eventFilter(QObject *watched, QEvent *event)
|
||||
|
||||
void SAKHighlightSettingsWidget::clearLabel()
|
||||
{
|
||||
QPushButton *bt = nullptr;
|
||||
QPushButton *bt = Q_NULLPTR;
|
||||
while (!labelList.isEmpty()) {
|
||||
bt = labelList.takeFirst();
|
||||
bt->deleteLater();
|
||||
|
||||
@ -28,16 +28,16 @@ class SAKHighlightSettingsWidget:public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKHighlightSettingsWidget(QTextDocument *doc, QWidget* parent = nullptr);
|
||||
SAKHighlightSettingsWidget(QTextDocument *doc, QWidget* parent = Q_NULLPTR);
|
||||
~SAKHighlightSettingsWidget();
|
||||
|
||||
bool eventFilter(QObject *watched, QEvent *event);
|
||||
private:
|
||||
Ui::SAKHighlightSettingsWidget *ui = nullptr;
|
||||
SAKHighlightSettings *highlighter = nullptr;
|
||||
QLineEdit *inputLineEdit = nullptr;
|
||||
QPushButton *clearLabelBt = nullptr;
|
||||
QPushButton *addLabelBt = nullptr;
|
||||
Ui::SAKHighlightSettingsWidget *ui = Q_NULLPTR;
|
||||
SAKHighlightSettings *highlighter = Q_NULLPTR;
|
||||
QLineEdit *inputLineEdit = Q_NULLPTR;
|
||||
QPushButton *clearLabelBt = Q_NULLPTR;
|
||||
QPushButton *addLabelBt = Q_NULLPTR;
|
||||
|
||||
QGridLayout labelLayout;
|
||||
QList<QPushButton*> labelList;
|
||||
|
||||
@ -24,7 +24,7 @@ class SAKMoreSettingsWidget:public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKMoreSettingsWidget(SAKDebugPage *debugPage, QWidget *parent = nullptr);
|
||||
SAKMoreSettingsWidget(SAKDebugPage *debugPage, QWidget *parent = Q_NULLPTR);
|
||||
~SAKMoreSettingsWidget();
|
||||
private:
|
||||
SAKDebugPage *_debugPage;
|
||||
|
||||
@ -25,9 +25,9 @@ class SAKReadWriteSettingsWidget:public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKReadWriteSettingsWidget(SAKDebugPage *debugPage, QWidget* parent = nullptr);
|
||||
SAKReadWriteSettingsWidget(SAKDebugPage *debugPage, QWidget* parent = Q_NULLPTR);
|
||||
private:
|
||||
Ui::SAKReadWriteSettingsWidget *ui = nullptr;
|
||||
Ui::SAKReadWriteSettingsWidget *ui = Q_NULLPTR;
|
||||
|
||||
QComboBox *readParametersComboBox;
|
||||
QComboBox *writeParametersComboBox;
|
||||
|
||||
@ -21,11 +21,11 @@
|
||||
SAKTimingSendingItemWidget::SAKTimingSendingItemWidget(SAKDebugPage *debugPage, QWidget *parent)
|
||||
:QWidget(parent)
|
||||
,ui (new Ui::SAKTimingSendingItemWidget)
|
||||
,timingCheckBox (nullptr)
|
||||
,timingTimeLineEdit (nullptr)
|
||||
,textFormatComboBox (nullptr)
|
||||
,remarkLineEdit (nullptr)
|
||||
,inputDataTextEdit (nullptr)
|
||||
,timingCheckBox (Q_NULLPTR)
|
||||
,timingTimeLineEdit (Q_NULLPTR)
|
||||
,textFormatComboBox (Q_NULLPTR)
|
||||
,remarkLineEdit (Q_NULLPTR)
|
||||
,inputDataTextEdit (Q_NULLPTR)
|
||||
,debugPage (debugPage)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@ -28,7 +28,7 @@ SAKSerialPortTransmissionItemWidget::SAKSerialPortTransmissionItemWidget(SAKDebu
|
||||
:SAKBaseTransmissionItemWidget (_debugPage, parent)
|
||||
#ifdef SAK_IMPORT_COM_MODULE
|
||||
,ui (new Ui::SAKSerialPortTransmissionItemWidget)
|
||||
,serialPort (nullptr)
|
||||
,serialPort (Q_NULLPTR)
|
||||
#endif
|
||||
{
|
||||
#ifdef SAK_IMPORT_COM_MODULE
|
||||
@ -89,7 +89,7 @@ void SAKSerialPortTransmissionItemWidget::on_enableCheckBox_clicked()
|
||||
disconnect(serialPort, &QSerialPort::readyRead, this, &SAKSerialPortTransmissionItemWidget::read);
|
||||
serialPort->close();
|
||||
serialPort->deleteLater();
|
||||
serialPort = nullptr;
|
||||
serialPort = Q_NULLPTR;
|
||||
this->setUiEnable(true);
|
||||
}
|
||||
};
|
||||
|
||||
@ -34,7 +34,7 @@ class SAKSerialPortTransmissionItemWidget:public SAKBaseTransmissionItemWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKSerialPortTransmissionItemWidget(SAKDebugPage *_debugPage, QWidget *parent = nullptr);
|
||||
SAKSerialPortTransmissionItemWidget(SAKDebugPage *_debugPage, QWidget *parent = Q_NULLPTR);
|
||||
|
||||
#ifdef SAK_IMPORT_COM_MODULE
|
||||
~SAKSerialPortTransmissionItemWidget();
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
SAKTcpTransmissionItemWidget::SAKTcpTransmissionItemWidget(SAKDebugPage *_debugPage, QWidget *parent)
|
||||
:SAKBaseTransmissionItemWidget (_debugPage, parent)
|
||||
,ui (new Ui::SAKTcpTransmissionItemWidget)
|
||||
,tcpSocket (nullptr)
|
||||
,tcpSocket (Q_NULLPTR)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@ -63,7 +63,7 @@ void SAKTcpTransmissionItemWidget::on_enableCheckBox_clicked()
|
||||
}
|
||||
disconnect(tcpSocket, &QTcpSocket::readyRead, this, &SAKTcpTransmissionItemWidget::read);
|
||||
delete tcpSocket;
|
||||
tcpSocket = nullptr;
|
||||
tcpSocket = Q_NULLPTR;
|
||||
this->setUiEnable(true);
|
||||
}
|
||||
};
|
||||
|
||||
@ -27,7 +27,7 @@ class SAKTcpTransmissionItemWidget:public SAKBaseTransmissionItemWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKTcpTransmissionItemWidget(SAKDebugPage *_debugPage, QWidget *parent = nullptr);
|
||||
SAKTcpTransmissionItemWidget(SAKDebugPage *_debugPage, QWidget *parent = Q_NULLPTR);
|
||||
~SAKTcpTransmissionItemWidget();
|
||||
|
||||
virtual void write(QByteArray data);
|
||||
|
||||
@ -21,7 +21,7 @@ class SAKTransmissionItemDelegate:public QAbstractItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKTransmissionItemDelegate(SAKDebugPage *page, QObject *parent = nullptr);
|
||||
SAKTransmissionItemDelegate(SAKDebugPage *page, QObject *parent = Q_NULLPTR);
|
||||
|
||||
enum TransmissionItemType {
|
||||
SerialPortType,
|
||||
|
||||
@ -67,7 +67,7 @@ void SAKTransmissionPage::on_addItemPushButton_clicked()
|
||||
{
|
||||
QListWidgetItem *item = new QListWidgetItem(listWidget);
|
||||
listWidget->insertItem(listWidget->count(), item);
|
||||
QWidget *itemWidget = nullptr;
|
||||
QWidget *itemWidget = Q_NULLPTR;
|
||||
switch (transmissionType){
|
||||
case SerialPortTransmission:
|
||||
itemWidget = new SAKSerialPortTransmissionItemWidget(_debugPage, this);
|
||||
|
||||
@ -27,7 +27,7 @@ class SAKTransmissionPage:public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKTransmissionPage(SAKDebugPage *debugPage, QWidget *parent = nullptr);
|
||||
SAKTransmissionPage(SAKDebugPage *debugPage, QWidget *parent = Q_NULLPTR);
|
||||
~SAKTransmissionPage();
|
||||
|
||||
enum TransmissionType {
|
||||
|
||||
@ -26,18 +26,18 @@ class SAKTransmissionSettings:public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKTransmissionSettings(SAKDebugPage *debugPage, QWidget *parent = nullptr);
|
||||
SAKTransmissionSettings(SAKDebugPage *debugPage, QWidget *parent = Q_NULLPTR);
|
||||
~SAKTransmissionSettings();
|
||||
private:
|
||||
QWidget *serialPortWidget = nullptr;
|
||||
QWidget *udpWidget = nullptr;
|
||||
QWidget *tcpWidget = nullptr;
|
||||
SAKDebugPage *_debugPage = nullptr;
|
||||
Ui::SAKTransmissionSettings *ui = nullptr;
|
||||
QWidget *serialPortWidget = Q_NULLPTR;
|
||||
QWidget *udpWidget = Q_NULLPTR;
|
||||
QWidget *tcpWidget = Q_NULLPTR;
|
||||
SAKDebugPage *_debugPage = Q_NULLPTR;
|
||||
Ui::SAKTransmissionSettings *ui = Q_NULLPTR;
|
||||
|
||||
SAKTransmissionPage *udpTransmission = nullptr;
|
||||
SAKTransmissionPage *tcpTransmission = nullptr;
|
||||
SAKTransmissionPage *serialPortTransmission = nullptr;
|
||||
SAKTransmissionPage *udpTransmission = Q_NULLPTR;
|
||||
SAKTransmissionPage *tcpTransmission = Q_NULLPTR;
|
||||
SAKTransmissionPage *serialPortTransmission = Q_NULLPTR;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
SAKUdpTransmissionItemWidget::SAKUdpTransmissionItemWidget(SAKDebugPage *_debugPage, QWidget *parent)
|
||||
:SAKBaseTransmissionItemWidget (_debugPage, parent)
|
||||
,ui(new Ui::SAKUdpTransmissionItemWidget)
|
||||
,udpSocket (nullptr)
|
||||
,udpSocket (Q_NULLPTR)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@ -58,7 +58,7 @@ void SAKUdpTransmissionItemWidget::on_enableCheckBox_clicked()
|
||||
auto closeDev = [&](){
|
||||
disconnect(udpSocket, &QUdpSocket::readyRead, this, &SAKUdpTransmissionItemWidget::read);
|
||||
delete udpSocket;
|
||||
udpSocket = nullptr;
|
||||
udpSocket = Q_NULLPTR;
|
||||
this->setUiEnable(true);
|
||||
};
|
||||
|
||||
|
||||
@ -116,7 +116,7 @@ void SAKDebugPageOutputManager::setLineWrapMode()
|
||||
|
||||
void SAKDebugPageOutputManager::saveOutputTextToFile()
|
||||
{
|
||||
QString outFileName = QFileDialog::getSaveFileName(nullptr,
|
||||
QString outFileName = QFileDialog::getSaveFileName(Q_NULLPTR,
|
||||
tr("保存文件"),
|
||||
QString("./%1.txt")
|
||||
.arg(QDateTime::currentDateTime().toString("yyyyMMddhhmmss")),
|
||||
|
||||
@ -23,7 +23,7 @@ class SAKDebugPageOutputManager:public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKDebugPageOutputManager(SAKDebugPage *debugPage, QObject *parent = nullptr);
|
||||
SAKDebugPageOutputManager(SAKDebugPage *debugPage, QObject *parent = Q_NULLPTR);
|
||||
~SAKDebugPageOutputManager();
|
||||
|
||||
/**
|
||||
|
||||
@ -19,7 +19,7 @@ class SAKOutputDataFactory:public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKOutputDataFactory(QObject *parent = nullptr);
|
||||
SAKOutputDataFactory(QObject *parent = Q_NULLPTR);
|
||||
|
||||
/**
|
||||
* @brief cookData 将数据按照指定参数转变为字符串输出
|
||||
|
||||
@ -26,7 +26,7 @@ class SAKSaveOutputDataSettings:public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKSaveOutputDataSettings(QWidget *parent = nullptr);
|
||||
SAKSaveOutputDataSettings(QWidget *parent = Q_NULLPTR);
|
||||
~SAKSaveOutputDataSettings();
|
||||
|
||||
/**
|
||||
|
||||
@ -20,7 +20,7 @@ class SAKSaveOutputDataThread:public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKSaveOutputDataThread(QObject *parent = nullptr);
|
||||
SAKSaveOutputDataThread(QObject *parent = Q_NULLPTR);
|
||||
|
||||
void writeDataToFile(QByteArray data, SAKSaveOutputDataSettings::SaveOutputDataParamters parameters);
|
||||
private:
|
||||
|
||||
@ -22,7 +22,7 @@ class SAKStatisticsManager:public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKStatisticsManager(SAKDebugPage *debugPage, QObject *parent = nullptr);
|
||||
SAKStatisticsManager(SAKDebugPage *debugPage, QObject *parent = Q_NULLPTR);
|
||||
private:
|
||||
SAKDebugPage *debugPage;
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ class SAKDataVisualizationManager:public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKDataVisualizationManager(SAKDebugPage *page, QWidget *parent = nullptr);
|
||||
SAKDataVisualizationManager(SAKDebugPage *page, QWidget *parent = Q_NULLPTR);
|
||||
~SAKDataVisualizationManager();
|
||||
private:
|
||||
SAKDebugPage *debugPage;
|
||||
|
||||
@ -25,7 +25,7 @@ class SAKThroughputWidget:public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKThroughputWidget(SAKDebugPage *debugPage, QWidget *parent = nullptr);
|
||||
SAKThroughputWidget(SAKDebugPage *debugPage, QWidget *parent = Q_NULLPTR);
|
||||
~SAKThroughputWidget();
|
||||
|
||||
private:
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
SAKSerialPortDebugPage::SAKSerialPortDebugPage(QWidget *parent)
|
||||
:SAKDebugPage (SAKGlobal::SAKEnumDebugPageTypeCOM, parent)
|
||||
,serialPortAssistant (nullptr)
|
||||
,serialPortAssistant (Q_NULLPTR)
|
||||
,controller (new SAKSerialPortDeviceController)
|
||||
{
|
||||
setUpController();
|
||||
@ -53,7 +53,7 @@ void SAKSerialPortDebugPage::changeDeviceStatus(bool opened)
|
||||
if (serialPortAssistant){
|
||||
serialPortAssistant->terminate();
|
||||
delete serialPortAssistant;
|
||||
serialPortAssistant = nullptr;
|
||||
serialPortAssistant = Q_NULLPTR;
|
||||
}
|
||||
}
|
||||
emit deviceStatusChanged(opened);
|
||||
@ -65,7 +65,7 @@ void SAKSerialPortDebugPage::openOrColoseDevice()
|
||||
switchPushButton->setText(tr("打开"));
|
||||
serialPortAssistant->terminate();
|
||||
delete serialPortAssistant;
|
||||
serialPortAssistant = nullptr;
|
||||
serialPortAssistant = Q_NULLPTR;
|
||||
|
||||
setUiEnable(true);
|
||||
emit deviceStatusChanged(false);
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
SAKTcpClientDebugPage::SAKTcpClientDebugPage(QWidget *parent)
|
||||
:SAKDebugPage (SAKGlobal::SAKEnumDebugPageTypeTCPClient, parent)
|
||||
,tcpClientDevice (nullptr)
|
||||
,tcpClientDevice (Q_NULLPTR)
|
||||
,tcpClientDeviceController (new SAKTcpClientDeviceController)
|
||||
{
|
||||
setUpController();
|
||||
@ -54,7 +54,7 @@ void SAKTcpClientDebugPage::changeDeviceStatus(bool opened)
|
||||
if (tcpClientDevice){
|
||||
tcpClientDevice->terminate();
|
||||
delete tcpClientDevice;
|
||||
tcpClientDevice = nullptr;
|
||||
tcpClientDevice = Q_NULLPTR;
|
||||
}
|
||||
}
|
||||
emit deviceStatusChanged(opened);
|
||||
@ -66,7 +66,7 @@ void SAKTcpClientDebugPage::openOrColoseDevice()
|
||||
switchPushButton->setText(tr("打开"));
|
||||
tcpClientDevice->terminate();
|
||||
delete tcpClientDevice;
|
||||
tcpClientDevice = nullptr;
|
||||
tcpClientDevice = Q_NULLPTR;
|
||||
|
||||
setUiEnable(true);
|
||||
emit deviceStatusChanged(false);
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
SAKTcpServerDebugPage::SAKTcpServerDebugPage(QWidget *parent)
|
||||
:SAKDebugPage (SAKGlobal::SAKEnumDebugPageTypeTCPServer, parent)
|
||||
,tcpServerDevice (nullptr)
|
||||
,tcpServerDevice (Q_NULLPTR)
|
||||
,tcpServerDeviceController (new SAKTcpServerDeviceController)
|
||||
{
|
||||
setUpController();
|
||||
@ -54,7 +54,7 @@ void SAKTcpServerDebugPage::changeDeviceStatus(bool opened)
|
||||
if (tcpServerDevice){
|
||||
tcpServerDevice->terminate();
|
||||
delete tcpServerDevice;
|
||||
tcpServerDevice = nullptr;
|
||||
tcpServerDevice = Q_NULLPTR;
|
||||
}
|
||||
}
|
||||
emit deviceStatusChanged(opened);
|
||||
@ -86,7 +86,7 @@ void SAKTcpServerDebugPage::openOrColoseDevice()
|
||||
switchPushButton->setText(tr("打开"));
|
||||
tcpServerDevice->terminate();
|
||||
delete tcpServerDevice;
|
||||
tcpServerDevice = nullptr;
|
||||
tcpServerDevice = Q_NULLPTR;
|
||||
|
||||
setUiEnable(true);
|
||||
emit deviceStatusChanged(false);
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
SAKUdpDebugPage::SAKUdpDebugPage(QWidget *parent)
|
||||
:SAKDebugPage (SAKGlobal::SAKEnumDebugPageTypeUDP, parent)
|
||||
,udpDevice (nullptr)
|
||||
,udpDevice (Q_NULLPTR)
|
||||
,udpDeviceController (new SAKUdpDeviceController)
|
||||
{
|
||||
setUpController();
|
||||
@ -56,7 +56,7 @@ void SAKUdpDebugPage::changeDeviceStatus(bool opened)
|
||||
if (udpDevice){
|
||||
udpDevice->terminate();
|
||||
delete udpDevice;
|
||||
udpDevice = nullptr;
|
||||
udpDevice = Q_NULLPTR;
|
||||
}
|
||||
}
|
||||
emit deviceStatusChanged(opened);
|
||||
@ -68,7 +68,7 @@ void SAKUdpDebugPage::openOrColoseDevice()
|
||||
switchPushButton->setText(tr("打开"));
|
||||
udpDevice->terminate();
|
||||
delete udpDevice;
|
||||
udpDevice = nullptr;
|
||||
udpDevice = Q_NULLPTR;
|
||||
|
||||
setUiEnable(true);
|
||||
emit deviceStatusChanged(false);
|
||||
|
||||
@ -134,7 +134,7 @@ void SAKCRCCalculator::calculate()
|
||||
if (strList.at(i).isEmpty()){
|
||||
continue;
|
||||
}
|
||||
ch = static_cast<char>(strList.at(i).toInt(nullptr, 16));
|
||||
ch = static_cast<char>(strList.at(i).toInt(Q_NULLPTR, 16));
|
||||
inputArray.append(ch);
|
||||
}
|
||||
}else{
|
||||
|
||||
@ -35,7 +35,7 @@ class SAKCRCCalculator:public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKCRCCalculator(QWidget* parent = nullptr);
|
||||
SAKCRCCalculator(QWidget* parent = Q_NULLPTR);
|
||||
~SAKCRCCalculator();
|
||||
protected:
|
||||
bool eventFilter(QObject *watched, QEvent *event);
|
||||
@ -44,26 +44,26 @@ private:
|
||||
SAKCRCInterface crcInterface;
|
||||
|
||||
Ui::SAKCRCCalculator* ui;
|
||||
QComboBox* widthComboBox = nullptr;
|
||||
QComboBox* parameterComboBox = nullptr;
|
||||
QComboBox* widthComboBox = Q_NULLPTR;
|
||||
QComboBox* parameterComboBox = Q_NULLPTR;
|
||||
|
||||
QCheckBox* refinCheckBox = nullptr;
|
||||
QCheckBox* refoutCheckBox = nullptr;
|
||||
QLineEdit* polyLineEdit = nullptr;
|
||||
QLineEdit* initLineEdit = nullptr;
|
||||
QLineEdit* xorLineEdit = nullptr;
|
||||
QCheckBox* refinCheckBox = Q_NULLPTR;
|
||||
QCheckBox* refoutCheckBox = Q_NULLPTR;
|
||||
QLineEdit* polyLineEdit = Q_NULLPTR;
|
||||
QLineEdit* initLineEdit = Q_NULLPTR;
|
||||
QLineEdit* xorLineEdit = Q_NULLPTR;
|
||||
|
||||
QRadioButton* hexRadioBt = nullptr;
|
||||
QRadioButton* asciiRadioBt = nullptr;
|
||||
QRadioButton* hexRadioBt = Q_NULLPTR;
|
||||
QRadioButton* asciiRadioBt = Q_NULLPTR;
|
||||
|
||||
QLineEdit* hexCRCOutput = nullptr;
|
||||
QLineEdit* binCRCOutput = nullptr;
|
||||
QLineEdit* hexCRCOutput = Q_NULLPTR;
|
||||
QLineEdit* binCRCOutput = Q_NULLPTR;
|
||||
|
||||
QTextEdit* inputTextEdit = nullptr;
|
||||
QTextEdit* inputTextEdit = Q_NULLPTR;
|
||||
|
||||
QPushButton* calculatedBt = nullptr;
|
||||
QLabel *labelPolyFormula = nullptr;
|
||||
QLabel *labelInfo = nullptr;
|
||||
QPushButton* calculatedBt = Q_NULLPTR;
|
||||
QLabel *labelPolyFormula = Q_NULLPTR;
|
||||
QLabel *labelInfo = Q_NULLPTR;
|
||||
|
||||
void initParameterModel();
|
||||
private slots:
|
||||
|
||||
@ -20,7 +20,7 @@ class QtCryptographicHashCalculator:public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QtCryptographicHashCalculator(QtCryptographicHashController *controller, QObject *parent = nullptr);
|
||||
QtCryptographicHashCalculator(QtCryptographicHashController *controller, QObject *parent = Q_NULLPTR);
|
||||
private:
|
||||
QtCryptographicHashController *cryptographicHashController;
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
QtCryptographicHashController::QtCryptographicHashController(QWidget *parent)
|
||||
:QWidget (parent)
|
||||
,ui (new Ui::QtCryptographicHashController)
|
||||
,calculator (nullptr)
|
||||
,calculator (Q_NULLPTR)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@ -147,7 +147,7 @@ void QtCryptographicHashController::on_startStopPushButton_clicked()
|
||||
calculator->blockSignals(true);
|
||||
calculator->terminate();
|
||||
calculator->deleteLater();
|
||||
calculator = nullptr;
|
||||
calculator = Q_NULLPTR;
|
||||
setUiEnable(true);
|
||||
startStopPushButton->setText(tr("开始计算"));
|
||||
setUiEnable(true);
|
||||
|
||||
@ -31,7 +31,7 @@ class QtCryptographicHashController : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QtCryptographicHashController(QWidget *parent = nullptr);
|
||||
QtCryptographicHashController(QWidget *parent = Q_NULLPTR);
|
||||
|
||||
void setUiEnable(bool enable);
|
||||
QString fileName(){return _fileName;}
|
||||
|
||||
@ -153,7 +153,7 @@ void SAKUpdateManager::checkForUpdateFinished()
|
||||
checkForUpdatePushButton->setEnabled(true);
|
||||
|
||||
delete networkReply;
|
||||
networkReply = nullptr;
|
||||
networkReply = Q_NULLPTR;
|
||||
}
|
||||
|
||||
SAKUpdateManager::UpdateInfo SAKUpdateManager::extractUpdateInfo(QByteArray jsonObjectData)
|
||||
|
||||
@ -32,7 +32,7 @@ class SAKUpdateManager:public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAKUpdateManager(QWidget *parent = nullptr);
|
||||
SAKUpdateManager(QWidget *parent = Q_NULLPTR);
|
||||
~SAKUpdateManager();
|
||||
|
||||
void checkForUpdate();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user