Редакция 242 | Редакция 248 | К новейшей редакции | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 242 | Редакция 243 | ||
---|---|---|---|
Строка 3... | Строка 3... | ||
3 | 3 | ||
4 | #include <QThread>
|
4 | #include <QThread>
|
5 | #include <QProcess>
|
5 | #include <QProcess>
|
6 | #include <QMutex>
|
6 | #include <QMutex>
|
7 | #include <QDebug>
|
7 | #include <QDebug>
|
- | 8 | #include <QEventLoop>
|
|
- | 9 | #include "woker.h"
|
|
8 | 10 | ||
9 | class WmiThread : public QThread |
11 | class WmiThread : public QThread |
10 | {
|
12 | {
|
11 | Q_OBJECT |
13 | Q_OBJECT |
12 | public: |
14 | public: |
Строка 24... | Строка 26... | ||
24 | return stopped; |
26 | return stopped; |
25 | mutex.unlock(); |
27 | mutex.unlock(); |
26 | 28 | ||
27 | }; |
29 | }; |
28 | void setWmiString(QString new_wmi_string){wmi_string = new_wmi_string;} |
30 | void setWmiString(QString new_wmi_string){wmi_string = new_wmi_string;} |
29 | private: |
- | |
30 | volatile bool stopped; |
31 | volatile bool stopped; |
- | 32 | private: |
|
- | 33 | ||
31 | volatile bool error; |
34 | volatile bool error; |
- | 35 | ||
32 | QProcess process;
|
36 | QProcess process;
|
33 | QString host;
|
37 | QString host;
|
34 | QString user_name;
|
38 | QString user_name;
|
35 | QString password;
|
39 | QString password;
|
36 | QMutex mutex;
|
40 | QMutex mutex;
|
Строка 40... | Строка 44... | ||
40 | signals:
|
44 | signals:
|
41 | 45 | ||
42 | public slots: |
46 | public slots: |
43 | void readStandartProcessOutput(); |
47 | void readStandartProcessOutput(); |
44 | void readStandartProcessError(); |
48 | void readStandartProcessError(); |
- | 49 | void wokerIsStopped(); |
|
45 | 50 | ||
46 | private slots: |
51 | private slots: |
47 | 52 | ||
48 | 53 | ||
49 | 54 |