mirror of https://github.com/torvalds/linux.git
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:
parent
721bfe583c
commit
87433e3e06
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue