stat-ing multiple times is much more optimal than exec-ing multiple times,
bonus points for using QStandardPaths::findExecutable() to look for the
program (which should check for it in ~/.local/bin too)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
apparently X11 sends key events with same serial even seconds after (if the
key is the same), also now only key presses will be considered
auto-repeated because X11 sends (fake/simulated) key release events
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
fun fact: it is very easy to break auto-repeat code by reparenting QWidget
from a QPushButton event (KMediaWidget does it)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
I remember ubrk_following() and ubrk_preceding() causing a crash if the
position is not within the text bounds so leaving the -1 checks just in
case
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
fun fact: anything that is checking for BOMs is either not passing them
to QTextCodec/QTextConverter (e.g. Kate) when converting or was just using
QTextCodec::IgnoreHeader flag (QXmlStreamWriter used to)
okular xps generator now works btw (xml files in .xps files seem to be
UTF-16 encoded with BOM)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
since QEasingCurve instances are no longer shared and no detaching is done
the check that was optimization to avoid detaching is no longer worth it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
ICU finally does not generate BOMs (since idk when), I guess someone took
note. chopping BOMs from the result may have to be done only if the input
data had BOM (for compat) but let's see if that is even needed
Kate encoding tests pass now btw
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
most of them are unused since QTextStream is used mostly for streaming to
QFile, besides that the streaming of void pointer could result in streaming
in std::endl function pointer address or some other non-sense
I will not gut-out QTextStream yet (not in this release cycle) because I
know for a fact such change will break things that use the declarative
component (such as plasma and its applets due to nan/inf compat code in
QTextStream)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
what a surprise it is to learn that both function replace characters only
in some cases (when context is NULL or some internally set context)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
doing qreal (either float or double) math on demand is much more optimal,
also reducing the switches to one is a bonus
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
by starting the elapsed timer just before the fade timer the opacity
transition will be smoother at the start of the effect
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>