Subversion Repositories OpenInventory

Rev

Rev 246 | Rev 248 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 246 Rev 247
Line 16... Line 16...
16
}
16
}
17
17
18
void WmiThread::run(){
18
void WmiThread::run(){
19
19
20
20
21
   QEventLoop * loop = new QEventLoop();
21
   QEventLoop loop; // = new QEventLoop();
22
    Woker woker; // îáúåêò äëÿ ðàáîòû â òåëå ïîòîêà
22
    Woker woker; // îáúåêò äëÿ ðàáîòû â òåëå ïîòîêà
23
23
24
    // connect(&woker, SIGNAL(workEnd()), this, SLOT(wokerIsStopped()));
24
    // connect(&woker, SIGNAL(workEnd()), this, SLOT(wokerIsStopped()));
25
connect(&woker, SIGNAL(workEnd()), loop, SLOT(quit()));
25
connect(&woker, SIGNAL(workEnd()), &loop, SLOT(quit()));
26
26
27
/*
27
/*
28
    QString query_string;
28
    QString query_string;
29
    error = false; //ñáðîñèì ôëàã îøèáêè
29
    error = false; //ñáðîñèì ôëàã îøèáêè
30
    query_string = tr("wmic -U ");
30
    query_string = tr("wmic -U ");
Line 43... Line 43...
43
*/
43
*/
44
44
45
45
46
    woker.startProcess();
46
    woker.startProcess();
47
47
48
    loop->exec();
48
    loop.exec();
49
}
49
}
50
50
51
void WmiThread::stop(){
51
void WmiThread::stop(){
52
      mutex.lock();
52
      mutex.lock();
53
      stopped = true;
53
      stopped = true;