Files
qt-creator/src/plugins/texteditor/snippets/snippetscollection.h
Eike Ziller 8d08196a21 Fix crash when removing built-in snippets
Snippets collection managed the snippets with persistent iterators to
the "end" of the active snippets. Qt 5's QList was nicely updating
iterators even on non-const operations, but that has changed in Qt 6.

Don't use iterators, simply work with the count of active items.

Fixes: QTCREATORBUG-26648
Task-number: QTCREATORBUG-24098
Change-Id: Icc13274daf0e87d0562d80d7bc763c863d5da075
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-06 10:30:47 +00:00

4.3 KiB