In Qt6 the Svg includes are split into two different subdirs,
namely QtSvg and QtSvgWidgets. So, after 0862042b, it is necessary
to also account for the last one. Nothing needs to be done for Qt5.
Clang 12 (at least) misses the fact that tag is always initialized,
because the if/else sequence does cover all cases.
Initialize the variable although it is not required. It does not hurt
at least.
The code is written in such a way that the elements are searched
several times. This can be expensive when there are a lots of insets
in the document.
Concerning the sanity checks, they are now conditionned on the
presence of assertion.
Related to bug #12297.
(shamelessly stolen from c26db650a1, which was for cmake build)
The original test was always successfull, even if the flag was invalid.
But checking for '-Wdeprecated-copy' instead yields to error if the
warning does not exist. Existent warning for 'deprecated-copy' implies
that 'no-deprecated-copy' also exist.
The original test was always successfull, even if the flag was invalid.
But checking for '-Wdeprecated-copy' instead yields to error if the warning does not exist.
Existent warning for 'deprecated-copy' implies that 'no-deprecated-copy' also exist.
Add parameter 'force' to scrollToCursor(...) to avoid the case where the
cursor is not set to top because it is already visible on screen.
Change screen offset in this method so that the paragraph is really at
the top of the screen. This part may cause unforeseen issues and needs care.
gotoInset: use the new force flag and do not trigger a redraw.
Instead, return a boolean telling whether redraw is needed.
In the code that use it, set an update flag instead of the extra redraw.
In the handling of paragraph-goto, also set the update flag instead of
triggering a repaint.
Remove Bufferview::scrollToCursor(), which was equivalent to showCursor().
Fixes bug #10425.
Lyx crashes on export to pdf if used with sanitizer set to 'unspecified'.
Crash found by Scott.
Given that if we export without GUI, there is some weirdness here though.
1.) Why does lyx not crash if not using '-fsanitize' compile-option
2.) Why is export to pdf dependent on the screen-resolution
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.