Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 241 → Rev 242

/trunk/DBViewer/mainwindow.cpp
129,7 → 129,7
// buildReport(true);
 
all_reading = false; // íåò ïðî÷èòàííûõ äàííûõ èç ïðîöåññà
wmiThread = new WmiThread(this);
// wmiThread = new WmiThread(this);
 
}
 
1821,19 → 1821,25
TWmiVideoCard MainWindow::getWmiVideoGard(QString host, QString user_name, QString password){
TWmiVideoCard result;
bool ok;
wmiThread->setHost(host); // çàäàåì õîñò
wmiThread->setUser(user_name);//çàäàåì èìÿ ïîëüçîâàòåëÿ
wmiThread->setPassword( password);
wmiThread->start(QThread::NormalPriority);
wmiThread->setWmiString(tr("select * from Win32_ComputerSystem"));
ok = wmiThread->wait(10000);
wmiThread.moveToThread(&wmiThread);
wmiThread.setHost(host); // çàäàåì õîñò
wmiThread.setUser(user_name);//çàäàåì èìÿ ïîëüçîâàòåëÿ
wmiThread.setPassword( password);
wmiThread.setWmiString(tr("select * from Win32_ComputerSystem"));
wmiThread.start(QThread::NormalPriority);
//for (;;) {if (wmiThread.isStopped()) break;}
int t;
t++;
 
 
ok = wmiThread.wait(10000);
if (ok){
int m;
m++;
}
else {
wmiThread->stop();
ok = wmiThread->wait(10000);
wmiThread.stop();
ok = wmiThread.wait(10000);
int k;
k++;
}