From 1450016c693b1f698a1e3f60c355043b24eb07fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Sat, 30 Dec 2023 20:33:33 +0800 Subject: [PATCH] update --- example/src/helper/Log.cpp | 6 +++++- example/src/helper/Log.h | 2 +- example/src/singleton.h | 6 ++++++ src/Qt5/imports/FluentUI/Controls/FluCopyableText.qml | 1 - src/Qt6/imports/FluentUI/Controls/FluCopyableText.qml | 1 - 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/example/src/helper/Log.cpp b/example/src/helper/Log.cpp index e5417e56..d3212dc1 100644 --- a/example/src/helper/Log.cpp +++ b/example/src/helper/Log.cpp @@ -94,6 +94,9 @@ QString Log::prettyProductInfoWrapper() static inline void myMessageHandler(const QtMsgType type, const QMessageLogContext &context, const QString &message) { + if(message == "Could not get the INetworkConnection instance for the adapter GUID."){ + return; + } if(logLevelMap[type]>g_logLevel){ return; } @@ -165,12 +168,13 @@ static inline void myMessageHandler(const QtMsgType type, const QMessageLogConte } } -void Log::setup(const QString &app) +void Log::setup(const QString &app,int level) { Q_ASSERT(!app.isEmpty()); if (app.isEmpty()) { return; } + g_logLevel = level; static bool once = false; if (once) { return; diff --git a/example/src/helper/Log.h b/example/src/helper/Log.h index a8efba33..808ba8c8 100644 --- a/example/src/helper/Log.h +++ b/example/src/helper/Log.h @@ -5,7 +5,7 @@ namespace Log { QString prettyProductInfoWrapper(); - void setup(const QString &app); + void setup(const QString &app,int level = 4); } #endif // LOG_H diff --git a/example/src/singleton.h b/example/src/singleton.h index ef685f96..f6f25892 100644 --- a/example/src/singleton.h +++ b/example/src/singleton.h @@ -44,4 +44,10 @@ private: \ return Singleton::getInstance(); \ } +#define HIDE_CONSTRUCTOR(Class) \ +private: \ + Class() = default; \ + Class(const Class& other) = delete; \ + Class& operator=(const Class& other) = delete; + #endif // SINGLETON_H diff --git a/src/Qt5/imports/FluentUI/Controls/FluCopyableText.qml b/src/Qt5/imports/FluentUI/Controls/FluCopyableText.qml index 1f1dea3c..cb902881 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluCopyableText.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluCopyableText.qml @@ -26,7 +26,6 @@ TextEdit { anchors.fill: parent cursorShape: Qt.IBeamCursor acceptedButtons: Qt.RightButton - visible: !readOnly onClicked: control.echoMode !== TextInput.Password && menu.popup() } FluTextBoxMenu{ diff --git a/src/Qt6/imports/FluentUI/Controls/FluCopyableText.qml b/src/Qt6/imports/FluentUI/Controls/FluCopyableText.qml index 90d40775..34c1fc7f 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluCopyableText.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluCopyableText.qml @@ -26,7 +26,6 @@ TextEdit { anchors.fill: parent cursorShape: Qt.IBeamCursor acceptedButtons: Qt.RightButton - visible: !readOnly onClicked: control.echoMode !== TextInput.Password && menu.popup() } FluTextBoxMenu{