1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef UTILITIES_H
5#define UTILITIES_H
6
7#include <QtCore/qstring.h>
8#include <QtCore/qloggingcategory.h>
9
10using namespace Qt::Literals::StringLiterals;
11
12QT_BEGIN_NAMESPACE
13
14Q_DECLARE_LOGGING_CATEGORY(lcQdoc)
15Q_DECLARE_LOGGING_CATEGORY(lcQdocClang)
16
17class INode;
18class Location;
19
20namespace Utilities {
21void startDebugging(const QString &message);
22void stopDebugging(const QString &message);
23bool debugging();
24
25const INode *nodeForString(const QString &string);
26QString stringForNode(const INode *node);
27
28QString uniqueIdentifier(const Location &loc, const QString &prefix);
29QString separator(qsizetype wordPosition, qsizetype numberOfWords);
30QString comma(qsizetype wordPosition, qsizetype numberOfWords);
31QString asAsciiPrintable(const QString &name);
32QString protect(const QString &string);
33QStringList getInternalIncludePaths(const QString &compiler);
34bool isGeneratedFile(const QString &path);
35
36static constexpr QLatin1StringView samp = "&amp;"_L1;
37static constexpr QLatin1StringView slt = "&lt;"_L1;
38static constexpr QLatin1StringView sgt = "&gt;"_L1;
39static constexpr QLatin1StringView squot = "&quot;"_L1;
40}
41
42QT_END_NAMESPACE
43
44#endif // UTILITIES_H
45

source code of qttools/src/qdoc/qdoc/src/qdoc/utilities.h