فهرست منبع

added configPath property to loader

Maldela 8 سال پیش
والد
کامیت
ea5c3468a5
2فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 1 1
      fancontrol-gui/package/contents/ui/ConfigfileTab.qml
  2. 2 0
      import/src/loader.h

+ 1 - 1
fancontrol-gui/package/contents/ui/ConfigfileTab.qml

@@ -32,7 +32,7 @@ ColumnLayout {
 
     Label {
         anchors.top: parent.top
-        text: !!loader ? decodeURIComponent(loader.configUrl) : ""
+        text: !!loader ? decodeURIComponent(loader.configPath) : ""
     }
 
     Rectangle {

+ 2 - 0
import/src/loader.h

@@ -45,6 +45,7 @@ class Loader : public QObject
 {
     Q_OBJECT
     Q_PROPERTY(QUrl configUrl READ configUrl NOTIFY configUrlChanged)
+    Q_PROPERTY(QString configPath READ configPath NOTIFY configUrlChanged)
     Q_PROPERTY(QString configFile READ configFile NOTIFY configFileChanged)
     Q_PROPERTY(QList<QObject *> hwmons READ hwmonsAsObjects NOTIFY hwmonsChanged)
     Q_PROPERTY(int interval READ interval WRITE setInterval NOTIFY intervalChanged)
@@ -63,6 +64,7 @@ public:
     Q_INVOKABLE void abortTestingFans();
     Q_INVOKABLE void detectSensors();
     QUrl configUrl() const { return m_configUrl; }
+    QString configPath() const { return m_configUrl.path(); }
     QString configFile() const { return m_configFile; }
     QList<Hwmon *> hwmons() const { return m_hwmons; }
     bool sensorsDetected() const { return m_sensorsDetected; }