mirror-chatterino2/src/widgets/helper/TrimRegExpValidator.cpp
kornes 3bf1756579
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>
2022-05-16 09:42:17 +00:00

18 lines
458 B
C++

#include "widgets/helper/TrimRegExpValidator.hpp"
namespace chatterino {
TrimRegExpValidator::TrimRegExpValidator(const QRegularExpression &re,
QObject *parent)
: QRegularExpressionValidator(re, parent)
{
}
QValidator::State TrimRegExpValidator::validate(QString &input, int &pos) const
{
input = input.trimmed();
return QRegularExpressionValidator::validate(input, pos);
}
} // namespace chatterino