Using Qt logging utilities instead of printf so that those warnings
can be enabled/disabled. Those warnings are disabled by default. To
enable them, use QT_LOGGING_RULES="qtermwidget.debug=true".
Also improve the formatting. An example warning:
Undecodable sequence: "\u001B[22;0;0t"
Closes https://github.com/lxqt/qterminal/issues/640
It was hard-coded in TerminalDisplay.cpp - Shift+Up always results in
ScrollLineUpCommand regardless of settings in *.keytab. Now those
commands are correctly parsed by KeyboardTranslator.
Fixeslxde/qterminal#348
This fix is similar to KDE/konsole@b88dfb402a
while I use signals and slots instead of introducing new pointers. That
sounds more reliable :)
With this patch, non-color sequences using colons are also accepted. I
consider such sequences undefined behavior, though.
Closes https://github.com/lxqt/qterminal/issues/78
* Disables automatic conversions from 8-bit strings (char *) to unicode
QStrings.
* Disables automatic conversion from QString to 8-bit strings (char *).
* Disables automatic conversions from QByteArray to const char * or const
void *.
* Disables automatic conversions from QString (or char *) to QUrl.
* Use QStringBuilder for more efficient string creation.
It make us aware of string and encoding conversions.
* 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.