Fix: ignore whitespaces pasted in EmotePopup search (#3730)

Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
kornes
2022-05-16 09:42:17 +00:00
committed by GitHub
parent addcbb10f9
commit 3bf1756579
7 changed files with 46 additions and 6 deletions
+3 -2
View File
@@ -1,5 +1,7 @@
#include "widgets/helper/RegExpItemDelegate.hpp"
#include "widgets/helper/TrimRegExpValidator.hpp"
#include <QLineEdit>
namespace chatterino {
@@ -16,8 +18,7 @@ QWidget *RegExpItemDelegate::createEditor(QWidget *parent,
const QModelIndex &index) const
{
auto *editor = new QLineEdit(parent);
editor->setValidator(
new QRegularExpressionValidator(this->regexp_, editor));
editor->setValidator(new TrimRegExpValidator(this->regexp_, editor));
return editor;
}