mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
kconfig: qconf: confine {begin,end}Group to constructor and destructor
Call beginGroup() in the the constructor and endGroup() in the destructor. This looks cleaner. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
@@ -37,6 +37,12 @@ QAction *ConfigMainWindow::saveAction;
|
||||
ConfigSettings::ConfigSettings()
|
||||
: QSettings("kernel.org", "qconf")
|
||||
{
|
||||
beginGroup("/kconfig/qconf");
|
||||
}
|
||||
|
||||
ConfigSettings::~ConfigSettings()
|
||||
{
|
||||
endGroup();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1829,7 +1835,6 @@ int main(int ac, char** av)
|
||||
configApp = new QApplication(ac, av);
|
||||
|
||||
configSettings = new ConfigSettings();
|
||||
configSettings->beginGroup("/kconfig/qconf");
|
||||
v = new ConfigMainWindow();
|
||||
|
||||
//zconfdump(stdout);
|
||||
@@ -1837,7 +1842,6 @@ int main(int ac, char** av)
|
||||
v->show();
|
||||
configApp->exec();
|
||||
|
||||
configSettings->endGroup();
|
||||
delete configSettings;
|
||||
delete v;
|
||||
delete configApp;
|
||||
|
||||
@@ -24,6 +24,7 @@ class ConfigMainWindow;
|
||||
class ConfigSettings : public QSettings {
|
||||
public:
|
||||
ConfigSettings();
|
||||
~ConfigSettings(void);
|
||||
QList<int> readSizes(const QString& key, bool *ok);
|
||||
bool writeSizes(const QString& key, const QList<int>& value);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user