SettingsDialog: Modernize

Change-Id: Ia49293754b971c568eb48a577465266a2883a42f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Eike Ziller
2016-03-11 10:44:47 +01:00
parent 343242a988
commit 9f15f70723
2 changed files with 3 additions and 12 deletions

View File

@@ -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;

View File

@@ -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