diff options
Diffstat (limited to 'examples/corelib/threads/queuedcustomtype')
-rw-r--r-- | examples/corelib/threads/queuedcustomtype/window.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/corelib/threads/queuedcustomtype/window.cpp b/examples/corelib/threads/queuedcustomtype/window.cpp index 2cefba1e17..0d3f80aba4 100644 --- a/examples/corelib/threads/queuedcustomtype/window.cpp +++ b/examples/corelib/threads/queuedcustomtype/window.cpp @@ -89,9 +89,10 @@ Window::Window() void Window::loadImage() { QStringList formats; - foreach (QByteArray format, QImageReader::supportedImageFormats()) + const QList<QByteArray> supportedFormats = QImageReader::supportedImageFormats(); + for (const QByteArray &format : supportedFormats) if (format.toLower() == format) - formats.append("*." + format); + formats.append(QLatin1String("*.") + QString::fromLatin1(format)); QString newPath = QFileDialog::getOpenFileName(this, tr("Open Image"), path, tr("Image files (%1)").arg(formats.join(' '))); |