Commit 3e6efdf4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Trimmed string before searching emoticon

parent fa91f252
Pipeline #81049 canceled with stage
...@@ -32,12 +32,13 @@ EmoticonUnicodeTab::~EmoticonUnicodeTab() ...@@ -32,12 +32,13 @@ EmoticonUnicodeTab::~EmoticonUnicodeTab()
void EmoticonUnicodeTab::searchUnicode(const QString &str) void EmoticonUnicodeTab::searchUnicode(const QString &str)
{ {
bool searchVisible = !str.trimmed().isEmpty(); const QString trimmedStr{str.trimmed()};
bool searchVisible = !trimmedStr.isEmpty();
setTabVisible(mSearchTabIndex, searchVisible); setTabVisible(mSearchTabIndex, searchVisible);
if (searchVisible) { if (searchVisible) {
setCurrentIndex(mSearchTabIndex); setCurrentIndex(mSearchTabIndex);
} }
mEmoticonUnicodeSearchProxyModel->setFilterFixedString(str); mEmoticonUnicodeSearchProxyModel->setFilterFixedString(trimmedStr);
} }
void EmoticonUnicodeTab::createSearchTab() void EmoticonUnicodeTab::createSearchTab()
......
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