Commit Graph

159 Commits

Author SHA1 Message Date
Martin T. H. Sandsmark
785fedbe53 fix deprecated qset warnings 2020-04-26 12:11:43 -04:00
Kurt Hindenburg
3e8401391a Add comments about QSet deprecated methods 2020-03-28 15:28:21 -04:00
Kurt Hindenburg
449fdd90c9 Revert "Replace deprecated QSet::toList and QSet::fromList()"
These are only in Qt5.14+; Konsole will be on Qt5.12 for LTS
for another year.

This reverts commit c07210056c.
2020-03-28 14:39:50 -04:00
João Eudes Lima
c07210056c Replace deprecated QSet::toList and QSet::fromList()
'fromList' is deprecated: Use QSet(list.begin(), list.end()) instead.
'toList' is deprecated: Use values() instead.
2020-03-28 14:20:46 -04:00
Kurt Hindenburg
ab0636de8a Q_UNUSED() does not need semi-colon at end 2020-03-28 14:06:25 -04:00
Mariusz Glebocki
52d2720007 Revert "GIT_SILENT: minor qstring optimization"
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.
2019-12-17 21:04:14 -05:00
Nicolas Fella
e6f3d0a14e Replace Q_DECL_OVERRIDE with override 2019-12-04 02:53:28 +00:00
Ahmad Samir
5f60bc5a6f Replace foreach (deprecated) with range-for
The code compiles and konsole seems to work as bofore.
2019-12-03 11:29:31 +02:00
Laurent Montel
f96deb39aa GIT_SILENT: minor qstring optimization 2019-09-07 13:33:09 +02:00
Kurt Hindenburg
2339f20cca config-konsole.h is not installed; krazy has been fixed 2019-08-28 08:48:07 -04:00
Laurent Montel
ef1beaab86 Remove unused includes 2019-08-23 08:09:17 +02:00
Kurt Hindenburg
d77e3449ee For MacOS portion, use nullptr instead of NULL 2019-02-23 14:30:00 -05:00
Mariusz Glebocki
137ee33078 Properly show "/" for %d tab title format
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
2018-12-30 18:01:47 -05:00
Mariusz Glebocki
79c31d359f Show valid subprocess CWD for %D tab title format
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
2018-12-30 17:59:14 -05:00
Kurt Hindenburg
ec5c05751c modernize deprecated header 2018-10-27 22:46:50 -04:00
Kurt Hindenburg
8f44c36aec modernize use auto 2018-10-27 22:05:38 -04:00
Kurt Hindenburg
bae9343903 Use nullptr for the null pointer constant 2018-10-27 18:55:18 -04:00
Kurt Hindenburg
7f4b89f792 Add braces around if statements 2018-10-06 15:36:37 -04:00
Yuri Chornoivan
6fb6ac4775 Fix minor EBN issues and typos 2018-10-06 12:20:23 +03:00
Caio Carvalho
90b96b695f Fix when the name of a process called with sudo is not shown
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
2018-05-12 14:44:23 -03:00
Kurt Hindenburg
bed548e85a sync declarations with definitions (have .h and .cpp variable names match) 2018-01-06 16:39:16 -05:00
Kurt Hindenburg
c696e06e33 Use Q_DECL_OVERRIDE for non-Linux systems 2017-07-22 12:50:18 -04:00
Kurt Hindenburg
2a2a56d73c modernize use nullptr 2017-07-15 23:28:32 -04:00
Kurt Hindenburg
4c5f7f6764 uncrustify using kf5 config 2017-06-28 10:09:34 -04:00
Pino Toscano
3d19a44661 libprocstat does not seem to be used on FreeBSD 2017-06-26 06:50:02 +02:00
Kurt Hindenburg
8e2a1e5a08 DragonflyBSD doesn't need/have libprocstat.h 2017-06-25 12:23:23 -04:00
Pino Toscano
690e1d2882 include <errno.h> where errno is used 2017-06-19 22:45:40 +02:00
Kurt Hindenburg
8f010c7cc5 fix *BSD code build with QT_NO_CAST_FROM_ASCII
Tested on FreeBSD 11 - guessing on OpenBSD and DragonflyBSD
2017-06-18 14:19:09 -04:00
R.J.V. Bertin
4cd725ffbe use the proper Mac platform token 2017-06-15 18:30:43 +02:00
R.J.V. Bertin
923231329b make Mac-specific code build with QT_NO_CAST_FROM_ASCII 2017-06-15 18:29:15 +02:00
Kurt Hindenburg
eade05a4bd Do not specify Qt modules in includes 2017-04-26 21:33:34 -04:00
Kurt Hindenburg
b92d563cd3 Since we ignore return value of readProcessInfo(), change to void 2017-04-22 00:44:15 -04:00
Kurt Hindenburg
a540e6fdd0 Fix readability-implicit-bool-cast issues using nullptr 2017-04-21 10:51:31 -04:00
Kurt Hindenburg
21cc5c1fed Use QLatin1* to handle casts from ascii 2017-04-16 14:26:39 -04:00
Kurt Hindenburg
accf076104 Use member initializer lists in constructors 2017-04-11 12:07:34 -04:00
Kurt Hindenburg
dfafff97d4 remove QDebug/qWarning and use QCDebug 2017-03-31 21:06:18 -04:00
Kurt Hindenburg
cf06fa08b3 rearrange code placment to keep related items together 2017-03-31 08:58:19 -04:00
Kurt Hindenburg
66044df34b fix a lot of issues of readability-implicit-bool-cast 2017-03-29 08:32:59 -04:00
Kurt Hindenburg
7c8815f5e0 simplify if()s for readability 2017-03-27 11:08:31 -04:00
Kurt Hindenburg
35d419e734 Add Q_DECL_OVERRIDE via clang-tidy 2017-03-26 00:01:57 -04:00
Kurt Hindenburg
49f6216e6a Add static_cast to show conversions 2017-02-18 15:18:07 -05:00
Kurt Hindenburg
edcb028d29 const & foreach loop 2016-09-04 17:27:12 -04:00
Martin T. H. Sandsmark
e7770aba9f Avoid polling processes if they report what we need with OCS7
This is apparently what the OCS7 stuff is supposed to solve, so let's
use it if we can.

REVIEW: 128784
BUG: 325442
2016-08-28 17:04:18 +02:00
Martin T. H. Sandsmark
392ee33cf8 Don't re-read process information that should be static
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
2016-08-27 22:41:18 +02:00
Martin T. H. Sandsmark
e07a62ede3 Remove unused environment reading code
REVIEW: 128674
CCBUG: 325442
2016-08-27 13:26:06 +02:00
Kurt Hindenburg
a805f856ff For remote ssh processes, add %U which gets replaced by user@ if present
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
2016-07-09 18:45:39 -04:00
Kurt Hindenburg
d424d1457d Try to catch ssh command arguments for tab titles
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
2016-07-09 18:30:53 -04:00
Kurt Hindenburg
2c93676978 Fix FreeBSD readArguments and implement its readEnvironment
* 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
2016-07-09 13:58:43 -04:00
Kurt Hindenburg
272c8f7fd8 Q_OS_MAC -> Q_OS_OSX
Q_OS_MAC includes OSX and iOS

Patch from rjvbertin gmail com
2016-07-07 15:53:57 -04:00
Kurt Hindenburg
527d2606be Port KDE_struct_stat to QT_STATBUF; KDE::stat to QT_STAT
Re-commit this patch from Feb 2015; I was told it caused Konsole to not
build on Mac OSX.  However, it builds now fine on my system.

For Q_OS_MAC only
2016-07-07 15:25:59 -04:00