diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2018-06-19 15:09:33 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2018-06-22 13:10:54 +0000 |
commit | 6173e1d6f82b3bc205c1bebdc8481c1dbff4572f (patch) | |
tree | c384626aec1c786aede1ddf2a882e46fc2d494e6 /src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | |
parent | 033a1a279311fd2eda02e4c90657542f688b5f8b (diff) |
Build the Windows platform plugin with QT_NO_FOREACH
...for consistency with the other platform plugins.
Change-Id: I85946d610a62c19140618c83f80c4aa63fce4bc3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsdialoghelpers.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index 9738b4f7f5..40ab2a4dd2 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -1026,7 +1026,7 @@ static QList<FilterSpec> filterSpecs(const QStringList &filters, Q_ASSERT(filterSeparatorRE.isValid()); // Split filter specification as 'Texts (*.txt[;] *.doc)', '*.txt[;] *.doc' // into description and filters specification as '*.txt;*.doc' - foreach (const QString &filterString, filters) { + for (const QString &filterString : filters) { const int openingParenPos = filterString.lastIndexOf(QLatin1Char('(')); const int closingParenPos = openingParenPos != -1 ? filterString.indexOf(QLatin1Char(')'), openingParenPos + 1) : -1; @@ -1321,7 +1321,7 @@ void QWindowsNativeSaveFileDialog::setNameFilters(const QStringList &f) // filter only if a default suffix is set (see docs). Set the first available // suffix unless we have a defaultSuffix. if (!hasDefaultSuffix()) { - foreach (const QString &filter, f) { + for (const QString &filter : f) { const QString suffix = suffixFromFilter(filter); if (!suffix.isEmpty()) { setDefaultSuffixSys(suffix); @@ -1780,12 +1780,12 @@ void QWindowsXpNativeFileDialog::populateOpenFileName(OPENFILENAME *ofn, HWND ow // Create a buffer with the filter strings. int totalStringLength = 0; - QList<FilterSpec> specs = + const QList<FilterSpec> specs = filterSpecs(m_options->nameFilters(), m_options->options() & QFileDialogOptions::HideNameFilterDetails, &totalStringLength); const int size = specs.size(); wchar_t *ptr = new wchar_t[totalStringLength + 2 * size + 1]; ofn->lpstrFilter = ptr; - foreach (const FilterSpec &spec, specs) { + for (const FilterSpec &spec : specs) { ptr += spec.description.toWCharArray(ptr); *ptr++ = 0; ptr += spec.filter.toWCharArray(ptr); |