[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib
From: John Tapsell <john.tapsell () kdemail ! net>
Date: 2006-12-31 18:52:41
Message-ID: 1167591161.597019.1072.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 618261 by johnflux:
Fix showing the process pid
M +4 -3 Process.h
M +0 -2 ProcessFilter.cc
M +3 -3 ProcessModel.cc
--- trunk/KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib/Process.h \
#618260:618261 @@ -33,11 +33,12 @@
public:
typedef enum { Daemon, Kernel, Init, Kdeapp, Shell, Tools, Wordprocessing, Term, \
Other, Invalid } ProcessType; Process() { clear();}
- Process(long long _pid, long long _ppid, Process *_parent) {clear(); pid = _pid; \
parent_pid = _ppid; parent = _parent; } + Process(long long _pid, long long _ppid, \
Process *_parent) {clear(); pid = _pid; parent_pid = tree_ppid = _ppid; parent = \
_parent; } bool isValid() {return processType != Process::Invalid;}
long long pid; ///The systems ID for this process
- long long parent_pid; ///The systems ID for the parent of this process. 0 for \
init. + long long parent_pid; ///The system ID for the parent of this process. 0 \
for init. + long long tree_ppid; ///The internal pid for the parent of this process \
- this is set to 0 when in simple mode, otherwise equals parent_pid
/** A guaranteed NON-NULL pointer to the parent process except for the fake process \
with pid 0.
* The Parent's pid is the same value as the parent_pid. The parent process will \
be also pointed @@ -70,7 +71,7 @@
long long xResMemOtherBytes; ///The amount of memory in bytes used in X server \
other than pixmaps bool isStoppedOrZombie; ///An optomisation value, true iff \
process->status == "stopped" || process->status == "zombie" private:
- void clear() {pid = 0; parent_pid = 0; uid = 0; gid = -1; tracerpid = 0; userTime = \
-1; sysTime = -1; userUsage=0; sysUsage=0; totalUserUsage=0; totalSysUsage=0; \
numChildren=0; nice=0; vmSize=0; vmRSS = 0; processType=Invalid; xResPxmMemBytes=0; \
xResNumPxm=0; xResMemOtherBytes=0; isStoppedOrZombie=false;} + void clear() {pid = 0; \
tree_ppid = 0; parent_pid = 0; uid = 0; gid = -1; tracerpid = 0; userTime = -1; \
sysTime = -1; userUsage=0; sysUsage=0; totalUserUsage=0; totalSysUsage=0; \
numChildren=0; nice=0; vmSize=0; vmRSS = 0; processType=Invalid; xResPxmMemBytes=0; \
xResNumPxm=0; xResMemOtherBytes=0; isStoppedOrZombie=false;} };
#endif
--- trunk/KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib/ProcessFilter.cc \
#618260:618261 @@ -115,7 +115,5 @@
}
void ProcessFilter::resort() {
filterChanged();//Tell the proxy view to refresh all its information
- kDebug() << "RESORT" << endl;
-
}
#include "ProcessFilter.moc"
--- trunk/KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib/ProcessModel.cc \
#618260:618261 @@ -308,7 +308,7 @@
//If we are init, then our ppid is 0, so leave our row as 0. If we are not, then \
we need to find our parent process //and find which child item we are in that
- if(process->parent_pid == 0) {
+ if(process->tree_ppid == 0) {
if(mCPUHeading != -1 && mShowChildTotals && !mSimple) {
QModelIndex index = createIndex(0, mCPUHeading, process);
emit dataChanged(index, index);
@@ -339,7 +339,7 @@
long long new_ppid = newPidToPpidMapping[pid];
//This is called from insertOrChangeRows and after the parent is checked, so we \
know the (new) parent won't change under us
- if(new_ppid != mPidToProcess[pid]->parent_pid) {
+ if(new_ppid != mPidToProcess[pid]->tree_ppid) {
//Process has reparented. Delete and reinsert
//again, we know that the new parent won't change under us
removeRow(pid);
@@ -474,7 +474,7 @@
}
} break;
case DataColumnPid: break; //Already dealt with
- case DataColumnPPid: break; //Already dealt with
+ case DataColumnPPid: if(process->parent_pid==0) {process->parent_pid = \
newDataRow[i].toLongLong();} break; //update the parent_pid if we are in simple \
mode, in which case the parent_pid is currently set to 0 case DataColumnOtherLong: \
value = newDataRow[i].toLongLong(); break; case DataColumnOtherPrettyLong: value = \
KGlobal::locale()->formatNumber( newDataRow[i].toDouble(),0 ); break; case \
DataColumnOtherPrettyFloat: value = KGlobal::locale()->formatNumber( \
newDataRow[i].toDouble() ); break;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic