diff options
author | Slávek Banko <[email protected]> | 2021-01-14 02:37:59 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2021-01-14 02:37:59 +0100 |
commit | 355f00c2bd6f4b2870133d0423420ef8046b7156 (patch) | |
tree | 914337ce5bd4bd2bc984866f02c370c2a2788c7e /src/torkview.cpp | |
parent | 5962b7e681adb58055898f2e35665934bd08e235 (diff) | |
download | tork-355f00c2bd6f4b2870133d0423420ef8046b7156.tar.gz tork-355f00c2bd6f4b2870133d0423420ef8046b7156.zip |
Added controlled conversions to char* instead of automatic ascii conversions.
The definition of -UTQT_NO_ASCII_CAST is no longer needed.
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'src/torkview.cpp')
-rw-r--r-- | src/torkview.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/torkview.cpp b/src/torkview.cpp index e03fe92..ff76276 100644 --- a/src/torkview.cpp +++ b/src/torkview.cpp @@ -933,12 +933,12 @@ TQString torkView::parseStreamPort(const TQString &str_port) TQString path = "/proc/" +*it+"/fd"; - if ((pdir = opendir((const char*)path)) == NULL) + if ((pdir = opendir(path.local8Bit())) == NULL) continue; while ((pde = readdir(pdir)) != NULL) { - snprintf(fdpath, MAX_PROC_STR_LEN, "/proc/%s/fd/%s", (const char*)*it, pde->d_name); + snprintf(fdpath, MAX_PROC_STR_LEN, "/proc/%s/fd/%s", (*it).local8Bit().data(), pde->d_name); fdpath[MAX_PROC_STR_LEN - 1] = '\0'; int len = readlink(fdpath, lbuf, MAX_PROC_STR_LEN); @@ -1013,12 +1013,12 @@ void torkView::ORStatusUpdated(const TQString &ORID, const TQString &status) if (tmpstatus.contains("closed") || tmpstatus.contains("failed")){ delete ORline; - if (entryGuards[ORID]) + if (!entryGuards[ORID].isEmpty()) entryGuards.remove(ORID); return; } - if (entryGuards[ORID]){ + if (!entryGuards[ORID].isEmpty()){ guardStatusUpdated(ORID, status); return; } @@ -1333,10 +1333,10 @@ void torkView::serverStatusUpdated(const TQString &ip,const TQString &fp, #endif if (gi){ - country_id = GeoIP_id_by_name(gi, ip); + country_id = GeoIP_id_by_name(gi, ip.latin1()); cc = GeoIP_country_code[country_id]; GeoIP_delete(gi); - + if (!m_countryList.contains(country_id)) m_countryList << country_id; }else |