Android: Use qAsConst with non-const Qt containers in range-loops

Change-Id: I1242a5c62a27b7b8f30bb7b43ff406eceb4135f7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Alessandro Portale
2021-02-16 20:40:12 +01:00
parent 80dfaf3be3
commit 670616c6f9
7 changed files with 10 additions and 10 deletions

View File

@@ -538,7 +538,7 @@ void AndroidRunnerWorker::asyncStartHelper()
forceStop();
asyncStartLogcat();
for (const QString &entry : m_beforeStartAdbCommands)
for (const QString &entry : qAsConst(m_beforeStartAdbCommands))
runAdb(entry.split(' ', Qt::SkipEmptyParts));
QStringList args({"shell", "am", "start"});
@@ -825,7 +825,7 @@ void AndroidRunnerWorker::onProcessIdChanged(qint64 pid)
m_debugServerProcess.reset();
// Run adb commands after application quit.
for (const QString &entry: m_afterFinishAdbCommands)
for (const QString &entry: qAsConst(m_afterFinishAdbCommands))
runAdb(entry.split(' ', Qt::SkipEmptyParts));
} else {
// In debugging cases this will be funneled to the engine to actually start