diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-03-21 23:04:07 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-03-22 11:57:36 +0100 |
commit | afc144b1f949e799a966933f28e07f83f735a7e2 (patch) | |
tree | fe73d1f458d6e4ac374d4dc69cdfd7bbccf2db0b | |
parent | fe40f6457800d4ce3d50a84b53f33b775087871f (diff) |
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 <sbergman@redhat.com>
-rw-r--r-- | vcl/qt5/QtWidget.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
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: |