From ed1b6e9ba0b255826e8745f64efa6694669ecae3 Mon Sep 17 00:00:00 2001 From: scorpio810 Date: Fri, 17 Jul 2026 07:58:20 +0000 Subject: [PATCH] terminalstripdrawer.cpp: fix two Qt6 compile errors - Add missing include: QHash> was only forward-declared transitively under Qt5's heavier headers; Qt6's leaner etc. no longer pull it in. - Replace QPolygonF{points_} with QPolygonF(points_): under Qt6, QPolygonF inherits QList's constructors via 'using QList::QList;', including the std::initializer_list one. Brace-init-list construction with a single argument first considers only initializer-list constructors before falling back to regular ones, which trips up overload resolution here even though points_ is exactly a QList (QVector is a plain alias for QList under Qt6). Plain parenthesised construction sidesteps that resolution phase entirely and binds directly to QPolygonF(const QList&). --- sources/TerminalStrip/GraphicsItem/terminalstripdrawer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/TerminalStrip/GraphicsItem/terminalstripdrawer.cpp b/sources/TerminalStrip/GraphicsItem/terminalstripdrawer.cpp index a1cd907ca..ee94b3b77 100644 --- a/sources/TerminalStrip/GraphicsItem/terminalstripdrawer.cpp +++ b/sources/TerminalStrip/GraphicsItem/terminalstripdrawer.cpp @@ -18,6 +18,7 @@ #include "terminalstripdrawer.h" #include +#include namespace TerminalStripDrawer { @@ -271,7 +272,7 @@ void TerminalStripDrawer::paint(QPainter *painter) auto pen_{painter->pen()}; pen_.setWidth(2); painter->setPen(pen_); - painter->drawPolyline(QPolygonF{points_}); + painter->drawPolyline(QPolygonF(points_)); painter->restore(); } }