forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/11.0'
Change-Id: I87b22a73427cf9fc1b96075dc0db769ed3d3621c
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user