diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-05 01:01:05 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-05 01:01:06 +0200 |
commit | 327b305e95187fda869c5af407e78a17e0e381cd (patch) | |
tree | fc51c7579a9c1fed3c3993ac2ea68bf9dd32f8bb /src/gui/painting | |
parent | da284ef10e0ef80776b9fc9b7bb0e6dc8d71ba63 (diff) | |
parent | a2e718a71abad719ea196e9dc4d90d9267102f54 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I554a2762890391b3b6013c8b82211a8386a4ced8
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpagesize.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/painting/qpagesize.cpp b/src/gui/painting/qpagesize.cpp index a1c9f6e417..c98ca8a1fb 100644 --- a/src/gui/painting/qpagesize.cpp +++ b/src/gui/painting/qpagesize.cpp @@ -222,8 +222,6 @@ static const int qt_windowsConversion[][2] = { {DMPAPER_PENV_10_ROTATED, DMPAPER_PENV_10} // Is = DMPAPER_LAST, use as loop terminator }; -static const int windowsConversionCount = int(sizeof(qt_windowsConversion) / sizeof(qt_windowsConversion[0])); - // Standard sizes data struct StandardPageSize { QPageSize::PageSizeId id; @@ -423,9 +421,9 @@ static QPageSize::PageSizeId qt_idForWindowsID(int windowsId, QSize *match = 0) if (windowsId <= DMPAPER_NONE || windowsId > DMPAPER_LAST) return QPageSize::Custom; // Check if one of the unsupported values, convert to valid value if is - for (int i = 0; i < windowsConversionCount; ++i) { - if (qt_windowsConversion[i][0] == windowsId) { - windowsId = qt_windowsConversion[i][1]; + for (const auto &it : qt_windowsConversion) { + if (it[0] == windowsId) { + windowsId = it[1]; break; } } |