This fixes two performance issues and improves the performance of
TextMetrics::redoParagraph by 15% in a workload that uses the cache a
lot. The difference will be much less when the cache is not used much.
1/ repetion of the hash code computation
The code
if (cache.contains(key))
result = cache[key]:
is not efficient, since qHash(key) has to be computed twice.
To fix this a new Cache::object_str() method is added, which allows
if (auto * obj = cache.object(key))
result = *obj;
2/ code of has code computation
Instead of using a verbose string that is complicated to build as
key, new key structs BreakAtKey and TextLayoutKey are introduced,
along with the relevant qHash() implementation.
The main problem is that, while lilypond.exe exists, there is not lilypond-book.exe: the previous calls always failed, even though the file was there, just not called the right way.
The configuration variable is LYX_DEBUG_SANITIZE
which can have following values:
"NONE"
"ADDRESS" Use address sanitizer (previously used with the variable LYX_ASAN)
"UNSPECIFIED" Use unspecified sanitizer
IGNORE is a typical placeholder for tags that should not be output, along with NONE. At some point, we should check if both are required, or if NONE is enough…
Initially Qt5 modifier handling was broken. Therefore a workaround was introduced.
This workaround broke the LyX modifier handling with swap of Command-Control-key disabled.
The change disables the hack to get the correct behavior in LyX.
We now use a new variable, "wrap", to track if a wrap should be
done, which is true either if "auto_wrap" is true or if the user
chooses to wrap in the dialog.
This preserves the meaning of the "auto_wrap" variable and also
removes the confusion of why the previous code of
if (!auto_wrap) {
...
}
if (auto_wrap) {
did not use an "else" instead of the second "if".
No change in functionality.
Does not change much, but Coverity complains about it. Let's see if
this allows Inset's child classes to grow their own move constructor.
Also some whitespace.
This requires the introduction of the booleans selected_left and
selected_right in PainterInfo. These tell whether the selection
continues at the left/right of the inset.
This information allows to
1/ paint equation number in the right color: either current text color
or selection text color.
2/ before that, paint a small background rectangle of the correct color.
This allows to avoid painting a large rectangle of an arbitrary color
that was the cause of the bug.
Fixes bug #12319.
When the cursor cannot move on cursor up/down, at least the selection
should be cleared (when not selecting).
To detect this, the method Cursor::upDownInText has been modified to
return true when cursor is at top/bottom of inset, but there is some
room above/below.
Moreover, introduce the functions LFUN_FINISHED_UP/DOWN, which is
dispatched at upper cursor level as long as no local movement is
possible. This allows to handle differently the original char moving
action and its consequences.
Fixes part of bug #12310.
Example: when a selection is set, a `Left' cursor movement would not
reset selection when the cursor was at the beginning of buffer.
To fix this, it is necessary, when cursor is in top-level text, to
avoid the mechnanism (undispatched cursor) that sends the action to the
upper level (necessary when the cursor leaves an inset).
The change is mechanical and is done for : char-backward,
char-forward, char-left, char-right, word-left, word-right, word-left,
word-right. It might be possible to factor this code a bit, but there
is no evident solution.
char-up/down are *not* handled at this point.
Fixes part of bug #12310.
The "benefit" row gives the amount of days in-between when an issue
is found because of the ctests and when an issue is reported by
someone not using the ctests. In the example of the ps2pdf flag, the
issue was reported just a couple of weeks after we found it with the
ctests, indicating that the ctests were not that helpful in this
case.