Commit 9f15f707 authored by Eike Ziller's avatar Eike Ziller
Browse files

SettingsDialog: Modernize



Change-Id: Ia49293754b971c568eb48a577465266a2883a42f
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 343242a9
......@@ -83,14 +83,8 @@ public:
bool findPageById(const Id id, int *pageIndex) const
{
for (int j = 0; j < pages.size(); ++j) {
IOptionsPage *page = pages.at(j);
if (page->id() == id) {
*pageIndex = j;
return true;
}
}
return false;
*pageIndex = Utils::indexOf(pages, Utils::equal(&IOptionsPage::id, id));
return *pageIndex != -1;
}
Id id;
......
......@@ -23,8 +23,7 @@
**
****************************************************************************/
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#pragma once
#include "coreplugin/dialogs/ioptionspage.h"
......@@ -104,5 +103,3 @@ private:
} // namespace Internal
} // namespace Core
#endif // SETTINGSDIALOG_H
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment