From: Roman Zippel <zippel@linux-m68k.org>
To: Shlomi Fish <shlomif@freehackers.org>
Cc: linux-kernel@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH 2.6.23-rc4] qconf ("make xconfig") Search Dialog Enhancement (rev8)
Date: Sun, 16 Sep 2007 18:43:26 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0709160043430.1817@scrub.home> (raw)
In-Reply-To: <200709132252.20719.shlomif@freehackers.org>
Hi,
On Thu, 13 Sep 2007, Shlomi Fish wrote:
> This patch adds an option to use either substring match, regular expression
> match, or keywords search in the "make xconfig" Edit->Find dialog.
>
> It also allows searching on the "help" field of the menus as well as
> the "name" of the symbol.
>
> This change involved adding the sym_generic_search function to the LKC, and
> implementing sym_re_search using it.
I like the direction, but first of all please fix the coding style.
I would also prefer to move more of the search functionality into the
generic code, so it can be used by other front ends as well, otherwise a
lot of this had to be duplicated.
I think a filter function makes it maybe a bit to flexible, if a front
end wants to do some weird filtering, it can still access the symbol
data base directly. So what I have in mind is something like this:
struct symbol **sym_generic_search(const char *pattern, unsigned int flags);
This means the back end provides a basic search facility for the most
common search operations. The flags would specify what to search (e.g.
symbol name, help text, prompts) and how to do it.
> @@ -1199,6 +1199,23 @@
> layout2->addWidget(searchButton);
> layout1->addLayout(layout2);
>
> + // Initialize the "Search Type" button group.
> + searchType = new QVButtonGroup("Search Type", this, "searchType");
> +
> + substringSearch = new QRadioButton(
> + "Substring Match", searchType, "Substring Match"
> + );
> +
> + keywordsSearch = new QRadioButton("Keywords", searchType, "Keywords");
> +
> + regexSearch = new QRadioButton(
> + "Regular Expression", searchType, "Regular Expression"
> + );
> +
> + substringSearch->setChecked(TRUE);
> + layout1->addWidget(searchType);
> +
> + // Initialize the ConfigView and ConfigInfoView
> split = new QSplitter(this);
> split->setOrientation(QSplitter::Vertical);
> list = new ConfigView(split, name);
> @@ -1245,6 +1262,20 @@
> }
> }
>
> +SEARCH_TYPE ConfigSearchWindow::getSearchType()
> +{
> + return substringSearch->isChecked() ? SUBSTRING :
> + regexSearch->isChecked() ? REGEX :
> + KEYWORDS;
> +}
>
If you use QButtonGroup::insert() you can assign id's to the indivual
buttons and then use selectedId to make this part simpler.
bye, Roman
next parent reply other threads:[~2007-09-16 16:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200709132252.20719.shlomif@freehackers.org>
2007-09-16 16:43 ` Roman Zippel [this message]
2007-09-20 11:50 ` Shlomi Fish
2007-09-20 12:08 ` Sam Ravnborg
2007-10-05 2:08 ` Roman Zippel
[not found] ` <200710082155.12351.shlomif-lkml@freehackers.org>
2007-10-11 17:22 ` Sam Ravnborg
[not found] <200709141645.04112.shlomif@freehackers.org>
2007-09-14 21:11 ` Sam Ravnborg
2007-09-16 9:25 ` Sam Ravnborg
2007-09-14 13:48 Shlomi Fish
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0709160043430.1817@scrub.home \
--to=zippel@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=shlomif@freehackers.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®