All: Use Utils::SkipEmptyParts

Task-number: QTCREATORBUG-24098
Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-06-17 06:35:31 +02:00
parent 6e798401a0
commit 1c81a3b3e8
65 changed files with 236 additions and 156 deletions

View File

@@ -49,6 +49,7 @@
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
#include <utils/stringutils.h>
#include <utils/synchronousprocess.h>
#include <utils/temporaryfile.h>
#include <utils/theme/theme.h>
@@ -838,7 +839,7 @@ QStringList GitClient::unmanagedFiles(const QString &workingDirectory,
if (response.result != SynchronousProcessResponse::Finished)
return filePaths;
const QStringList managedFilePaths
= transform(response.stdOut().split('\0', QString::SkipEmptyParts),
= transform(response.stdOut().split('\0', Utils::SkipEmptyParts),
[&wd](const QString &fp) { return wd.absoluteFilePath(fp); });
return filtered(filePaths, [&managedFilePaths](const QString &fp) {
return !managedFilePaths.contains(fp);
@@ -3231,7 +3232,7 @@ void GitClient::push(const QString &workingDirectory, const QStringList &pushArg
command->setCookie(NoRemoteBranch);
if (command->cookie().toInt() == NoRemoteBranch) {
const QStringList lines = text.split('\n', QString::SkipEmptyParts);
const QStringList lines = text.split('\n', Utils::SkipEmptyParts);
for (const QString &line : lines) {
/* Extract the suggested command from the git output which
* should be similar to the following:
@@ -3281,7 +3282,7 @@ void GitClient::push(const QString &workingDirectory, const QStringList &pushArg
QMessageBox::No) == QMessageBox::Yes) {
const QStringList fallbackCommandParts =
m_pushFallbackCommand.split(' ', QString::SkipEmptyParts);
m_pushFallbackCommand.split(' ', Utils::SkipEmptyParts);
VcsCommand *rePushCommand = vcsExec(workingDirectory,
fallbackCommandParts.mid(1),
nullptr, true, VcsCommand::ShowSuccessMessage);