diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2016-11-28 15:27:51 +0200 |
---|---|---|
committer | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2016-11-28 15:27:51 +0200 |
commit | 7b3642cce4aba6f89402e073d9f928fa4ebc878d (patch) | |
tree | 1084e196b0e3c39230e643bad212c0ca60ee383b /src/plugins/coreplugin/documentmanager.cpp | |
parent | f69a466534bfa3d84b0c6bebfecc47ccf3fd1699 (diff) | |
parent | 96256d1ecc9190353b6304b2b4190b39fc9885aa (diff) | |
download | qt-creator-7b3642cce4aba6f89402e073d9f928fa4ebc878d.tar.gz |
Merge remote-tracking branch 'origin/4.2'
Change-Id: I259a402bc896fc2e359cc96b7510453ac9a9a552
Diffstat (limited to 'src/plugins/coreplugin/documentmanager.cpp')
-rw-r--r-- | src/plugins/coreplugin/documentmanager.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/coreplugin/documentmanager.cpp b/src/plugins/coreplugin/documentmanager.cpp index 02408aef3e..bf65d4620b 100644 --- a/src/plugins/coreplugin/documentmanager.cpp +++ b/src/plugins/coreplugin/documentmanager.cpp @@ -702,14 +702,16 @@ QString DocumentManager::getSaveFileName(const QString &title, const QString &pa const int index = regExp.lastIndexIn(*selectedFilter); if (index != -1) { bool suffixOk = false; - const QStringList &suffixes = regExp.cap(1).remove(QLatin1Char('*')).split(QLatin1Char(' ')); - foreach (const QString &suffix, suffixes) + QString caption = regExp.cap(1); + caption.remove(QLatin1Char('*')); + const QVector<QStringRef> suffixes = caption.splitRef(QLatin1Char(' ')); + foreach (const QStringRef &suffix, suffixes) if (fileName.endsWith(suffix)) { suffixOk = true; break; } if (!suffixOk && !suffixes.isEmpty()) - fileName.append(suffixes.at(0)); + fileName.append(suffixes.at(0).toString()); } } if (QFile::exists(fileName)) { |