Summary:
`%D` did work only with main process - for every subprocess it just
displayed "-". With the patch "-" is displayed only in processes for
which CWD can't be read (e.g. root processes).
Test Plan:
* Use `%D` in tab title format
* Run `vim`
* (optionally) run `:cd /usr` in vim
**Actual result:** "-" is shown in the title instead of `%D`
**Expected result:** valid CWD is shown in the title instead of `%D`
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17865
Recent code changed how %u is handled (only when %u is required, poll
/proc filesystem). This correct an issue when %u is added/removed from
the Rename Tab dialog.
This changes the process info code to only update the information that
can change about a process when updating information about a process.
CCBUG: 325442
REVIEW: 128777
readUserName() reads /etc/passwd every few seconds. Change it to only
do this if we need to replace %u with the user name in the tab title.
A temporary helper as this doesn't really fix the underlining issue.
ProcessInfo really needs re-worked.
CCBUG: 325442
This reverts commit c0079755eb.
This comes as one part of reverting all the work related with the
refactoring of the ssh command parser. That big refactoring commit
5a5fd236 causes some hard to debug crashes/problems. For the long term
benefit, reverting now and early is a good choice. I will try to redo the
refactoring in a better way for KDE SC 4.11, but for the upcoming 4.10
stability more important.
Those two formatters have never been actually implemented or revealed to
users. It is quite hard to infer what they are supposed to do based upon
exising code and commit history
The old code updates the argument list when it is asked to refresh
process info, but it calls ProcessInfo::addArgument() without ever
clearing existing arguements first. This means the argument list will
grow longer and longer for ever. For a long-running shell session in
which user has executed thousands of commands, that will waste quite
amount of memory, not to metion the logic error itself.
The reaseon why this bug keeps hidden is that the %c and %C formatter
have never been revealed to users, which are not implemented yet.
* Re-organise CMakeLists.txt
Squashed commit of the following:
commit 7de6492753607603675729844520c89d914294eb
Author: Robert Knight <robertknight@gmail.com>
Date: Wed Jun 25 22:46:06 2008 +0100
Formatting. Clarify comments.
commit 5e419ee80316fc523d6809f0b5f7112aca565d19
Author: Robert Knight <robertknight@gmail.com>
Date: Wed Jun 25 22:35:23 2008 +0100
Fix compilation of ProcessInfo.cpp under Linux. Add missing members to dummy psinfo struct. Create instance of correct ProcessInfo sub-class depending on whether OS is Linux or Solaris.
commit 08d0ce320761bf2beedeb463a01bcb0a3e426439
Author: Robert Knight <robertknight@gmail.com>
Date: Wed Jun 25 22:34:11 2008 +0100
Re-organise the CMakeLists.txt to avoid duplicating the list of sources for the part and the application.
commit 7b84b5ebb7422f8e87dbc2e224ebc2405355e262
Author: Robert Knight <robertknight@gmail.com>
Date: Wed Jun 25 17:28:47 2008 +0100
Support for reading process information under Solaris. Patch from Adriaan de Groot.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=824517