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
qqmljsloggingutils.cpp
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
6
8
9namespace QQmlJS {
10
12
14 QtMsgType level, bool ignored, bool isDefault)
15 : d_ptr{ new LoggerCategoryPrivate }
16{
17 Q_D(LoggerCategory);
18 d->m_name = name;
19 d->m_settingsName = settingsName;
20 d->m_description = description;
21 d->m_level = level;
22 d->m_ignored = ignored;
23 d->m_isDefault = isDefault;
24}
25
27 : d_ptr{ new LoggerCategoryPrivate{ *other.d_func() } }
28{
29}
30
32
34{
35 *d_func() = *other.d_func();
36 return *this;
37}
38
40
41LoggerCategory::~LoggerCategory() = default;
42
44{
45 Q_D(const LoggerCategory);
46 return d->m_name;
47}
48
50{
51 Q_D(const LoggerCategory);
52 return d->m_settingsName;
53}
54
56{
57 Q_D(const LoggerCategory);
58 return d->m_description;
59}
60
62{
63 Q_D(const LoggerCategory);
64 return d->m_level;
65}
66
68{
69 Q_D(const LoggerCategory);
70 return d->m_ignored;
71}
72
74{
75 Q_D(const LoggerCategory);
76 return d->m_isDefault;
77}
78
80{
81 Q_D(const LoggerCategory);
82 return d->id();
83}
84
86{
87 Q_D(LoggerCategory);
88 d->setLevel(type);
89}
90
92{
93 if (m_level == type)
94 return;
95
96 m_level = type;
97 m_changed = true;
98}
99
100void LoggerCategory::setIgnored(bool isIgnored)
101{
102 Q_D(LoggerCategory);
103 d->setIgnored(isIgnored);
104}
105
107{
108 if (m_ignored == isIgnored)
109 return;
110
111 m_ignored = isIgnored;
112 m_changed = true;
113}
114
116{
117 return m_changed;
118}
119
121{
122 Q_ASSERT(loggerCategory);
123 return loggerCategory->d_func();
124}
125
134} // namespace QQmlJS
135
static LoggerCategoryPrivate * get(LoggerCategory *)
LoggerCategory & operator=(const LoggerCategory &)
LoggerWarningId id() const
\inmodule QtQmlCompiler
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
QtMsgType
Definition qlogging.h:29
GLenum GLuint GLint level
GLenum type
GLuint name
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
QSharedPointer< T > other(t)
[5]