fix all PIFile::readAll calls
This commit is contained in:
@@ -212,7 +212,7 @@ void PISystemMonitor::run() {
|
||||
// piCout << (PRIVATE->cpu_u_cur - PRIVATE->cpu_u_prev).toMilliseconds() / delay_ms;
|
||||
# else
|
||||
PRIVATE->file.seekToBegin();
|
||||
PIString str = PIString::fromAscii(PRIVATE->file.readAll(true));
|
||||
PIString str = PIString::fromAscii(PRIVATE->file.readAll());
|
||||
int si = str.find('(') + 1, fi = 0, cc = 1;
|
||||
for (int i = si; i < str.size_s(); ++i) {
|
||||
if (str[i] == '(') cc++;
|
||||
@@ -250,7 +250,7 @@ void PISystemMonitor::run() {
|
||||
// piCout << sl[0] << sl[12] << sl[13];
|
||||
|
||||
PRIVATE->filem.seekToBegin();
|
||||
str = PIString::fromAscii(PRIVATE->filem.readAll(true));
|
||||
str = PIString::fromAscii(PRIVATE->filem.readAll());
|
||||
sl = str.split(" ");
|
||||
if (sl.size_s() < 6) return;
|
||||
tstat.virtual_memsize = sl[0].toLong() * page_size;
|
||||
@@ -357,7 +357,7 @@ void PISystemMonitor::gatherThread(llong id) {
|
||||
PIFile f(PRIVATE->proc_dir + "task/" + PIString::fromNumber(id) + "/stat");
|
||||
// piCout << f.path();
|
||||
if (!f.open(PIIODevice::ReadOnly)) return;
|
||||
PIString str = PIString::fromAscii(f.readAll(true));
|
||||
PIString str = PIString::fromAscii(f.readAll());
|
||||
int si = str.find('(') + 1, fi = 0, cc = 1;
|
||||
for (int i = si; i < str.size_s(); ++i) {
|
||||
if (str[i] == '(') cc++;
|
||||
|
||||
@@ -1208,7 +1208,7 @@ PIVector<PISerial::DeviceInfo> PISerial::availableDevicesInfo(bool test) {
|
||||
# endif
|
||||
PIFile file_prefixes("/proc/tty/drivers", PIIODevice::ReadOnly);
|
||||
if (file_prefixes.open()) {
|
||||
PIString fc = PIString::fromAscii(file_prefixes.readAll(true)), line, cpref;
|
||||
PIString fc = PIString::fromAscii(file_prefixes.readAll()), line, cpref;
|
||||
PIStringList words;
|
||||
file_prefixes.close();
|
||||
while (!fc.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user