Use Utils::SkipEmptyParts instead of the deprecated one in QString

- Qt 5.14 introduced Qt::Keep/SkipEmptyParts and deprecated these in
QString namespace.
- Qt Creator defined Utils::SkipEmptyParts conditional on the Qt version,
so we use that for flexibility.
- Remove any explicit references to QString::KeepEmptyParts, as it's a
default value.

Change-Id: I72c65e4901ebc4c5422d4835e63fe23fb6ef28ff
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Artur Shepilko
2020-07-18 11:52:03 -05:00
parent a8c30c9253
commit 1e3721c874
4 changed files with 11 additions and 8 deletions

View File

@@ -57,6 +57,7 @@
#include <utils/parameteraction.h>
#include <utils/qtcassert.h>
#include <utils/stringutils.h>
#include <vcsbase/basevcseditorfactory.h>
#include <vcsbase/basevcssubmiteditorfactory.h>
@@ -834,7 +835,7 @@ bool FossilPluginPrivate::submitEditorAboutToClose()
//rewrite entries of the form 'file => newfile' to 'newfile' because
//this would mess the commit command
for (QStringList::iterator iFile = files.begin(); iFile != files.end(); ++iFile) {
const QStringList parts = iFile->split(" => ", QString::SkipEmptyParts);
const QStringList parts = iFile->split(" => ", Utils::SkipEmptyParts);
if (!parts.isEmpty())
*iFile = parts.last();
}