Merge pull request #16451 from wwmayer/fix_qt6_warnings

Fix Qt6 warnings
This commit is contained in:
Chris Hennes
2024-09-12 21:22:37 -05:00
committed by GitHub
6 changed files with 38 additions and 13 deletions

View File

@@ -162,7 +162,7 @@ public:
// choose text color
auto tc = cfg.find("SplashTextColor");
if (tc != cfg.end()) {
QColor col; col.setNamedColor(QString::fromLatin1(tc->second.c_str()));
QColor col(QString::fromStdString(tc->second));
if (col.isValid()) {
textColor = col;
}
@@ -871,12 +871,20 @@ void AboutDialog::copyToClipboard()
#endif
QLocale loc;
str << "Locale: " << QLocale::languageToString(loc.language()) << "/"
#if QT_VERSION < QT_VERSION_CHECK(6,6,0)
<< QLocale::countryToString(loc.country())
#else
<< QLocale::territoryToString(loc.territory())
#endif
<< " (" << loc.name() << ")";
if (loc != QLocale::system()) {
loc = QLocale::system();
str << " [ OS: " << QLocale::languageToString(loc.language()) << "/"
#if QT_VERSION < QT_VERSION_CHECK(6,6,0)
<< QLocale::countryToString(loc.country())
#else
<< QLocale::territoryToString(loc.territory())
#endif
<< " (" << loc.name() << ") ]";
}
str << "\n";