aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsloggingutils_p.h
diff options
context:
space:
mode:
authorFabian Kosmale <[email protected]>2023-08-29 20:56:35 +0200
committerFabian Kosmale <[email protected]>2023-08-30 14:18:17 +0200
commit50f714789d43136ea2f8c29536b6b80d598e3b6f (patch)
treed5edca63a5e1a5de7848656c6cdadee5cb2b2d94 /src/qmlcompiler/qqmljsloggingutils_p.h
parente86a91dfd5535ce548618270343a2521fb0ef4c6 (diff)
QmlCompiler: Make LoggerCategory private again
It is not needed by the QQmlSA API. Additionally, remove the comparison operator for LoggerCategory and LoggerId, and replace its users by getting the id from the category before comparing. Pick-to: 6.6 Change-Id: I7747b09b941cfd5326b95d2ee2f78b0ee10991d3 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Semih Yavuz <[email protected]> Reviewed-by: Olivier De Cannière <[email protected]>
Diffstat (limited to 'src/qmlcompiler/qqmljsloggingutils_p.h')
-rw-r--r--src/qmlcompiler/qqmljsloggingutils_p.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/qmlcompiler/qqmljsloggingutils_p.h b/src/qmlcompiler/qqmljsloggingutils_p.h
index 683836ca6c..f124e6f9a7 100644
--- a/src/qmlcompiler/qqmljsloggingutils_p.h
+++ b/src/qmlcompiler/qqmljsloggingutils_p.h
@@ -23,6 +23,38 @@ QT_BEGIN_NAMESPACE
namespace QQmlJS {
+class LoggerCategoryPrivate;
+
+class Q_QMLCOMPILER_EXPORT LoggerCategory
+{
+ Q_DECLARE_PRIVATE(LoggerCategory)
+
+public:
+ LoggerCategory();
+ LoggerCategory(QString name, QString settingsName, QString description, QtMsgType level,
+ bool ignored = false, bool isDefault = false);
+ LoggerCategory(const LoggerCategory &);
+ LoggerCategory(LoggerCategory &&) noexcept;
+ LoggerCategory &operator=(const LoggerCategory &);
+ LoggerCategory &operator=(LoggerCategory &&) noexcept;
+ ~LoggerCategory();
+
+ QString name() const;
+ QString settingsName() const;
+ QString description() const;
+ QtMsgType level() const;
+ bool isIgnored() const;
+ bool isDefault() const;
+
+ LoggerWarningId id() const;
+
+ void setLevel(QtMsgType);
+ void setIgnored(bool);
+
+private:
+ std::unique_ptr<QQmlJS::LoggerCategoryPrivate> d_ptr;
+};
+
class LoggerCategoryPrivate
{
friend class QT_PREPEND_NAMESPACE(QQmlJS::LoggerCategory);