ui: Added second line to search autocompletion list showing namespace or filepath
* Show namespace or filepath in second line of search autocompletions * Add filepaths relative to .coatidb location * Rescore matches to acknowledge line split * Fixed SearchMatch type to be drawn always visible at right edge
This commit is contained in:
@@ -146,11 +146,11 @@ bool QtSmartSearchBox::event(QEvent *event)
|
||||
{
|
||||
if (m_highlightedMatch.hasChildren)
|
||||
{
|
||||
setEditText((m_highlightedMatch.text + NameHierarchy::getDelimiter()).c_str());
|
||||
setEditText((m_highlightedMatch.getFullName() + NameHierarchy::getDelimiter()).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
setEditText(m_highlightedMatch.text.c_str());
|
||||
setEditText(m_highlightedMatch.getFullName().c_str());
|
||||
}
|
||||
|
||||
requestAutoCompletions();
|
||||
@@ -456,7 +456,7 @@ void QtSmartSearchBox::onTextEdited(const QString& text)
|
||||
}
|
||||
}
|
||||
|
||||
if (match.text.size() && !m_allowMultipleElements)
|
||||
if (match.name.size() && !m_allowMultipleElements)
|
||||
{
|
||||
if (m_matches.size())
|
||||
{
|
||||
@@ -475,7 +475,7 @@ void QtSmartSearchBox::onTextEdited(const QString& text)
|
||||
layoutElements();
|
||||
}
|
||||
|
||||
if (match.text.size() || m_elements.size())
|
||||
if (match.name.size() || m_elements.size())
|
||||
{
|
||||
requestAutoCompletions();
|
||||
}
|
||||
@@ -510,7 +510,7 @@ void QtSmartSearchBox::onAutocompletionActivated(const SearchMatch& match)
|
||||
{
|
||||
addMatchAndUpdate(match);
|
||||
|
||||
if (match.text.size())
|
||||
if (match.name.size())
|
||||
{
|
||||
search();
|
||||
}
|
||||
@@ -580,7 +580,7 @@ void QtSmartSearchBox::moveCursorTo(int target)
|
||||
|
||||
void QtSmartSearchBox::addMatch(const SearchMatch& match)
|
||||
{
|
||||
if (!match.text.size())
|
||||
if (!match.name.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -607,7 +607,7 @@ void QtSmartSearchBox::addMatch(const SearchMatch& match)
|
||||
|
||||
void QtSmartSearchBox::addMatchAndUpdate(const SearchMatch& match)
|
||||
{
|
||||
if (match.text.size())
|
||||
if (match.name.size())
|
||||
{
|
||||
m_oldText.clear();
|
||||
clearLineEdit();
|
||||
|
||||
Reference in New Issue
Block a user