This reverts commit f96deb39aa.
This was anti-optimization.
QStringLiteral is a QString created at build time. Initialization of
QString with it has no overhead.
QLatin1String is 8 bit C string wrapper which needs run-time conversion
to 16 bit encoding used in QString.
Summary: `/` path was shown as empty string for %d format.
Test Plan:
* Use `%d` in tab title format
* Run `cd /`
**Actual result:** `%d` replaced with ``
**Expected result:** `%d` replaced with `/`
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17866
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
Summary:
Any process that is called in foreground with sudo (ex: sudo qtcreator) is identified by ProcessInfo::name only with the word sudo, being unable to identify which process it is. This fix makes it shows sudo along with the name of the process called.
Reviewers: #konsole, hindenburg
Reviewed by: #konsole, hindenburg
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D12754
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
Add a new string replacement %U for remote tabs, which evaluates
to _user@ if user is non-empty, and the empty string otherwise.
Patch by Tobias Berner tcberner gmail com
Part of REVIEW 127525
When using 'ssh server command args', try to gather the command args
for use in the tab titles. This doesn't work 100% and suggest using
quotes around the ssh command.
Patch by Tobias Berner tcberner gmail com
Part of REVIEW 127525
* FreeBSD's readArguments() implementation was broken:
It read the wrong sysctl.
Also the string processing did not work as expected.
* FreeBSD's readEnvironment() was not implemented.
This provides an implementation using libprocstat's
procstat_getenvv
Tested on my system w/ FreeBSD 11.0-CURRENT
Patch by Tobias Berner tcberner gmail com
Part of REVIEW 127525