Преглед изворни кода

shortened the time for detect-sensors to start in helper and removed resetting of fans when hwmon initializes

Maldela пре 9 година
родитељ
комит
8e86f04108
2 измењених фајлова са 8 додато и 8 уклоњено
  1. 8 7
      helper/src/helper.cpp
  2. 0 1
      lib/src/hwmon.cpp

+ 8 - 7
helper/src/helper.cpp

@@ -22,6 +22,7 @@
 #include <QtCore/QFile>
 #include <QtCore/QTextStream>
 #include <QtCore/QProcess>
+#include <QtCore/QFileInfo>
 
 #include <KAuth/KAuthHelperSupport>
 #include <KI18n/KLocalizedString>
@@ -108,34 +109,34 @@ ActionReply Helper::action(const QVariantMap &arguments)
     {
         QString program = QStringLiteral("sensors-detect");
         QStringList arguments = QStringList() << QStringLiteral("--auto");
-        
+
         QProcess process;
         process.start(program, arguments);
 
-        if (!process.waitForStarted(10000))
+        if (!process.waitForStarted(1000))
         {
             reply = ActionReply::HelperErrorType;
             reply.setErrorDescription(process.errorString());
-            
+
             return reply;
         }
-        
+
         if (!process.waitForFinished(10000))
         {
             reply = ActionReply::HelperErrorType;
             reply.setErrorDescription(process.errorString());
-            
+
             return reply;
         }
     }
-    
+
     else
     {
         reply.setType(ActionReply::HelperErrorType);
         reply.setErrorCode(ActionReply::NoSuchActionError);
         reply.setErrorDescription(i18n("This action does not exist!"));
     }
-    
+
     return reply;
 }
 

+ 0 - 1
lib/src/hwmon.cpp

@@ -80,7 +80,6 @@ void Hwmon::initialize()
                     if (pwmFan->index() == index)
                     {
                         newPwmFan = pwmFan;
-                        newPwmFan->reset();
                         break;
                     }
                 }