Allow to instantiate built-in option pages individually
Expose conversion from QtSettings to QtSettingsData so one can pass such an object to the constructor of e.g. QtLanguageOptionPage.
This commit is contained in:
parent
3ac8c8e1a4
commit
8d8585d00d
|
@ -548,6 +548,17 @@ QWidget *QtEnvOptionPage::setupWidget()
|
|||
return widget;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns a handle to the internal data.
|
||||
* \remarks
|
||||
* This is an opaque data structure. It can be used to construct option pages
|
||||
* like QtLanguageOptionPage.
|
||||
*/
|
||||
QtSettings::operator QtSettingsData &() const
|
||||
{
|
||||
return *m_d.get();
|
||||
}
|
||||
|
||||
} // namespace QtUtilities
|
||||
|
||||
INSTANTIATE_UI_FILE_BASED_OPTION_PAGE(QtAppearanceOptionPage)
|
||||
|
|
|
@ -53,6 +53,7 @@ public:
|
|||
void reevaluatePaletteAndDefaultIconTheme();
|
||||
bool isPaletteDark();
|
||||
bool hasCustomFont() const;
|
||||
operator QtSettingsData&() const;
|
||||
|
||||
OptionCategory *category();
|
||||
|
||||
|
|
Loading…
Reference in New Issue