diff options
author | saturneric <[email protected]> | 2024-07-30 17:13:31 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-07-30 17:13:31 +0000 |
commit | 5d0b30a9152367714ad839d8e41332c0879f6a98 (patch) | |
tree | 774a5a8dd17bfc9de07c3be0ef917c9c4e5625a2 /src/ui/dialog/settings/SettingsAppearance.cpp | |
parent | fix: do some build config clean up (diff) | |
download | GpgFrontend-5d0b30a9152367714ad839d8e41332c0879f6a98.tar.gz GpgFrontend-5d0b30a9152367714ad839d8e41332c0879f6a98.zip |
fix: use standard qt version checking macro
Diffstat (limited to 'src/ui/dialog/settings/SettingsAppearance.cpp')
-rw-r--r-- | src/ui/dialog/settings/SettingsAppearance.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/dialog/settings/SettingsAppearance.cpp b/src/ui/dialog/settings/SettingsAppearance.cpp index 06ea3aef..6b1eb076 100644 --- a/src/ui/dialog/settings/SettingsAppearance.cpp +++ b/src/ui/dialog/settings/SettingsAppearance.cpp @@ -140,12 +140,13 @@ void AppearanceTab::SetSettings() { auto target_theme_index = ui_->themeComboBox->findText(theme); if (theme.isEmpty() || target_theme_index == -1) { -#ifdef QT5_BUILD - ui_->themeComboBox->setCurrentIndex(ui_->themeComboBox->findText( - QApplication::style()->metaObject()->className())); -#else +#if QT_VERSION >= QT_VERSION_CHECK(6, 1, 0) ui_->themeComboBox->setCurrentIndex( ui_->themeComboBox->findText(QApplication::style()->name())); +#else + for (const auto& metadata : module->GetModuleMetaData().asKeyValueRange()) { + info << " - " << metadata.first << ": " << metadata.second << "\n"; + } #endif } else { ui_->themeComboBox->setCurrentIndex(target_theme_index); |