forked from qt-creator/qt-creator
Utils: Drop Utils::SkipEmptyParts again
We require Qt 5.14 nowadays. Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -90,7 +90,7 @@ static QStringList environmentImportPaths()
|
|||||||
QStringList paths;
|
QStringList paths;
|
||||||
|
|
||||||
const QStringList importPaths = QString::fromLocal8Bit(qgetenv("QML_IMPORT_PATH")).split(
|
const QStringList importPaths = QString::fromLocal8Bit(qgetenv("QML_IMPORT_PATH")).split(
|
||||||
Utils::HostOsInfo::pathListSeparator(), Utils::SkipEmptyParts);
|
Utils::HostOsInfo::pathListSeparator(), Qt::SkipEmptyParts);
|
||||||
|
|
||||||
for (const QString &path : importPaths) {
|
for (const QString &path : importPaths) {
|
||||||
const QString canonicalPath = QDir(path).canonicalPath();
|
const QString canonicalPath = QDir(path).canonicalPath();
|
||||||
|
@@ -241,7 +241,7 @@ QString QmlJS::modulePath(const QString &name, const QString &version,
|
|||||||
return QString();
|
return QString();
|
||||||
|
|
||||||
const QString sanitizedVersion = version == undefinedVersion ? QString() : version;
|
const QString sanitizedVersion = version == undefinedVersion ? QString() : version;
|
||||||
const QStringList parts = name.split('.', Utils::SkipEmptyParts);
|
const QStringList parts = name.split('.', Qt::SkipEmptyParts);
|
||||||
auto mkpath = [] (const QStringList &xs) -> QString { return xs.join(QLatin1Char('/')); };
|
auto mkpath = [] (const QStringList &xs) -> QString { return xs.join(QLatin1Char('/')); };
|
||||||
|
|
||||||
// Regular expression for building candidates by successively removing minor and major
|
// Regular expression for building candidates by successively removing minor and major
|
||||||
|
@@ -304,7 +304,7 @@ FilePaths Environment::path() const
|
|||||||
FilePaths Environment::pathListValue(const QString &varName) const
|
FilePaths Environment::pathListValue(const QString &varName) const
|
||||||
{
|
{
|
||||||
const QStringList pathComponents = expandedValueForKey(varName)
|
const QStringList pathComponents = expandedValueForKey(varName)
|
||||||
.split(OsSpecificAspects::pathListSeparator(m_osType), Utils::SkipEmptyParts);
|
.split(OsSpecificAspects::pathListSeparator(m_osType), Qt::SkipEmptyParts);
|
||||||
return transform(pathComponents, &FilePath::fromUserInput);
|
return transform(pathComponents, &FilePath::fromUserInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -122,7 +122,7 @@ void FileInProjectFinder::setSysroot(const FilePath &sysroot)
|
|||||||
|
|
||||||
void FileInProjectFinder::addMappedPath(const FilePath &localFilePath, const QString &remoteFilePath)
|
void FileInProjectFinder::addMappedPath(const FilePath &localFilePath, const QString &remoteFilePath)
|
||||||
{
|
{
|
||||||
const QStringList segments = remoteFilePath.split('/', Utils::SkipEmptyParts);
|
const QStringList segments = remoteFilePath.split('/', Qt::SkipEmptyParts);
|
||||||
|
|
||||||
PathMappingNode *node = &m_pathMapRoot;
|
PathMappingNode *node = &m_pathMapRoot;
|
||||||
for (const QString &segment : segments) {
|
for (const QString &segment : segments) {
|
||||||
@@ -192,7 +192,7 @@ bool FileInProjectFinder::findFileOrDirectory(const QString &originalPath, FileH
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto segments = originalPath.splitRef('/', Utils::SkipEmptyParts);
|
const auto segments = originalPath.splitRef('/', Qt::SkipEmptyParts);
|
||||||
const PathMappingNode *node = &m_pathMapRoot;
|
const PathMappingNode *node = &m_pathMapRoot;
|
||||||
for (const auto &segment : segments) {
|
for (const auto &segment : segments) {
|
||||||
auto it = node->children.find(segment.toString());
|
auto it = node->children.find(segment.toString());
|
||||||
|
@@ -166,7 +166,7 @@ QStringList PathListEditor::pathList() const
|
|||||||
if (text.isEmpty())
|
if (text.isEmpty())
|
||||||
return QStringList();
|
return QStringList();
|
||||||
// trim each line
|
// trim each line
|
||||||
QStringList rc = text.split('\n', Utils::SkipEmptyParts);
|
QStringList rc = text.split('\n', Qt::SkipEmptyParts);
|
||||||
const QStringList::iterator end = rc.end();
|
const QStringList::iterator end = rc.end();
|
||||||
for (QStringList::iterator it = rc.begin(); it != end; ++it)
|
for (QStringList::iterator it = rc.begin(); it != end; ++it)
|
||||||
*it = it->trimmed();
|
*it = it->trimmed();
|
||||||
@@ -184,7 +184,7 @@ void PathListEditor::setPathList(const QString &pathString)
|
|||||||
clear();
|
clear();
|
||||||
} else {
|
} else {
|
||||||
setPathList(pathString.split(HostOsInfo::pathListSeparator(),
|
setPathList(pathString.split(HostOsInfo::pathListSeparator(),
|
||||||
Utils::SkipEmptyParts));
|
Qt::SkipEmptyParts));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -600,7 +600,7 @@ QVector<AndroidDeviceInfo> AndroidConfig::connectedDevices(const FilePath &adbTo
|
|||||||
.arg(cmd.toUserOutput());
|
.arg(cmd.toUserOutput());
|
||||||
return devices;
|
return devices;
|
||||||
}
|
}
|
||||||
QStringList adbDevs = response.allOutput().split('\n', Utils::SkipEmptyParts);
|
QStringList adbDevs = response.allOutput().split('\n', Qt::SkipEmptyParts);
|
||||||
if (adbDevs.empty())
|
if (adbDevs.empty())
|
||||||
return devices;
|
return devices;
|
||||||
|
|
||||||
|
@@ -146,7 +146,7 @@ bool AndroidManager::packageInstalled(const QString &deviceSerial,
|
|||||||
QStringList args = AndroidDeviceInfo::adbSelector(deviceSerial);
|
QStringList args = AndroidDeviceInfo::adbSelector(deviceSerial);
|
||||||
args << "shell" << "pm" << "list" << "packages";
|
args << "shell" << "pm" << "list" << "packages";
|
||||||
QStringList lines = runAdbCommand(args).stdOut().split(QRegularExpression("[\\n\\r]"),
|
QStringList lines = runAdbCommand(args).stdOut().split(QRegularExpression("[\\n\\r]"),
|
||||||
Utils::SkipEmptyParts);
|
Qt::SkipEmptyParts);
|
||||||
for (const QString &line : lines) {
|
for (const QString &line : lines) {
|
||||||
// Don't want to confuse com.abc.xyz with com.abc.xyz.def so check with
|
// Don't want to confuse com.abc.xyz with com.abc.xyz.def so check with
|
||||||
// endsWith
|
// endsWith
|
||||||
|
@@ -510,7 +510,7 @@ void AndroidRunnerWorker::asyncStartHelper()
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const QString &entry : m_beforeStartAdbCommands)
|
for (const QString &entry : m_beforeStartAdbCommands)
|
||||||
runAdb(entry.split(' ', Utils::SkipEmptyParts));
|
runAdb(entry.split(' ', Qt::SkipEmptyParts));
|
||||||
|
|
||||||
QStringList args({"shell", "am", "start"});
|
QStringList args({"shell", "am", "start"});
|
||||||
args << m_amStartExtraArgs;
|
args << m_amStartExtraArgs;
|
||||||
@@ -800,7 +800,7 @@ void AndroidRunnerWorker::onProcessIdChanged(qint64 pid)
|
|||||||
|
|
||||||
// Run adb commands after application quit.
|
// Run adb commands after application quit.
|
||||||
for (const QString &entry: m_afterFinishAdbCommands)
|
for (const QString &entry: m_afterFinishAdbCommands)
|
||||||
runAdb(entry.split(' ', Utils::SkipEmptyParts));
|
runAdb(entry.split(' ', Qt::SkipEmptyParts));
|
||||||
} else {
|
} else {
|
||||||
// In debugging cases this will be funneled to the engine to actually start
|
// In debugging cases this will be funneled to the engine to actually start
|
||||||
// and attach gdb. Afterwards this ends up in handleRemoteDebuggerRunning() below.
|
// and attach gdb. Afterwards this ends up in handleRemoteDebuggerRunning() below.
|
||||||
|
@@ -105,7 +105,7 @@ int parseProgress(const QString &out, bool &foundAssertion)
|
|||||||
if (out.isEmpty())
|
if (out.isEmpty())
|
||||||
return progress;
|
return progress;
|
||||||
QRegularExpression reg("(?<progress>\\d*)%");
|
QRegularExpression reg("(?<progress>\\d*)%");
|
||||||
QStringList lines = out.split(QRegularExpression("[\\n\\r]"), Utils::SkipEmptyParts);
|
QStringList lines = out.split(QRegularExpression("[\\n\\r]"), Qt::SkipEmptyParts);
|
||||||
for (const QString &line : lines) {
|
for (const QString &line : lines) {
|
||||||
QRegularExpressionMatch match = reg.match(line);
|
QRegularExpressionMatch match = reg.match(line);
|
||||||
if (match.hasMatch()) {
|
if (match.hasMatch()) {
|
||||||
|
@@ -128,7 +128,7 @@ QStringList BoostTestConfiguration::argumentsForTestRunner(QStringList *omitted)
|
|||||||
|
|
||||||
if (AutotestPlugin::settings()->processArgs) {
|
if (AutotestPlugin::settings()->processArgs) {
|
||||||
arguments << filterInterfering(runnable().commandLineArguments.split(
|
arguments << filterInterfering(runnable().commandLineArguments.split(
|
||||||
' ', Utils::SkipEmptyParts), omitted);
|
' ', Qt::SkipEmptyParts), omitted);
|
||||||
}
|
}
|
||||||
return arguments;
|
return arguments;
|
||||||
}
|
}
|
||||||
|
@@ -101,7 +101,7 @@ QStringList CatchConfiguration::argumentsForTestRunner(QStringList *omitted) con
|
|||||||
|
|
||||||
if (AutotestPlugin::settings()->processArgs) {
|
if (AutotestPlugin::settings()->processArgs) {
|
||||||
arguments << filterInterfering(runnable().commandLineArguments.split(
|
arguments << filterInterfering(runnable().commandLineArguments.split(
|
||||||
' ', Utils::SkipEmptyParts), omitted);
|
' ', Qt::SkipEmptyParts), omitted);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto settings = dynamic_cast<CatchTestSettings *>(framework()->frameworkSettings());
|
auto settings = dynamic_cast<CatchTestSettings *>(framework()->frameworkSettings());
|
||||||
|
@@ -77,7 +77,7 @@ QStringList GTestConfiguration::argumentsForTestRunner(QStringList *omitted) con
|
|||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
if (AutotestPlugin::settings()->processArgs) {
|
if (AutotestPlugin::settings()->processArgs) {
|
||||||
arguments << filterInterfering(runnable().commandLineArguments.split(
|
arguments << filterInterfering(runnable().commandLineArguments.split(
|
||||||
' ', Utils::SkipEmptyParts), omitted);
|
' ', Qt::SkipEmptyParts), omitted);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QStringList &testSets = testCases();
|
const QStringList &testSets = testCases();
|
||||||
|
@@ -93,10 +93,10 @@ static bool matchesFilter(const QString &filter, const QString &fullTestName)
|
|||||||
QStringList negative;
|
QStringList negative;
|
||||||
int startOfNegative = filter.indexOf('-');
|
int startOfNegative = filter.indexOf('-');
|
||||||
if (startOfNegative == -1) {
|
if (startOfNegative == -1) {
|
||||||
positive.append(filter.split(':', Utils::SkipEmptyParts));
|
positive.append(filter.split(':', Qt::SkipEmptyParts));
|
||||||
} else {
|
} else {
|
||||||
positive.append(filter.left(startOfNegative).split(':', Utils::SkipEmptyParts));
|
positive.append(filter.left(startOfNegative).split(':', Qt::SkipEmptyParts));
|
||||||
negative.append(filter.mid(startOfNegative + 1).split(':', Utils::SkipEmptyParts));
|
negative.append(filter.mid(startOfNegative + 1).split(':', Qt::SkipEmptyParts));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString testName = fullTestName;
|
QString testName = fullTestName;
|
||||||
|
@@ -52,7 +52,7 @@ QStringList QtTestConfiguration::argumentsForTestRunner(QStringList *omitted) co
|
|||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
if (AutotestPlugin::settings()->processArgs) {
|
if (AutotestPlugin::settings()->processArgs) {
|
||||||
arguments.append(QTestUtils::filterInterfering(
|
arguments.append(QTestUtils::filterInterfering(
|
||||||
runnable().commandLineArguments.split(' ', Utils::SkipEmptyParts),
|
runnable().commandLineArguments.split(' ', Qt::SkipEmptyParts),
|
||||||
omitted, false));
|
omitted, false));
|
||||||
}
|
}
|
||||||
auto qtSettings = dynamic_cast<QtTestSettings *>(framework()->frameworkSettings());
|
auto qtSettings = dynamic_cast<QtTestSettings *>(framework()->frameworkSettings());
|
||||||
|
@@ -59,7 +59,7 @@ QStringList QuickTestConfiguration::argumentsForTestRunner(QStringList *omitted)
|
|||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
if (AutotestPlugin::settings()->processArgs) {
|
if (AutotestPlugin::settings()->processArgs) {
|
||||||
arguments.append(QTestUtils::filterInterfering
|
arguments.append(QTestUtils::filterInterfering
|
||||||
(runnable().commandLineArguments.split(' ', Utils::SkipEmptyParts),
|
(runnable().commandLineArguments.split(' ', Qt::SkipEmptyParts),
|
||||||
omitted, true));
|
omitted, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -376,7 +376,7 @@ QStringList MakefileParser::targetValues(bool *hasVariables)
|
|||||||
// Get all values of a line separated by spaces.
|
// Get all values of a line separated by spaces.
|
||||||
// Values representing a variable like $(value) get
|
// Values representing a variable like $(value) get
|
||||||
// removed currently.
|
// removed currently.
|
||||||
QStringList lineValues = m_line.split(QLatin1Char(' '), Utils::SkipEmptyParts);
|
QStringList lineValues = m_line.split(QLatin1Char(' '), Qt::SkipEmptyParts);
|
||||||
QStringList::iterator it = lineValues.begin();
|
QStringList::iterator it = lineValues.begin();
|
||||||
while (it != lineValues.end()) {
|
while (it != lineValues.end()) {
|
||||||
if ((*it).startsWith(QLatin1String("$("))) {
|
if ((*it).startsWith(QLatin1String("$("))) {
|
||||||
|
@@ -789,7 +789,7 @@ bool BazaarPluginPrivate::submitEditorAboutToClose()
|
|||||||
//rewrite entries of the form 'file => newfile' to 'newfile' because
|
//rewrite entries of the form 'file => newfile' to 'newfile' because
|
||||||
//this would mess the commit command
|
//this would mess the commit command
|
||||||
for (QStringList::iterator iFile = files.begin(); iFile != files.end(); ++iFile) {
|
for (QStringList::iterator iFile = files.begin(); iFile != files.end(); ++iFile) {
|
||||||
const QStringList parts = iFile->split(QLatin1String(" => "), Utils::SkipEmptyParts);
|
const QStringList parts = iFile->split(QLatin1String(" => "), Qt::SkipEmptyParts);
|
||||||
if (!parts.isEmpty())
|
if (!parts.isEmpty())
|
||||||
*iFile = parts.last();
|
*iFile = parts.last();
|
||||||
}
|
}
|
||||||
|
@@ -205,7 +205,7 @@ void ArtisticStyleSettings::createDocumentationFile() const
|
|||||||
for (QString line : lines) {
|
for (QString line : lines) {
|
||||||
line = line.trimmed();
|
line = line.trimmed();
|
||||||
if ((line.startsWith("--") && !line.startsWith("---")) || line.startsWith("OR ")) {
|
if ((line.startsWith("--") && !line.startsWith("---")) || line.startsWith("OR ")) {
|
||||||
const QStringList rawKeys = line.split(" OR ", Utils::SkipEmptyParts);
|
const QStringList rawKeys = line.split(" OR ", Qt::SkipEmptyParts);
|
||||||
for (QString k : rawKeys) {
|
for (QString k : rawKeys) {
|
||||||
k = k.trimmed();
|
k = k.trimmed();
|
||||||
k.remove('#');
|
k.remove('#');
|
||||||
|
@@ -309,7 +309,7 @@ public:
|
|||||||
propagateDown(index(0, 0, QModelIndex()));
|
propagateDown(index(0, 0, QModelIndex()));
|
||||||
|
|
||||||
QStringList checksList = checks.simplified().remove(" ")
|
QStringList checksList = checks.simplified().remove(" ")
|
||||||
.split(",", Utils::SkipEmptyParts);
|
.split(",", Qt::SkipEmptyParts);
|
||||||
|
|
||||||
for (QString &check : checksList) {
|
for (QString &check : checksList) {
|
||||||
Qt::CheckState state;
|
Qt::CheckState state;
|
||||||
@@ -858,7 +858,7 @@ void DiagnosticConfigsWidget::syncClazyWidgets(const ClangDiagnosticConfig &conf
|
|||||||
const QStringList checkNames = config.clazyMode()
|
const QStringList checkNames = config.clazyMode()
|
||||||
== ClangDiagnosticConfig::ClazyMode::UseDefaultChecks
|
== ClangDiagnosticConfig::ClazyMode::UseDefaultChecks
|
||||||
? m_clazyInfo.defaultChecks
|
? m_clazyInfo.defaultChecks
|
||||||
: config.clazyChecks().split(',', Utils::SkipEmptyParts);
|
: config.clazyChecks().split(',', Qt::SkipEmptyParts);
|
||||||
m_clazyTreeModel->enableChecks(checkNames);
|
m_clazyTreeModel->enableChecks(checkNames);
|
||||||
|
|
||||||
syncClazyChecksGroupBox();
|
syncClazyChecksGroupBox();
|
||||||
|
@@ -418,7 +418,7 @@ QStringList ClearCasePluginPrivate::getVobList() const
|
|||||||
const ClearCaseResponse response =
|
const ClearCaseResponse response =
|
||||||
runCleartool(currentState().topLevel(), args, m_settings.timeOutS, SilentRun);
|
runCleartool(currentState().topLevel(), args, m_settings.timeOutS, SilentRun);
|
||||||
|
|
||||||
return response.stdOut.split(QLatin1Char('\n'), Utils::SkipEmptyParts);
|
return response.stdOut.split(QLatin1Char('\n'), Qt::SkipEmptyParts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the drive letter of a path
|
/// Get the drive letter of a path
|
||||||
@@ -545,7 +545,7 @@ QString ClearCasePluginPrivate::ccManagesDirectory(const QString &directory) con
|
|||||||
if (response.error)
|
if (response.error)
|
||||||
return QString();
|
return QString();
|
||||||
|
|
||||||
const QStringList result = response.stdOut.split(QLatin1Char('\n'), Utils::SkipEmptyParts);
|
const QStringList result = response.stdOut.split(QLatin1Char('\n'), Qt::SkipEmptyParts);
|
||||||
if (result.size() != 2)
|
if (result.size() != 2)
|
||||||
return QString();
|
return QString();
|
||||||
|
|
||||||
@@ -894,7 +894,7 @@ QStringList ClearCasePluginPrivate::ccGetActiveVobs() const
|
|||||||
prefix += QLatin1Char('/');
|
prefix += QLatin1Char('/');
|
||||||
|
|
||||||
const QDir theViewRootDir(theViewRoot);
|
const QDir theViewRootDir(theViewRoot);
|
||||||
foreach (const QString &line, response.stdOut.split(QLatin1Char('\n'), Utils::SkipEmptyParts)) {
|
foreach (const QString &line, response.stdOut.split(QLatin1Char('\n'), Qt::SkipEmptyParts)) {
|
||||||
const bool isActive = line.at(0) == QLatin1Char('*');
|
const bool isActive = line.at(0) == QLatin1Char('*');
|
||||||
if (!isActive)
|
if (!isActive)
|
||||||
continue;
|
continue;
|
||||||
@@ -2057,7 +2057,7 @@ QList<QStringPair> ClearCasePluginPrivate::ccGetActivities() const
|
|||||||
QStringList args(QLatin1String("lsactivity"));
|
QStringList args(QLatin1String("lsactivity"));
|
||||||
args << QLatin1String("-fmt") << QLatin1String("%n\\t%[headline]p\\n");
|
args << QLatin1String("-fmt") << QLatin1String("%n\\t%[headline]p\\n");
|
||||||
const QString response = runCleartoolSync(currentState().topLevel(), args);
|
const QString response = runCleartoolSync(currentState().topLevel(), args);
|
||||||
QStringList acts = response.split(QLatin1Char('\n'), Utils::SkipEmptyParts);
|
QStringList acts = response.split(QLatin1Char('\n'), Qt::SkipEmptyParts);
|
||||||
foreach (const QString &activity, acts) {
|
foreach (const QString &activity, acts) {
|
||||||
QStringList act = activity.split(QLatin1Char('\t'));
|
QStringList act = activity.split(QLatin1Char('\t'));
|
||||||
if (act.size() >= 2)
|
if (act.size() >= 2)
|
||||||
@@ -2349,7 +2349,7 @@ QString ClearCasePluginPrivate::runExtDiff(const QString &workingDir, const QStr
|
|||||||
int timeOutS, QTextCodec *outputCodec)
|
int timeOutS, QTextCodec *outputCodec)
|
||||||
{
|
{
|
||||||
CommandLine diff("diff");
|
CommandLine diff("diff");
|
||||||
diff.addArgs(m_settings.diffArgs.split(' ', Utils::SkipEmptyParts));
|
diff.addArgs(m_settings.diffArgs.split(' ', Qt::SkipEmptyParts));
|
||||||
diff.addArgs(arguments);
|
diff.addArgs(arguments);
|
||||||
|
|
||||||
SynchronousProcess process;
|
SynchronousProcess process;
|
||||||
|
@@ -286,7 +286,7 @@ QStringList CMakeBuildConfiguration::extraCMakeArguments() const
|
|||||||
|
|
||||||
QStringList CMakeBuildConfiguration::initialCMakeArguments() const
|
QStringList CMakeBuildConfiguration::initialCMakeArguments() const
|
||||||
{
|
{
|
||||||
return aspect<InitialCMakeArgumentsAspect>()->value().split('\n', Utils::SkipEmptyParts);
|
return aspect<InitialCMakeArgumentsAspect>()->value().split('\n', Qt::SkipEmptyParts);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeBuildConfiguration::setExtraCMakeArguments(const QStringList &args)
|
void CMakeBuildConfiguration::setExtraCMakeArguments(const QStringList &args)
|
||||||
|
@@ -237,7 +237,7 @@ QStringList splitCommandLine(QString commandLine, QSet<QString> &flagsCache)
|
|||||||
}
|
}
|
||||||
} else { // If 's' is outside quotes ...
|
} else { // If 's' is outside quotes ...
|
||||||
for (const QString &flag :
|
for (const QString &flag :
|
||||||
part.split(QRegularExpression("\\s+"), Utils::SkipEmptyParts)) {
|
part.split(QRegularExpression("\\s+"), Qt::SkipEmptyParts)) {
|
||||||
auto flagIt = flagsCache.insert(flag);
|
auto flagIt = flagsCache.insert(flag);
|
||||||
result.append(*flagIt);
|
result.append(*flagIt);
|
||||||
}
|
}
|
||||||
|
@@ -194,7 +194,7 @@ void UrlLocatorFilter::restoreState(const QByteArray &state)
|
|||||||
|
|
||||||
QString value;
|
QString value;
|
||||||
in >> value;
|
in >> value;
|
||||||
m_remoteUrls = value.split('^', Utils::SkipEmptyParts);
|
m_remoteUrls = value.split('^', Qt::SkipEmptyParts);
|
||||||
|
|
||||||
QString shortcut;
|
QString shortcut;
|
||||||
in >> shortcut;
|
in >> shortcut;
|
||||||
|
@@ -188,7 +188,7 @@ void Core::Internal::MenuBarFilter::prepareSearch(const QString &entry)
|
|||||||
static const QRegularExpression seperatorRegExp(QString("[%1]").arg(separators));
|
static const QRegularExpression seperatorRegExp(QString("[%1]").arg(separators));
|
||||||
QString normalized = entry;
|
QString normalized = entry;
|
||||||
normalized.replace(seperatorRegExp, separators.at(0));
|
normalized.replace(seperatorRegExp, separators.at(0));
|
||||||
const QStringList entryPath = normalized.split(separators.at(0), Utils::SkipEmptyParts);
|
const QStringList entryPath = normalized.split(separators.at(0), Qt::SkipEmptyParts);
|
||||||
m_entries.clear();
|
m_entries.clear();
|
||||||
QVector<const QMenu *> processedMenus;
|
QVector<const QMenu *> processedMenus;
|
||||||
for (QAction* action : menuBarActions())
|
for (QAction* action : menuBarActions())
|
||||||
|
@@ -382,7 +382,7 @@ void MimeTypeSettingsPrivate::handlePatternEdited()
|
|||||||
const Utils::MimeType mt = m_model->m_mimeTypes.at(index);
|
const Utils::MimeType mt = m_model->m_mimeTypes.at(index);
|
||||||
ensurePendingMimeType(mt);
|
ensurePendingMimeType(mt);
|
||||||
m_pendingModifiedMimeTypes[mt.name()].globPatterns
|
m_pendingModifiedMimeTypes[mt.name()].globPatterns
|
||||||
= m_ui.patternsLineEdit->text().split(kSemiColon, Utils::SkipEmptyParts);
|
= m_ui.patternsLineEdit->text().split(kSemiColon, Qt::SkipEmptyParts);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MimeTypeSettingsPrivate::addMagicHeaderRow(const MagicData &data)
|
void MimeTypeSettingsPrivate::addMagicHeaderRow(const MagicData &data)
|
||||||
@@ -579,7 +579,7 @@ MimeTypeSettingsPrivate::UserMimeTypeHash MimeTypeSettingsPrivate::readUserModif
|
|||||||
if (reader.name() == QLatin1String(mimeTypeTagC)) {
|
if (reader.name() == QLatin1String(mimeTypeTagC)) {
|
||||||
mt.name = atts.value(QLatin1String(mimeTypeAttributeC)).toString();
|
mt.name = atts.value(QLatin1String(mimeTypeAttributeC)).toString();
|
||||||
mt.globPatterns = atts.value(QLatin1String(patternAttributeC)).toString()
|
mt.globPatterns = atts.value(QLatin1String(patternAttributeC)).toString()
|
||||||
.split(kSemiColon, Utils::SkipEmptyParts);
|
.split(kSemiColon, Qt::SkipEmptyParts);
|
||||||
} else if (reader.name() == QLatin1String(matchTagC)) {
|
} else if (reader.name() == QLatin1String(matchTagC)) {
|
||||||
QByteArray value = atts.value(QLatin1String(matchValueAttributeC)).toUtf8();
|
QByteArray value = atts.value(QLatin1String(matchValueAttributeC)).toUtf8();
|
||||||
QByteArray typeName = atts.value(QLatin1String(matchTypeAttributeC)).toUtf8();
|
QByteArray typeName = atts.value(QLatin1String(matchTypeAttributeC)).toUtf8();
|
||||||
|
@@ -312,7 +312,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
Core::SearchResultItem item;
|
Core::SearchResultItem item;
|
||||||
item.path = scope.split(QLatin1String("::"), Utils::SkipEmptyParts);
|
item.path = scope.split(QLatin1String("::"), Qt::SkipEmptyParts);
|
||||||
item.text = text;
|
item.text = text;
|
||||||
item.icon = info->icon();
|
item.icon = info->icon();
|
||||||
item.userData = QVariant::fromValue(info);
|
item.userData = QVariant::fromValue(info);
|
||||||
|
@@ -255,7 +255,7 @@ static QString validateDiagnosticOptions(const QStringList &options)
|
|||||||
|
|
||||||
static QStringList normalizeDiagnosticInputOptions(const QString &options)
|
static QStringList normalizeDiagnosticInputOptions(const QString &options)
|
||||||
{
|
{
|
||||||
return options.simplified().split(QLatin1Char(' '), Utils::SkipEmptyParts);
|
return options.simplified().split(QLatin1Char(' '), Qt::SkipEmptyParts);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClangDiagnosticConfigsWidget::onClangOnlyOptionsChanged()
|
void ClangDiagnosticConfigsWidget::onClangOnlyOptionsChanged()
|
||||||
|
@@ -760,7 +760,7 @@ void CompilerOptionsBuilder::evaluateCompilerFlags()
|
|||||||
{
|
{
|
||||||
static QStringList userBlackList = QString::fromLocal8Bit(
|
static QStringList userBlackList = QString::fromLocal8Bit(
|
||||||
qgetenv("QTC_CLANG_CMD_OPTIONS_BLACKLIST"))
|
qgetenv("QTC_CLANG_CMD_OPTIONS_BLACKLIST"))
|
||||||
.split(';', Utils::SkipEmptyParts);
|
.split(';', Qt::SkipEmptyParts);
|
||||||
|
|
||||||
const Utils::Id &toolChain = m_projectPart.toolchainType;
|
const Utils::Id &toolChain = m_projectPart.toolchainType;
|
||||||
bool containsDriverMode = false;
|
bool containsDriverMode = false;
|
||||||
|
@@ -308,7 +308,7 @@ void CppFileSettingsWidget::setLicenseTemplatePath(const QString &lp)
|
|||||||
static QStringList trimmedPaths(const QString &paths)
|
static QStringList trimmedPaths(const QString &paths)
|
||||||
{
|
{
|
||||||
QStringList res;
|
QStringList res;
|
||||||
foreach (const QString &path, paths.split(QLatin1Char(','), Utils::SkipEmptyParts))
|
foreach (const QString &path, paths.split(QLatin1Char(','), Qt::SkipEmptyParts))
|
||||||
res << path.trimmed();
|
res << path.trimmed();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@@ -62,7 +62,7 @@ QList<CvsLogEntry> parseLogEntries(const QString &o,
|
|||||||
enum ParseState { FileState, RevisionState, StatusLineState };
|
enum ParseState { FileState, RevisionState, StatusLineState };
|
||||||
|
|
||||||
QList<CvsLogEntry> rc;
|
QList<CvsLogEntry> rc;
|
||||||
const QStringList lines = o.split('\n', Utils::SkipEmptyParts);
|
const QStringList lines = o.split('\n', Qt::SkipEmptyParts);
|
||||||
ParseState state = FileState;
|
ParseState state = FileState;
|
||||||
|
|
||||||
const QString workingFilePrefix = QLatin1String("Working file: ");
|
const QString workingFilePrefix = QLatin1String("Working file: ");
|
||||||
@@ -178,7 +178,7 @@ StateList parseStatusOutput(const QString &directory, const QString &output)
|
|||||||
const QString dotDir = QString(QLatin1Char('.'));
|
const QString dotDir = QString(QLatin1Char('.'));
|
||||||
const QChar slash = QLatin1Char('/');
|
const QChar slash = QLatin1Char('/');
|
||||||
|
|
||||||
const QStringList list = output.split('\n', Utils::SkipEmptyParts);
|
const QStringList list = output.split('\n', Qt::SkipEmptyParts);
|
||||||
|
|
||||||
QString path = directory;
|
QString path = directory;
|
||||||
if (!path.isEmpty())
|
if (!path.isEmpty())
|
||||||
|
@@ -156,7 +156,7 @@ bool BreakpointParameters::isQmlFileAndLineBreakpoint() const
|
|||||||
if (qmlExtensionString.isEmpty())
|
if (qmlExtensionString.isEmpty())
|
||||||
qmlExtensionString = ".qml;.js";
|
qmlExtensionString = ".qml;.js";
|
||||||
|
|
||||||
const auto qmlFileExtensions = qmlExtensionString.splitRef(';', Utils::SkipEmptyParts);
|
const auto qmlFileExtensions = qmlExtensionString.splitRef(';', Qt::SkipEmptyParts);
|
||||||
const QString file = fileName.toString();
|
const QString file = fileName.toString();
|
||||||
for (const QStringRef &extension : qmlFileExtensions) {
|
for (const QStringRef &extension : qmlFileExtensions) {
|
||||||
if (file.endsWith(extension, Qt::CaseInsensitive))
|
if (file.endsWith(extension, Qt::CaseInsensitive))
|
||||||
|
@@ -2764,7 +2764,7 @@ void CdbEngine::setupScripting(const DebuggerResponse &response)
|
|||||||
}
|
}
|
||||||
const QString commands = stringSetting(ExtraDumperCommands);
|
const QString commands = stringSetting(ExtraDumperCommands);
|
||||||
if (!commands.isEmpty()) {
|
if (!commands.isEmpty()) {
|
||||||
for (const auto &command : commands.split('\n', Utils::SkipEmptyParts))
|
for (const auto &command : commands.split('\n', Qt::SkipEmptyParts))
|
||||||
runCommand({command, ScriptCommand});
|
runCommand({command, ScriptCommand});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -80,7 +80,7 @@ static QString getConfigurationOfGdbCommand(const FilePath &command)
|
|||||||
static QString extractGdbTargetAbiStringFromGdbOutput(const QString &gdbOutput)
|
static QString extractGdbTargetAbiStringFromGdbOutput(const QString &gdbOutput)
|
||||||
{
|
{
|
||||||
const auto outputLines = gdbOutput.split('\n');
|
const auto outputLines = gdbOutput.split('\n');
|
||||||
const auto whitespaceSeparatedTokens = outputLines.join(' ').split(' ', Utils::SkipEmptyParts);
|
const auto whitespaceSeparatedTokens = outputLines.join(' ').split(' ', Qt::SkipEmptyParts);
|
||||||
|
|
||||||
const QString targetKey{"--target="};
|
const QString targetKey{"--target="};
|
||||||
const QString targetValue = Utils::findOrDefault(whitespaceSeparatedTokens,
|
const QString targetValue = Utils::findOrDefault(whitespaceSeparatedTokens,
|
||||||
|
@@ -2700,7 +2700,7 @@ void GdbEngine::handleShowModuleSections(const DebuggerResponse &response,
|
|||||||
active = true;
|
active = true;
|
||||||
} else {
|
} else {
|
||||||
if (active) {
|
if (active) {
|
||||||
QStringList items = line.split(' ', Utils::SkipEmptyParts);
|
QStringList items = line.split(' ', Qt::SkipEmptyParts);
|
||||||
QString fromTo = items.value(0, QString());
|
QString fromTo = items.value(0, QString());
|
||||||
const int pos = fromTo.indexOf('-');
|
const int pos = fromTo.indexOf('-');
|
||||||
QTC_ASSERT(pos >= 0, continue);
|
QTC_ASSERT(pos >= 0, continue);
|
||||||
@@ -3189,7 +3189,7 @@ void GdbEngine::handleRegisterListing(const DebuggerResponse &response)
|
|||||||
m_registers.clear();
|
m_registers.clear();
|
||||||
QStringList lines = response.consoleStreamOutput.split('\n');
|
QStringList lines = response.consoleStreamOutput.split('\n');
|
||||||
for (int i = 1; i < lines.size(); ++i) {
|
for (int i = 1; i < lines.size(); ++i) {
|
||||||
const QVector<QStringRef> parts = lines.at(i).splitRef(' ', Utils::SkipEmptyParts);
|
const QVector<QStringRef> parts = lines.at(i).splitRef(' ', Qt::SkipEmptyParts);
|
||||||
if (parts.size() < 7)
|
if (parts.size() < 7)
|
||||||
continue;
|
continue;
|
||||||
int gdbRegisterNumber = parts.at(1).toInt();
|
int gdbRegisterNumber = parts.at(1).toInt();
|
||||||
|
@@ -384,7 +384,7 @@ static QString addParameterNames(const QString &functionSignature, const QString
|
|||||||
const int lastParen = argumentsString.lastIndexOf(')');
|
const int lastParen = argumentsString.lastIndexOf(')');
|
||||||
if (lastParen != -1)
|
if (lastParen != -1)
|
||||||
argumentsString.truncate(lastParen);
|
argumentsString.truncate(lastParen);
|
||||||
const QStringList arguments = argumentsString.split(',', Utils::SkipEmptyParts);
|
const QStringList arguments = argumentsString.split(',', Qt::SkipEmptyParts);
|
||||||
const int pCount = parameterNames.count();
|
const int pCount = parameterNames.count();
|
||||||
const int aCount = arguments.count();
|
const int aCount = arguments.count();
|
||||||
for (int i = 0; i < aCount; ++i) {
|
for (int i = 0; i < aCount; ++i) {
|
||||||
|
@@ -648,7 +648,7 @@ bool BranchModel::branchIsMerged(const QModelIndex &idx)
|
|||||||
VcsOutputWindow::appendError(errorMessage);
|
VcsOutputWindow::appendError(errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QStringList lines = output.split('\n', Utils::SkipEmptyParts);
|
const QStringList lines = output.split('\n', Qt::SkipEmptyParts);
|
||||||
for (const QString &l : lines) {
|
for (const QString &l : lines) {
|
||||||
QString currentBranch = l.mid(2); // remove first letters (those are either
|
QString currentBranch = l.mid(2); // remove first letters (those are either
|
||||||
// " " or "* " depending on whether it is
|
// " " or "* " depending on whether it is
|
||||||
|
@@ -291,7 +291,7 @@ QString GerritPushDialog::pushTarget() const
|
|||||||
if (!topic.isEmpty())
|
if (!topic.isEmpty())
|
||||||
target += '/' + topic;
|
target += '/' + topic;
|
||||||
|
|
||||||
const QStringList reviewersInput = reviewers().split(',', Utils::SkipEmptyParts);
|
const QStringList reviewersInput = reviewers().split(',', Qt::SkipEmptyParts);
|
||||||
for (const QString &reviewer : reviewersInput)
|
for (const QString &reviewer : reviewersInput)
|
||||||
options << "r=" + reviewer;
|
options << "r=" + reviewer;
|
||||||
|
|
||||||
|
@@ -851,7 +851,7 @@ QStringList GitClient::unmanagedFiles(const QString &workingDirectory,
|
|||||||
if (response.result != SynchronousProcessResponse::Finished)
|
if (response.result != SynchronousProcessResponse::Finished)
|
||||||
return filePaths;
|
return filePaths;
|
||||||
const QStringList managedFilePaths
|
const QStringList managedFilePaths
|
||||||
= transform(response.stdOut().split('\0', Utils::SkipEmptyParts),
|
= transform(response.stdOut().split('\0', Qt::SkipEmptyParts),
|
||||||
[&wd](const QString &fp) { return wd.absoluteFilePath(fp); });
|
[&wd](const QString &fp) { return wd.absoluteFilePath(fp); });
|
||||||
return filtered(filePaths, [&managedFilePaths](const QString &fp) {
|
return filtered(filePaths, [&managedFilePaths](const QString &fp) {
|
||||||
return !managedFilePaths.contains(fp);
|
return !managedFilePaths.contains(fp);
|
||||||
@@ -3243,7 +3243,7 @@ void GitClient::push(const QString &workingDirectory, const QStringList &pushArg
|
|||||||
command->setCookie(NoRemoteBranch);
|
command->setCookie(NoRemoteBranch);
|
||||||
|
|
||||||
if (command->cookie().toInt() == NoRemoteBranch) {
|
if (command->cookie().toInt() == NoRemoteBranch) {
|
||||||
const QStringList lines = text.split('\n', Utils::SkipEmptyParts);
|
const QStringList lines = text.split('\n', Qt::SkipEmptyParts);
|
||||||
for (const QString &line : lines) {
|
for (const QString &line : lines) {
|
||||||
/* Extract the suggested command from the git output which
|
/* Extract the suggested command from the git output which
|
||||||
* should be similar to the following:
|
* should be similar to the following:
|
||||||
@@ -3293,7 +3293,7 @@ void GitClient::push(const QString &workingDirectory, const QStringList &pushArg
|
|||||||
QMessageBox::No) == QMessageBox::Yes) {
|
QMessageBox::No) == QMessageBox::Yes) {
|
||||||
|
|
||||||
const QStringList fallbackCommandParts =
|
const QStringList fallbackCommandParts =
|
||||||
m_pushFallbackCommand.split(' ', Utils::SkipEmptyParts);
|
m_pushFallbackCommand.split(' ', Qt::SkipEmptyParts);
|
||||||
VcsCommand *rePushCommand = vcsExec(workingDirectory,
|
VcsCommand *rePushCommand = vcsExec(workingDirectory,
|
||||||
fallbackCommandParts.mid(1),
|
fallbackCommandParts.mid(1),
|
||||||
nullptr, true, VcsCommand::ShowSuccessMessage);
|
nullptr, true, VcsCommand::ShowSuccessMessage);
|
||||||
|
@@ -270,7 +270,7 @@ void LocalHelpManager::setScrollWheelZoomingEnabled(bool enabled)
|
|||||||
QStringList LocalHelpManager::lastShownPages()
|
QStringList LocalHelpManager::lastShownPages()
|
||||||
{
|
{
|
||||||
const QVariant value = Core::ICore::settings()->value(kLastShownPagesKey, QVariant());
|
const QVariant value = Core::ICore::settings()->value(kLastShownPagesKey, QVariant());
|
||||||
return value.toString().split(Constants::ListSeparator, Utils::SkipEmptyParts);
|
return value.toString().split(Constants::ListSeparator, Qt::SkipEmptyParts);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalHelpManager::setLastShownPages(const QStringList &pages)
|
void LocalHelpManager::setLastShownPages(const QStringList &pages)
|
||||||
@@ -282,7 +282,7 @@ QList<float> LocalHelpManager::lastShownPagesZoom()
|
|||||||
{
|
{
|
||||||
const QVariant value = Core::ICore::settings()->value(kLastShownPagesZoomKey, QVariant());
|
const QVariant value = Core::ICore::settings()->value(kLastShownPagesZoomKey, QVariant());
|
||||||
const QStringList stringValues = value.toString().split(Constants::ListSeparator,
|
const QStringList stringValues = value.toString().split(Constants::ListSeparator,
|
||||||
Utils::SkipEmptyParts);
|
Qt::SkipEmptyParts);
|
||||||
return Utils::transform(stringValues, [](const QString &str) { return str.toFloat(); });
|
return Utils::transform(stringValues, [](const QString &str) { return str.toFloat(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -113,7 +113,7 @@ QComboBox *OpenPagesManager::openPagesComboBox() const
|
|||||||
QStringList splitString(const QVariant &value)
|
QStringList splitString(const QVariant &value)
|
||||||
{
|
{
|
||||||
using namespace Help::Constants;
|
using namespace Help::Constants;
|
||||||
return value.toString().split(ListSeparator, Utils::SkipEmptyParts);
|
return value.toString().split(ListSeparator, Qt::SkipEmptyParts);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenPagesManager::setupInitialPages()
|
void OpenPagesManager::setupInitialPages()
|
||||||
|
@@ -263,7 +263,7 @@ void SearchWidget::contextMenuEvent(QContextMenuEvent *contextMenuEvent)
|
|||||||
|
|
||||||
QStringList SearchWidget::currentSearchTerms() const
|
QStringList SearchWidget::currentSearchTerms() const
|
||||||
{
|
{
|
||||||
return searchEngine->searchInput().split(QRegularExpression("\\W+"), Utils::SkipEmptyParts);
|
return searchEngine->searchInput().split(QRegularExpression("\\W+"), Qt::SkipEmptyParts);
|
||||||
}
|
}
|
||||||
|
|
||||||
// #pragma mark -- SearchSideBarItem
|
// #pragma mark -- SearchSideBarItem
|
||||||
|
@@ -113,7 +113,7 @@ static QVector<QSize> stringToSizes(const QString &s)
|
|||||||
{
|
{
|
||||||
QVector<QSize> result;
|
QVector<QSize> result;
|
||||||
const QString trimmed = s.trimmed();
|
const QString trimmed = s.trimmed();
|
||||||
const QVector<QStringRef> &sizes = trimmed.splitRef(',', Utils::SkipEmptyParts);
|
const QVector<QStringRef> &sizes = trimmed.splitRef(',', Qt::SkipEmptyParts);
|
||||||
result.reserve(sizes.size());
|
result.reserve(sizes.size());
|
||||||
for (const QStringRef &sizeSpec : sizes) {
|
for (const QStringRef &sizeSpec : sizes) {
|
||||||
const QSize size = sizeFromString(sizeSpec);
|
const QSize size = sizeFromString(sizeSpec);
|
||||||
|
@@ -813,8 +813,8 @@ QString BaseSettingsWidget::name() const
|
|||||||
|
|
||||||
LanguageFilter BaseSettingsWidget::filter() const
|
LanguageFilter BaseSettingsWidget::filter() const
|
||||||
{
|
{
|
||||||
return {m_mimeTypes->text().split(filterSeparator, Utils::SkipEmptyParts),
|
return {m_mimeTypes->text().split(filterSeparator, Qt::SkipEmptyParts),
|
||||||
m_filePattern->text().split(filterSeparator, Utils::SkipEmptyParts)};
|
m_filePattern->text().split(filterSeparator, Qt::SkipEmptyParts)};
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseSettings::StartBehavior BaseSettingsWidget::startupBehavior() const
|
BaseSettings::StartBehavior BaseSettingsWidget::startupBehavior() const
|
||||||
@@ -913,7 +913,7 @@ private:
|
|||||||
|
|
||||||
void BaseSettingsWidget::showAddMimeTypeDialog()
|
void BaseSettingsWidget::showAddMimeTypeDialog()
|
||||||
{
|
{
|
||||||
MimeTypeDialog dialog(m_mimeTypes->text().split(filterSeparator, Utils::SkipEmptyParts),
|
MimeTypeDialog dialog(m_mimeTypes->text().split(filterSeparator, Qt::SkipEmptyParts),
|
||||||
Core::ICore::dialogParent());
|
Core::ICore::dialogParent());
|
||||||
if (dialog.exec() == QDialog::Rejected)
|
if (dialog.exec() == QDialog::Rejected)
|
||||||
return;
|
return;
|
||||||
|
@@ -429,7 +429,7 @@ public:
|
|||||||
|
|
||||||
QStringList entries() const
|
QStringList entries() const
|
||||||
{
|
{
|
||||||
return textEditWidget()->toPlainText().split(QLatin1Char('\n'), Utils::SkipEmptyParts);
|
return textEditWidget()->toPlainText().split(QLatin1Char('\n'), Qt::SkipEmptyParts);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString text() const
|
QString text() const
|
||||||
@@ -548,7 +548,7 @@ void CustomToolChainConfigWidget::applyImpl()
|
|||||||
tc->setMakeCommand(m_makeCommand->filePath());
|
tc->setMakeCommand(m_makeCommand->filePath());
|
||||||
tc->setTargetAbi(m_abiWidget->currentAbi());
|
tc->setTargetAbi(m_abiWidget->currentAbi());
|
||||||
Macros macros = Utils::transform<QVector>(
|
Macros macros = Utils::transform<QVector>(
|
||||||
m_predefinedDetails->text().split('\n', Utils::SkipEmptyParts),
|
m_predefinedDetails->text().split('\n', Qt::SkipEmptyParts),
|
||||||
[](const QString &m) {
|
[](const QString &m) {
|
||||||
return Macro::fromKeyValue(m);
|
return Macro::fromKeyValue(m);
|
||||||
});
|
});
|
||||||
|
@@ -452,7 +452,7 @@ static inline IWizardFactory::WizardKind kindAttribute(const QXmlStreamReader &r
|
|||||||
static inline QSet<Id> readRequiredFeatures(const QXmlStreamReader &reader)
|
static inline QSet<Id> readRequiredFeatures(const QXmlStreamReader &reader)
|
||||||
{
|
{
|
||||||
QString value = reader.attributes().value(QLatin1String(featuresRequiredC)).toString();
|
QString value = reader.attributes().value(QLatin1String(featuresRequiredC)).toString();
|
||||||
QStringList stringList = value.split(QLatin1Char(','), Utils::SkipEmptyParts);
|
QStringList stringList = value.split(QLatin1Char(','), Qt::SkipEmptyParts);
|
||||||
QSet<Id> features;
|
QSet<Id> features;
|
||||||
foreach (const QString &string, stringList)
|
foreach (const QString &string, stringList)
|
||||||
features |= Id::fromString(string);
|
features |= Id::fromString(string);
|
||||||
|
@@ -83,7 +83,7 @@ public:
|
|||||||
m_view.setHeaderLabel(varName);
|
m_view.setHeaderLabel(varName);
|
||||||
m_view.setDragDropMode(QAbstractItemView::InternalMove);
|
m_view.setDragDropMode(QAbstractItemView::InternalMove);
|
||||||
const QStringList pathList = paths.split(Utils::HostOsInfo::pathListSeparator(),
|
const QStringList pathList = paths.split(Utils::HostOsInfo::pathListSeparator(),
|
||||||
Utils::SkipEmptyParts);
|
Qt::SkipEmptyParts);
|
||||||
for (const QString &path : pathList)
|
for (const QString &path : pathList)
|
||||||
addPath(path);
|
addPath(path);
|
||||||
|
|
||||||
@@ -447,7 +447,7 @@ bool EnvironmentWidget::currentEntryIsPathList(const QModelIndex ¤t) const
|
|||||||
if (valueIndex.column() == 0)
|
if (valueIndex.column() == 0)
|
||||||
valueIndex = valueIndex.siblingAtColumn(1);
|
valueIndex = valueIndex.siblingAtColumn(1);
|
||||||
const QStringList entries = d->m_model->data(valueIndex).toString()
|
const QStringList entries = d->m_model->data(valueIndex).toString()
|
||||||
.split(Utils::HostOsInfo::pathListSeparator(), Utils::SkipEmptyParts);
|
.split(Utils::HostOsInfo::pathListSeparator(), Qt::SkipEmptyParts);
|
||||||
if (entries.length() < 2)
|
if (entries.length() < 2)
|
||||||
return false;
|
return false;
|
||||||
for (const QString &potentialDir : entries) {
|
for (const QString &potentialDir : entries) {
|
||||||
|
@@ -210,7 +210,7 @@ void JsonSummaryPage::addToProject(const JsonWizard::GeneratorFiles &files)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const QStringList dependencies = m_wizard->stringValue("Dependencies")
|
const QStringList dependencies = m_wizard->stringValue("Dependencies")
|
||||||
.split(':', Utils::SkipEmptyParts);
|
.split(':', Qt::SkipEmptyParts);
|
||||||
if (!dependencies.isEmpty())
|
if (!dependencies.isEmpty())
|
||||||
folder->addDependencies(dependencies);
|
folder->addDependencies(dependencies);
|
||||||
}
|
}
|
||||||
|
@@ -324,7 +324,7 @@ static QStringList environmentTemplatesPaths()
|
|||||||
|
|
||||||
if (!envTempPath.isEmpty()) {
|
if (!envTempPath.isEmpty()) {
|
||||||
for (const QString &path : envTempPath
|
for (const QString &path : envTempPath
|
||||||
.split(Utils::HostOsInfo::pathListSeparator(), Utils::SkipEmptyParts)) {
|
.split(Utils::HostOsInfo::pathListSeparator(), Qt::SkipEmptyParts)) {
|
||||||
QString canonicalPath = QDir(path).canonicalPath();
|
QString canonicalPath = QDir(path).canonicalPath();
|
||||||
if (!canonicalPath.isEmpty() && !paths.contains(canonicalPath))
|
if (!canonicalPath.isEmpty() && !paths.contains(canonicalPath))
|
||||||
paths.append(canonicalPath);
|
paths.append(canonicalPath);
|
||||||
|
@@ -2014,7 +2014,7 @@ void ProjectExplorerPlugin::extensionsInitialized()
|
|||||||
const QString gitBinary = Core::ICore::settings()->value("Git/BinaryPath", "git")
|
const QString gitBinary = Core::ICore::settings()->value("Git/BinaryPath", "git")
|
||||||
.toString();
|
.toString();
|
||||||
const QStringList rawGitSearchPaths = Core::ICore::settings()->value("Git/Path")
|
const QStringList rawGitSearchPaths = Core::ICore::settings()->value("Git/Path")
|
||||||
.toString().split(':', Utils::SkipEmptyParts);
|
.toString().split(':', Qt::SkipEmptyParts);
|
||||||
const Utils::FilePaths gitSearchPaths = Utils::transform(rawGitSearchPaths,
|
const Utils::FilePaths gitSearchPaths = Utils::transform(rawGitSearchPaths,
|
||||||
[](const QString &rawPath) { return Utils::FilePath::fromString(rawPath); });
|
[](const QString &rawPath) { return Utils::FilePath::fromString(rawPath); });
|
||||||
const Utils::FilePath fullGitPath = Utils::Environment::systemEnvironment()
|
const Utils::FilePath fullGitPath = Utils::Environment::systemEnvironment()
|
||||||
|
@@ -79,7 +79,7 @@ static FolderNode *recursiveFindOrCreateFolderNode(FolderNode *folder,
|
|||||||
directoryWithoutPrefix = directory;
|
directoryWithoutPrefix = directory;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QStringList parts = directoryWithoutPrefix.toString().split('/', Utils::SkipEmptyParts);
|
QStringList parts = directoryWithoutPrefix.toString().split('/', Qt::SkipEmptyParts);
|
||||||
if (!Utils::HostOsInfo::isWindowsHost() && !isRelative && !parts.isEmpty())
|
if (!Utils::HostOsInfo::isWindowsHost() && !isRelative && !parts.isEmpty())
|
||||||
parts[0].prepend('/');
|
parts[0].prepend('/');
|
||||||
|
|
||||||
|
@@ -350,7 +350,7 @@ void SelectableFilesModel::collectFiles(Tree *root, Utils::FilePaths *result) co
|
|||||||
QList<Glob> SelectableFilesModel::parseFilter(const QString &filter)
|
QList<Glob> SelectableFilesModel::parseFilter(const QString &filter)
|
||||||
{
|
{
|
||||||
QList<Glob> result;
|
QList<Glob> result;
|
||||||
const QStringList list = filter.split(QLatin1Char(';'), Utils::SkipEmptyParts);
|
const QStringList list = filter.split(QLatin1Char(';'), Qt::SkipEmptyParts);
|
||||||
for (const QString &e : list) {
|
for (const QString &e : list) {
|
||||||
QString entry = e.trimmed();
|
QString entry = e.trimmed();
|
||||||
Glob g;
|
Glob g;
|
||||||
|
@@ -51,7 +51,7 @@ static QStringList qt_clean_filter_list(const QString &filter)
|
|||||||
QString f = filter;
|
QString f = filter;
|
||||||
if (match.hasMatch())
|
if (match.hasMatch())
|
||||||
f = match.captured(2);
|
f = match.captured(2);
|
||||||
return f.split(QLatin1Char(' '), Utils::SkipEmptyParts);
|
return f.split(QLatin1Char(' '), Qt::SkipEmptyParts);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool validateLibraryPath(const Utils::FilePath &filePath,
|
static bool validateLibraryPath(const Utils::FilePath &filePath,
|
||||||
|
@@ -2133,7 +2133,7 @@ static QStringList extractFieldsFromBuildString(const QByteArray &buildString)
|
|||||||
result.append(match.captured(1)); // qtVersion
|
result.append(match.captured(1)); // qtVersion
|
||||||
|
|
||||||
// Abi info string:
|
// Abi info string:
|
||||||
QStringList abiInfo = match.captured(2).split('-', Utils::SkipEmptyParts);
|
QStringList abiInfo = match.captured(2).split('-', Qt::SkipEmptyParts);
|
||||||
|
|
||||||
result.append(abiInfo.takeFirst()); // cpu
|
result.append(abiInfo.takeFirst()); // cpu
|
||||||
|
|
||||||
|
@@ -337,9 +337,9 @@ void ExamplesListModel::parseExamples(QXmlStreamReader *reader,
|
|||||||
} else if (reader->name() == QLatin1String("dependency")) {
|
} else if (reader->name() == QLatin1String("dependency")) {
|
||||||
item->dependencies.append(projectsOffset + slash + reader->readElementText(QXmlStreamReader::ErrorOnUnexpectedElement));
|
item->dependencies.append(projectsOffset + slash + reader->readElementText(QXmlStreamReader::ErrorOnUnexpectedElement));
|
||||||
} else if (reader->name() == QLatin1String("tags")) {
|
} else if (reader->name() == QLatin1String("tags")) {
|
||||||
item->tags = trimStringList(reader->readElementText(QXmlStreamReader::ErrorOnUnexpectedElement).split(QLatin1Char(','), Utils::SkipEmptyParts));
|
item->tags = trimStringList(reader->readElementText(QXmlStreamReader::ErrorOnUnexpectedElement).split(QLatin1Char(','), Qt::SkipEmptyParts));
|
||||||
} else if (reader->name() == QLatin1String("platforms")) {
|
} else if (reader->name() == QLatin1String("platforms")) {
|
||||||
item->platforms = trimStringList(reader->readElementText(QXmlStreamReader::ErrorOnUnexpectedElement).split(QLatin1Char(','), Utils::SkipEmptyParts));
|
item->platforms = trimStringList(reader->readElementText(QXmlStreamReader::ErrorOnUnexpectedElement).split(QLatin1Char(','), Qt::SkipEmptyParts));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QXmlStreamReader::EndElement:
|
case QXmlStreamReader::EndElement:
|
||||||
|
@@ -88,7 +88,7 @@ private:
|
|||||||
{
|
{
|
||||||
QList<DeviceProcessItem> processes;
|
QList<DeviceProcessItem> processes;
|
||||||
const QStringList lines = listProcessesReply.split(QString::fromLatin1(Delimiter0)
|
const QStringList lines = listProcessesReply.split(QString::fromLatin1(Delimiter0)
|
||||||
+ QString::fromLatin1(Delimiter1), Utils::SkipEmptyParts);
|
+ QString::fromLatin1(Delimiter1), Qt::SkipEmptyParts);
|
||||||
foreach (const QString &line, lines) {
|
foreach (const QString &line, lines) {
|
||||||
const QStringList elements = line.split(QLatin1Char('\n'));
|
const QStringList elements = line.split(QLatin1Char('\n'));
|
||||||
if (elements.count() < 4) {
|
if (elements.count() < 4) {
|
||||||
|
@@ -108,7 +108,7 @@ void RemoteLinuxEnvironmentReader::remoteProcessFinished()
|
|||||||
QString remoteOutput = QString::fromUtf8(m_deviceProcess->readAllStandardOutput());
|
QString remoteOutput = QString::fromUtf8(m_deviceProcess->readAllStandardOutput());
|
||||||
if (!remoteOutput.isEmpty()) {
|
if (!remoteOutput.isEmpty()) {
|
||||||
m_env = Utils::Environment(remoteOutput.split(QLatin1Char('\n'),
|
m_env = Utils::Environment(remoteOutput.split(QLatin1Char('\n'),
|
||||||
Utils::SkipEmptyParts), Utils::OsTypeLinux);
|
Qt::SkipEmptyParts), Utils::OsTypeLinux);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setFinished();
|
setFinished();
|
||||||
|
@@ -153,9 +153,9 @@ void ColorThemes::setDocument(ScxmlEditor::PluginInterface::ScxmlDocument *doc)
|
|||||||
if (m_document) {
|
if (m_document) {
|
||||||
PluginInterface::ScxmlTag *scxmlTag = m_document->scxmlRootTag();
|
PluginInterface::ScxmlTag *scxmlTag = m_document->scxmlRootTag();
|
||||||
if (scxmlTag && scxmlTag->hasEditorInfo(Constants::C_SCXML_EDITORINFO_COLORS)) {
|
if (scxmlTag && scxmlTag->hasEditorInfo(Constants::C_SCXML_EDITORINFO_COLORS)) {
|
||||||
const QStringList colors = scxmlTag->editorInfo(Constants::C_SCXML_EDITORINFO_COLORS).split(";;", Utils::SkipEmptyParts);
|
const QStringList colors = scxmlTag->editorInfo(Constants::C_SCXML_EDITORINFO_COLORS).split(";;", Qt::SkipEmptyParts);
|
||||||
for (const QString &color : colors) {
|
for (const QString &color : colors) {
|
||||||
const QStringList colorInfo = color.split("_", Utils::SkipEmptyParts);
|
const QStringList colorInfo = color.split("_", Qt::SkipEmptyParts);
|
||||||
if (colorInfo.count() == 2)
|
if (colorInfo.count() == 2)
|
||||||
documentColors[colorInfo[0]] = colorInfo[1];
|
documentColors[colorInfo[0]] = colorInfo[1];
|
||||||
}
|
}
|
||||||
|
@@ -287,7 +287,7 @@ void GraphicsScene::paste(const QPointF &targetPos)
|
|||||||
QString strMinPos = QLatin1String(mimeData->data("StateChartEditor/CopiedMinPos"));
|
QString strMinPos = QLatin1String(mimeData->data("StateChartEditor/CopiedMinPos"));
|
||||||
QPointF minPos(0, 0);
|
QPointF minPos(0, 0);
|
||||||
if (!strMinPos.isEmpty()) {
|
if (!strMinPos.isEmpty()) {
|
||||||
QStringList coords = strMinPos.split(":", Utils::SkipEmptyParts);
|
QStringList coords = strMinPos.split(":", Qt::SkipEmptyParts);
|
||||||
if (coords.count() == 2)
|
if (coords.count() == 2)
|
||||||
minPos = QPointF(coords[0].toDouble(), coords[1].toDouble());
|
minPos = QPointF(coords[0].toDouble(), coords[1].toDouble());
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ void Serializer::read(QPoint &d)
|
|||||||
|
|
||||||
void Serializer::setData(const QString &d)
|
void Serializer::setData(const QString &d)
|
||||||
{
|
{
|
||||||
m_data = d.split(m_separator, Utils::SkipEmptyParts);
|
m_data = d.split(m_separator, Qt::SkipEmptyParts);
|
||||||
m_index = 0;
|
m_index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -121,7 +121,7 @@ void StateItem::updateAttributes()
|
|||||||
// Check initial attribute
|
// Check initial attribute
|
||||||
QString strNewId = tagValue("id", true);
|
QString strNewId = tagValue("id", true);
|
||||||
if (!m_parallelState) {
|
if (!m_parallelState) {
|
||||||
QStringList NSIDs = strNewId.split(tag()->document()->nameSpaceDelimiter(), Utils::SkipEmptyParts);
|
QStringList NSIDs = strNewId.split(tag()->document()->nameSpaceDelimiter(), Qt::SkipEmptyParts);
|
||||||
if (!NSIDs.isEmpty()) {
|
if (!NSIDs.isEmpty()) {
|
||||||
NSIDs[NSIDs.count() - 1] = m_stateNameItem->toPlainText();
|
NSIDs[NSIDs.count() - 1] = m_stateNameItem->toPlainText();
|
||||||
QString strOldId = NSIDs.join(tag()->document()->nameSpaceDelimiter());
|
QString strOldId = NSIDs.join(tag()->document()->nameSpaceDelimiter());
|
||||||
|
@@ -151,7 +151,7 @@ StatusList parseStatusOutput(const QString &output)
|
|||||||
{
|
{
|
||||||
StatusList changeSet;
|
StatusList changeSet;
|
||||||
const QString newLine = QString(QLatin1Char('\n'));
|
const QString newLine = QString(QLatin1Char('\n'));
|
||||||
const QStringList list = output.split(newLine, Utils::SkipEmptyParts);
|
const QStringList list = output.split(newLine, Qt::SkipEmptyParts);
|
||||||
foreach (const QString &l, list) {
|
foreach (const QString &l, list) {
|
||||||
const QString line =l.trimmed();
|
const QString line =l.trimmed();
|
||||||
if (line.size() > 8) {
|
if (line.size() > 8) {
|
||||||
|
@@ -98,7 +98,7 @@ QString FindInFiles::label() const
|
|||||||
|
|
||||||
const QChar slash = QLatin1Char('/');
|
const QChar slash = QLatin1Char('/');
|
||||||
const QStringList &nonEmptyComponents = path().toFileInfo().absoluteFilePath()
|
const QStringList &nonEmptyComponents = path().toFileInfo().absoluteFilePath()
|
||||||
.split(slash, Utils::SkipEmptyParts);
|
.split(slash, Qt::SkipEmptyParts);
|
||||||
return tr("%1 \"%2\":")
|
return tr("%1 \"%2\":")
|
||||||
.arg(title)
|
.arg(title)
|
||||||
.arg(nonEmptyComponents.isEmpty() ? QString(slash) : nonEmptyComponents.last());
|
.arg(nonEmptyComponents.isEmpty() ? QString(slash) : nonEmptyComponents.last());
|
||||||
|
@@ -142,7 +142,7 @@ void HighlighterSettings::fromSettings(const QString &category, QSettings *s)
|
|||||||
|
|
||||||
void HighlighterSettings::setIgnoredFilesPatterns(const QString &patterns)
|
void HighlighterSettings::setIgnoredFilesPatterns(const QString &patterns)
|
||||||
{
|
{
|
||||||
setExpressionsFromList(patterns.split(QLatin1Char(','), Utils::SkipEmptyParts));
|
setExpressionsFromList(patterns.split(QLatin1Char(','), Qt::SkipEmptyParts));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString HighlighterSettings::ignoredFilesPatterns() const
|
QString HighlighterSettings::ignoredFilesPatterns() const
|
||||||
|
@@ -85,7 +85,7 @@ void QmlJsTodoItemsScanner::processDocument(QmlJS::Document::Ptr doc)
|
|||||||
|
|
||||||
// Process every line
|
// Process every line
|
||||||
// TODO: Do not create QStringList, just iterate through a string tracking line endings.
|
// TODO: Do not create QStringList, just iterate through a string tracking line endings.
|
||||||
QStringList commentLines = source.split('\n', Utils::SkipEmptyParts);
|
QStringList commentLines = source.split('\n', Qt::SkipEmptyParts);
|
||||||
quint32 startLine = sourceLocation.startLine;
|
quint32 startLine = sourceLocation.startLine;
|
||||||
for (int j = 0; j < commentLines.count(); ++j) {
|
for (int j = 0; j < commentLines.count(); ++j) {
|
||||||
const QString &commentLine = commentLines.at(j);
|
const QString &commentLine = commentLines.at(j);
|
||||||
|
@@ -294,11 +294,11 @@ void Parser::Private::parseHeader(QIODevice *device)
|
|||||||
continue;
|
continue;
|
||||||
} else if (line.startsWith("positions: ")) {
|
} else if (line.startsWith("positions: ")) {
|
||||||
QString values = getValue(line, 11);
|
QString values = getValue(line, 11);
|
||||||
data->setPositions(values.split(' ', Utils::SkipEmptyParts));
|
data->setPositions(values.split(' ', Qt::SkipEmptyParts));
|
||||||
addressValuesCount = data->positions().count();
|
addressValuesCount = data->positions().count();
|
||||||
} else if (line.startsWith("events: ")) {
|
} else if (line.startsWith("events: ")) {
|
||||||
QString values = getValue(line, 8);
|
QString values = getValue(line, 8);
|
||||||
data->setEvents(values.split(' ', Utils::SkipEmptyParts));
|
data->setEvents(values.split(' ', Qt::SkipEmptyParts));
|
||||||
costValuesCount = data->events().count();
|
costValuesCount = data->events().count();
|
||||||
} else if (line.startsWith("version: ")) {
|
} else if (line.startsWith("version: ")) {
|
||||||
QString value = getValue(line, 9);
|
QString value = getValue(line, 9);
|
||||||
@@ -321,7 +321,7 @@ void Parser::Private::parseHeader(QIODevice *device)
|
|||||||
} else if (line.startsWith("summary: ")) {
|
} else if (line.startsWith("summary: ")) {
|
||||||
QString values = getValue(line, 9);
|
QString values = getValue(line, 9);
|
||||||
uint i = 0;
|
uint i = 0;
|
||||||
foreach (const QStringRef &value, values.splitRef(' ', Utils::SkipEmptyParts))
|
foreach (const QStringRef &value, values.splitRef(' ', Qt::SkipEmptyParts))
|
||||||
data->setTotalCost(i++, value.toULongLong());
|
data->setTotalCost(i++, value.toULongLong());
|
||||||
} else if (!line.trimmed().isEmpty()) {
|
} else if (!line.trimmed().isEmpty()) {
|
||||||
// handle line and exit parseHeader
|
// handle line and exit parseHeader
|
||||||
|
@@ -369,7 +369,7 @@ int VcsBaseClientSettings::vcsTimeoutS() const
|
|||||||
|
|
||||||
QStringList VcsBaseClientSettings::searchPathList() const
|
QStringList VcsBaseClientSettings::searchPathList() const
|
||||||
{
|
{
|
||||||
return stringValue(pathKey).split(HostOsInfo::pathListSeparator(), Utils::SkipEmptyParts);
|
return stringValue(pathKey).split(HostOsInfo::pathListSeparator(), Qt::SkipEmptyParts);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString VcsBaseClientSettings::settingsGroup() const
|
QString VcsBaseClientSettings::settingsGroup() const
|
||||||
|
@@ -103,7 +103,7 @@ CrashHandlerSetup::CrashHandlerSetup(const QString &appName,
|
|||||||
return;
|
return;
|
||||||
if (!QStringList{"1", "all", "yes"}.contains(value)) {
|
if (!QStringList{"1", "all", "yes"}.contains(value)) {
|
||||||
const QString binaryName = QFileInfo(QCoreApplication::applicationFilePath()).fileName();
|
const QString binaryName = QFileInfo(QCoreApplication::applicationFilePath()).fileName();
|
||||||
if (!value.split(",", Utils::SkipEmptyParts).contains(binaryName))
|
if (!value.split(",", Qt::SkipEmptyParts).contains(binaryName))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user