chore: update files of project

This commit is contained in:
x-tools-author 2024-03-25 15:50:11 +08:00
parent 46d3ced8a5
commit 8e1fe1a5ae
2 changed files with 9 additions and 23 deletions

View File

@ -232,7 +232,7 @@ void xToolsCanBusStudioUi::onConnectClicked()
connect(mDevice, &QCanBusDevice::framesWritten, this, &xToolsCanBusStudioUi::onFrameWritten);
auto items = configurationItems();
for (const ConfigurationItem& item : items) {
for (auto& item : items) {
mDevice->setConfigurationParameter(item.first, item.second);
}

View File

@ -66,28 +66,14 @@ void xToolsAnalyzerToolUi::onBaseToolUiInitialized(xToolsBaseTool *tool, const Q
bool fixed = ui->checkBoxFixedLength->isChecked();
cookedTool->setFixed(fixed);
});
connect(ui->spinBoxFrameLength,
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QOverload<const QString &>::of(&QSpinBox::valueChanged),
#else
&QSpinBox::valueChanged,
#endif
this,
[=]() {
int len = ui->spinBoxFrameLength->value();
cookedTool->setFrameBytes(len);
});
connect(ui->spinBoxMaxTempBytes,
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QOverload<const QString &>::of(&QSpinBox::valueChanged),
#else
&QSpinBox::valueChanged,
#endif
this,
[=]() {
int maxBytes = ui->spinBoxMaxTempBytes->value();
cookedTool->setMaxTempBytes(maxBytes);
});
connect(ui->spinBoxFrameLength, QOverload<int>::of(&QSpinBox::valueChanged), this, [=]() {
int len = ui->spinBoxFrameLength->value();
cookedTool->setFrameBytes(len);
});
connect(ui->spinBoxMaxTempBytes, QOverload<int>::of(&QSpinBox::valueChanged), this, [=]() {
int maxBytes = ui->spinBoxMaxTempBytes->value();
cookedTool->setMaxTempBytes(maxBytes);
});
connect(ui->lineEditSeparationMark, &QLineEdit::textChanged, this, [=]() {
QString txt = ui->lineEditSeparationMark->text().trimmed();
QByteArray flag = xToolsInterface::string2array(txt, format);