9#include <QtCore/qregularexpression.h>
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
217
218
219
220
223
224
225
226
227
230
231
232
233
234
237
238
239
240
241
244
245
246
247
248
251
252
253
254
255
258
259
260
263
264
265
266
267
268
269
270
271
286
287
288
289
293 while (a && (a
->type() != t || a->string() != s))
299
300
301
304
305
306
313
314
315
322
323
324
327
328
329
332
333
334
335
336
337
338
341 static bool deja =
false;
345 while (atms[i]
.english !=
nullptr) {
347 Location::internalError(QStringLiteral(
"QDoc::Atom: atom %1 missing").arg(i));
353 int i =
static_cast<
int>(
type());
354 if (i < 0 || i >
static_cast<
int>(
Last))
355 return QLatin1String(
"Invalid");
356 return QLatin1String(atms[i]
.english);
360
361
362
363
364
365
368
369
370
379 result += atom->string();
389
390
391
392
393
394
395
396
403 resolveSquareBracketParams(p2);
407
408
409
410
411
412
420 resolveSquareBracketParams(p2);
424
425
426
429 m_squareBracketParams = text.toLower().split(QLatin1Char(
' '));
430 for (
const auto ¶m : m_squareBracketParams) {
432 m_domain = QDocDatabase::qdocDB()->findTree(param);
438 if (param ==
"qml") {
439 m_genus = Genus::QML;
442 if (param ==
"cpp") {
443 m_genus = Genus::CPP;
446 if (param ==
"doc") {
447 m_genus = Genus::DOC;
450 if (param ==
"api") {
451 m_genus = Genus::API;
459
460
462 :
Atom(t.m_type, t.string()),
472
473
474
475
477 :
Atom(previous, t.m_type, t.string()),
489 if (m_squareBracketParams.contains(
"attached"))
#define ATOM_FORMATTING_LINK
The Atom class is the fundamental unit for representing documents internally.
AtomType type() const
Return the type of this atom.
AtomType
\value AnnotatedList \value AutoLink \value BaseName \value BriefLeft \value BriefRight \value C \val...
const Atom * next(AtomType t, const QString &s) const
Return the next Atom in the list if it is of AtomType t and its string part is s.
QString linkText() const
For a link atom, returns the string representing the link text if one exist in the list of atoms.
const Atom * next() const
Return the next atom in the atom list.
const Atom * next(AtomType t) const
Return the next Atom in the list if it is of AtomType t.
const Atom * find(AtomType t, qsizetype *offset=nullptr) const
Starting from this Atom, searches the linked list for the atom of specified type t and returns it.
const Atom * find(AtomType t, const QString &s) const
Starting from this Atom, searches the linked list for the atom of specified type t and string s,...
QString typeString() const
Return the type of this atom as a string.
virtual int flags() const override
LinkAtom(Atom::AtomType type, const QString &p1, const QString &p2, Location location=Location())
Constructs a LinkAtom carrying an explicit atom type.
LinkAtom(const QString &p1, const QString &p2, Location location=Location())
Constructs a LinkAtom of type Atom::Link.
LinkAtom(const LinkAtom &t)
Standard copy constructor of LinkAtom t.
LinkAtom(Atom *previous, const LinkAtom &t)
Special copy constructor of LinkAtom t, where where the new LinkAtom will not be the first one in the...
void resolveSquareBracketParams(const QString &text) override
Resolves the parameters that were enclosed in square brackets, supplied as text, setting the domain a...
The Location class provides a way to mark a location in a file.
Combined button and popup list for selecting options.