Commit fce87047 authored by Kåre Särs's avatar Kåre Särs
Browse files

Fix S&R not recovering from canceled folder search

BUG: 435689
parent 82562479
...@@ -127,18 +127,17 @@ void FolderFilesList::terminateSearch() ...@@ -127,18 +127,17 @@ void FolderFilesList::terminateSearch()
{ {
m_cancelSearch = true; m_cancelSearch = true;
wait(); wait();
m_files.clear();
} }
QStringList FolderFilesList::fileList() QStringList FolderFilesList::fileList()
{ {
if (m_cancelSearch) {
m_files.clear();
}
return m_files; return m_files;
} }
void FolderFilesList::cancelSearch()
{
m_cancelSearch = true;
}
void FolderFilesList::checkNextItem(DirectoryWithResults &handleOnFolder) const void FolderFilesList::checkNextItem(DirectoryWithResults &handleOnFolder) const
{ {
/** /**
......
...@@ -28,9 +28,6 @@ public: ...@@ -28,9 +28,6 @@ public:
QStringList fileList(); QStringList fileList();
public Q_SLOTS:
void cancelSearch();
Q_SIGNALS: Q_SIGNALS:
void searching(const QString &path); void searching(const QString &path);
void fileListReady(); void fileListReady();
......
...@@ -878,7 +878,7 @@ void KatePluginSearchView::matchesFound(const QUrl &url, const QVector<KateSearc ...@@ -878,7 +878,7 @@ void KatePluginSearchView::matchesFound(const QUrl &url, const QVector<KateSearc
void KatePluginSearchView::stopClicked() void KatePluginSearchView::stopClicked()
{ {
m_folderFilesList.cancelSearch(); m_folderFilesList.terminateSearch();
m_searchOpenFiles.cancelSearch(); m_searchOpenFiles.cancelSearch();
cancelDiskFileSearch(); cancelDiskFileSearch();
Results *res = qobject_cast<Results *>(m_ui.resultTabWidget->currentWidget()); Results *res = qobject_cast<Results *>(m_ui.resultTabWidget->currentWidget());
...@@ -1935,7 +1935,7 @@ void KatePluginSearchView::tabCloseRequested(int index) ...@@ -1935,7 +1935,7 @@ void KatePluginSearchView::tabCloseRequested(int index)
if (m_curResults == tmp) { if (m_curResults == tmp) {
m_searchOpenFiles.cancelSearch(); m_searchOpenFiles.cancelSearch();
cancelDiskFileSearch(); cancelDiskFileSearch();
m_folderFilesList.cancelSearch(); m_folderFilesList.terminateSearch();
} }
if (m_ui.resultTabWidget->count() > 1) { if (m_ui.resultTabWidget->count() > 1) {
delete tmp; // remove the tab delete tmp; // remove the tab
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment