Index: sources/device/DeviceController.h =================================================================== diff -u -re2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d -re8262d170bb94046ddb767074a31530bdf4a2319 --- sources/device/DeviceController.h (.../DeviceController.h) (revision e2dc7bd9995a3bb410aa472a1f95c1cc9ba3136d) +++ sources/device/DeviceController.h (.../DeviceController.h) (revision e8262d170bb94046ddb767074a31530bdf4a2319) @@ -33,12 +33,18 @@ namespace Device { +/*! + * \brief The TimedProcess class + * \details This is a timed process class which has a timeout + * and will kill the process if it can't be finished within the given timeout + * in milliseconds. + */ class TimedProcess : public QObject { Q_OBJECT explicit TimedProcess(QObject *parent = nullptr) : QObject(parent) { } int _id = 0; - int _interval = 0; + int _timeout = 0; QProcess *_process = nullptr; QString _command = ""; @@ -50,13 +56,13 @@ deleteLater(); } public: - TimedProcess(QProcess *vProcess, const QString &vCommand, int vInterval) - : QObject(), _interval(vInterval), _process(vProcess), _command(vCommand) { + TimedProcess(QProcess *vProcess, const QString &vCommand, int vTimeout) + : QObject(), _timeout(vTimeout), _process(vProcess), _command(vCommand) { connect(_process, SIGNAL( finished(int)), this , SLOT(onFinish (int))); } void start() { - _id = startTimer(_interval); + _id = startTimer(_timeout); _process->start(_command); }