* [PATCH] xconfig: Search text should have focus after search and reopen
@ 2014-11-04 10:35 Peter Kümmel
2014-11-04 20:11 ` Paul Bolle
0 siblings, 1 reply; 3+ messages in thread
From: Peter Kümmel @ 2014-11-04 10:35 UTC (permalink / raw)
To: linux-kbuild; +Cc: yann.morin.1998, Peter Kümmel
Signed-off-by: Peter Kümmel <syntheticpp@gmx.net>
---
scripts/kconfig/qconf.cc | 7 +++++++
scripts/kconfig/qconf.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 9d3b04b..014df76c 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1198,6 +1198,7 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
layout2->addWidget(editField);
searchButton = new QPushButton(_("Search"), this);
searchButton->setAutoDefault(FALSE);
+ searchButton->setFocusPolicy(Qt::NoFocus);
connect(searchButton, SIGNAL(clicked()), SLOT(search()));
layout2->addWidget(searchButton);
layout1->addLayout(layout2);
@@ -1235,6 +1236,11 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
}
}
+void ConfigSearchWindow::setFocusOnLineEdit()
+{
+ editField->setFocus(Qt::OtherFocusReason);
+}
+
void ConfigSearchWindow::saveSettings(void)
{
if (name()) {
@@ -1506,6 +1512,7 @@ void ConfigMainWindow::searchConfig(void)
if (!searchWindow)
searchWindow = new ConfigSearchWindow(this, "search");
searchWindow->show();
+ searchWindow->setFocusOnLineEdit();
}
void ConfigMainWindow::changeMenu(struct menu *menu)
diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index bde0c6b..6f2c4d6 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -288,6 +288,7 @@ public:
public slots:
void saveSettings(void);
void search(void);
+ void setFocusOnLineEdit(void);
protected:
QLineEdit* editField;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] xconfig: Search text should have focus after search and reopen
2014-11-04 10:35 [PATCH] xconfig: Search text should have focus after search and reopen Peter Kümmel
@ 2014-11-04 20:11 ` Paul Bolle
2014-11-05 6:55 ` Aw: " Peter Kuemmel
0 siblings, 1 reply; 3+ messages in thread
From: Paul Bolle @ 2014-11-04 20:11 UTC (permalink / raw)
To: Peter Kümmel; +Cc: linux-kbuild, yann.morin.1998
On Tue, 2014-11-04 at 11:35 +0100, Peter Kümmel wrote:
Again, this patch, though smaller that the previous, is not obviously
trivial. So, could you please add a few lines describing current
behavior, why it's wrong, and how this patch fixes it? That might
increase the chance this patch gets some review.
> Signed-off-by: Peter Kümmel <syntheticpp@gmx.net>
> ---
> scripts/kconfig/qconf.cc | 7 +++++++
> scripts/kconfig/qconf.h | 1 +
> 2 files changed, 8 insertions(+)
>
> diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
> index 9d3b04b..014df76c 100644
> --- a/scripts/kconfig/qconf.cc
> +++ b/scripts/kconfig/qconf.cc
> @@ -1198,6 +1198,7 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
> layout2->addWidget(editField);
> searchButton = new QPushButton(_("Search"), this);
> searchButton->setAutoDefault(FALSE);
> + searchButton->setFocusPolicy(Qt::NoFocus);
> connect(searchButton, SIGNAL(clicked()), SLOT(search()));
> layout2->addWidget(searchButton);
> layout1->addLayout(layout2);
> @@ -1235,6 +1236,11 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
> }
> }
>
> +void ConfigSearchWindow::setFocusOnLineEdit()
> +{
> + editField->setFocus(Qt::OtherFocusReason);
> +}
> +
> void ConfigSearchWindow::saveSettings(void)
> {
> if (name()) {
> @@ -1506,6 +1512,7 @@ void ConfigMainWindow::searchConfig(void)
> if (!searchWindow)
> searchWindow = new ConfigSearchWindow(this, "search");
> searchWindow->show();
> + searchWindow->setFocusOnLineEdit();
> }
>
> void ConfigMainWindow::changeMenu(struct menu *menu)
> diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
> index bde0c6b..6f2c4d6 100644
> --- a/scripts/kconfig/qconf.h
> +++ b/scripts/kconfig/qconf.h
> @@ -288,6 +288,7 @@ public:
> public slots:
> void saveSettings(void);
> void search(void);
> + void setFocusOnLineEdit(void);
>
> protected:
> QLineEdit* editField;
Thanks,
Paul Bolle
^ permalink raw reply [flat|nested] 3+ messages in thread* Aw: Re: [PATCH] xconfig: Search text should have focus after search and reopen
2014-11-04 20:11 ` Paul Bolle
@ 2014-11-05 6:55 ` Peter Kuemmel
0 siblings, 0 replies; 3+ messages in thread
From: Peter Kuemmel @ 2014-11-05 6:55 UTC (permalink / raw)
To: Paul Bolle; +Cc: linux-kbuild, yann.morin.1998
Thx for the hints, hope patches are better now.
Peter
> Gesendet: Dienstag, 04. November 2014 um 21:11 Uhr
> Von: "Paul Bolle" <pebolle@tiscali.nl>
> An: "Peter Kümmel" <syntheticpp@gmx.net>
> Cc: linux-kbuild@vger.kernel.org, yann.morin.1998@free.fr
> Betreff: Re: [PATCH] xconfig: Search text should have focus after search and reopen
>
> On Tue, 2014-11-04 at 11:35 +0100, Peter Kümmel wrote:
>
> Again, this patch, though smaller that the previous, is not obviously
> trivial. So, could you please add a few lines describing current
> behavior, why it's wrong, and how this patch fixes it? That might
> increase the chance this patch gets some review.
>
> > Signed-off-by: Peter Kümmel <syntheticpp@gmx.net>
> > ---
> > scripts/kconfig/qconf.cc | 7 +++++++
> > scripts/kconfig/qconf.h | 1 +
> > 2 files changed, 8 insertions(+)
> >
> > diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
> > index 9d3b04b..014df76c 100644
> > --- a/scripts/kconfig/qconf.cc
> > +++ b/scripts/kconfig/qconf.cc
> > @@ -1198,6 +1198,7 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
> > layout2->addWidget(editField);
> > searchButton = new QPushButton(_("Search"), this);
> > searchButton->setAutoDefault(FALSE);
> > + searchButton->setFocusPolicy(Qt::NoFocus);
> > connect(searchButton, SIGNAL(clicked()), SLOT(search()));
> > layout2->addWidget(searchButton);
> > layout1->addLayout(layout2);
> > @@ -1235,6 +1236,11 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
> > }
> > }
> >
> > +void ConfigSearchWindow::setFocusOnLineEdit()
> > +{
> > + editField->setFocus(Qt::OtherFocusReason);
> > +}
> > +
> > void ConfigSearchWindow::saveSettings(void)
> > {
> > if (name()) {
> > @@ -1506,6 +1512,7 @@ void ConfigMainWindow::searchConfig(void)
> > if (!searchWindow)
> > searchWindow = new ConfigSearchWindow(this, "search");
> > searchWindow->show();
> > + searchWindow->setFocusOnLineEdit();
> > }
> >
> > void ConfigMainWindow::changeMenu(struct menu *menu)
> > diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
> > index bde0c6b..6f2c4d6 100644
> > --- a/scripts/kconfig/qconf.h
> > +++ b/scripts/kconfig/qconf.h
> > @@ -288,6 +288,7 @@ public:
> > public slots:
> > void saveSettings(void);
> > void search(void);
> > + void setFocusOnLineEdit(void);
> >
> > protected:
> > QLineEdit* editField;
>
> Thanks,
>
>
> Paul Bolle
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-05 6:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-04 10:35 [PATCH] xconfig: Search text should have focus after search and reopen Peter Kümmel
2014-11-04 20:11 ` Paul Bolle
2014-11-05 6:55 ` Aw: " Peter Kuemmel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox