diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
commit | 395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch) | |
tree | 9829cadb79d2cc7c29a940627fadb28b11e54150 /kicker-applets/ktimemon/sample.cc | |
parent | 399f47c376fdf4d19192732a701ea9578d11619d (diff) | |
download | tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip |
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker-applets/ktimemon/sample.cc')
-rw-r--r-- | kicker-applets/ktimemon/sample.cc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kicker-applets/ktimemon/sample.cc b/kicker-applets/ktimemon/sample.cc index 99ea20b..54d1edf 100644 --- a/kicker-applets/ktimemon/sample.cc +++ b/kicker-applets/ktimemon/sample.cc @@ -102,7 +102,7 @@ KSample::KSample(KTimeMon *t, bool a, unsigned p, unsigned s, unsigned c) : KMessageBox::error(timemon, i18n("Unable to open the file '%1'. The diagnostics are:\n%2.\n" "This file is required to determine current memory usage.\n" - "Maybe your proc filesystem is non-Linux standard?").arg(MEMINFO_NAME).arg(strerror(errno))); + "Maybe your proc filesystem is non-Linux standard?").tqarg(MEMINFO_NAME).tqarg(strerror(errno))); exit(1); } @@ -112,7 +112,7 @@ KSample::KSample(KTimeMon *t, bool a, unsigned p, unsigned s, unsigned c) : KMessageBox::error(timemon, i18n("Unable to open the file '%1'. The diagnostics are:\n%2.\n" "This file is required to determine current system info. " - "Maybe your proc filesystem is non-Linux standard?").arg(MEMINFO_NAME).arg(strerror(errno))); + "Maybe your proc filesystem is non-Linux standard?").tqarg(MEMINFO_NAME).tqarg(strerror(errno))); exit(1); } @@ -125,7 +125,7 @@ KSample::KSample(KTimeMon *t, bool a, unsigned p, unsigned s, unsigned c) : "The diagnostics are:\n%1.\n" "Are you really running Solaris? " "Please contact the maintainer at mueller@kde.org " - "who will try to figure out what went wrong.").arg(strerror(errno))); + "who will try to figure out what went wrong.").tqarg(strerror(errno))); exit(1); } #endif @@ -210,7 +210,7 @@ void KSample::readSample() if ((l = read(memFD, buffer, sizeof(buffer) - 1)) < 0) { fatal(i18n("Unable to read the memory usage file '%1'.\n" - "The diagnostics are: %2").arg(MEMINFO_NAME).arg(strerror(errno))); + "The diagnostics are: %2").tqarg(MEMINFO_NAME).tqarg(strerror(errno))); } buffer[l] = '\0'; l = 0; @@ -223,7 +223,7 @@ void KSample::readSample() "different file format than expected.\n" "Maybe your version of the proc filesystem is " "incompatible with supported versions. " - "Please contact the developer at http://bugs.kde.org/ who will try to sort this out.").arg(MEMINFO_NAME)); + "Please contact the developer at http://bugs.kde.org/ who will try to sort this out.").tqarg(MEMINFO_NAME)); l++; } @@ -237,7 +237,7 @@ void KSample::readSample() lseek(statFD, 0, 0); if ((l = read(statFD, buffer, sizeof(buffer)-1)) < 0) fatal(i18n("Unable to read the system usage file '%1'.\n" - "The diagnostics are: %2").arg(STAT_NAME).arg(strerror(errno))); + "The diagnostics are: %2").tqarg(STAT_NAME).tqarg(strerror(errno))); buffer[l] = '\0'; @@ -271,7 +271,7 @@ void KSample::readSample() struct tbl_sysinfo sysinfo; if (table(TBL_SYSINFO, 0, &sysinfo, 1, sizeof(sysinfo)) != 1) - fatal(msg.arg("TBL_SYSINFO")); + fatal(msg.tqarg("TBL_SYSINFO")); sample.user = sysinfo.si_user; sample.nice = sysinfo.si_nice; @@ -281,7 +281,7 @@ void KSample::readSample() struct tbl_vmstats vmstats; if (table(TBL_VMSTATS, 0, &vmstats, 1, sizeof(vmstats)) != 1) - fatal(msg.arg("TBL_VMSTATS")); + fatal(msg.tqarg("TBL_VMSTATS")); sample.mtotal = vmstats.free_count + vmstats.active_count + vmstats.inactive_count + vmstats.wire_count; @@ -291,7 +291,7 @@ void KSample::readSample() struct tbl_swapinfo swapinfo; if (table(TBL_SWAPINFO, -1, &swapinfo, 1, sizeof(swapinfo)) != 1) - fatal(msg.arg("TBL_SWAPINFO")); + fatal(msg.tqarg("TBL_SWAPINFO")); sample.stotal = swapinfo.size; sample.sfree = swapinfo.free; @@ -324,7 +324,7 @@ void KSample::readSample() kstat_read(kc, ksp, &cstat) == -1) // and read into buffer fatal(i18n("Unable to read the CPU statistics entry " "from the 'kstat' library. The diagnostics are '%1'.\n" - "Please contact the maintainer via http://bugs.kde.org/ who will try to sort this out.").arg(strerror(errno))); + "Please contact the maintainer via http://bugs.kde.org/ who will try to sort this out.").tqarg(strerror(errno))); // fields are: idle user kernel iowait (no nice info?) sample.user += cstat.cpu_sysinfo.cpu[1] / sample.cpus; @@ -338,7 +338,7 @@ void KSample::readSample() fatal(i18n("The number of CPUs appears to have changed at " "very short notice, or the 'kstat' library returns " "inconsistent results (%1 vs. %2 CPUs).\n" - "Please contact the maintainer via http://bugs.kde.org/ who will try to sort this out.").arg(sample.cpus).arg(cpus)); + "Please contact the maintainer via http://bugs.kde.org/ who will try to sort this out.").tqarg(sample.cpus).tqarg(cpus)); // availrmem = pages of core for user-proc ( == physmem - kernelmem) // freemem = no of free pages @@ -350,7 +350,7 @@ void KSample::readSample() fatal(i18n("Unable to read the memory statistics entry " "from the 'kstat' library. The diagnostics are '%1'\n" "You might want to contact the maintainer at " - "http://bugs.kde.org/ who will try to sort this out.").arg(strerror(errno))); + "http://bugs.kde.org/ who will try to sort this out.").tqarg(strerror(errno))); int i; unsigned long physmem = 0, freemem = 0, availrmem = 0; @@ -367,7 +367,7 @@ void KSample::readSample() fatal(i18n("There seems to be a problem with KTimeMon's handling " "of the 'kstat' library: 0 bytes of physical memory determined!\n" "Free memory is %1, available memory is %2.\n" - "Please contact the maintainer at mueller@kde.org who will try to sort this out.").arg(freemem).arg(availrmem)); + "Please contact the maintainer at mueller@kde.org who will try to sort this out.").tqarg(freemem).tqarg(availrmem)); sample.mtotal = physmem; sample.free = freemem; @@ -378,7 +378,7 @@ void KSample::readSample() if ((swapentries = swapctl(SC_GETNSWP, 0)) == -1) fatal(i18n("Unable to determine the number of " "swap spaces. The diagnostics are '%1'.\n" - "Please contact the maintainer at http://bugs.kde.org/ who will try to sort this out.").arg(strerror(errno))); + "Please contact the maintainer at http://bugs.kde.org/ who will try to sort this out.").tqarg(strerror(errno))); if (swapentries != 0) { // 2* to get some space for padding?? @@ -389,8 +389,8 @@ void KSample::readSample() "trying to determine the swap usage.\n" "Attempted to allocate %1 bytes of memory (2 * %2 + %3 * %4).\n" "Please contact the maintainer at http://bugs.kde.org/ who will try to sort this out.") - .arg(2 * sizeof(int) + swapentries * sizeof(struct swapent)) - .arg(sizeof(int)).arg(swapentries).arg(sizeof(struct swapent))); + .tqarg(2 * sizeof(int) + swapentries * sizeof(struct swapent)) + .tqarg(sizeof(int)).tqarg(swapentries).tqarg(sizeof(struct swapent))); char path[1024]; stbl->swt_n = swapentries; @@ -399,7 +399,7 @@ void KSample::readSample() if ((swapentries = swapctl(SC_LIST, stbl)) == -1) fatal(i18n("Unable to determine the swap usage.\n" "The diagnostics are '%1'.\n" - "Please contact the maintainer at http://bugs.kde.org/ who will try to sort this out.").arg(strerror(errno))); + "Please contact the maintainer at http://bugs.kde.org/ who will try to sort this out.").tqarg(strerror(errno))); if (!warned && swapentries != stbl->swt_n) { @@ -407,7 +407,7 @@ void KSample::readSample() nonfatal(i18n("Information was requested for " "%1 swap spaces, but only %2 swap entries were returned.\n" "KTimeMon will attempt to continue.\n" - "Please contact the maintainer at http://bugs.kde.org/ who will try to sort this out.").arg(stbl->swt_n).arg(swapentries)); + "Please contact the maintainer at http://bugs.kde.org/ who will try to sort this out.").tqarg(stbl->swt_n).tqarg(swapentries)); } for (i = 0; i < swapentries; i++) { |