Qt6 Migration: Complete migration with DDS/RTI support and build validation
Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
18662 files changed
+4115092
-5435
No files matched your search
@@ -0,0 +1,161 @@
|
||||
#include "LoginWnd.h"
|
||||
#include "ui_LoginUi.h"
|
||||
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
#include <QFileDialog>
|
||||
#include <QDebug>
|
||||
#include <QSqlDatabase>
|
||||
|
||||
|
||||
LoginWnd::LoginWnd(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_ui(new Ui::LoginWnd)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
connect(m_ui->pbHeart, &QPushButton::clicked,
|
||||
this, &LoginWnd::slotHeart);
|
||||
|
||||
// SQLite:
|
||||
connect(m_ui->pbLoadFile, &QPushButton::clicked, this, &LoginWnd::slotLoadFile);
|
||||
connect(m_ui->tbChooseFile, &QToolButton::clicked, this, &LoginWnd::slotChooseFile);
|
||||
connect(m_ui->pbExit_2, &QPushButton::clicked, this, &LoginWnd::reject);
|
||||
|
||||
// DBMS:
|
||||
connect(m_ui->pbLogin, &QPushButton::clicked, this, &LoginWnd::accept);
|
||||
connect(m_ui->pbExit, &QPushButton::clicked, this, &LoginWnd::reject);
|
||||
|
||||
// Common:
|
||||
connect(m_ui->pbLoad, &QPushButton::clicked, this, &LoginWnd::slotLoadPreset);
|
||||
connect(m_ui->pbSave, &QPushButton::clicked, this, &LoginWnd::slotSavePreset);
|
||||
|
||||
fillPresetComboBox();
|
||||
|
||||
|
||||
// set typical values
|
||||
m_ui->leDatabase->setText(QStringLiteral("lts_ets_pro"));
|
||||
m_ui->leUsername->setText(QStringLiteral("ets_exm"));
|
||||
|
||||
m_ui->leHostname->setPlaceholderText(QStringLiteral("on-site: try 'EXCDBS01'"));
|
||||
|
||||
m_ui->cbDriver->addItems(QSqlDatabase::drivers());
|
||||
const int idx = m_ui->cbDriver->findText(QStringLiteral("QPSQL"));
|
||||
if (idx >= 0)
|
||||
m_ui->cbDriver->setCurrentIndex(idx);
|
||||
}
|
||||
|
||||
LoginWnd::~LoginWnd()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
|
||||
void LoginWnd::slotLoadFile()
|
||||
{
|
||||
if (m_ui->leFilename->text().isEmpty())
|
||||
return;
|
||||
|
||||
accept(); // just to make clear that the user cannot login to a database, so he has to click explicitly on "Load File"
|
||||
}
|
||||
|
||||
|
||||
void LoginWnd::slotChooseFile()
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select File-based Database"),
|
||||
QString(), // last wd
|
||||
tr("All Files (*.*)"));
|
||||
|
||||
if (fileName.isEmpty())
|
||||
return;
|
||||
|
||||
m_ui->leFilename->setText(fileName);
|
||||
}
|
||||
|
||||
|
||||
void LoginWnd::fillPresetComboBox()
|
||||
{
|
||||
m_ui->cbPresets->clear();
|
||||
|
||||
const PresetManager::PresetList &presetList = presetManager.getPresetList();
|
||||
|
||||
for (const Preset &preset : qAsConst(presetList))
|
||||
m_ui->cbPresets->addItem(preset.name);
|
||||
|
||||
if (!presetList.isEmpty())
|
||||
{
|
||||
setDefaultLoginData(presetList.first().loginData);
|
||||
m_ui->cbPresets->setCurrentIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LoginWnd::slotLoadPreset()
|
||||
{
|
||||
setDefaultLoginData(presetManager.getPresetList().at(m_ui->cbPresets->currentIndex()).loginData);
|
||||
}
|
||||
|
||||
void LoginWnd::slotSavePreset()
|
||||
{
|
||||
presetManager.savePreset(getLoginData(), this);
|
||||
|
||||
fillPresetComboBox();
|
||||
setDefaultLoginData(presetManager.getPresetList().at(m_ui->cbPresets->count()-1).loginData); // set default to last (new) preset
|
||||
m_ui->cbPresets->setCurrentIndex(m_ui->cbPresets->count()-1); // set index to last (new) preset
|
||||
}
|
||||
|
||||
|
||||
void LoginWnd::setDefaultLoginData(const LoginData &defaultLoginData)
|
||||
{
|
||||
if (!defaultLoginData.filename.isEmpty()) // no username, etc needed if that's a file
|
||||
{
|
||||
m_ui->leFilename->setText(defaultLoginData.filename);
|
||||
m_ui->leDatabase->setText(QString());
|
||||
m_ui->leUsername->setText(QString());
|
||||
m_ui->lePassword->setText(QString());
|
||||
m_ui->leHostname->setText(QString());
|
||||
m_ui->sbPort->setValue(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ui->leFilename->setText(QString());
|
||||
m_ui->leDatabase->setText(defaultLoginData.database);
|
||||
m_ui->leUsername->setText(defaultLoginData.username);
|
||||
m_ui->lePassword->setText(defaultLoginData.password);
|
||||
m_ui->leHostname->setText(defaultLoginData.hostname);
|
||||
m_ui->cbDriver->setCurrentIndex(m_ui->cbDriver->findText(defaultLoginData.driver));
|
||||
m_ui->sbPort->setValue(defaultLoginData.port);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LoginData LoginWnd::getLoginData() const
|
||||
{
|
||||
LoginData ld;
|
||||
|
||||
ld.driver = m_ui->cbDriver->currentText();
|
||||
ld.database = m_ui->leDatabase->text();
|
||||
ld.username = m_ui->leUsername->text();
|
||||
ld.password = m_ui->lePassword->text();
|
||||
ld.hostname = m_ui->leHostname->text();
|
||||
ld.port = m_ui->sbPort->value();
|
||||
ld.filename = m_ui->leFilename->text();
|
||||
|
||||
return ld;
|
||||
}
|
||||
|
||||
void LoginWnd::slotHeart()
|
||||
{
|
||||
QWidget* w = new QWidget;
|
||||
w->setAttribute(Qt::WA_DeleteOnClose); // delete when closed
|
||||
QVBoxLayout* b = new QVBoxLayout;
|
||||
QLabel* l = new QLabel(QStringLiteral("<html><body>Geschmiedet mit %1 , ohne Kostenträger, für das Team.<br>Diese Software wurde in meiner Freizeit entwickelt, bitte habt Verständnis für Bugs und Geduld für Fixes. Danke! - Euer Mike Wille, SLSE 2016, 17</body></html>").arg(QChar(0x2764)));
|
||||
QGraphicsDropShadowEffect *shadow = new QGraphicsDropShadowEffect;
|
||||
shadow->setOffset(0,0);
|
||||
shadow->setBlurRadius(22);
|
||||
shadow->setColor(QColor("blue"));
|
||||
l->setGraphicsEffect(shadow);
|
||||
b->addWidget(l);
|
||||
w->setLayout(b);
|
||||
|
||||
w->show();
|
||||
}
|
||||
Reference in new issue
Block a user