Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qqmljsloggingutils_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 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 QQMLJSLOGGINGUTILS_P_H
5#define QQMLJSLOGGINGUTILS_P_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 <private/qtqmlcompilerexports_p.h>
19
20#include "qqmljsloggingutils.h"
21
23
24namespace QQmlJS {
25
27{
29
30public:
31 LoggerWarningId id() const { return LoggerWarningId(m_name); }
32
33 void setLevel(QtMsgType);
34 void setIgnored(bool);
35
36 QString name() const;
40 bool isIgnored() const;
41 bool isDefault() const;
42 bool hasChanged() const;
43
45
46 friend bool operator==(const LoggerCategoryPrivate &lhs, const LoggerCategoryPrivate &rhs)
47 {
48 return operatorEqualsImpl(lhs, rhs);
49 }
50 friend bool operator!=(const LoggerCategoryPrivate &lhs, const LoggerCategoryPrivate &rhs)
51 {
52 return !operatorEqualsImpl(lhs, rhs);
53 }
54
55 bool operator==(const LoggerWarningId warningId) const { return warningId.name() == m_name; }
56
57private:
58 static bool operatorEqualsImpl(const LoggerCategoryPrivate &, const LoggerCategoryPrivate &);
59
60 QString m_name;
61 QString m_settingsName;
62 QString m_description;
63 QtMsgType m_level = QtDebugMsg;
64 bool m_ignored = false;
65 bool m_isDefault = false; // Whether or not the category can be disabled
66 bool m_changed = false;
67};
68
69} // namespace QQmlJS
70
72
73#endif // QQMLJSLOGGINGUTILS_P_H
friend bool operator!=(const LoggerCategoryPrivate &lhs, const LoggerCategoryPrivate &rhs)
friend class QT_PREPEND_NAMESPACE(QQmlJS::LoggerCategory)
bool operator==(const LoggerWarningId warningId) const
static LoggerCategoryPrivate * get(LoggerCategory *)
friend bool operator==(const LoggerCategoryPrivate &lhs, const LoggerCategoryPrivate &rhs)
const QAnyStringView name() const
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
Combined button and popup list for selecting options.
QtMsgType
Definition qlogging.h:29
@ QtDebugMsg
Definition qlogging.h:30
GLenum GLuint id
[7]