forked from qt-creator/qt-creator
All: Use Utils::SkipEmptyParts
Task-number: QTCREATORBUG-24098 Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -36,26 +36,31 @@
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/messagemanager.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
|
||||
#include <projectexplorer/devicesupport/devicemanager.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
|
||||
#include <debugger/debuggeritemmanager.h>
|
||||
#include <debugger/debuggeritem.h>
|
||||
#include <debugger/debuggerkitinformation.h>
|
||||
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
#include <qtsupport/qtversionmanager.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/environment.h>
|
||||
#include <utils/environment.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/persistentsettings.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/runextensions.h>
|
||||
#include <utils/stringutils.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
#include <utils/environment.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDirIterator>
|
||||
@@ -612,7 +617,7 @@ QVector<AndroidDeviceInfo> AndroidConfig::connectedDevices(const FilePath &adbTo
|
||||
.arg(cmd.toUserOutput());
|
||||
return devices;
|
||||
}
|
||||
QStringList adbDevs = response.allOutput().split('\n', QString::SkipEmptyParts);
|
||||
QStringList adbDevs = response.allOutput().split('\n', Utils::SkipEmptyParts);
|
||||
if (adbDevs.empty())
|
||||
return devices;
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/stringutils.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
|
||||
#include <QApplication>
|
||||
@@ -145,7 +146,7 @@ bool AndroidManager::packageInstalled(const QString &deviceSerial,
|
||||
QStringList args = AndroidDeviceInfo::adbSelector(deviceSerial);
|
||||
args << "shell" << "pm" << "list" << "packages";
|
||||
QStringList lines = runAdbCommand(args).stdOut().split(QRegularExpression("[\\n\\r]"),
|
||||
QString::SkipEmptyParts);
|
||||
Utils::SkipEmptyParts);
|
||||
for (const QString &line : lines) {
|
||||
// Don't want to confuse com.abc.xyz with com.abc.xyz.def so check with
|
||||
// endsWith
|
||||
|
||||
@@ -41,13 +41,14 @@
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/runextensions.h>
|
||||
#include <utils/stringutils.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
#include <utils/temporaryfile.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/url.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QDirIterator>
|
||||
@@ -509,7 +510,7 @@ void AndroidRunnerWorker::asyncStartHelper()
|
||||
}
|
||||
|
||||
for (const QString &entry : m_beforeStartAdbCommands)
|
||||
runAdb(entry.split(' ', QString::SkipEmptyParts));
|
||||
runAdb(entry.split(' ', Utils::SkipEmptyParts));
|
||||
|
||||
QStringList args({"shell", "am", "start"});
|
||||
args << m_amStartExtraArgs;
|
||||
@@ -778,7 +779,7 @@ void AndroidRunnerWorker::onProcessIdChanged(qint64 pid)
|
||||
|
||||
// Run adb commands after application quit.
|
||||
for (const QString &entry: m_afterFinishAdbCommands)
|
||||
runAdb(entry.split(' ', QString::SkipEmptyParts));
|
||||
runAdb(entry.split(' ', Utils::SkipEmptyParts));
|
||||
} else {
|
||||
// In debugging cases this will be funneled to the engine to actually start
|
||||
// and attach gdb. Afterwards this ends up in handleRemoteDebuggerRunning() below.
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "androidsdkmanager.h"
|
||||
|
||||
#include "androidconstants.h"
|
||||
@@ -30,9 +31,10 @@
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/runextensions.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/runextensions.h>
|
||||
#include <utils/stringutils.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
|
||||
#include <QFutureWatcher>
|
||||
#include <QLoggingCategory>
|
||||
@@ -107,7 +109,7 @@ int parseProgress(const QString &out, bool &foundAssertion)
|
||||
if (out.isEmpty())
|
||||
return progress;
|
||||
QRegularExpression reg("(?<progress>\\d*)%");
|
||||
QStringList lines = out.split(QRegularExpression("[\\n\\r]"), QString::SkipEmptyParts);
|
||||
QStringList lines = out.split(QRegularExpression("[\\n\\r]"), Utils::SkipEmptyParts);
|
||||
for (const QString &line : lines) {
|
||||
QRegularExpressionMatch match = reg.match(line);
|
||||
if (match.hasMatch()) {
|
||||
|
||||
Reference in New Issue
Block a user