forked from qt-creator/qt-creator
Beautifier: Rename settingspage classes
*SettingsPage is the predominant name. Also move the code to the canonical location at the end of the file. Change-Id: Ib8e0d1f7a87576c4fd8019896102907c77c30f2f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -182,10 +182,10 @@ static ArtisticStyleSettings &settings()
|
|||||||
|
|
||||||
// ArtisticStyleOptionsPage
|
// ArtisticStyleOptionsPage
|
||||||
|
|
||||||
class ArtisticStyleOptionsPageWidget : public Core::IOptionsPageWidget
|
class ArtisticStyleSettingsPageWidget : public Core::IOptionsPageWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArtisticStyleOptionsPageWidget()
|
ArtisticStyleSettingsPageWidget()
|
||||||
{
|
{
|
||||||
QGroupBox *options = nullptr;
|
QGroupBox *options = nullptr;
|
||||||
|
|
||||||
@@ -231,21 +231,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ArtisticStyleOptionsPage final : public Core::IOptionsPage
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ArtisticStyleOptionsPage()
|
|
||||||
{
|
|
||||||
setId("ArtisticStyle");
|
|
||||||
setDisplayName(asDisplayName());
|
|
||||||
setCategory(Constants::OPTION_CATEGORY);
|
|
||||||
setWidgetCreator([] { return new ArtisticStyleOptionsPageWidget; });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const ArtisticStyleOptionsPage settingsPage;
|
|
||||||
|
|
||||||
|
|
||||||
// Style
|
// Style
|
||||||
|
|
||||||
ArtisticStyle::ArtisticStyle()
|
ArtisticStyle::ArtisticStyle()
|
||||||
@@ -350,4 +335,21 @@ Command ArtisticStyle::textCommand(const QString &cfgFile) const
|
|||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ArtisticStyleSettingsPage
|
||||||
|
|
||||||
|
class ArtisticStyleSettingsPage final : public Core::IOptionsPage
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ArtisticStyleSettingsPage()
|
||||||
|
{
|
||||||
|
setId("ArtisticStyle");
|
||||||
|
setDisplayName(asDisplayName());
|
||||||
|
setCategory(Constants::OPTION_CATEGORY);
|
||||||
|
setWidgetCreator([] { return new ArtisticStyleSettingsPageWidget; });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const ArtisticStyleSettingsPage settingsPage;
|
||||||
|
|
||||||
} // Beautifier::Internal
|
} // Beautifier::Internal
|
||||||
|
@@ -235,10 +235,10 @@ static ClangFormatSettings &settings()
|
|||||||
return theSettings;
|
return theSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
class ClangFormatOptionsPageWidget : public Core::IOptionsPageWidget
|
class ClangFormatSettingsPageWidget : public Core::IOptionsPageWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ClangFormatOptionsPageWidget()
|
ClangFormatSettingsPageWidget()
|
||||||
{
|
{
|
||||||
ClangFormatSettings &s = settings();
|
ClangFormatSettings &s = settings();
|
||||||
QGroupBox *options = nullptr;
|
QGroupBox *options = nullptr;
|
||||||
@@ -310,21 +310,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ClangFormatOptionsPage final : public Core::IOptionsPage
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ClangFormatOptionsPage()
|
|
||||||
{
|
|
||||||
setId("ClangFormat");
|
|
||||||
setDisplayName(Tr::tr("Clang Format"));
|
|
||||||
setCategory(Constants::OPTION_CATEGORY);
|
|
||||||
setWidgetCreator([] { return new ClangFormatOptionsPageWidget; });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const ClangFormatOptionsPage settingsPage;
|
|
||||||
|
|
||||||
|
|
||||||
// ClangFormat
|
// ClangFormat
|
||||||
|
|
||||||
ClangFormat::ClangFormat()
|
ClangFormat::ClangFormat()
|
||||||
@@ -516,4 +501,21 @@ Command ClangFormat::textCommand(int offset, int length) const
|
|||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ClangFormatSettingsPage
|
||||||
|
|
||||||
|
class ClangFormatSettingsPage final : public Core::IOptionsPage
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ClangFormatSettingsPage()
|
||||||
|
{
|
||||||
|
setId("ClangFormat");
|
||||||
|
setDisplayName(Tr::tr("Clang Format"));
|
||||||
|
setCategory(Constants::OPTION_CATEGORY);
|
||||||
|
setWidgetCreator([] { return new ClangFormatSettingsPageWidget; });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const ClangFormatSettingsPage settingsPage;
|
||||||
|
|
||||||
} // Beautifier::Internal
|
} // Beautifier::Internal
|
||||||
|
@@ -177,10 +177,10 @@ static UncrustifySettings &settings()
|
|||||||
return theSettings;
|
return theSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
class UncrustifyOptionsPageWidget : public Core::IOptionsPageWidget
|
class UncrustifySettingsPageWidget : public Core::IOptionsPageWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit UncrustifyOptionsPageWidget()
|
UncrustifySettingsPageWidget()
|
||||||
{
|
{
|
||||||
UncrustifySettings &s = settings();
|
UncrustifySettings &s = settings();
|
||||||
|
|
||||||
@@ -227,20 +227,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class UncrustifyOptionsPage final : public Core::IOptionsPage
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
UncrustifyOptionsPage()
|
|
||||||
{
|
|
||||||
setId("Uncrustify");
|
|
||||||
setDisplayName(uDisplayName());
|
|
||||||
setCategory(Constants::OPTION_CATEGORY);
|
|
||||||
setWidgetCreator([] { return new UncrustifyOptionsPageWidget; });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const UncrustifyOptionsPage settingsPage;
|
|
||||||
|
|
||||||
|
|
||||||
// Uncrustify
|
// Uncrustify
|
||||||
|
|
||||||
@@ -381,4 +367,21 @@ Command Uncrustify::textCommand(const FilePath &cfgFile, bool fragment) const
|
|||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// UncrustifySettingsPage
|
||||||
|
|
||||||
|
class UncrustifySettingsPage final : public Core::IOptionsPage
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
UncrustifySettingsPage()
|
||||||
|
{
|
||||||
|
setId("Uncrustify");
|
||||||
|
setDisplayName(uDisplayName());
|
||||||
|
setCategory(Constants::OPTION_CATEGORY);
|
||||||
|
setWidgetCreator([] { return new UncrustifySettingsPageWidget; });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const UncrustifySettingsPage settingsPage;
|
||||||
|
|
||||||
} // Beautifier::Internal
|
} // Beautifier::Internal
|
||||||
|
Reference in New Issue
Block a user