diff --git a/apps/OpenSpace/ext/launcher/src/notificationwindow.cpp b/apps/OpenSpace/ext/launcher/src/notificationwindow.cpp index f154b976fd..64f4c941f6 100644 --- a/apps/OpenSpace/ext/launcher/src/notificationwindow.cpp +++ b/apps/OpenSpace/ext/launcher/src/notificationwindow.cpp @@ -66,6 +66,11 @@ namespace { std::vector entries; std::vector lines = ghoul::tokenizeString(data, '\n'); + if (lines.empty() || lines[0].empty()) { + // The notification file is empty and we don't want to show anything + return entries; + } + std::vector::const_iterator curr = lines.cbegin(); while (curr != lines.end()) { Entry e = parseEntry(curr); @@ -89,7 +94,7 @@ namespace { text = text.darker(); if (date::sys_days(ymd) < date::sys_days(lastStartedDate)) { - QColor text = QColor(120, 120, 120); + const QColor textColor = QColor(120, 120, 120); return std::format( "" "" @@ -99,7 +104,7 @@ namespace { "{1}" "" "", - e.date, e.text, text.red(), text.green(), text.blue() + e.date, e.text, textColor.red(), textColor.green(), textColor.blue() ); } else { diff --git a/apps/OpenSpace/ext/launcher/src/settingsdialog.cpp b/apps/OpenSpace/ext/launcher/src/settingsdialog.cpp index 0dc036a102..1392e409b3 100644 --- a/apps/OpenSpace/ext/launcher/src/settingsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/settingsdialog.cpp @@ -108,9 +108,14 @@ void SettingsDialog::createWidgets() { "If this setting is checked, the application will remember the profile that " "was loaded into OpenSpace and will use it at the next startup as well" ); + connect( _rememberLastProfile, +#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) + &QCheckBox::checkStateChanged, +#else // ^^^^ >=6.7.0 // !WIN32 <6.7.0 &QCheckBox::stateChanged, +#endif // (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) [this]() { if (_rememberLastProfile->isChecked()) { _currentEdit.rememberLastProfile = true; @@ -166,7 +171,11 @@ void SettingsDialog::createWidgets() { ); connect( _rememberLastConfiguration, +#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) + &QCheckBox::checkStateChanged, +#else // ^^^^ >=6.7.0 // !WIN32 <6.7.0 &QCheckBox::stateChanged, +#endif // (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) [this]() { if (_rememberLastConfiguration->isChecked()) { _currentEdit.rememberLastConfiguration = true; @@ -241,7 +250,11 @@ void SettingsDialog::createWidgets() { ); connect( _bypassLauncher, +#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) + &QCheckBox::checkStateChanged, +#else // ^^^^ >=6.7.0 // !WIN32 <6.7.0 &QCheckBox::stateChanged, +#endif // (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) [this]() { if (_bypassLauncher->isChecked()) { _currentEdit.bypassLauncher = _bypassLauncher->isChecked(); @@ -313,7 +326,11 @@ void SettingsDialog::createWidgets() { ); connect( _mrf.isEnabled, +#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) + &QCheckBox::checkStateChanged, +#else // ^^^^ >=6.7.0 // !WIN32 <6.7.0 &QCheckBox::stateChanged, +#endif // (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) [this]() { if (_mrf.isEnabled->isChecked()) { _currentEdit.mrf.isEnabled = _mrf.isEnabled->isChecked();