mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
18 lines
458 B
C++
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
|