qt5base-lts/src
Giuseppe D'Angelo 78a8e561b2 QRegularExpression: do not mark as dirty on no-op setters
Quite some code in Qt takes a copy of a QRegularExpression and then
changes something on it (e.g. the case sensitivity) based on some
other criteria:

  QRegularExpression copy = orig;
  if (cond)
    copy.setPatternOptions(copy.patternOptions() | CaseInsensitive);
  use(copy);

This pattern can be found in QAIM, QString-related classes, and so on.
The "problem" is that if the attempted modification is a no-op, we'd
still invalidate the copy object (by detaching). Even if no detaches
are involved, setting the same pattern or options on a QRE object
shouldn't require a relatively expensive pattern recompile.

In summary: don't detach/mark a QRE object as dirty if a setter didn't
actually do a modification.

Change-Id: Iae0ab4a5e443e7285a83d3d7e0f1dcfd66e8d51d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-11-16 10:21:09 +01:00
..
3rdparty 3rdparty: Add touchpad gestures support to bundled xinput xcb module 2021-11-13 17:58:45 +03:00
android Android: Treat ACTION_CANCEL as TouchCancelEvent 2021-10-29 08:39:55 +02:00
concurrent Doc: Enable qdoc warning count limit 2021-10-21 19:10:52 +02:00
corelib QRegularExpression: do not mark as dirty on no-op setters 2021-11-16 10:21:09 +01:00
dbus Doc: Fix qdoc warnings 2021-11-11 11:34:49 +01:00
entrypoint Fix EntryPointMinGW32Target.cmake to be found in top-level build 2021-11-05 14:52:26 +01:00
gui Fix return type documentation of QFileSystemModel::fileName() 2021-11-15 13:46:46 +00:00
network Doc: Fix qdoc warnings 2021-11-11 11:34:49 +01:00
opengl Doc: Enable qdoc warning count limit 2021-10-21 19:10:52 +02:00
openglwidgets Migrate to autogenerated cpp exports 2021-06-25 19:33:12 +02:00
platformsupport evdevtouch: Fix loading screen name for output mapping 2021-10-12 12:52:01 +02:00
plugins Build PostgreSQL driver as universal binary on macOS 2021-11-15 19:02:07 +01:00
printsupport Doc: Enable qdoc warning count limit 2021-10-21 19:10:52 +02:00
sql Doc: Enable qdoc warning count limit 2021-10-21 19:10:52 +02:00
testlib QTestLog: Properly own the loggers 2021-11-09 21:36:50 +01:00
tools Disable some tools and plugins if regularexpression feature is disabled 2021-11-12 09:57:44 +01:00
widgets Make sure we paint overlapped children and siblings when moving far 2021-11-15 18:25:50 +01:00
xml QDomDocument::setContent: Open device if necessary 2021-11-09 18:33:39 +01:00
CMakeLists.txt Make it possible to disable the PrintSupport module 2021-02-09 09:17:21 +01:00