5#include "QtCore/qglobal.h"
44 auto it = m_fieldFilterRemove.
begin();
45 while (
it != m_fieldFilterRemove.
end()) {
47 fieldFilterStr.
append(u
",");
53 auto it = m_fieldFilterAdd.
begin();
54 while (
it != m_fieldFilterAdd.
end()) {
56 fieldFilterStr.
append(u
",");
61 return fieldFilterStr;
75 if (
c.kind() == Path::Kind::Field) {
79 return m_filtredDefault;
90 }
else if (m_filtredTypes.
contains(baseK)) {
103 uR
"((?<op>[-+])?(?:(?<type>[a-zA-Z0-9_]*):)?(?<field>[a-zA-Z0-9_]*))")));
107 if (
m.capturedView(u
"op") == u
"+") {
108 m_fieldFilterRemove.
remove(
m.captured(u
"type"),
m.captured(u
"field"));
109 m_fieldFilterAdd.
insert(
m.captured(u
"type"),
m.captured(u
"field"));
111 m_fieldFilterRemove.
insert(
m.captured(u
"type"),
m.captured(u
"field"));
112 m_fieldFilterAdd.
remove(
m.captured(u
"type"),
m.captured(u
"field"));
115 qCWarning(domLog) <<
"could not extract filter from" << fField;
157 return FieldFilter { fieldFilterAdd, fieldFilterRemove };
208 auto end = reverseMap.cend();
225 addFilteredOfMap(m_fieldFilterAdd);
226 addFilteredOfMap(m_fieldFilterRemove);
227 m_filtredDefault =
true;
229 m_filtredDefault =
false;
230 m_filtredFields.
clear();
231 for (
auto s : filtredFieldStrs)
234 m_filtredTypes.
clear();
235 for (
auto s : filtredTypeStrs) {
241 qCWarning(domLog) <<
"Filter on unknown type " <<
s <<
" will be ignored";
251#include "moc_qqmldomfieldfilter_p.cpp"
bool contains(const Key &key) const noexcept
Returns true if the hash contains an item with the key; otherwise returns false.
T value(const Key &key) const noexcept
const_iterator cend() const
const_iterator cbegin() const
iterator insert(const Key &key, const T &value)
size_type remove(const Key &key)
QList< T > values() const
DomItem component(GoTo option=GoTo::Strict)
const QMultiMap< QString, QString > & fieldFilterAdd() const
static FieldFilter defaultFilter()
static FieldFilter noLocationFilter()
static FieldFilter compareFilter()
bool operator()(DomItem &, Path, DomItem &) const
static FieldFilter compareNoCommentsFilter()
bool addFilter(QString f)
QString describeFieldsFilter() const
QMultiMap< QString, QString > fieldFilterRemove() const
Class that represent a filter on DomItem, when dumping or comparing.
\inmodule QtCore \reentrant
\inmodule QtCore \reentrant
QRegularExpressionMatch matchView(QStringView subjectView, qsizetype offset=0, MatchType matchType=NormalMatch, MatchOptions matchOptions=NoMatchOption) const
static QString anchoredPattern(const QString &expression)
bool contains(const T &value) const
const_iterator cbegin() const noexcept
iterator insert(const T &value)
\macro QT_RESTRICTED_CAST_FROM_ASCII
QStringList split(const QString &sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Splits the string into substrings wherever sep occurs, and returns the list of those strings.
static QString fromUtf16(const char16_t *, qsizetype size=-1)
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QString & append(QChar c)
QMap< QString, QString > map
[6]
cache insert(employee->id(), employee)
QSet< QString >::iterator it
QMLDOM_EXPORT QString domTypeToString(DomType k)
QMLDOM_EXPORT QMap< DomType, QString > domTypeToStringMap()
size_t qHash(const Path &, size_t)
Combined button and popup list for selecting options.
#define qCWarning(category,...)
static bool contains(const QJsonArray &haystack, unsigned needle)
GLenum GLsizei GLsizei GLint * values
[15]
GLsizei GLenum GLenum * types
static QLatin1StringView typeStr(QShaderDescription::VariableType t)
QLatin1StringView QLatin1String
#define QStringLiteral(str)
if(qFloatDistance(a, b)<(1<< 7))
[0]
\inmodule QtCore \reentrant
bool contains(const AT &t) const noexcept