Fixes https://github.com/lxqt/qterminal/issues/415
Because they are transient by definition (since Qt 5.5), the code should not spare an extra space for them (Konsole does not have this feature).
Apart from that, the code does not need to fill the area behind the scrollbar explicitly; it is enough to auto-fill it.
Naturally, no change will be seen with styles other than Kvantum.
Python binding was broke since commit b1f37a8.
This is a fix and to some degree a refactor.
The binding build is now integrated. Controlled by the CMake
QTERMWIDGET_BUILD_PYTHON_BINDING option.
CMake components taken from https://cgit.kde.org/pykde5.git/. No need to
reinvent the wheel.
Closes https://github.com/lxqt/qtermwidget/issues/135.
..in destructor if the process is still running.
This is a workaround and a proper solution should be made on higher
levels (QTerminal?) -> properly try to close the session and optionally
present information from shell about the state.
For example, \e[0;1m\e[90m should give bold gray texts. It gave black.
Quick notes:
0 => reset all attributes
1 => use bold. In popular implementations (VTE3 & konsole), it also
changes a normal color to an intense color
90 => color0, intense; usually gray
This is already fixed in konsole:
https://github.com/KDE/konsole/commit/771b4b22289d928f77d0a3bda9762b8137f2407c
I happen to use the same function name :)
* Prevent a possible C++11 range for detach
The solution with Qt>=5.7 is to use the qAsConst() macro.
But the qAsConst macro is just a const_cast to const T&.
* Don't call QByteArray::operator[]() on temporary
Just use the QByteArray::at().
* Adds missing reference in foreach
That's an non non trivial type (QString), using a reference as no drawbacks
and it performs better.
* Use QStringList::constFirst()
Drop QStringList::first(). It's faster and we might avoid detaching a
temporary.
* Don't call QList::operator[]() on temporary objects
It's not what we want. The at operator and QList::value() do the job in the
right way.
* Stops allocating an unneeded temporary container
We were allocating an temporary container (_entries.values(keyCode)) which
implies an extra iteration also.
Now we don't use any temporary container and only perform one iteration.