From 56464629bff97c6a297cba19622a2bf6955683fa Mon Sep 17 00:00:00 2001 From: plc-user <74435298+plc-user@users.noreply.github.com> Date: Sat, 22 Aug 2026 13:34:29 +0200 Subject: [PATCH] FIX compile-warnings --- sources/print/projectprintwindow.cpp | 5 ++++- sources/richtext/richtexteditor.cpp | 2 -- sources/ui/configpage/shortcutsconfigpage.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sources/print/projectprintwindow.cpp b/sources/print/projectprintwindow.cpp index 797117e00..f8aa0d95c 100644 --- a/sources/print/projectprintwindow.cpp +++ b/sources/print/projectprintwindow.cpp @@ -436,7 +436,10 @@ void ProjectPrintWindow::printDiagram(Diagram *diagram, bool fit_page, QPainter // Build info text QStringList lines; - for (const QString &key : {"label", "manufacturer", "designation", "description"}) { + for (const auto &key : {QStringLiteral("label"), + QStringLiteral("manufacturer"), + QStringLiteral("designation"), + QStringLiteral("description")}) { if (info.contains(key) && !info.value(key).toString().isEmpty()) lines << QETInformation::translatedInfoKey(key) + ": " + info.value(key).toString(); } diff --git a/sources/richtext/richtexteditor.cpp b/sources/richtext/richtexteditor.cpp index eefa6b39f..489d3391a 100644 --- a/sources/richtext/richtexteditor.cpp +++ b/sources/richtext/richtexteditor.cpp @@ -101,8 +101,6 @@ namespace qdesigner_internal { QXmlStreamAttributes *atts, bool *paragraphAlignmentFound) { - typedef QXmlStreamAttributes::iterator AttributeIt; - if (atts->isEmpty()) return; diff --git a/sources/ui/configpage/shortcutsconfigpage.cpp b/sources/ui/configpage/shortcutsconfigpage.cpp index c008cc325..145f80d27 100644 --- a/sources/ui/configpage/shortcutsconfigpage.cpp +++ b/sources/ui/configpage/shortcutsconfigpage.cpp @@ -212,7 +212,7 @@ void ShortcutsConfigPage::applyFilter() const int quick_filter = m_quick_filter->currentIndex(); int visible_actions = 0; - for (const Row &row : qAsConst(m_rows)) { + for (const Row &row : std::as_const(m_rows)) { // Text is matched by substring, but the key sequence is matched exactly: // a substring match would let "Ctrl+S" also hit "Ctrl+Shift+F" (the "S" // of "Shift"), which is precisely the kind of false positive that hides