forked from qt-creator/qt-creator
Core: Fix warnings in setting dialog
Change-Id: I1e531c78fda7eb8063ff3fb11631fec79573541f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -56,6 +56,8 @@ using namespace Utils;
|
|||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
bool optionsPageLessThan(const IOptionsPage *p1, const IOptionsPage *p2)
|
bool optionsPageLessThan(const IOptionsPage *p1, const IOptionsPage *p2)
|
||||||
{
|
{
|
||||||
if (p1->category() != p2->category())
|
if (p1->category() != p2->category())
|
||||||
@@ -127,7 +129,7 @@ CategoryModel::~CategoryModel()
|
|||||||
|
|
||||||
int CategoryModel::rowCount(const QModelIndex &parent) const
|
int CategoryModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
return parent.isValid() ? 0 : m_categories.size();
|
return parent.isValid() ? 0 : static_cast<int>(m_categories.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant CategoryModel::data(const QModelIndex &index, int role) const
|
QVariant CategoryModel::data(const QModelIndex &index, int role) const
|
||||||
@@ -249,7 +251,7 @@ protected:
|
|||||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
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
|
#ifdef QT_NO_DEBUG
|
||||||
|
|
||||||
@@ -804,6 +806,8 @@ bool SettingsDialog::execDialog()
|
|||||||
return m_applied;
|
return m_applied;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
bool executeSettingsDialog(QWidget *parent, Id initialPage)
|
bool executeSettingsDialog(QWidget *parent, Id initialPage)
|
||||||
{
|
{
|
||||||
if (!ExtensionSystem::PluginManager::isInitializationDone()) {
|
if (!ExtensionSystem::PluginManager::isInitializationDone()) {
|
||||||
|
Reference in New Issue
Block a user