Apply clang-format to Lts/Common and DTC/enum headers

- Formatted all CodeGen module files (9 files)
- Formatted LtsAppDescriptor module files
- Formatted LtsAppManager/AppChooser files
- Applied clang-format to all DTC and enum headers across modules
- Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/)

Cosmetic changes only, no functional modifications.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-19 14:46:29 +02:00
1 parent 1881d68aef
commit d6b6ffce7c
848 files changed
+89305 -100020

No files matched your search

@@ -1,6 +1,5 @@
#include "lts_progress_dialog_helper.h"
#include "lts_frameless_dialog.h"
@@ -12,136 +11,118 @@
#include <QPushButton>
#include <QTimer>
namespace LtsWidgets
{
LtsProgressDialogHelper::LtsProgressDialogHelper(QWidget *parent)
: QObject(parent)
, m_waitDlg(nullptr)
, m_parentWidget(parent)
, m_textLabel(nullptr)
{}
LtsProgressDialogHelper::LtsProgressDialogHelper(QWidget* parent)
: QObject(parent), m_waitDlg(nullptr), m_parentWidget(parent), m_textLabel(nullptr)
{
}
LtsProgressDialogHelper::~LtsProgressDialogHelper()
{
delete m_waitDlg;
delete m_waitDlg;
}
void LtsProgressDialogHelper::setCustomText(const QString &customText)
void LtsProgressDialogHelper::setCustomText(const QString& customText)
{
if (m_waitDlg == nullptr || m_textLabel == nullptr)
return;
if (m_waitDlg == nullptr || m_textLabel == nullptr)
return;
if (customText.isEmpty())
m_textLabel->setText(tr("Waiting for server reply..."));
else
m_textLabel->setText(customText);
if (customText.isEmpty())
m_textLabel->setText(tr("Waiting for server reply..."));
else
m_textLabel->setText(customText);
}
void LtsProgressDialogHelper::setParentWidget(QWidget *newParent)
void LtsProgressDialogHelper::setParentWidget(QWidget* newParent)
{
m_parentWidget = newParent;
if (m_waitDlg)
{
m_waitDlg->setParent(newParent);
QTimer::singleShot(0, m_waitDlg.data(), &LtsFramelessDialog::onUpdateGeometry);
}
m_parentWidget = newParent;
if (m_waitDlg)
{
m_waitDlg->setParent(newParent);
QTimer::singleShot(0, m_waitDlg.data(), &LtsFramelessDialog::onUpdateGeometry);
}
}
void LtsProgressDialogHelper::slotShowWaitForReplyWindow()
{
if (m_waitDlg)
m_waitDlg->deleteLater();
m_waitDlg = new LtsFramelessDialog(m_parentWidget, Behaviour::Modal);
if (m_waitDlg)
m_waitDlg->deleteLater();
m_waitDlg = new LtsFramelessDialog(m_parentWidget, Behaviour::Modal);
QHBoxLayout *l = new QHBoxLayout(m_waitDlg);
QHBoxLayout* l = new QHBoxLayout(m_waitDlg);
QProgressBar *pb = new QProgressBar(m_waitDlg);
pb->setMaximum(0);
pb->setValue(-1);
QProgressBar* pb = new QProgressBar(m_waitDlg);
pb->setMaximum(0);
pb->setValue(-1);
l->addWidget(pb);
l->addWidget(pb);
m_textLabel = new QLabel(m_waitDlg);
setCustomText();
l->addWidget(m_textLabel);
m_textLabel = new QLabel(m_waitDlg);
setCustomText();
l->addWidget(m_textLabel);
m_waitDlg->setLayout(l);
m_waitDlg->show();
m_waitDlg->raise();
m_waitDlg->setLayout(l);
m_waitDlg->show();
m_waitDlg->raise();
}
void LtsProgressDialogHelper::slotStopWaitForReplyWindow(const ReplyResult &replyResult, const QString &replyString)
void LtsProgressDialogHelper::slotStopWaitForReplyWindow(const ReplyResult& replyResult, const QString& replyString)
{
if (m_waitDlg == nullptr)
{
return;
}
m_waitDlg->deleteLater();
m_waitDlg = nullptr;
QString resultText = tr("Unknown result (%1)!").arg((int)replyResult);
switch (replyResult)
{
case ReplyResult::Close:
if (m_waitDlg == nullptr)
{
return;
return;
}
case ReplyResult::Success:
m_waitDlg->deleteLater();
m_waitDlg = nullptr;
QString resultText = tr("Unknown result (%1)!").arg((int)replyResult);
switch (replyResult)
{
resultText = tr("Operation was successful");
break;
case ReplyResult::Close: {
return;
}
case ReplyResult::Success: {
resultText = tr("Operation was successful");
break;
}
case ReplyResult::Failure: {
resultText = tr("Operation has failed!\nReason: '%1'").arg(replyString);
break;
}
case ReplyResult::TimeOut: {
resultText = tr("Operation has timed out and could not be processed! Please try again later");
break;
}
}
case ReplyResult::Failure:
{
resultText = tr("Operation has failed!\nReason: '%1'").arg(replyString);
break;
}
m_waitDlg = new LtsFramelessDialog(m_parentWidget, Behaviour::Modal);
case ReplyResult::TimeOut:
{
resultText = tr("Operation has timed out and could not be processed! Please try again later");
break;
}
}
QVBoxLayout* newLayout = new QVBoxLayout(m_waitDlg);
newLayout->addWidget(new QLabel(resultText, m_waitDlg));
m_waitDlg = new LtsFramelessDialog(m_parentWidget, Behaviour::Modal);
QPushButton* btn = new QPushButton(tr("OK"), m_waitDlg);
connect(btn, &QPushButton::clicked, this, &LtsProgressDialogHelper::accept);
QVBoxLayout *newLayout = new QVBoxLayout(m_waitDlg);
newLayout->addWidget(new QLabel(resultText, m_waitDlg));
newLayout->addWidget(btn);
QPushButton *btn = new QPushButton(tr("OK"),m_waitDlg);
connect(btn, &QPushButton::clicked,
this, &LtsProgressDialogHelper::accept);
newLayout->addWidget(btn);
m_waitDlg->setLayout(newLayout);
m_waitDlg->show();
m_waitDlg->setLayout(newLayout);
m_waitDlg->show();
}
void LtsProgressDialogHelper::accept()
{
m_waitDlg->accept();
m_waitDlg->deleteLater();
m_waitDlg = nullptr;
emit accepted();
m_waitDlg->accept();
m_waitDlg->deleteLater();
m_waitDlg = nullptr;
emit accepted();
}
}
} // namespace LtsWidgets