forked from qt-creator/qt-creator
SettingsDialog: Modernize
Change-Id: Ia49293754b971c568eb48a577465266a2883a42f Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user