Skip to content

Added a SearchColumnNames button to TableBrowser - #4180

Merged
lucydodo merged 4 commits into
sqlitebrowser:masterfrom
SimonHallefelt:Feature-3542
Sep 7, 2026
Merged

lucydodo merged 4 commits into
sqlitebrowser:masterfrom
SimonHallefelt:Feature-3542

Conversation

@SimonHallefelt

Copy link
Copy Markdown
Contributor

This pull request is in regards to: #3542.

Added a SearchColumnNames button to the TableBrowser. The button is placed next to the FindReplaceButton.
image
The button icon was created by using Inkscape to modify the page_find.svg, to ensure it would be of the same style as the other buttons.

When the SearchColumnNames button is pressed so will it open a dialog box that is almost the same as the FindDialogBox, so it would not make the UI inconsistent (and its simpler to copy code and just change its text and refrences)
image
The search functionality is modeled after how the FindSearch funktions and I think its a 1 to 1 in how it behaves, except that I made it highlight the full column instead of a individual cell.
image

@SimonHallefelt

Copy link
Copy Markdown
Contributor Author

Does this mean that https://github.com/nalgeon/sqlean is no longer compatible with ARM, because as far as I know, so should my changes not affect this?
image

@FriedrichFroebel

Copy link
Copy Markdown
Contributor

Does this mean that https://github.com/nalgeon/sqlean is no longer compatible with ARM, because as far as I know, so should my changes not affect this?

It rather seems like upstream changes cause our patch to be not up-to-date anymore. I guess @lucydodo needs to take a look at this, maybe an upstream patch is feasible to reduce the risk of breaking in the future.

@SimonHallefelt SimonHallefelt mentioned this pull request Aug 28, 2026
1 task
@lucydodo

lucydodo commented Sep 3, 2026

Copy link
Copy Markdown
Member

@FriedrichFroebel Would you still like to proceed with the review of this PR?

@lucydodo lucydodo linked an issue Sep 3, 2026 that may be closed by this pull request
@lucydodo lucydodo added the enhancement Feature requests. label Sep 3, 2026
@FriedrichFroebel

Copy link
Copy Markdown
Contributor

@lucydodo I Just pointed out the issue with our CI. For the remaining parts, I will leave this to persons with more knowledge, as my knowledge of C++ and Qt is rather limited ultimately.

@lucydodo

lucydodo commented Sep 3, 2026

Copy link
Copy Markdown
Member

@FriedrichFroebel No worries, I'll take a look over the weekend. :)

@lucydodo lucydodo self-assigned this Sep 3, 2026
@lucydodo

lucydodo commented Sep 3, 2026

Copy link
Copy Markdown
Member

In the meantime, I'll try using GitHub Copilot to do a first-pass review.
(Of course, I'll make the final review and decision myself, but it might catch something I missed)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Shared search state, hidden-column matches, incorrect scrolling, and reversed navigation icons need correction.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds column-name search to Browse Data.

Changes:

  • Adds column-search controls and toolbar action.
  • Implements case-sensitive navigation and column highlighting.
  • Adds and registers a dedicated icon.
File summaries
File Description
src/TableBrowser.ui Adds search UI and action.
src/TableBrowser.h Declares column search logic.
src/TableBrowser.cpp Implements search behavior.
src/icons/page_find_column.svg Provides the new icon.
src/icons/icons.qrc Registers the icon resource.
Review details
  • Files reviewed: 4/5 changed files
  • Comments generated: 5
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/TableBrowser.cpp Outdated
if (columnCount <= 0)
return;

static int lastFoundIndex = -1;
Comment thread src/TableBrowser.cpp
Comment on lines +1777 to +1779
const QString columnName = m_model->headerData(i, Qt::Horizontal, Qt::EditRole).toString();
if (!columnName.contains(searchText, caseSensitivity))
return false;
Comment thread src/TableBrowser.cpp
ui->dataTable->selectionModel()->select(QItemSelection(top, bottom),
QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Columns);

ui->dataTable->horizontalScrollBar()->setValue(ui->dataTable->horizontalHeader()->sectionViewportPosition(i));
Comment thread src/TableBrowser.ui Outdated
</property>
<property name="icon">
<iconset resource="icons/icons.qrc">
<normaloff>:/icons/up</normaloff>:/icons/up</iconset>
Comment thread src/TableBrowser.ui Outdated
</property>
<property name="icon">
<iconset resource="icons/icons.qrc">
<normaloff>:/icons/down</normaloff>:/icons/down</iconset>
@lucydodo
lucydodo merged commit 23a6d0e into sqlitebrowser:master Sep 7, 2026
23 checks passed
@lucydodo
lucydodo self-requested a review September 7, 2026 10:03

@lucydodo lucydodo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Now it's merged. Thank you for the contribution. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature requests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Allow to search/filter for column names ("Browse Data")

4 participants