mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-02-02 19:27:38 +08:00
update
This commit is contained in:
parent
6221eb4178
commit
1450016c69
@ -94,6 +94,9 @@ QString Log::prettyProductInfoWrapper()
|
|||||||
|
|
||||||
static inline void myMessageHandler(const QtMsgType type, const QMessageLogContext &context, const QString &message)
|
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){
|
if(logLevelMap[type]>g_logLevel){
|
||||||
return;
|
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());
|
Q_ASSERT(!app.isEmpty());
|
||||||
if (app.isEmpty()) {
|
if (app.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
g_logLevel = level;
|
||||||
static bool once = false;
|
static bool once = false;
|
||||||
if (once) {
|
if (once) {
|
||||||
return;
|
return;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
namespace Log
|
namespace Log
|
||||||
{
|
{
|
||||||
QString prettyProductInfoWrapper();
|
QString prettyProductInfoWrapper();
|
||||||
void setup(const QString &app);
|
void setup(const QString &app,int level = 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // LOG_H
|
#endif // LOG_H
|
||||||
|
@ -44,4 +44,10 @@ private: \
|
|||||||
return Singleton<Class>::getInstance(); \
|
return Singleton<Class>::getInstance(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define HIDE_CONSTRUCTOR(Class) \
|
||||||
|
private: \
|
||||||
|
Class() = default; \
|
||||||
|
Class(const Class& other) = delete; \
|
||||||
|
Class& operator=(const Class& other) = delete;
|
||||||
|
|
||||||
#endif // SINGLETON_H
|
#endif // SINGLETON_H
|
||||||
|
@ -26,7 +26,6 @@ TextEdit {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.IBeamCursor
|
cursorShape: Qt.IBeamCursor
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
visible: !readOnly
|
|
||||||
onClicked: control.echoMode !== TextInput.Password && menu.popup()
|
onClicked: control.echoMode !== TextInput.Password && menu.popup()
|
||||||
}
|
}
|
||||||
FluTextBoxMenu{
|
FluTextBoxMenu{
|
||||||
|
@ -26,7 +26,6 @@ TextEdit {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.IBeamCursor
|
cursorShape: Qt.IBeamCursor
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
visible: !readOnly
|
|
||||||
onClicked: control.echoMode !== TextInput.Password && menu.popup()
|
onClicked: control.echoMode !== TextInput.Password && menu.popup()
|
||||||
}
|
}
|
||||||
FluTextBoxMenu{
|
FluTextBoxMenu{
|
||||||
|
Loading…
Reference in New Issue
Block a user