Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
9d789bbd
Commit
9d789bbd
authored
Jan 28, 2021
by
Kåre Särs
Committed by
Christoph Cullmann
Jan 28, 2021
Browse files
Do not hide the tree root item on empty results
parent
a6a457db
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/search/MatchModel.cpp
View file @
9d789bbd
...
...
@@ -455,7 +455,7 @@ static QString nbsFormated(int number, int width)
QString
MatchModel
::
infoHtmlString
()
const
{
if
(
m_matchFiles
.
isEmpty
()
&&
m_searchState
==
SearchDone
)
{
if
(
m_matchFiles
.
isEmpty
()
&&
m_searchState
==
SearchDone
&&
m_lastMatchUrl
.
isEmpty
()
)
{
return
QString
();
}
...
...
@@ -975,7 +975,9 @@ Qt::ItemFlags MatchModel::flags(const QModelIndex &index) const
int
MatchModel
::
rowCount
(
const
QModelIndex
&
parent
)
const
{
if
(
!
parent
.
isValid
())
{
return
(
m_matchFiles
.
isEmpty
()
&&
m_searchState
==
SearchDone
)
?
0
:
1
;
return
(
m_matchFiles
.
isEmpty
()
&&
m_searchState
==
SearchDone
&&
m_lastMatchUrl
.
isEmpty
())
?
0
:
1
;
}
if
(
parent
.
internalId
()
==
InfoItemId
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment