mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-07-30 07:44:13 +02:00
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:
+5
-4
@@ -1697,10 +1697,11 @@ void QETApp::useSystemPalette(bool use) {
|
||||
);
|
||||
} else {
|
||||
QFile file(configDir() + "/style.css");
|
||||
file.open(QFile::ReadOnly);
|
||||
QString styleSheet = QLatin1String(file.readAll());
|
||||
qApp->setStyleSheet(styleSheet);
|
||||
file.close();
|
||||
if (file.open(QFile::ReadOnly)) {
|
||||
QString styleSheet = QLatin1String(file.readAll());
|
||||
qApp->setStyleSheet(styleSheet);
|
||||
file.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user