Merge remote-tracking branch 'origin/11.0'

Change-Id: I87b22a73427cf9fc1b96075dc0db769ed3d3621c
This commit is contained in:
Eike Ziller
2023-06-09 11:24:29 +02:00
269 changed files with 2821 additions and 1503 deletions

View File

@@ -1426,7 +1426,7 @@ void TextEditorWidgetPrivate::print(QPrinter *printer)
return;
doc = doc->clone(doc);
const auto cleanup = qScopeGuard([doc] { delete doc; });
const QScopeGuard cleanup([doc] { delete doc; });
QTextOption opt = doc->defaultTextOption();
opt.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
@@ -2546,7 +2546,7 @@ void TextEditorWidget::keyPressEvent(QKeyEvent *e)
{
ICore::restartTrimmer();
auto clearBlockSelectionGuard = qScopeGuard([&]() { d->clearBlockSelection(); });
QScopeGuard cleanup([&] { d->clearBlockSelection(); });
if (!isModifier(e) && mouseHidingEnabled())
viewport()->setCursor(Qt::BlankCursor);
@@ -2825,7 +2825,7 @@ void TextEditorWidget::keyPressEvent(QKeyEvent *e)
}
if (blockSelectionOperation != QTextCursor::NoMove) {
clearBlockSelectionGuard.dismiss();
cleanup.dismiss();
d->handleMoveBlockSelection(blockSelectionOperation);
} else if (!d->cursorMoveKeyEvent(e)) {
QTextCursor cursor = textCursor();
@@ -5275,7 +5275,7 @@ void TextEditorWidgetPrivate::paintTextMarks(QPainter &painter, const ExtraAreaP
int yoffset = blockBoundingRect.top();
painter.save();
const auto cleanup = qScopeGuard([&painter, size, yoffset, xoffset, overrideIcon] {
const QScopeGuard cleanup([&painter, size, yoffset, xoffset, overrideIcon] {
if (!overrideIcon.isNull()) {
const QRect r(xoffset, yoffset, size, size);
overrideIcon.paint(&painter, r, Qt::AlignCenter);