mirror-chatterino2/src/widgets/helper/TrimRegExpValidator.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
458 B
C++
Raw Normal View History

#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