Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist Search History #635

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Pavithra-aa-Anand
Copy link
Collaborator

Persist the search history even across DLT Viewer restarts.

Signed-off by : Pavithra Anand [email protected]

Persist the search history even across DLT Viewer restarts.

Signed-off by : Pavithra Anand <[email protected]>
@@ -8292,6 +8305,19 @@ void MainWindow::onSearchProgressChanged(bool isInProgress)
ui->dockWidgetProject->setEnabled(!isInProgress);
}

void MainWindow::loadSearchHistoryList(QStringList& searchHistory)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please move this whole stuff into the corresponding widget (search form or search dialog) instead of extending main window which is already a polluted superclass antipattern?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, will move it to search dialog

Moved loadSearchHistoryList function from mainwindow to searchdialog

Signed-off by : Pavithra Anand <[email protected]>
QAction *searchHistoryActs[MaxSearchHistory];
QStringList searchHistory;

QLineEdit* searchLineEdit;
Copy link
Collaborator

Choose a reason for hiding this comment

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

can all this be also moved to the corresponding widget?

Copy link
Collaborator Author

@Pavithra-aa-Anand Pavithra-aa-Anand Feb 27, 2025

Choose a reason for hiding this comment

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

Yes, sure. Will move to search form/search dialog

Copy link
Collaborator Author

@Pavithra-aa-Anand Pavithra-aa-Anand Mar 3, 2025

Choose a reason for hiding this comment

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

I have already utilised searchHistory which is QStringList in saving and loading history functions.
In searchForm, I could see m_historyModel which is QStringListModel is defined.

So, Is it expected to proceed with searchHistory or m_historyModel?

@alexmucde alexmucde added this to the Release v2.28.0 milestone Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ToDo
Development

Successfully merging this pull request may close these issues.

4 participants