Fix remaining Qt6 build warnings (narrowing, nodiscard, qHash)

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.
This commit is contained in:
Dieter Mayer
2026-07-12 23:20:30 +02:00
parent 5c65bf6486
commit a0f66d22cc
5 changed files with 16 additions and 9 deletions
+1 -1
View File
@@ -748,7 +748,7 @@ void ElementScene::addItems(QVector<QGraphicsItem *> items)
*/
void ElementScene::removeItems(QVector<QGraphicsItem *> items)
{
const int previous_selected_count{selectedItems().size()};
const int previous_selected_count = static_cast<int>(selectedItems().size());
//block signal to avoid multiple emit of selection changed,
//we emit this signal only once at the end of this function.