Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmlpreviewblacklist.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQMLPREVIEWBLACKLIST_H
5#define QQMLPREVIEWBLACKLIST_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qhash.h>
19#include <QtCore/qchar.h>
20#include <QtCore/qstring.h>
21#include <algorithm>
22
24
26{
27public:
28 void blacklist(const QString &path);
29 void whitelist(const QString &path);
30 bool isBlacklisted(const QString &path) const;
31 void clear();
32
33private:
34 class Node {
35 public:
36 Node();
37 Node(const Node &other);
38 Node(Node &&other) noexcept;
39
40 ~Node();
41
42 Node &operator=(const Node &other);
43 Node &operator=(Node &&other) noexcept;
44
46 void insert(const QString &path, int offset);
47 void remove(const QString &path, int offset);
48 int containedPrefixLeaf(const QString &path, int offset) const;
49
50 private:
51 Node(const QString &mine, const QHash<QChar, Node *> &next = QHash<QChar, Node *>(),
52 bool isLeaf = true);
53
54 QString m_mine;
55 QHash<QChar, Node *> m_next;
56 bool m_isLeaf = false;
57 };
58
59 Node m_root;
60};
61
63
64#endif // QQMLPREVIEWBLACKLIST_H
\inmodule QtCore
void blacklist(const QString &path)
void whitelist(const QString &path)
bool isBlacklisted(const QString &path) const
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QSet< QString >::iterator it
short next
Definition keywords.cpp:445
Combined button and popup list for selecting options.
GLuint GLuint end
GLenum GLuint GLintptr offset
GLsizei const GLchar *const * path
QSharedPointer< T > other(t)
[5]