Index: sources/device/DeviceError.h =================================================================== diff -u -rf38edd22f7b63694c21b83d6f4b69ea618390126 -r9ae3b0d6624904693329309aaf8ff02784c17184 --- sources/device/DeviceError.h (.../DeviceError.h) (revision f38edd22f7b63694c21b83d6f4b69ea618390126) +++ sources/device/DeviceError.h (.../DeviceError.h) (revision 9ae3b0d6624904693329309aaf8ff02784c17184) @@ -38,33 +38,26 @@ public: enum Scripts_Error_Enum { - eScripts_OK = 0 , + eDevice_OK = 0 , - eScripts_Error_Start = 1000 , // the script itself in system starts from 0 so give it enough gap + eDevice_Scripts_Error_Start = 1000 , // the script itself in system starts from 0 so give it enough gap - eScripts_Error_NotFound , - eScripts_Error_NotExecutable, - eScripts_Error_IsRunning , - eScripts_Error_OutOfRange , - eScripts_Error_Incorrect_Req, - eScripts_Error_Incorrect_Rsp, + eDevice_Scripts_Error_NotFound , + eDevice_Scripts_Error_NotExecutable , + eDevice_Scripts_Error_IsRunning , + eDevice_Scripts_Error_OutOfRange , + eDevice_Scripts_Error_Incorrect_Req , + eDevice_Scripts_Error_Incorrect_Rsp , - eScripts_Error_End + eDevice_Watch_Error_NotFound , + eDevice_Watch_Error_NotAdded , + eDevice_Error_End + }; Q_ENUM(Scripts_Error_Enum) - static QString scriptErrorText( DeviceError::Scripts_Error_Enum vError ) { - QString message; - if (eScripts_Error_Start < vError && vError < eScripts_Error_End) { - message += QObject::tr(Scripts_Error_Text[vError - eScripts_Error_Start - 1]); - } - else { - message += QObject::tr("Device error"); - } - return message; - } - + static QString deviceErrorText( DeviceError::Scripts_Error_Enum vError ); static Scripts_Error_Enum checkScript(QString &vScript, const QString &vShellScript); };