From 87d57d19941fba4a921020480ca5761f23536c93 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 21 Feb 2014 15:15:29 +0100 Subject: Fix users of QTextLayout::additionalFormats to use the new API QTextLayout::additionalFormats setters and getters using QList have been deprecated; port to the QVector versions. Moved op== definition for FormatRange needed in tst_qsyntaxhighlighter.cpp to a friend declaration in FormatRange itself, because MSVC 2008 doesn't find it otherwise. Change-Id: Ibab6589df057f02377d895079b56395859e3401e Reviewed-by: Konstantin Ritt --- src/widgets/widgets/qwidgettextcontrol.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/widgets/widgets/qwidgettextcontrol.cpp') diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index 53b2406fc1..a46abf374d 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -2029,7 +2029,7 @@ void QWidgetTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) QTextLayout *layout = block.layout(); if (isGettingInput) layout->setPreeditArea(cursor.position() - block.position(), e->preeditString()); - QList overrides; + QVector overrides; const int oldPreeditCursor = preeditCursor; preeditCursor = e->preeditString().length(); hideCursor = false; @@ -2049,7 +2049,7 @@ void QWidgetTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) } } } - layout->setAdditionalFormats(overrides); + layout->setFormats(overrides); cursor.endEditBlock(); @@ -2878,7 +2878,7 @@ void QWidgetTextControlPrivate::commitPreedit() QTextBlock block = cursor.block(); QTextLayout *layout = block.layout(); layout->setPreeditArea(-1, QString()); - layout->clearAdditionalFormats(); + layout->clearFormats(); cursor.endEditBlock(); } -- cgit v1.2.3