vcl/qt5/QtWidget.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit afc144b1f949e799a966933f28e07f83f735a7e2
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Mar 21 23:04:07 2022 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue Mar 22 11:57:36 2022 +0100

    loplugin:loopvartoosmall
    
    ...with --enable-qt6, where QList::size() return type has changed from int 
to
    qsizetype (aka ptrdiff_t); but just replacing the use of int with a use of
    qsizetype would fail with --enable-qt5 in some build environments where the 
Qt5
    qglobal.h doesn't happen to already be included, so simply replace this 
with a
    range-based for loop and be done with it
    
    Change-Id: I5a6c7b0468ed7cef6de7fb647fdb2631a8cb5b35
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131916
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx
index ca74b9d118f0..77d9222a74f9 100644
--- a/vcl/qt5/QtWidget.cxx
+++ b/vcl/qt5/QtWidget.cxx
@@ -673,9 +673,8 @@ void QtWidget::inputMethodEvent(QInputMethodEvent* pEvent)
                                                  ExtTextInputAttr::NONE);
         aInputEvent.mpTextAttr = aTextAttrs.data();
 
-        for (int i = 0; i < rAttrList.size(); ++i)
+        for (const QInputMethodEvent::Attribute& rAttr : rAttrList)
         {
-            const QInputMethodEvent::Attribute& rAttr = rAttrList.at(i);
             switch (rAttr.type)
             {
                 case QInputMethodEvent::TextFormat:

Reply via email to