From 722d7511b2d528def21ae13d1019feeeb2f02e92 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 1 Oct 2024 12:49:06 +0200 Subject: [PATCH] Core: Fix warnings in setting dialog Change-Id: I1e531c78fda7eb8063ff3fb11631fec79573541f Reviewed-by: Eike Ziller --- src/plugins/coreplugin/dialogs/settingsdialog.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.cpp b/src/plugins/coreplugin/dialogs/settingsdialog.cpp index 440912efdef..7bf67845996 100644 --- a/src/plugins/coreplugin/dialogs/settingsdialog.cpp +++ b/src/plugins/coreplugin/dialogs/settingsdialog.cpp @@ -56,6 +56,8 @@ using namespace Utils; namespace Core { namespace Internal { +namespace { + bool optionsPageLessThan(const IOptionsPage *p1, const IOptionsPage *p2) { if (p1->category() != p2->category()) @@ -127,7 +129,7 @@ CategoryModel::~CategoryModel() int CategoryModel::rowCount(const QModelIndex &parent) const { - return parent.isValid() ? 0 : m_categories.size(); + return parent.isValid() ? 0 : static_cast(m_categories.size()); } QVariant CategoryModel::data(const QModelIndex &index, int role) const @@ -249,7 +251,7 @@ protected: bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; }; -static bool categoryVisible(const Id &id) +static bool categoryVisible([[maybe_unused]] const Id &id) { #ifdef QT_NO_DEBUG @@ -804,6 +806,8 @@ bool SettingsDialog::execDialog() return m_applied; } +} // namespace + bool executeSettingsDialog(QWidget *parent, Id initialPage) { if (!ExtensionSystem::PluginManager::isInitializationDone()) {