Browse Source

V1.1.8
1、修改了阴影组件和日志初始化组件

Apple 5 days ago
parent
commit
57024b6717

+ 8 - 1
common/LHLog/LHLogInit.cpp

@@ -16,9 +16,14 @@
  * GCC9会在标准库中,GCC8.3需要手动链接库stdc++fs才可以使用
  */
 
+std::atomic_bool g_isLogInit(false); // 是否已经初始化日志
+
 void initLog(QString ModuleName, CLHQLogApi& lhQLog)
 {
-
+    if(g_isLogInit.load())
+    {
+        return; // 已经初始化过了
+    }
     try {
         /* 创建一个控制台sink */
         auto sink_consolse = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
@@ -99,6 +104,8 @@ void initLog(QString ModuleName, CLHQLogApi& lhQLog)
     catch (const spdlog::spdlog_ex& ex) {
         qDebug() << "Log initialization failed: " << ex.what() ;
     }
+
+    g_isLogInit.store(true);
 }
 
 

+ 0 - 0
common/Shadow/oneshadow.cpp → common/Shadow/oneshadow.cpp_


+ 0 - 0
common/Shadow/oneshadow.h → common/Shadow/oneshadow.h_


+ 4 - 4
common/combox/customcombobox.h

@@ -1,5 +1,5 @@
-#ifndef CUSTOMCOMBOBOX_H
-#define CUSTOMCOMBOBOX_H
+#ifndef _CUSTOMCOMBOBOX_H_
+#define _CUSTOMCOMBOBOX_H_
 
 #include <QComboBox>
 
@@ -13,7 +13,7 @@ class CustomComboBox : public QComboBox
 {
 public:
     explicit CustomComboBox(QWidget *parent = nullptr);
-    ~CustomComboBox();
+    ~CustomComboBox() override;
 
     /* 设置下拉框阴影,需要先设置样式表,再调用此函数 */
     void setViewShadowEffect();
@@ -24,4 +24,4 @@ private:
     const int LISTVIEW_MARGIN = 12; // QAbstractItemView边距(阴影宽度)
 };
 
-#endif // CUSTOMCOMBOBOX_H
+#endif // _CUSTOMCOMBOBOX_H_