LtsWidgets: Qt6 API fixes complete

- QComboBox::activated signal: QString→int parameter (lts_text_editor)
- qAsConst→std::as_const (5 files)
- localPos()→position() (lts_height_plot_widget)
- setMargin→setContentsMargins (tests/window.cpp)
- CMAKE_AUTOUIC OFF + include in header for MOC
- enterEvent(QEnterEvent*) signature fixes
- QRegExp→QRegularExpression replacements

All LtsWidgets module files now Qt6-compatible.
This commit is contained in:
torsten committed 2026-08-21 11:08:24 +02:00
1 parent ffa25fb394
commit 418443c841
25 files changed
+58 -47

No files matched your search

@@ -29,6 +29,7 @@
#include <math.h>
#include <QTimer>
#include <QLabel>
#include <QRandomGenerator>
namespace LtsWidgets
{
@@ -378,7 +379,7 @@ void LtsTabWidget::addWidget(const QString &fullName, QWidget *widget, bool setC
QString randomString;
for (int i = 0; i < randomStringLength; i++)
{
int index = qrand() % possibleCharacters.length();
int index = QRandomGenerator::global()->bounded(possibleCharacters.length());
QChar nextChar = possibleCharacters.at(index);
randomString.append(nextChar);
}
@@ -892,14 +893,14 @@ void CloseButton::mouseReleaseEvent(QMouseEvent *e) // only accept a click direc
QRectF c = cross();
QRect adjusted = QRect(QPoint(floor(c.x()), floor(c.y())), QPoint(ceil(c.right()), ceil(c.bottom() +1 /* hack */))); // be more tolerant
if (!adjusted.contains(e->localPos().toPoint()))
if (!adjusted.contains(e->position().toPoint()))
{
//qWarning() << "NO! release - event:" << e->localPos() << "cross:" << cross();
//qWarning() << "NO! release - event:" << e->position() << "cross:" << cross();
e->ignore();
return;
}
//qWarning() << "YES! release - event:" << e->localPos() << "cross:" << cross();
//qWarning() << "YES! release - event:" << e->position() << "cross:" << cross();
e->accept();
emit clicked();
}