forked from qt-creator/qt-creator
Core: Avoid a temporary MultiTextCursor
Change-Id: Ibe588ab34e754c9f2c6b483ab642c818b19edef7 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -449,8 +449,7 @@ void BaseTextFind::defineFindScope()
|
|||||||
for (const QTextCursor &c : multiCursor) {
|
for (const QTextCursor &c : multiCursor) {
|
||||||
if (c.hasSelection()) {
|
if (c.hasSelection()) {
|
||||||
if (foundSelection || c.block() != c.document()->findBlock(c.anchor())) {
|
if (foundSelection || c.block() != c.document()->findBlock(c.anchor())) {
|
||||||
const QList<QTextCursor> sortedCursors = Utils::sorted(multiCursor.cursors());
|
d->m_scope = Utils::MultiTextCursor(Utils::sorted(multiCursor.cursors()));
|
||||||
d->m_scope = Utils::MultiTextCursor(sortedCursors);
|
|
||||||
QTextCursor cursor = textCursor();
|
QTextCursor cursor = textCursor();
|
||||||
cursor.clearSelection();
|
cursor.clearSelection();
|
||||||
setTextCursor(cursor);
|
setTextCursor(cursor);
|
||||||
|
|||||||
Reference in New Issue
Block a user