Remove unused code from the Release 2 scope modules

Trim mostly-deletion changes (~700 lines) across the modules the Release
2 build compiles: unused telegrams and receiver/handler code in
TrainingAreaBase (telegrams, recv_from_dds_aes/fts, ism/main/pdm/position
handlers), dead members in SqlBrowser and ProjectDataManagement,
unused LtsPluginManager loader paths, LtsSession unit-test, WlsTetra and
DdsView cleanups, plus the stale include_directories removal in
Lts/CMakeLists.txt. Continues the Release 2 source prune (keep only what
the build compiles).

Excluded from this commit by design: the machine-specific .envrc
(MIGRATE_PIPELINE_ROOT path fix stays uncommitted) and the untracked
qt5-before/ reference tree.
This commit is contained in:
berrux-dev committed 2026-11-17 17:28:48 +01:00
1 parent e60a860283
commit 84f8cfb41f
45 files changed
+30 -724

No files matched your search

@@ -1,18 +1,13 @@
#include "AddLine.h"
#include "ui_AddLinesUi.h"
#include <QtCore/QDebug>
AddLines::AddLines(QWidget* parent)
: QDialog(parent)
, m_ui(new Ui::AddLines)
{
qRegisterMetaType<AddModel*>("AddModel*");
m_ui->setupUi(this);
m_ui->setupUi(this);
m_ui->dataView->setModel(&addModel);
connect(m_ui->pbDone, &QPushButton::clicked,
@@ -28,21 +23,17 @@ AddLines::AddLines(QWidget* parent)
this, &AddLines::slotClear);
}
AddLines::~AddLines()
{
delete m_ui;
}
void AddLines::slotDeleteLines()
{
//qWarning() << "slotDeleteLines";
//qWarning() << "slotDeleteLines";
while (m_ui->dataView->selectionModel()->selectedRows().count())
{
const QModelIndexList selectedRows = m_ui->dataView->selectionModel()->selectedRows();
if (selectedRows.at(0).row() == addModel.rowCount()-1) // do not delete empty row!
{
return; // In hope that the selectedRows list is sorted.....
@@ -52,27 +43,23 @@ void AddLines::slotDeleteLines()
}
}
void AddLines::slotClear()
{
//qWarning() << "slotClear";
addModel.clear();
}
void AddLines::reject()
{
emit signalAddLines(nullptr);
}
void AddLines::copyDataFromModel(DataModel* dataModel)
{
addModel.setHeaderList(dataModel->getHeaderList());
addModel.setTablename(dataModel->getTableName());
}
void AddLines::slotAddLines()
{
this->hide(); // hide until in work..
@@ -1,7 +1,6 @@
#pragma once
#include "AddModel.h"
#include <QtWidgets/QDialog>
namespace Ui
@@ -9,7 +8,6 @@ namespace Ui
class AddLines;
}
class AddLines : public QDialog
{
Q_OBJECT
@@ -17,7 +15,6 @@ class AddLines : public QDialog
public:
explicit AddLines(QWidget *parent = nullptr);
~AddLines();
void copyDataFromModel(DataModel* dataModel);
protected:
@@ -1,8 +1,6 @@
#include "AddModel.h"
#include <QtCore/QDebug>
void AddModel::setHeaderList(const HeaderList& headerList)
{
m_headerList = headerList;
@@ -10,17 +8,14 @@ void AddModel::setHeaderList(const HeaderList& headerList)
endResetModel();
}
const HeaderList& AddModel::getHeaderList() const
{
return m_headerList;
}
bool AddModel::removeRow(int row, const QModelIndex &parent)
{
//qWarning() << "removeRow";
(void)parent;
if (row >= m_dataList.count())
@@ -36,7 +31,6 @@ bool AddModel::removeRow(int row, const QModelIndex &parent)
return true;
}
void AddModel::clear()
{
beginResetModel();
@@ -44,7 +38,6 @@ void AddModel::clear()
endResetModel();
}
QVariant AddModel::data(const QModelIndex &index, int role) const
{
switch (role)
@@ -96,7 +89,6 @@ bool AddModel::setData(const QModelIndex &index, const QVariant &value, int role
return true;
}
QMetaType::Type AddModel::getColumnType(const int column) const
{
if (column < 0 || column >= m_headerList.size())
@@ -104,7 +96,6 @@ QMetaType::Type AddModel::getColumnType(const int column) const
return m_headerList.at(column).second;
}
QVariant AddModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if (orientation != Qt::Horizontal)
@@ -121,19 +112,16 @@ QVariant AddModel::headerData(int section, Qt::Orientation orientation, int role
return QVariant();
}
int AddModel::rowCount(const QModelIndex &) const
{
return m_dataList.count() + 1 /* empty row for new data */; // yes, if the user wants to add more than 1 line!
}
int AddModel::columnCount(const QModelIndex &) const
{
return m_headerList.count();
}
Qt::ItemFlags AddModel::flags(const QModelIndex &) const
{
return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable;
@@ -145,7 +133,6 @@ void AddModel::setTablename(const QString& tableName)
m_tableName = tableName;
}
const QString& AddModel::getTableName() const
{
return m_tableName;
@@ -13,7 +13,6 @@
#include <QShortcut>
#include <QtCore/QThread>
BrowserWnd::BrowserWnd()
: QWidget(nullptr)
, m_loginWnd(new LoginWnd(this))
@@ -49,13 +48,11 @@ BrowserWnd::~BrowserWnd()
delete m_loginWnd;
}
void BrowserWnd::slotAddNewQuery()
{
addNewQuery();
}
void BrowserWnd::slotConnectResult(const QString &result)
{
if (result.isEmpty()) // connection success!
@@ -70,9 +67,7 @@ void BrowserWnd::slotConnectResult(const QString &result)
m_ui->splitter->setStretchFactor(1, 1); // stretch the query widget
this->show();
addNewQuery();
refreshTableList();
connect(m_ui->leFilter, &QLineEdit::textChanged, this, &BrowserWnd::slotFilterTableList);
@@ -94,13 +89,11 @@ void BrowserWnd::slotConnectResult(const QString &result)
m_waitWnd->hide();
}
void BrowserWnd::slotFilterTableList(const QString &)
{
refreshTableList();
}
void BrowserWnd::addNewQuery(const QString &tableName) // tableName only set when query from double clicking table list
{
Query *query = new Query(m_queryWorker);
@@ -127,7 +120,6 @@ void BrowserWnd::addNewQuery(const QString &tableName) // tableName only set whe
// m_waitWnd->setStatus(percent);
//}
void BrowserWnd::endThread()
{
if (!m_queryThread)
@@ -143,17 +135,13 @@ void BrowserWnd::endThread()
m_queryWorker = nullptr;
}
void BrowserWnd::refreshTableList()
{
m_ui->lwTables->clear();
m_waitWnd->wait(QStringLiteral("Refreshing Table List .."));
emit signalGetTableList();
}
void BrowserWnd::slotNewTableList(QStringList tables)
{
if (!m_ui->leFilter->text().isEmpty()) // filter when there is a filter
@@ -163,15 +151,12 @@ void BrowserWnd::slotNewTableList(QStringList tables)
}
m_ui->lwTables->addItems(tables);
m_waitWnd->hide();
}
void BrowserWnd::startConnect()
{
//m_loginWnd->setDefaultLoginData(presetManager. defaultLoginData);
if (!m_loginWnd->exec()) // false = user reject
{
QCoreApplication::quit();
@@ -179,11 +164,9 @@ void BrowserWnd::startConnect()
}
m_waitWnd->wait(tr("Connecting .."));
emit signalConnect(m_loginWnd->getLoginData());
}
bool BrowserWnd::test()
{
if (QSqlDatabase::drivers().isEmpty() ||
@@ -193,25 +176,20 @@ bool BrowserWnd::test()
tr("Missing Qt PostgreSQL driver"),
tr("There is no QPSQL driver."
"\nDid you install the package 'libQt5Sql5-postgresql'?"));
return false;
}
return true;
}
void BrowserWnd::slotFilterTableItemChanged(QListWidgetItem *item)
{
QString tableName = item->text();
addNewQuery(tableName);
}
void BrowserWnd::slotTabCloseRequested(int index)
{
Query *q = qobject_cast<Query *>(m_ui->twQueries->widget(index));
m_ui->twQueries->removeTab(index);
if (!q)
@@ -220,19 +198,16 @@ void BrowserWnd::slotTabCloseRequested(int index)
delete q; // It´s safe to delete nullptr;
}
void BrowserWnd::slotShowWait(const QString &msg)
{
m_waitWnd->wait(msg);
}
void BrowserWnd::slotHideWait()
{
m_waitWnd->hide();
}
void BrowserWnd::slotHeart()
{
QWidget *w = new QWidget;
@@ -246,6 +221,5 @@ void BrowserWnd::slotHeart()
l->setGraphicsEffect(shadow);
b->addWidget(l);
w->setLayout(b);
w->show();
}
@@ -6,7 +6,6 @@
#include <QtWidgets/QWidget>
class QListWidgetItem;
class Query;
@@ -15,7 +14,6 @@ namespace Ui
class BrowserWnd;
}
class BrowserWnd: public QWidget
{
Q_OBJECT
@@ -49,7 +47,6 @@ private slots:
void slotConnectResult(const QString &);
void slotNewTableList(QStringList);
void slotHeart();
/*void slotSelectQueryResult(QString errorMsg, DataModel* dataModel);
void slotSelectQueryStatus(int percent);
void slotQueryQuery(QString); // when the query widget starts a query....*/
@@ -57,8 +54,6 @@ private slots:
/*void slotExecute(QString, QVariant, QModelIndex);
void slotExecuteQueryResult(bool success, QString msg, QVariant val, QModelIndex onThisPosition);*/
void slotAddNewQuery();
void slotShowWait(const QString &msg);
void slotHideWait();
@@ -14,7 +14,6 @@ else()
set(Qt6_Widgets "")
endif()
SET(my_SRCS
main.cpp
LoginWnd.cpp
@@ -46,7 +45,6 @@ SET(my_UICS
)
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/ui)
NGL_ADD_TOOL_ICON(my_SRCS "sql")
NGL_WRAP_UI(my_SRCS ${my_UICS})
NGL_ADD_EXECUTABLE(AAR SV WS NO_TRANSLATION sqlbrowser ${my_SRCS} ${my_UICS})
@@ -9,7 +9,6 @@
//#define WAIT_FOR_IDLE while (!m_idle) { QThread::msleep(50); } (void)m_idle
DataModel::DataModel(QObject *parent) // [M]VC
: QAbstractTableModel(parent)
, m_idle(true)
@@ -28,19 +27,16 @@ DataModel::DataModel(QObject *parent) // [M]VC
// endResetModel();
//}
void DataModel::dataListReserve(const int size)
{
m_newDataList.reserve(size);
}
void DataModel::addLine(const Data& data)
{
m_newDataList.append(data);
}
void DataModel::addColumn(const QString& columnName, QMetaType::Type type)
{
// QPair<QString,QVariant::Type> pair;
@@ -49,7 +45,6 @@ void DataModel::addColumn(const QString& columnName, QMetaType::Type type)
m_newHeaderList.append(QPair<QString,QMetaType::Type>(columnName, type));
}
void DataModel::slotSwapLists() // for threading..
{
m_dataList = m_newDataList;
@@ -62,32 +57,27 @@ void DataModel::slotSwapLists() // for threading..
endResetModel();
}
void DataModel::setTableName(const QString &tableName)
{
m_tableName = tableName;
setEditable(!m_tableName.isEmpty()); // editable items depend on wether it's a custom query, or a table list query
}
QString DataModel::getTableName() const
{
return m_tableName;
}
int DataModel::rowCount(const QModelIndex &parent) const
{
return parent.isValid() ? 0 : m_dataList.count();
}
int DataModel::columnCount(const QModelIndex &parent) const
{
return parent.isValid() ? 0 : m_headerList.count();
}
QVariant DataModel::data(const QModelIndex &index, int role) const
{
if (index.row() >= m_dataList.count())
@@ -127,7 +117,6 @@ QVariant DataModel::data(const QModelIndex &index, int role) const
return QVariant();
}
QVariant DataModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if (orientation == Qt::Horizontal && section >= 0 && section < m_headerList.size())
@@ -145,7 +134,6 @@ QVariant DataModel::headerData(int section, Qt::Orientation orientation, int rol
return QAbstractTableModel::headerData(section, orientation, role);
}
void DataModel::setEditable(bool editable)
{
resetFlags();
@@ -154,19 +142,16 @@ void DataModel::setEditable(bool editable)
m_flags |= Qt::ItemIsEditable;
}
const HeaderList& DataModel::getHeaderList() const
{
return m_headerList;
}
void DataModel::resetFlags()
{
m_flags = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
}
Qt::ItemFlags DataModel::flags(const QModelIndex &index) const
{
Q_UNUSED(index);
@@ -174,7 +159,6 @@ Qt::ItemFlags DataModel::flags(const QModelIndex &index) const
return m_flags;
}
void DataModel::slotSetData(const QModelIndex &index, const QVariant &value)
{
Data row = m_dataList.at(index.row()); // get row from data list
@@ -197,7 +181,6 @@ bool DataModel::setData(const QModelIndex &index, const QVariant &value, int rol
return false; // ALWAYS! as we need to wait for a result (which is async)
}
void DataModel::deleteLines(const QList<QModelIndex> &affectedRowsList)
{
if (affectedRowsList.isEmpty())
@@ -2,13 +2,11 @@
#include <QtWidgets/QDialog>
namespace Ui
{
class WaitWnd;
}
class WaitWnd: public QDialog
{
Q_OBJECT