فهرست منبع

fixed build of fancontrol_gui

Maldela 9 سال پیش
والد
کامیت
6a98fc1524
3فایلهای تغییر یافته به همراه12 افزوده شده و 14 حذف شده
  1. 4 5
      fancontrol-gui/CMakeLists.txt
  2. 5 6
      fancontrol-gui/src/windowconfig.cpp
  3. 3 3
      package/contents/ui/PwmFan.qml

+ 4 - 5
fancontrol-gui/CMakeLists.txt

@@ -5,8 +5,9 @@ set(LIBRARIES fancontrol_gui_lib
               Qt5::Widgets
               KF5::Declarative
               KF5::I18n
-              KF5::ConfigGui)
-              
+              KF5::ConfigGui
+              KF5::ConfigCore)
+
 find_package(Qt5 COMPONENTS Widgets REQUIRED)
 find_package(KF5 COMPONENTS Declarative Config REQUIRED)
 
@@ -16,7 +17,5 @@ add_definitions(${Qt5Widgets_DEFINITIONS})
 add_executable(fancontrol_gui ${Fancontrol_GUI_SRCS})
 target_link_libraries(fancontrol_gui ${LIBRARIES})
 
-target_compile_features(fancontrol_gui_lib PRIVATE cxx_lambdas)
-
 install(TARGETS fancontrol_gui ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
-install(FILES metadata.desktop RENAME "fancontrol_gui.desktop" DESTINATION ${XDG_APPS_INSTALL_DIR})
+install(FILES metadata.desktop RENAME "fancontrol_gui.desktop" DESTINATION ${XDG_APPS_INSTALL_DIR})

+ 5 - 6
fancontrol-gui/src/windowconfig.cpp

@@ -23,8 +23,7 @@
 #include "windowconfig.h"
 
 #include <QtGui/QWindow>
-#include <QtCore/QDebug>
-#include <QScreen>
+#include <QtGui/QScreen>
 
 #include <KConfigCore/KSharedConfig>
 #include <KConfigGui/KWindowConfig>
@@ -34,7 +33,7 @@
 #define CONFIG_NAME "fancontrol-gui"
 #endif
 
-   
+
 WindowConfig *WindowConfig::m_instance = Q_NULLPTR;
 
 WindowConfig::WindowConfig(QObject *parent) : QObject(parent)
@@ -45,7 +44,7 @@ WindowConfig* WindowConfig::instance()
 {
     if (!m_instance)
         m_instance = new WindowConfig;
-    
+
     return m_instance;
 }
 
@@ -53,7 +52,7 @@ void WindowConfig::save(QWindow *window)
 {
     if (!window)
         return;
-    
+
     KConfigGroup configGroup(KSharedConfig::openConfig(QStringLiteral(CONFIG_NAME)), "window");
     KWindowConfig::saveWindowSize(window, configGroup);
     configGroup.sync();
@@ -63,7 +62,7 @@ void WindowConfig::restore(QWindow *window)
 {
     if (!window)
         return;
-    
+
     KConfigGroup configGroup(KSharedConfig::openConfig(QStringLiteral(CONFIG_NAME)), "window");
     KWindowConfig::restoreWindowSize(window, configGroup);
 }

+ 3 - 3
package/contents/ui/PwmFan.qml

@@ -44,9 +44,9 @@ Rectangle {
     radius: 10
     clip: false
 
-    onMinTempChanged: if (fan) meshCanvas.requestPaint()
-    onMaxTempChanged: if (fan) meshCanvas.requestPaint()
-    onUnitChanged: if (fan) meshCanvas.requestRepaint()
+    onMinTempChanged: if (!!fan) meshCanvas.requestPaint()
+    onMaxTempChanged: if (!!fan) meshCanvas.requestPaint()
+    onUnitChanged: if (!!fan) meshCanvas.requestRepaint()
 
     SystemPalette {
         id: palette