Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 248 → Rev 249

/trunk/DBViewer/wmithread.h
29,11 → 29,11
}
void setWmiString(QString new_wmi_string){wmi_string = new_wmi_string;}
QString resultString(){
QTextCodec *codec = QTextCodec::codecForName("cp1251");
QTextCodec *codecUTF = QTextCodec::codecForName("utf8");
QTextCodec::setCodecForTr(codecUTF);
// static QTextCodec *codec = QTextCodec::codecForName("cp1251");
// static QTextCodec *codecUTF = QTextCodec::codecForName("utf8");
// QTextCodec::setCodecForTr(codecUTF);
return QString(tr(p_buffer));
QTextCodec::setCodecForTr(codec);
// QTextCodec::setCodecForTr(codec);
}
volatile bool stopped;
private:
/trunk/DBViewer/database.cpp
1012,7 → 1012,9
 
TWmiVideoCard vCard;
 
vCard = MainWindow::getWmiVideoGard(tr("192.168.0.135"), tr("Àäìèíèñòðàòîð"), tr("Patr10t"));
 
 
vCard = MainWindow::getWmiVideoGard("192.168.0.11", tr("Àäìèíèñòðàòîð"), "!s-Leg01@Z");
int i;
i++;
 
/trunk/DBViewer/mainwindow.cpp
1852,13 → 1852,13
values_list = tmp_str.split("|");
int index_tmp;
index_tmp = fields_list.indexOf(tr("AdapterCompatibility")); // ïðîèçâîäèòåëü
if (index_tmp!=-1) result.manufacturer = values_list.at(index_tmp);
if ((index_tmp!=-1) && (index_tmp < values_list.count())) result.manufacturer = values_list.at(index_tmp);
index_tmp = fields_list.indexOf(tr("Name")); // íàçâàíèå âèäåîêàðòû
if (index_tmp!=-1) result.name = values_list.at(index_tmp);
if ((index_tmp!=-1) && (index_tmp < values_list.count())) result.name = values_list.at(index_tmp);
index_tmp = fields_list.indexOf(tr("VideoProcessor")); // ìîäåëü
if (index_tmp!=-1) result.model = values_list.at(index_tmp);
if ((index_tmp!=-1) && (index_tmp < values_list.count())) result.model = values_list.at(index_tmp);
index_tmp = fields_list.indexOf(tr("AdapterRAM")); // ìîäåëü
if (index_tmp!=-1) result.video_ram = QVariant(values_list.at(index_tmp)).asInt();
if ((index_tmp!=-1) && (index_tmp < values_list.count())) result.video_ram = QVariant(values_list.at(index_tmp)).asInt();
return result;
}
else return result; //ïîëó÷èëè íå êîððåêòíûé îòâåò
/trunk/DBViewer/wmithread.cpp
29,8 → 29,9
// error = false; //ñáðîñèì ôëàã îøèáêè
query_string = tr("wmic -U ");
query_string.append(user_name);
query_string.append(tr("%"));
query_string.append("%\"");
query_string.append(password);
query_string.append("\"");
query_string.append(tr(" //"));
query_string.append(host);
query_string.append(tr(" \""));
40,7 → 41,7
// process.start("ls\n");
// while (!stopped) {;}
 
 
qDebug() << query_string;
woker.setProcessString(query_string);
woker.startProcess();