26 bool autoescape)
const
36 if (input.
userType() == qMetaTypeId<QVariantList>()) {
37 if (argument.
userType() == qMetaTypeId<QVariantList>())
38 return input.
value<QVariantList>() + argument.
value<QVariantList>();
42 if (input.
userType() == qMetaTypeId<QStringList>()) {
48 if (input.
userType() == qMetaTypeId<int>()) {
49 if (argument.
userType() == qMetaTypeId<int>())
50 return input.
value<
int>() + argument.
value<
int>();
54 if (input.
userType() == qMetaTypeId<uint>()) {
55 if (argument.
userType() == qMetaTypeId<uint>())
56 return input.
value<uint>() + argument.
value<uint>();
62 return input.
value<
double>() + argument.
value<
double>();
66 if (input.
userType() == qMetaTypeId<long long>()) {
67 if (argument.
userType() == qMetaTypeId<long long>())
68 return input.
value<
long long>() + argument.
value<
long long>();
72 if (input.
userType() == qMetaTypeId<unsigned long long>()) {
73 if (input.
userType() == qMetaTypeId<unsigned long long>())
74 return input.
value<
unsigned long long>()
75 + argument.
value<
unsigned long long>();
83 bool autoescape)
const
89 (void)value.get().toInt(&ok);
93 if (value.get().size() < 1)
98 if (value.get().size() < arg)
101 return SafeString(value.get().at(value.get().size() - arg));
QVariant doFilter(const QVariant &input, const QVariant &argument={}, bool autoescape={}) const override
A QString wrapper class for containing whether a string is safe or needs to be escaped.
const NestedString & get() const
QVariant doFilter(const QVariant &input, const QVariant &argument={}, bool autoescape={}) const override
bool isSafeString(const QVariant &input)
Cutelee::SafeString getSafeString(const QVariant &input)
int toInt(bool *ok, int base) const const
bool canConvert(int targetTypeId) const const
QStringList toStringList() const const
int userType() const const
Utility functions used throughout Cutelee.