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:
25 files changed
+58
-47
No files matched your search
@@ -18,6 +18,7 @@
|
||||
#include <QMenu>
|
||||
#include <QShortcut>
|
||||
#include <QPointer>
|
||||
#include <utility>
|
||||
|
||||
|
||||
namespace LtsWidgets
|
||||
@@ -191,7 +192,7 @@ void LtsToolBarArea::dropEvent(QDropEvent *event)
|
||||
LtsDragIcon *source = qobject_cast<LtsDragIcon *>(event->source());
|
||||
// does not work when not dragged on a LtsDragIcon ... should be ok for now
|
||||
LtsDragIcon *after = nullptr;
|
||||
QWidget *w = childAt(event->pos());
|
||||
QWidget *w = childAt(event->position().toPoint());
|
||||
while (w)
|
||||
{
|
||||
after = qobject_cast<LtsDragIcon *>(w);
|
||||
@@ -212,7 +213,7 @@ QMenu *LtsToolBarArea::functionKeyMenu(QWidget *parent)
|
||||
{
|
||||
ShortCut &shorty = val.value();
|
||||
act = menu->addAction(QStringLiteral("%1%2").arg(shorty.keyName(), !shorty.name.isEmpty() ? QStringLiteral(" - %1").arg(shorty.name) : QString()));
|
||||
act->setData(shorty.shortcut->key()[0]);
|
||||
act->setData(shorty.shortcut->key()[0].toCombined());
|
||||
connect(act, &QAction::triggered, this, &LtsToolBarArea::functionKeyMenuTriggered);
|
||||
}
|
||||
menu->addSeparator();
|
||||
@@ -264,7 +265,7 @@ bool LtsToolBarArea::setFunctionKey(int fkey, const QString &action)
|
||||
|
||||
// Icon available?
|
||||
LtsDragIcon *icon = nullptr;
|
||||
for (LtsDragIcon *ic : qAsConst(m_buttonMap))
|
||||
for (LtsDragIcon *ic : std::as_const(m_buttonMap))
|
||||
{
|
||||
if (ic->identifier() == action)
|
||||
{
|
||||
@@ -280,7 +281,7 @@ bool LtsToolBarArea::setFunctionKey(int fkey, const QString &action)
|
||||
ShortCut &shorty = m_functionKeys[fkey];
|
||||
|
||||
// Remove key symbol from any icon
|
||||
for (LtsDragIcon *ic : qAsConst(m_buttonMap))
|
||||
for (LtsDragIcon *ic : std::as_const(m_buttonMap))
|
||||
if (ic->identifier() == shorty.identifier)
|
||||
ic->removeModification();
|
||||
|
||||
@@ -327,7 +328,7 @@ void LtsToolBarArea::removeMenuAction(LtsDragIcon *icon)
|
||||
if (itShortcut.identifier == icon->identifier())
|
||||
itShortcut.clear();
|
||||
}
|
||||
for (LtsDragIcon *ic : qAsConst(m_foreignButtonMap))
|
||||
for (LtsDragIcon *ic : std::as_const(m_foreignButtonMap))
|
||||
{
|
||||
if(ic->identifier() == icon->identifier())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user