Clears the 9 non-deprecation warnings from the Qt6 build:
- qHash(QColor): hash rgba() (unambiguous QRgb) instead of name(), and
use the size_t seed signature on Qt6 (guarded for Qt5). Fixes the
ambiguous-overload warning in terminalstripmodel.h.
- Two qsizetype->int narrowings in brace-init: explicit static_cast<int>
(elementscene.cpp, terminalstrip.cpp).
- main.cpp: keep the QtConcurrent::run QFuture in a [[maybe_unused]]
variable (nodiscard).
- qetapp.cpp: guard the stylesheet load on QFile::open() succeeding
(nodiscard) instead of ignoring the result.
- StyleEditor: QGridLayout(this) pre-empted the widget's layout slot,
causing setLayout(main_layout) to silently fail and orphan main_layout.
Fix: use QGridLayout() without a parent so setLayout() succeeds.
- ExportDialog: ~ExportDialog() was empty, leaving ExportDiagramLine
heap objects in diagram_lines_ unfreed. Fix: qDeleteAll(diagram_lines_).
- GenericPanel::getItemForDiagram: when called without the bool* created
arg, it created a parentless QTreeWidgetItem that callers immediately
discarded. Fix: return nullptr when created==nullptr and item not found
(all callers already guard with if (item)).
- ElementScene: m_paste_area (created in initPasteArea) was temporarily
added/removed from the scene during XML loading but never freed in the
destructor. Fix: delete it if not currently in the scene.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
clazy is a compiler plugin which allows clang to understand Qt
semantics. You get more than 50 Qt related compiler warnings, ranging
from unneeded memory allocations to misusage of API, including fix-its
for automatic refactoring.
https://invent.kde.org/sdk/clazy
When saving an element it is checked, if the origin (0/0)
is inside the graphical parts. If outside, the element is
moved by integer values for x- and y-offset before saving.
Old calculation for offset could lead to "strange" new
values for positions.
Additionally: fix typos and English comments