Changeset View
Changeset View
Standalone View
Standalone View
processui/ProcessModel.cpp
Show First 20 Lines • Show All 753 Lines • ▼ Show 20 Line(s) | 751 | if(process->changes() & (KSysGuard::Process::Usage | KSysGuard::Process::Status) || (process->changes() & KSysGuard::Process::TotalUsage && mShowChildTotals)) { | |||
---|---|---|---|---|---|
754 | emit q->dataChanged(index, index); | 754 | emit q->dataChanged(index, index); | ||
755 | index = q->createIndex(row, ProcessModel::HeadingCPUTime, process); | 755 | index = q->createIndex(row, ProcessModel::HeadingCPUTime, process); | ||
756 | emit q->dataChanged(index, index); | 756 | emit q->dataChanged(index, index); | ||
757 | //Because of our sorting, changing usage needs to also invalidate the User column | 757 | //Because of our sorting, changing usage needs to also invalidate the User column | ||
758 | index = q->createIndex(row, ProcessModel::HeadingUser, process); | 758 | index = q->createIndex(row, ProcessModel::HeadingUser, process); | ||
759 | emit q->dataChanged(index, index); | 759 | emit q->dataChanged(index, index); | ||
760 | } | 760 | } | ||
761 | if(process->changes() & KSysGuard::Process::Status) { | 761 | if(process->changes() & KSysGuard::Process::Status) { | ||
762 | totalUpdated++; | 762 | totalUpdated+=2; | ||
763 | QModelIndex index = q->createIndex(row, ProcessModel::HeadingNoNewPrivileges, process); | 763 | QModelIndex index = q->createIndex(row, ProcessModel::HeadingNoNewPrivileges, process); | ||
764 | emit q->dataChanged(index, index); | 764 | emit q->dataChanged(index, index); | ||
765 | index = q->createIndex(row, ProcessModel::HeadingCGroup, process); | ||||
766 | emit q->dataChanged(index, index); | ||||
765 | } | 767 | } | ||
766 | if(process->changes() & KSysGuard::Process::NiceLevels) { | 768 | if(process->changes() & KSysGuard::Process::NiceLevels) { | ||
767 | totalUpdated++; | 769 | totalUpdated++; | ||
768 | QModelIndex index = q->createIndex(row, ProcessModel::HeadingNiceness, process); | 770 | QModelIndex index = q->createIndex(row, ProcessModel::HeadingNiceness, process); | ||
769 | emit q->dataChanged(index, index); | 771 | emit q->dataChanged(index, index); | ||
770 | } | 772 | } | ||
771 | if(process->changes() & KSysGuard::Process::VmSize) { | 773 | if(process->changes() & KSysGuard::Process::VmSize) { | ||
772 | totalUpdated++; | 774 | totalUpdated++; | ||
▲ Show 20 Lines • Show All 251 Lines • ▼ Show 20 Line(s) | 991 | switch(section) { | |||
1024 | case HeadingXTitle: | 1026 | case HeadingXTitle: | ||
1025 | return i18n("<qt>The title of any windows that this process is showing.</qt>"); | 1027 | return i18n("<qt>The title of any windows that this process is showing.</qt>"); | ||
1026 | case HeadingPid: | 1028 | case HeadingPid: | ||
1027 | return i18n("The unique Process ID that identifies this process."); | 1029 | return i18n("The unique Process ID that identifies this process."); | ||
1028 | case HeadingIoRead: | 1030 | case HeadingIoRead: | ||
1029 | return i18n("The number of bytes read. See What's This for more information."); | 1031 | return i18n("The number of bytes read. See What's This for more information."); | ||
1030 | case HeadingIoWrite: | 1032 | case HeadingIoWrite: | ||
1031 | return i18n("The number of bytes written. See What's This for more information."); | 1033 | return i18n("The number of bytes written. See What's This for more information."); | ||
1034 | case HeadingCGroup: | ||||
1035 | return i18n("<qt>The control group (cgroup) where this process belongs.</qt>"); | ||||
davidedmundson: > The control group (cgroup) where this process was belongs.
That doesn't scan right.
s/was… | |||||
1032 | default: | 1036 | default: | ||
1033 | return QVariant(); | 1037 | return QVariant(); | ||
1034 | } | 1038 | } | ||
1035 | } | 1039 | } | ||
1036 | case Qt::WhatsThisRole: | 1040 | case Qt::WhatsThisRole: | ||
1037 | { | 1041 | { | ||
1038 | switch(section) { | 1042 | switch(section) { | ||
1039 | case HeadingName: | 1043 | case HeadingName: | ||
Show All 38 Lines | 1079 | return i18n("<qt>This column shows the IO statistics for each process. The tooltip provides the following information:<br>" | |||
1078 | "<tr><td>Characters Written</td><td>The number of bytes which this task has caused, or shall cause to be written to disk. Similar caveats apply here as with Characters Read.</td></tr>" | 1082 | "<tr><td>Characters Written</td><td>The number of bytes which this task has caused, or shall cause to be written to disk. Similar caveats apply here as with Characters Read.</td></tr>" | ||
1079 | "<tr><td>Read Syscalls</td><td>The number of read I/O operations, i.e. syscalls like read() and pread().</td></tr>" | 1083 | "<tr><td>Read Syscalls</td><td>The number of read I/O operations, i.e. syscalls like read() and pread().</td></tr>" | ||
1080 | "<tr><td>Write Syscalls</td><td>The number of write I/O operations, i.e. syscalls like write() and pwrite().</td></tr>" | 1084 | "<tr><td>Write Syscalls</td><td>The number of write I/O operations, i.e. syscalls like write() and pwrite().</td></tr>" | ||
1081 | "<tr><td>Actual Bytes Read</td><td>The number of bytes which this process really did cause to be fetched from the storage layer. Done at the submit_bio() level, so it is accurate for block-backed filesystems. This may not give sensible values for NFS and CIFS filesystems.</td></tr>" | 1085 | "<tr><td>Actual Bytes Read</td><td>The number of bytes which this process really did cause to be fetched from the storage layer. Done at the submit_bio() level, so it is accurate for block-backed filesystems. This may not give sensible values for NFS and CIFS filesystems.</td></tr>" | ||
1082 | "<tr><td>Actual Bytes Written</td><td>Attempt to count the number of bytes which this process caused to be sent to the storage layer. This is done at page-dirtying time.</td>" | 1086 | "<tr><td>Actual Bytes Written</td><td>Attempt to count the number of bytes which this process caused to be sent to the storage layer. This is done at page-dirtying time.</td>" | ||
1083 | "</table><p>" | 1087 | "</table><p>" | ||
1084 | "The number in brackets shows the rate at which each value is changing, determined from taking the difference between the previous value and the new value, and dividing by the update interval.<p>" | 1088 | "The number in brackets shows the rate at which each value is changing, determined from taking the difference between the previous value and the new value, and dividing by the update interval.<p>" | ||
1085 | "<i>Technical information: </i>This data is collected from /proc/*/io and is documented further in Documentation/accounting and Documentation/filesystems/proc.txt in the kernel source."); | 1089 | "<i>Technical information: </i>This data is collected from /proc/*/io and is documented further in Documentation/accounting and Documentation/filesystems/proc.txt in the kernel source."); | ||
1090 | case HeadingCGroup: | ||||
1091 | return i18n("<qt><i>Technical information: </i>This shows Linux Control Group (cgroup) membership, retrieved from /proc/[pid]/cgroup. Control groups are used by Systemd and containers for limiting process group's usage of resources and to monitor them."); | ||||
1086 | default: | 1092 | default: | ||
1087 | return QVariant(); | 1093 | return QVariant(); | ||
1088 | } | 1094 | } | ||
1089 | } | 1095 | } | ||
1090 | case Qt::DisplayRole: | 1096 | case Qt::DisplayRole: | ||
1091 | return d->mHeadings[section]; | 1097 | return d->mHeadings[section]; | ||
1092 | default: | 1098 | default: | ||
1093 | return QVariant(); | 1099 | return QVariant(); | ||
▲ Show 20 Lines • Show All 306 Lines • ▼ Show 20 Line(s) | 1403 | { | |||
1400 | 1406 | | |||
1401 | WindowInfo *w = d->mPidToWindowInfo.value(process->pid(), NULL); | 1407 | WindowInfo *w = d->mPidToWindowInfo.value(process->pid(), NULL); | ||
1402 | if(!w) | 1408 | if(!w) | ||
1403 | return QVariant(QVariant::String); | 1409 | return QVariant(QVariant::String); | ||
1404 | else | 1410 | else | ||
1405 | return w->name; | 1411 | return w->name; | ||
1406 | } | 1412 | } | ||
1407 | #endif | 1413 | #endif | ||
1414 | case HeadingCGroup: | ||||
1415 | return process->cGroup(); | ||||
1408 | default: | 1416 | default: | ||
1409 | return QVariant(); | 1417 | return QVariant(); | ||
1410 | } | 1418 | } | ||
1411 | break; | 1419 | break; | ||
1412 | } | 1420 | } | ||
1413 | case Qt::ToolTipRole: { | 1421 | case Qt::ToolTipRole: { | ||
1414 | if(!d->mShowingTooltips) | 1422 | if(!d->mShowingTooltips) | ||
1415 | return QVariant(); | 1423 | return QVariant(); | ||
▲ Show 20 Lines • Show All 363 Lines • ▼ Show 20 Line(s) | 1786 | #if HAVE_X11 | |||
1779 | case HeadingXTitle: | 1787 | case HeadingXTitle: | ||
1780 | { | 1788 | { | ||
1781 | WindowInfo *w = d->mPidToWindowInfo.value(process->pid(), NULL); | 1789 | WindowInfo *w = d->mPidToWindowInfo.value(process->pid(), NULL); | ||
1782 | if(!w) | 1790 | if(!w) | ||
1783 | return QString(); | 1791 | return QString(); | ||
1784 | return w->name; | 1792 | return w->name; | ||
1785 | } | 1793 | } | ||
1786 | #endif | 1794 | #endif | ||
1795 | case HeadingCGroup: | ||||
1796 | return process->cGroup(); | ||||
1787 | default: | 1797 | default: | ||
1788 | return QVariant(); | 1798 | return QVariant(); | ||
1789 | } | 1799 | } | ||
1790 | break; | 1800 | break; | ||
1791 | } | 1801 | } | ||
1792 | #if HAVE_X11 | 1802 | #if HAVE_X11 | ||
1793 | case WindowIdRole: { | 1803 | case WindowIdRole: { | ||
1794 | KSysGuard::Process *process = reinterpret_cast< KSysGuard::Process * > (index.internalPointer()); | 1804 | KSysGuard::Process *process = reinterpret_cast< KSysGuard::Process * > (index.internalPointer()); | ||
▲ Show 20 Lines • Show All 167 Lines • ▼ Show 20 Line(s) | 1955 | void ProcessModel::setupHeader() { | |||
1962 | headings << i18nc("process heading", "NNP"); | 1972 | headings << i18nc("process heading", "NNP"); | ||
1963 | headings << i18nc("process heading", "Command"); | 1973 | headings << i18nc("process heading", "Command"); | ||
1964 | #if HAVE_X11 | 1974 | #if HAVE_X11 | ||
1965 | if (d->mIsX11) { | 1975 | if (d->mIsX11) { | ||
1966 | headings << i18nc("process heading", "X11 Memory"); | 1976 | headings << i18nc("process heading", "X11 Memory"); | ||
1967 | headings << i18nc("process heading", "Window Title"); | 1977 | headings << i18nc("process heading", "Window Title"); | ||
1968 | } | 1978 | } | ||
1969 | #endif | 1979 | #endif | ||
1980 | headings << i18nc("process heading", "CGroup"); | ||||
1970 | 1981 | | |||
1971 | if(d->mHeadings.isEmpty()) { // If it's empty, this is the first time this has been called, so insert the headings | 1982 | if(d->mHeadings.isEmpty()) { // If it's empty, this is the first time this has been called, so insert the headings | ||
1972 | beginInsertColumns(QModelIndex(), 0, headings.count()-1); | 1983 | beginInsertColumns(QModelIndex(), 0, headings.count()-1); | ||
1973 | { | 1984 | { | ||
1974 | d->mHeadings = headings; | 1985 | d->mHeadings = headings; | ||
1975 | } | 1986 | } | ||
1976 | endInsertColumns(); | 1987 | endInsertColumns(); | ||
1977 | } else { | 1988 | } else { | ||
▲ Show 20 Lines • Show All 268 Lines • Show Last 20 Lines |
That doesn't scan right.
s/was // ?