kconfig: qconf: remove name from ConfigSearchWindow constructor
This constructor is only called with "search" as the second argument. Hard-code the name in the constructor, and drop it from the function argument. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
1b4263e750
commit
740fdef853
|
@ -1288,10 +1288,10 @@ void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e)
|
||||||
Parent::contextMenuEvent(e);
|
Parent::contextMenuEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name)
|
ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow *parent)
|
||||||
: Parent(parent), result(NULL)
|
: Parent(parent), result(NULL)
|
||||||
{
|
{
|
||||||
setObjectName(name);
|
setObjectName("search");
|
||||||
setWindowTitle("Search Config");
|
setWindowTitle("Search Config");
|
||||||
|
|
||||||
QVBoxLayout* layout1 = new QVBoxLayout(this);
|
QVBoxLayout* layout1 = new QVBoxLayout(this);
|
||||||
|
@ -1312,9 +1312,9 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
|
||||||
|
|
||||||
split = new QSplitter(this);
|
split = new QSplitter(this);
|
||||||
split->setOrientation(Qt::Vertical);
|
split->setOrientation(Qt::Vertical);
|
||||||
list = new ConfigView(split, name);
|
list = new ConfigView(split, "search");
|
||||||
list->list->mode = listMode;
|
list->list->mode = listMode;
|
||||||
info = new ConfigInfoView(split, name);
|
info = new ConfigInfoView(split, "search");
|
||||||
connect(list->list, SIGNAL(menuChanged(struct menu *)),
|
connect(list->list, SIGNAL(menuChanged(struct menu *)),
|
||||||
info, SLOT(setInfo(struct menu *)));
|
info, SLOT(setInfo(struct menu *)));
|
||||||
connect(list->list, SIGNAL(menuChanged(struct menu *)),
|
connect(list->list, SIGNAL(menuChanged(struct menu *)),
|
||||||
|
@ -1322,18 +1322,17 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
|
||||||
|
|
||||||
layout1->addWidget(split);
|
layout1->addWidget(split);
|
||||||
|
|
||||||
if (name) {
|
|
||||||
QVariant x, y;
|
QVariant x, y;
|
||||||
int width, height;
|
int width, height;
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
||||||
configSettings->beginGroup(name);
|
configSettings->beginGroup("search");
|
||||||
width = configSettings->value("/window width", parent->width() / 2).toInt();
|
width = configSettings->value("/window width", parent->width() / 2).toInt();
|
||||||
height = configSettings->value("/window height", parent->height() / 2).toInt();
|
height = configSettings->value("/window height", parent->height() / 2).toInt();
|
||||||
resize(width, height);
|
resize(width, height);
|
||||||
x = configSettings->value("/window x");
|
x = configSettings->value("/window x");
|
||||||
y = configSettings->value("/window y");
|
y = configSettings->value("/window y");
|
||||||
if ((x.isValid())&&(y.isValid()))
|
if (x.isValid() && y.isValid())
|
||||||
move(x.toInt(), y.toInt());
|
move(x.toInt(), y.toInt());
|
||||||
QList<int> sizes = configSettings->readSizes("/split", &ok);
|
QList<int> sizes = configSettings->readSizes("/split", &ok);
|
||||||
if (ok)
|
if (ok)
|
||||||
|
@ -1341,7 +1340,6 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
|
||||||
configSettings->endGroup();
|
configSettings->endGroup();
|
||||||
connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
|
connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void ConfigSearchWindow::saveSettings(void)
|
void ConfigSearchWindow::saveSettings(void)
|
||||||
{
|
{
|
||||||
|
@ -1642,7 +1640,7 @@ void ConfigMainWindow::saveConfigAs(void)
|
||||||
void ConfigMainWindow::searchConfig(void)
|
void ConfigMainWindow::searchConfig(void)
|
||||||
{
|
{
|
||||||
if (!searchWindow)
|
if (!searchWindow)
|
||||||
searchWindow = new ConfigSearchWindow(this, "search");
|
searchWindow = new ConfigSearchWindow(this);
|
||||||
searchWindow->show();
|
searchWindow->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -272,7 +272,7 @@ class ConfigSearchWindow : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
typedef class QDialog Parent;
|
typedef class QDialog Parent;
|
||||||
public:
|
public:
|
||||||
ConfigSearchWindow(ConfigMainWindow* parent, const char *name = 0);
|
ConfigSearchWindow(ConfigMainWindow *parent);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void saveSettings(void);
|
void saveSettings(void);
|
||||||
|
|
Loading…
Reference in New Issue