Commit 56409f5a authored by hjk's avatar hjk

Replace a few occurrences of QStringList() << ...

... by something shorter.

Change-Id: I363b4e509adb07997517b2d233246a333aea4aea
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent 95e2d7f5
...@@ -873,7 +873,7 @@ ...@@ -873,7 +873,7 @@
\code \code
auto something = new MyCustomType; auto something = new MyCustomType;
auto keyEvent = static_cast<QKeyEvent *>(event); auto keyEvent = static_cast<QKeyEvent *>(event);
auto myList = QStringList() << QLatin1String("FooThing") << QLatin1String("BarThing"); auto myList = QStringList({ "FooThing", "BarThing" });
\endcode \endcode
\li When assigning iterator types. \li When assigning iterator types.
......
...@@ -106,7 +106,7 @@ enum { debugLeaks = 0 }; ...@@ -106,7 +106,7 @@ enum { debugLeaks = 0 };
loading. loading.
\code \code
// 'plugins' and subdirs will be searched for plugins // 'plugins' and subdirs will be searched for plugins
PluginManager::setPluginPaths(QStringList() << "plugins"); PluginManager::setPluginPaths(QStringList("plugins"));
PluginManager::loadPlugins(); // try to load all the plugins PluginManager::loadPlugins(); // try to load all the plugins
\endcode \endcode
Additionally, it is possible to directly access the plugin specifications Additionally, it is possible to directly access the plugin specifications
......
...@@ -82,7 +82,7 @@ void ConfigController::readStereotypeDefinitions(const QString &path) ...@@ -82,7 +82,7 @@ void ConfigController::readStereotypeDefinitions(const QString &path)
fileNames.append(fileInfo.fileName()); fileNames.append(fileInfo.fileName());
} else if (fileInfo.isDir()) { } else if (fileInfo.isDir()) {
dir.setPath(path); dir.setPath(path);
dir.setNameFilters(QStringList() << QStringLiteral("*.def")); dir.setNameFilters(QStringList("*.def"));
fileNames = dir.entryList(QDir::Files); fileNames = dir.entryList(QDir::Files);
} else { } else {
// TODO add error handling // TODO add error handling
......
...@@ -147,9 +147,9 @@ void StereotypeDisplayVisitor::visitDItem(const DItem *item) ...@@ -147,9 +147,9 @@ void StereotypeDisplayVisitor::visitDItem(const DItem *item)
m_stereotypeSmartDisplay = DObject::StereotypeIcon; m_stereotypeSmartDisplay = DObject::StereotypeIcon;
visitDObject(item); visitDObject(item);
if (m_stereotypeIconId.isEmpty() && !item->shape().isEmpty()) if (m_stereotypeIconId.isEmpty() && !item->shape().isEmpty())
m_shapeIconId = m_stereotypeController->findStereotypeIconId(StereotypeIcon::ElementItem, QStringList() << item->shape()); m_shapeIconId = m_stereotypeController->findStereotypeIconId(StereotypeIcon::ElementItem, QStringList(item->shape()));
if (m_shapeIconId.isEmpty() && !item->variety().isEmpty()) if (m_shapeIconId.isEmpty() && !item->variety().isEmpty())
m_shapeIconId = m_stereotypeController->findStereotypeIconId(StereotypeIcon::ElementItem, QStringList() << item->variety()); m_shapeIconId = m_stereotypeController->findStereotypeIconId(StereotypeIcon::ElementItem, QStringList(item->variety()));
} }
} // namespace qmt } // namespace qmt
...@@ -461,7 +461,7 @@ Qt::DropActions TreeModel::supportedDropActions() const ...@@ -461,7 +461,7 @@ Qt::DropActions TreeModel::supportedDropActions() const
QStringList TreeModel::mimeTypes() const QStringList TreeModel::mimeTypes() const
{ {
return QStringList() << QStringLiteral("text/model-elements"); return QStringList(QString("text/model-elements"));
} }
void TreeModel::onBeginResetModel() void TreeModel::onBeginResetModel()
......
...@@ -698,7 +698,7 @@ void PropertiesView::MView::visitMAssociation(const MAssociation *association) ...@@ -698,7 +698,7 @@ void PropertiesView::MView::visitMAssociation(const MAssociation *association)
m_endANavigable->setEnabled(isSingleSelection); m_endANavigable->setEnabled(isSingleSelection);
if (m_endAKind == 0) { if (m_endAKind == 0) {
m_endAKind = new QComboBox(m_topWidget); m_endAKind = new QComboBox(m_topWidget);
m_endAKind->addItems(QStringList() << tr("Association") << tr("Aggregation") << tr("Composition")); m_endAKind->addItems({ tr("Association"), tr("Aggregation"), tr("Composition") });
addRow(tr("Relationship:"), m_endAKind, "relationship a"); addRow(tr("Relationship:"), m_endAKind, "relationship a");
connect(m_endAKind, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), connect(m_endAKind, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, &PropertiesView::MView::onAssociationEndAKindChanged); this, &PropertiesView::MView::onAssociationEndAKindChanged);
...@@ -763,7 +763,7 @@ void PropertiesView::MView::visitMAssociation(const MAssociation *association) ...@@ -763,7 +763,7 @@ void PropertiesView::MView::visitMAssociation(const MAssociation *association)
m_endBNavigable->setEnabled(isSingleSelection); m_endBNavigable->setEnabled(isSingleSelection);
if (m_endBKind == 0) { if (m_endBKind == 0) {
m_endBKind = new QComboBox(m_topWidget); m_endBKind = new QComboBox(m_topWidget);
m_endBKind->addItems(QStringList() << tr("Association") << tr("Aggregation") << tr("Composition")); m_endBKind->addItems({ tr("Association"), tr("Aggregation"), tr("Composition") });
addRow(tr("Relationship:"), m_endBKind, "relationship b"); addRow(tr("Relationship:"), m_endBKind, "relationship b");
connect(m_endBKind, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), connect(m_endBKind, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, &PropertiesView::MView::onAssociationEndBKindChanged); this, &PropertiesView::MView::onAssociationEndBKindChanged);
...@@ -862,9 +862,8 @@ void PropertiesView::MView::visitDObject(const DObject *object) ...@@ -862,9 +862,8 @@ void PropertiesView::MView::visitDObject(const DObject *object)
} }
if (m_visualSecondaryRoleSelector == 0) { if (m_visualSecondaryRoleSelector == 0) {
m_visualSecondaryRoleSelector = new QComboBox(m_topWidget); m_visualSecondaryRoleSelector = new QComboBox(m_topWidget);
m_visualSecondaryRoleSelector->addItems(QStringList() << tr("Normal") m_visualSecondaryRoleSelector->addItems({ tr("Normal"), tr("Lighter"), tr("Darker"),
<< tr("Lighter") << tr("Darker") tr("Soften"), tr("Outline") });
<< tr("Soften") << tr("Outline"));
addRow(tr("Role:"), m_visualSecondaryRoleSelector, "role"); addRow(tr("Role:"), m_visualSecondaryRoleSelector, "role");
connect(m_visualSecondaryRoleSelector, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), connect(m_visualSecondaryRoleSelector, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, &PropertiesView::MView::onVisualSecondaryRoleChanged); this, &PropertiesView::MView::onVisualSecondaryRoleChanged);
...@@ -891,8 +890,8 @@ void PropertiesView::MView::visitDObject(const DObject *object) ...@@ -891,8 +890,8 @@ void PropertiesView::MView::visitDObject(const DObject *object)
} }
if (m_stereotypeDisplaySelector == 0) { if (m_stereotypeDisplaySelector == 0) {
m_stereotypeDisplaySelector = new QComboBox(m_topWidget); m_stereotypeDisplaySelector = new QComboBox(m_topWidget);
m_stereotypeDisplaySelector->addItems(QStringList() << tr("Smart") << tr("None") << tr("Label") m_stereotypeDisplaySelector->addItems({ tr("Smart"), tr("None"), tr("Label"),
<< tr("Decoration") << tr("Icon")); tr("Decoration"), tr("Icon") });
addRow(tr("Stereotype display:"), m_stereotypeDisplaySelector, "stereotype display"); addRow(tr("Stereotype display:"), m_stereotypeDisplaySelector, "stereotype display");
connect(m_stereotypeDisplaySelector, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), connect(m_stereotypeDisplaySelector, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, &PropertiesView::MView::onStereotypeDisplayChanged); this, &PropertiesView::MView::onStereotypeDisplayChanged);
...@@ -929,7 +928,7 @@ void PropertiesView::MView::visitDClass(const DClass *klass) ...@@ -929,7 +928,7 @@ void PropertiesView::MView::visitDClass(const DClass *klass)
visitDObject(klass); visitDObject(klass);
if (m_templateDisplaySelector == 0) { if (m_templateDisplaySelector == 0) {
m_templateDisplaySelector = new QComboBox(m_topWidget); m_templateDisplaySelector = new QComboBox(m_topWidget);
m_templateDisplaySelector->addItems(QStringList() << tr("Smart") << tr("Box") << tr("Angle Brackets")); m_templateDisplaySelector->addItems({ tr("Smart"), tr("Box"), tr("Angle Brackets") });
addRow(tr("Template display:"), m_templateDisplaySelector, "template display"); addRow(tr("Template display:"), m_templateDisplaySelector, "template display");
connect(m_templateDisplaySelector, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), connect(m_templateDisplaySelector, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, &PropertiesView::MView::onTemplateDisplayChanged); this, &PropertiesView::MView::onTemplateDisplayChanged);
...@@ -1378,7 +1377,8 @@ void PropertiesView::MView::setTitle(const MItem *item, const QList<V *> &elemen ...@@ -1378,7 +1377,8 @@ void PropertiesView::MView::setTitle(const MItem *item, const QList<V *> &elemen
if (filtered.size() == elements.size()) { if (filtered.size() == elements.size()) {
if (elements.size() == 1) { if (elements.size() == 1) {
if (item && !item->isVarietyEditable()) { if (item && !item->isVarietyEditable()) {
QString stereotypeIconId = m_propertiesView->stereotypeController()->findStereotypeIconId(StereotypeIcon::ElementItem, QStringList() << item->variety()); QString stereotypeIconId = m_propertiesView->stereotypeController()
->findStereotypeIconId(StereotypeIcon::ElementItem, QStringList(item->variety()));
if (!stereotypeIconId.isEmpty()) { if (!stereotypeIconId.isEmpty()) {
StereotypeIcon stereotypeIcon = m_propertiesView->stereotypeController()->findStereotypeIcon(stereotypeIconId); StereotypeIcon stereotypeIcon = m_propertiesView->stereotypeController()->findStereotypeIcon(stereotypeIconId);
m_propertiesTitle = stereotypeIcon.title(); m_propertiesTitle = stereotypeIcon.title();
......
...@@ -313,19 +313,19 @@ void DiagramSceneController::dropNewElement(const QString &newElementId, const Q ...@@ -313,19 +313,19 @@ void DiagramSceneController::dropNewElement(const QString &newElementId, const Q
auto package = new MPackage(); auto package = new MPackage();
newName = tr("New Package"); newName = tr("New Package");
if (!stereotype.isEmpty()) if (!stereotype.isEmpty())
package->setStereotypes(QStringList() << stereotype); package->setStereotypes({ stereotype });
newObject = package; newObject = package;
} else if (newElementId == QLatin1String(ELEMENT_TYPE_COMPONENT)) { } else if (newElementId == QLatin1String(ELEMENT_TYPE_COMPONENT)) {
auto component = new MComponent(); auto component = new MComponent();
newName = tr("New Component"); newName = tr("New Component");
if (!stereotype.isEmpty()) if (!stereotype.isEmpty())
component->setStereotypes(QStringList() << stereotype); component->setStereotypes({ stereotype });
newObject = component; newObject = component;
} else if (newElementId == QLatin1String(ELEMENT_TYPE_CLASS)) { } else if (newElementId == QLatin1String(ELEMENT_TYPE_CLASS)) {
auto klass = new MClass(); auto klass = new MClass();
newName = tr("New Class"); newName = tr("New Class");
if (!stereotype.isEmpty()) if (!stereotype.isEmpty())
klass->setStereotypes(QStringList() << stereotype); klass->setStereotypes({ stereotype });
newObject = klass; newObject = klass;
} else if (newElementId == QLatin1String(ELEMENT_TYPE_ITEM)) { } else if (newElementId == QLatin1String(ELEMENT_TYPE_ITEM)) {
auto item = new MItem(); auto item = new MItem();
......
...@@ -245,7 +245,7 @@ void ModelManagerInterface::addTaskInternal(QFuture<void> result, const QString ...@@ -245,7 +245,7 @@ void ModelManagerInterface::addTaskInternal(QFuture<void> result, const QString
void ModelManagerInterface::loadQmlTypeDescriptionsInternal(const QString &resourcePath) void ModelManagerInterface::loadQmlTypeDescriptionsInternal(const QString &resourcePath)
{ {
const QDir typeFileDir(resourcePath + QLatin1String("/qml-type-descriptions")); const QDir typeFileDir(resourcePath + QLatin1String("/qml-type-descriptions"));
const QStringList qmlTypesExtensions = QStringList() << QLatin1String("*.qmltypes"); const QStringList qmlTypesExtensions = QStringList("*.qmltypes");
QFileInfoList qmlTypesFiles = typeFileDir.entryInfoList( QFileInfoList qmlTypesFiles = typeFileDir.entryInfoList(
qmlTypesExtensions, qmlTypesExtensions,
QDir::Files, QDir::Files,
...@@ -352,7 +352,7 @@ QFuture<void> ModelManagerInterface::refreshSourceFiles(const QStringList &sourc ...@@ -352,7 +352,7 @@ QFuture<void> ModelManagerInterface::refreshSourceFiles(const QStringList &sourc
void ModelManagerInterface::fileChangedOnDisk(const QString &path) void ModelManagerInterface::fileChangedOnDisk(const QString &path)
{ {
Utils::runAsync(&ModelManagerInterface::parse, Utils::runAsync(&ModelManagerInterface::parse,
workingCopyInternal(), QStringList() << path, workingCopyInternal(), QStringList(path),
this, Dialect(Dialect::AnyLanguage), true); this, Dialect(Dialect::AnyLanguage), true);
} }
......
...@@ -89,7 +89,7 @@ DropSupport::DropSupport(QWidget *parentWidget, const DropFilterFunction &filter ...@@ -89,7 +89,7 @@ DropSupport::DropSupport(QWidget *parentWidget, const DropFilterFunction &filter
QStringList DropSupport::mimeTypesForFilePaths() QStringList DropSupport::mimeTypesForFilePaths()
{ {
return QStringList() << QStringLiteral("text/uri-list"); return QStringList("text/uri-list");
} }
bool DropSupport::isFileDrop(QDropEvent *event) const bool DropSupport::isFileDrop(QDropEvent *event) const
......
...@@ -118,7 +118,7 @@ MimeType MimeDatabasePrivate::mimeTypeForName(const QString &nameOrAlias) ...@@ -118,7 +118,7 @@ MimeType MimeDatabasePrivate::mimeTypeForName(const QString &nameOrAlias)
QStringList MimeDatabasePrivate::mimeTypeForFileName(const QString &fileName, QString *foundSuffix) QStringList MimeDatabasePrivate::mimeTypeForFileName(const QString &fileName, QString *foundSuffix)
{ {
if (fileName.endsWith(QLatin1Char('/'))) if (fileName.endsWith(QLatin1Char('/')))
return QStringList() << QLatin1String("inode/directory"); return QStringList("inode/directory");
const QStringList matchingMimeTypes = provider()->findByFileName(QFileInfo(fileName).fileName(), foundSuffix); const QStringList matchingMimeTypes = provider()->findByFileName(QFileInfo(fileName).fileName(), foundSuffix);
return matchingMimeTypes; return matchingMimeTypes;
......
...@@ -154,7 +154,7 @@ namespace { ...@@ -154,7 +154,7 @@ namespace {
SynchronousProcess proc; SynchronousProcess proc;
proc.setProcessChannelMode(QProcess::MergedChannels); proc.setProcessChannelMode(QProcess::MergedChannels);
proc.setTimeoutS(30); proc.setTimeoutS(30);
SynchronousProcessResponse response = proc.runBlocking(executable, QStringList() << shell); SynchronousProcessResponse response = proc.runBlocking(executable, QStringList(shell));
if (response.result != SynchronousProcessResponse::Finished) if (response.result != SynchronousProcessResponse::Finished)
return true; return true;
return !response.allOutput().contains("x86-64"); return !response.allOutput().contains("x86-64");
...@@ -327,7 +327,7 @@ void AndroidConfig::updateNdkInformation() const ...@@ -327,7 +327,7 @@ void AndroidConfig::updateNdkInformation() const
return; return;
m_availableNdkPlatforms.clear(); m_availableNdkPlatforms.clear();
FileName path = ndkLocation(); FileName path = ndkLocation();
QDirIterator it(path.appendPath(QLatin1String("platforms")).toString(), QStringList() << QLatin1String("android-*"), QDir::Dirs); QDirIterator it(path.appendPath("platforms").toString(), QStringList("android-*"), QDir::Dirs);
while (it.hasNext()) { while (it.hasNext()) {
const QString &fileName = it.next(); const QString &fileName = it.next();
m_availableNdkPlatforms.push_back(fileName.midRef(fileName.lastIndexOf(QLatin1Char('-')) + 1).toInt()); m_availableNdkPlatforms.push_back(fileName.midRef(fileName.lastIndexOf(QLatin1Char('-')) + 1).toInt());
...@@ -378,7 +378,7 @@ void AndroidConfig::updateAvailableSdkPlatforms() const ...@@ -378,7 +378,7 @@ void AndroidConfig::updateAvailableSdkPlatforms() const
proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment()); proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment());
SynchronousProcessResponse response SynchronousProcessResponse response
= proc.runBlocking(androidToolPath().toString(), = proc.runBlocking(androidToolPath().toString(),
QStringList() << QLatin1String("list") << QLatin1String("target")); // list avaialbe AVDs QStringList({ "list", "target" })); // list available AVDs
if (response.result != SynchronousProcessResponse::Finished) if (response.result != SynchronousProcessResponse::Finished)
return; return;
...@@ -539,8 +539,7 @@ QVector<AndroidDeviceInfo> AndroidConfig::connectedDevices(const QString &adbToo ...@@ -539,8 +539,7 @@ QVector<AndroidDeviceInfo> AndroidConfig::connectedDevices(const QString &adbToo
QVector<AndroidDeviceInfo> devices; QVector<AndroidDeviceInfo> devices;
SynchronousProcess adbProc; SynchronousProcess adbProc;
adbProc.setTimeoutS(30); adbProc.setTimeoutS(30);
SynchronousProcessResponse response SynchronousProcessResponse response = adbProc.runBlocking(adbToolPath, QStringList("devices"));
= adbProc.runBlocking(adbToolPath, QStringList() << QLatin1String("devices"));
if (response.result != SynchronousProcessResponse::Finished) { if (response.result != SynchronousProcessResponse::Finished) {
if (error) if (error)
*error = QApplication::translate("AndroidConfiguration", *error = QApplication::translate("AndroidConfiguration",
...@@ -669,9 +668,7 @@ bool AndroidConfig::removeAVD(const QString &name) const ...@@ -669,9 +668,7 @@ bool AndroidConfig::removeAVD(const QString &name) const
proc.setTimeoutS(5); proc.setTimeoutS(5);
proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment()); proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment());
SynchronousProcessResponse response SynchronousProcessResponse response
= proc.runBlocking(androidToolPath().toString(), = proc.runBlocking(androidToolPath().toString(), QStringList({ "delete", "avd", "-n", name }));
QStringList() << QLatin1String("delete") << QLatin1String("avd")
<< QLatin1String("-n") << name);
return response.result == SynchronousProcessResponse::Finished && response.exitCode == 0; return response.result == SynchronousProcessResponse::Finished && response.exitCode == 0;
} }
...@@ -687,9 +684,7 @@ QVector<AndroidDeviceInfo> AndroidConfig::androidVirtualDevices(const QString &a ...@@ -687,9 +684,7 @@ QVector<AndroidDeviceInfo> AndroidConfig::androidVirtualDevices(const QString &a
SynchronousProcess proc; SynchronousProcess proc;
proc.setTimeoutS(20); proc.setTimeoutS(20);
proc.setProcessEnvironment(environment.toProcessEnvironment()); proc.setProcessEnvironment(environment.toProcessEnvironment());
SynchronousProcessResponse response SynchronousProcessResponse response = proc.run(androidTool, { "list", "avd" }); // list available AVDs
= proc.run(androidTool,
QStringList() << QLatin1String("list") << QLatin1String("avd")); // list available AVDs
if (response.result != SynchronousProcessResponse::Finished) if (response.result != SynchronousProcessResponse::Finished)
return devices; return devices;
...@@ -739,16 +734,16 @@ QVector<AndroidDeviceInfo> AndroidConfig::androidVirtualDevices(const QString &a ...@@ -739,16 +734,16 @@ QVector<AndroidDeviceInfo> AndroidConfig::androidVirtualDevices(const QString &a
int lastIndex = line.lastIndexOf(QLatin1Char('/')) + 1; int lastIndex = line.lastIndexOf(QLatin1Char('/')) + 1;
if (lastIndex >= line.size()) if (lastIndex >= line.size())
break; break;
dev.cpuAbi = QStringList() << line.mid(lastIndex); dev.cpuAbi = QStringList(line.mid(lastIndex));
} else if (line.contains(QLatin1String("ABI:"))) { } else if (line.contains(QLatin1String("ABI:"))) {
int lastIndex = line.lastIndexOf(QLatin1Char(' ')) + 1; int lastIndex = line.lastIndexOf(QLatin1Char(' ')) + 1;
if (lastIndex >= line.size()) if (lastIndex >= line.size())
break; break;
dev.cpuAbi = QStringList() << line.mid(lastIndex).trimmed(); dev.cpuAbi = QStringList(line.mid(lastIndex).trimmed());
} }
} }
// armeabi-v7a devices can also run armeabi code // armeabi-v7a devices can also run armeabi code
if (dev.cpuAbi == QStringList(QLatin1String("armeabi-v7a"))) if (dev.cpuAbi == QStringList("armeabi-v7a"))
dev.cpuAbi << QLatin1String("armeabi"); dev.cpuAbi << QLatin1String("armeabi");
dev.state = AndroidDeviceInfo::OkState; dev.state = AndroidDeviceInfo::OkState;
dev.type = AndroidDeviceInfo::Emulator; dev.type = AndroidDeviceInfo::Emulator;
...@@ -1354,8 +1349,8 @@ bool AndroidConfigurations::force32bitEmulator() ...@@ -1354,8 +1349,8 @@ bool AndroidConfigurations::force32bitEmulator()
QStringList AndroidDeviceInfo::adbSelector(const QString &serialNumber) QStringList AndroidDeviceInfo::adbSelector(const QString &serialNumber)
{ {
if (serialNumber.startsWith(QLatin1String("????"))) if (serialNumber.startsWith(QLatin1String("????")))
return QStringList() << QLatin1String("-d"); return QStringList("-d");
return QStringList() << QLatin1String("-s") << serialNumber; return QStringList({ "-s", serialNumber });
} }
const AndroidConfig &AndroidConfigurations::currentConfig() const AndroidConfig &AndroidConfigurations::currentConfig()
......
...@@ -69,7 +69,7 @@ static QStringList qtSoPaths(QtSupport::BaseQtVersion *qtVersion) ...@@ -69,7 +69,7 @@ static QStringList qtSoPaths(QtSupport::BaseQtVersion *qtVersion)
QString path = qtVersion->qmakeProperty(qMakeVariables[i]); QString path = qtVersion->qmakeProperty(qMakeVariables[i]);
if (path.isNull()) if (path.isNull())
continue; continue;
QDirIterator it(path, QStringList() << QLatin1String("*.so"), QDir::Files, QDirIterator::Subdirectories); QDirIterator it(path, QStringList("*.so"), QDir::Files, QDirIterator::Subdirectories);
while (it.hasNext()) { while (it.hasNext()) {
it.next(); it.next();
paths.insert(it.fileInfo().absolutePath()); paths.insert(it.fileInfo().absolutePath());
......
...@@ -408,15 +408,8 @@ bool AndroidManager::checkKeystorePassword(const QString &keystorePath, const QS ...@@ -408,15 +408,8 @@ bool AndroidManager::checkKeystorePassword(const QString &keystorePath, const QS
bool AndroidManager::checkCertificatePassword(const QString &keystorePath, const QString &keystorePasswd, const QString &alias, const QString &certificatePasswd) bool AndroidManager::checkCertificatePassword(const QString &keystorePath, const QString &keystorePasswd, const QString &alias, const QString &certificatePasswd)
{ {
// assumes that the keystore password is correct // assumes that the keystore password is correct
QStringList arguments; QStringList arguments = { "-certreq", "-keystore", keystorePath,
arguments << QLatin1String("-certreq") "--storepass", keystorePasswd, "-alias", alias, "-keypass" };
<< QLatin1String("-keystore")
<< keystorePath
<< QLatin1String("--storepass")
<< keystorePasswd
<< QLatin1String("-alias")
<< alias
<< QLatin1String("-keypass");
if (certificatePasswd.isEmpty()) if (certificatePasswd.isEmpty())
arguments << keystorePasswd; arguments << keystorePasswd;
else else
...@@ -433,14 +426,8 @@ bool AndroidManager::checkCertificateExists(const QString &keystorePath, ...@@ -433,14 +426,8 @@ bool AndroidManager::checkCertificateExists(const QString &keystorePath,
const QString &keystorePasswd, const QString &alias) const QString &keystorePasswd, const QString &alias)
{ {
// assumes that the keystore password is correct // assumes that the keystore password is correct
QStringList arguments; QStringList arguments = { "-list", "-keystore", keystorePath,
arguments << QLatin1String("-list") "--storepass", keystorePasswd, "-alias", alias };
<< QLatin1String("-keystore")
<< keystorePath
<< QLatin1String("--storepass")
<< keystorePasswd
<< QLatin1String("-alias")
<< alias;
Utils::SynchronousProcess proc; Utils::SynchronousProcess proc;
proc.setTimeoutS(10); proc.setTimeoutS(10);
......
...@@ -1056,8 +1056,8 @@ bool AndroidManifestEditorWidget::parseMetaData(QXmlStreamReader &reader, QXmlSt ...@@ -1056,8 +1056,8 @@ bool AndroidManifestEditorWidget::parseMetaData(QXmlStreamReader &reader, QXmlSt
QXmlStreamAttributes result; QXmlStreamAttributes result;
if (attributes.value(QLatin1String("android:name")) == QLatin1String("android.app.lib_name")) { if (attributes.value(QLatin1String("android:name")) == QLatin1String("android.app.lib_name")) {
QStringList keys = QStringList() << QLatin1String("android:value"); QStringList keys = QStringList("android:value");
QStringList values = QStringList() << m_targetLineEdit->currentText(); QStringList values = QStringList(m_targetLineEdit->currentText());
result = modifyXmlStreamAttributes(attributes, keys, values); result = modifyXmlStreamAttributes(attributes, keys, values);
found = true; found = true;
} else { } else {
......
...@@ -678,7 +678,7 @@ void AndroidSettingsWidget::manageAVD() ...@@ -678,7 +678,7 @@ void AndroidSettingsWidget::manageAVD()
avdProcess->setProcessEnvironment(m_androidConfig.androidToolEnvironment().toProcessEnvironment()); avdProcess->setProcessEnvironment(m_androidConfig.androidToolEnvironment().toProcessEnvironment());
QString executable = m_androidConfig.androidToolPath().toString(); QString executable = m_androidConfig.androidToolPath().toString();
QStringList arguments = QStringList() << QLatin1String("avd"); QStringList arguments = QStringList("avd");
avdProcess->start(executable, arguments); avdProcess->start(executable, arguments);
} }
......
...@@ -297,7 +297,7 @@ QList<AndroidToolChainFactory::AndroidToolChainInformation> AndroidToolChainFact ...@@ -297,7 +297,7 @@ QList<AndroidToolChainFactory::AndroidToolChainInformation> AndroidToolChainFact
QRegExp versionRegExp(NDKGccVersionRegExp); QRegExp versionRegExp(NDKGccVersionRegExp);
FileName path = ndkPath; FileName path = ndkPath;
QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(), QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(),
QStringList() << QLatin1String("*"), QDir::Dirs); QStringList("*"), QDir::Dirs);
while (it.hasNext()) { while (it.hasNext()) {
const QString &fileName = FileName::fromString(it.next()).fileName(); const QString &fileName = FileName::fromString(it.next()).fileName();
int idx = versionRegExp.indexIn(fileName); int idx = versionRegExp.indexIn(fileName);
...@@ -387,7 +387,7 @@ AndroidToolChainFactory::autodetectToolChainsForNdk(const FileName &ndkPath, ...@@ -387,7 +387,7 @@ AndroidToolChainFactory::autodetectToolChainsForNdk(const FileName &ndkPath,
QRegExp versionRegExp(NDKGccVersionRegExp); QRegExp versionRegExp(NDKGccVersionRegExp);
FileName path = ndkPath; FileName path = ndkPath;
QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(), QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(),
QStringList() << QLatin1String("*"), QDir::Dirs); QStringList("*"), QDir::Dirs);
QHash<Abi, QList<AndroidToolChain *>> newestToolChainForArch; QHash<Abi, QList<AndroidToolChain *>> newestToolChainForArch;
while (it.hasNext()) { while (it.hasNext()) {
...@@ -437,7 +437,7 @@ QList<int> AndroidToolChainFactory::newestToolChainVersionForArch(const Abi &abi ...@@ -437,7 +437,7 @@ QList<int> AndroidToolChainFactory::newestToolChainVersionForArch(const Abi &abi
m_ndkLocation = AndroidConfigurations::currentConfig().ndkLocation(); m_ndkLocation = AndroidConfigurations::currentConfig().ndkLocation();
FileName path = m_ndkLocation; FileName path = m_ndkLocation;
QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(), QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(),
QStringList() << QLatin1String("*"), QDir::Dirs); QStringList("*"), QDir::Dirs);
while (it.hasNext()) { while (it.hasNext()) {
const QString &fileName = FileName::fromString(it.next()).fileName(); const QString &fileName = FileName::fromString(it.next()).fileName();
int idx = versionRegExp.indexIn(fileName); int idx = versionRegExp.indexIn(fileName);
......
...@@ -80,7 +80,7 @@ static int updateVersionHelper(const QString &command) ...@@ -80,7 +80,7 @@ static int updateVersionHelper(const QString &command)
{ {
Utils::SynchronousProcess process; Utils::SynchronousProcess process;
Utils::SynchronousProcessResponse response Utils::SynchronousProcessResponse response
= process.runBlocking(command, QStringList() << QLatin1String("--version")); = process.runBlocking(command, QStringList("--version"));
if (response.result != Utils::SynchronousProcessResponse::Finished) if (response.result != Utils::SynchronousProcessResponse::Finished)
return 0; return 0;
...@@ -157,7 +157,7 @@ void ArtisticStyleSettings::createDocumentationFile() const ...@@ -157,7 +157,7 @@ void ArtisticStyleSettings::createDocumentationFile() const
Utils::SynchronousProcess process; Utils::SynchronousProcess process;
process.setTimeoutS(2); process.setTimeoutS(2);
Utils::SynchronousProcessResponse response Utils::SynchronousProcessResponse response
= process.runBlocking(command(), QStringList() << QLatin1String("-h")); = process.runBlocking(command(), QStringList("-h"));
if (response.result != Utils::SynchronousProcessResponse::Finished) if (response.result != Utils::SynchronousProcessResponse::Finished)
return; return;
......
...@@ -129,7 +129,7 @@ void UncrustifySettings::createDocumentationFile() const ...@@ -129,7 +129,7 @@ void UncrustifySettings::createDocumentationFile() const
Utils::SynchronousProcess process; Utils::SynchronousProcess process;
process.setTimeoutS(2); process.setTimeoutS(2);
Utils::SynchronousProcessResponse response Utils::SynchronousProcessResponse response
= process.runBlocking(command(), QStringList() << QLatin1String("--show-config")); = process.runBlocking(command(), QStringList("--show-config"));
if (response.result != Utils::SynchronousProcessResponse::Finished) if (response.result != Utils::SynchronousProcessResponse::Finished)
return; return;
......
...@@ -68,7 +68,7 @@ private: ...@@ -68,7 +68,7 @@ private:
ClangStaticAnalyzerDiagnosticModel::ClangStaticAnalyzerDiagnosticModel(QObject *parent) ClangStaticAnalyzerDiagnosticModel::ClangStaticAnalyzerDiagnosticModel(QObject *parent)
: Utils::TreeModel<>(parent) : Utils::TreeModel<>(parent)
{ {
setHeader(QStringList() << tr("Issue") << tr("Location")); setHeader({ tr("Issue"), tr("Location") });
} }
void ClangStaticAnalyzerDiagnosticModel::addDiagnostics(const QList<Diagnostic> &diagnostics) void ClangStaticAnalyzerDiagnosticModel::addDiagnostics(const QList<Diagnostic> &diagnostics)
......
...@@ -1600,7 +1600,7 @@ bool ClearCasePlugin::vcsOpen(const QString &workingDir, const QString &fileName ...@@ -1600,7 +1600,7 @@ bool ClearCasePlugin::vcsOpen(const QString &workingDir, const QString &fileName
VersionSelector selector(file, response.stdErr); VersionSelector selector(file, response.stdErr);
if (selector.exec() == QDialog::Accepted) { if (selector.exec() == QDialog::Accepted) {
if (selector.isUpdate()) if (selector.isUpdate())
ccUpdate(workingDir, QStringList() << file); ccUpdate(workingDir, QStringList(file));
else else
args.removeOne(QLatin1String("-query")); args.removeOne(QLatin1String("-query"));
response = runCleartool(topLevel, args, m_settings.timeOutS, response = runCleartool(topLevel, args, m_settings.timeOutS,
...@@ -1795,7 +1795,7 @@ static QString baseName(const QString &fileName) ...@@ -1795,7 +1795,7 @@ static QString baseName(const QString &fileName)
bool ClearCasePlugin::vcsAdd(const QString &workingDir, const QString &fileName) bool ClearCasePlugin::vcsAdd(const QString &workingDir, const QString &fileName)
{ {
return ccFileOp(workingDir, tr("ClearCase Add File %1").arg(baseName(fileName)), return ccFileOp(workingDir, tr("ClearCase Add File %1").arg(baseName(fileName)),
QStringList() << QLatin1String("mkelem") << QLatin1String("-ci"), fileName); QStringList({ "mkelem", "-ci" }), fileName);
} }
bool ClearCasePlugin::vcsDelete(const QString &workingDir, const QString &fileName) bool ClearCasePlugin::vcsDelete(const QString &workingDir, const QString &fileName)
...@@ -1806,14 +1806,14 @@ bool ClearCasePlugin::vcsDelete(const QString &workingDir, const QString &fileNa ...@@ -1806,14 +1806,14 @@ bool ClearCasePlugin::vcsDelete(const QString &workingDir, const QString &fileNa
return true; return true;
return ccFileOp(workingDir, tr("ClearCase Remove File %1").arg(baseName(fileName)), return ccFileOp(workingDir, tr("ClearCase Remove File %1").arg(baseName(fileName)),
QStringList() << QLatin1String("rmname") << QLatin1String("-force"), fileName); QStringList({ "rmname", "-force" }), fileName);
} }
bool ClearCasePlugin::vcsMove(const QString &workingDir, const QString &from, const QString &to) bool ClearCasePlugin::vcsMove(const QString &workingDir, const QString &from, const QString &to)
{ {
return ccFileOp(workingDir, tr("ClearCase Rename File %1 -> %2") return ccFileOp(workingDir, tr("ClearCase Rename File %1 -> %2")
.arg(baseName(from)).arg(baseName(to)), .arg(baseName(from)).arg(baseName(to)),
QStringList() << QLatin1String("move"), from, to); QStringList("move"), from, to);
} }
bool ClearCasePlugin::vcsCheckout(const QString & /*directory*/, const QByteArray & /*url*/) bool ClearCasePlugin::vcsCheckout(const QString & /*directory*/, const QByteArray & /*url*/)
......
...@@ -151,7 +151,7 @@ void CommandMappings::setPageTitle(const QString &s) ...@@ -151,7 +151,7 @@ void CommandMappings::setPageTitle(const QString &s)
void CommandMappings::setTargetHeader(const QString &s) void CommandMappings::setTargetHeader(const QString &s)
{ {
d->commandList->setHeaderLabels(QStringList() << tr("Command"