forked from qt-creator/qt-creator
Various Plugins: Simplify return QStringList statements
Change-Id: Id014225851e6b9f8436387c681bea42e5de3b797 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -182,7 +182,7 @@ static QStringList doSplitArgsWin(const QString &args, ProcessArgs::SplitError *
|
|||||||
if (inquote) {
|
if (inquote) {
|
||||||
if (err)
|
if (err)
|
||||||
*err = ProcessArgs::BadQuoting;
|
*err = ProcessArgs::BadQuoting;
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -265,7 +265,7 @@ static QStringList splitArgsWin(const QString &_args, bool abortOnMeta,
|
|||||||
err = &perr;
|
err = &perr;
|
||||||
QString args = prepareArgsWin(_args, &perr, env, pwd).toWindowsArgs();
|
QString args = prepareArgsWin(_args, &perr, env, pwd).toWindowsArgs();
|
||||||
if (*err != ProcessArgs::SplitOk)
|
if (*err != ProcessArgs::SplitOk)
|
||||||
return QStringList();
|
return {};
|
||||||
return doSplitArgsWin(args, err);
|
return doSplitArgsWin(args, err);
|
||||||
} else {
|
} else {
|
||||||
QString args = _args;
|
QString args = _args;
|
||||||
@@ -470,12 +470,12 @@ static QStringList splitArgsUnix(const QString &args, bool abortOnMeta,
|
|||||||
quoteerr:
|
quoteerr:
|
||||||
if (err)
|
if (err)
|
||||||
*err = ProcessArgs::BadQuoting;
|
*err = ProcessArgs::BadQuoting;
|
||||||
return QStringList();
|
return {};
|
||||||
|
|
||||||
metaerr:
|
metaerr:
|
||||||
if (err)
|
if (err)
|
||||||
*err = ProcessArgs::FoundMeta;
|
*err = ProcessArgs::FoundMeta;
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static bool isSpecialCharUnix(ushort c)
|
inline static bool isSpecialCharUnix(ushort c)
|
||||||
|
|||||||
@@ -2520,7 +2520,7 @@ QStringList FileSystemModelPrivate::unwatchPathsAt(const QModelIndex &index)
|
|||||||
QTC_CHECK(useFileSystemWatcher());
|
QTC_CHECK(useFileSystemWatcher());
|
||||||
const FileSystemNode *indexNode = node(index);
|
const FileSystemNode *indexNode = node(index);
|
||||||
if (indexNode == nullptr)
|
if (indexNode == nullptr)
|
||||||
return QStringList();
|
return {};
|
||||||
const Qt::CaseSensitivity caseSensitivity = indexNode->caseSensitive()
|
const Qt::CaseSensitivity caseSensitivity = indexNode->caseSensitive()
|
||||||
? Qt::CaseSensitive : Qt::CaseInsensitive;
|
? Qt::CaseSensitive : Qt::CaseInsensitive;
|
||||||
const QString path = indexNode->fileInfo().absoluteFilePath();
|
const QString path = indexNode->fileInfo().absoluteFilePath();
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ QStringList PathListEditor::pathList() const
|
|||||||
{
|
{
|
||||||
const QString text = d->edit->toPlainText().trimmed();
|
const QString text = d->edit->toPlainText().trimmed();
|
||||||
if (text.isEmpty())
|
if (text.isEmpty())
|
||||||
return QStringList();
|
return {};
|
||||||
// trim each line
|
// trim each line
|
||||||
QStringList rc = text.split('\n', Qt::SkipEmptyParts);
|
QStringList rc = text.split('\n', Qt::SkipEmptyParts);
|
||||||
const QStringList::iterator end = rc.end();
|
const QStringList::iterator end = rc.end();
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ static QStringList interfering(InterferingType type)
|
|||||||
return QString("BOOST_TEST_" + item).toUpper();
|
return QString("BOOST_TEST_" + item).toUpper();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
static QStringList filterInterfering(const QStringList &provided, QStringList *omitted)
|
static QStringList filterInterfering(const QStringList &provided, QStringList *omitted)
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ QStringList MakefileParser::directorySources(const QString &directory,
|
|||||||
{
|
{
|
||||||
if (isCanceled()) {
|
if (isCanceled()) {
|
||||||
m_success = false;
|
m_success = false;
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
emit status(Tr::tr("Parsing directory %1").arg(directory));
|
emit status(Tr::tr("Parsing directory %1").arg(directory));
|
||||||
@@ -343,7 +343,7 @@ QStringList MakefileParser::targetValues(bool *hasVariables)
|
|||||||
const int index = m_line.indexOf(QLatin1Char('='));
|
const int index = m_line.indexOf(QLatin1Char('='));
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
m_success = false;
|
m_success = false;
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
m_line.remove(0, index + 1); // remove the 'target = ' prefix
|
m_line.remove(0, index + 1); // remove the 'target = ' prefix
|
||||||
@@ -423,7 +423,7 @@ QStringList MakefileParser::parseTermsAfterAssign(const QString &line)
|
|||||||
{
|
{
|
||||||
int assignPos = line.indexOf(QLatin1Char('=')) + 1;
|
int assignPos = line.indexOf(QLatin1Char('=')) + 1;
|
||||||
if (assignPos <= 0 || assignPos >= line.size())
|
if (assignPos <= 0 || assignPos >= line.size())
|
||||||
return QStringList();
|
return {};
|
||||||
|
|
||||||
const QStringList parts = ProcessArgs::splitArgs(line.mid(assignPos), HostOsInfo::hostOs());
|
const QStringList parts = ProcessArgs::splitArgs(line.mid(assignPos), HostOsInfo::hostOs());
|
||||||
QStringList result;
|
QStringList result;
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ AbstractSettings::~AbstractSettings() = default;
|
|||||||
|
|
||||||
QStringList AbstractSettings::completerWords()
|
QStringList AbstractSettings::completerWords()
|
||||||
{
|
{
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList AbstractSettings::styles() const
|
QStringList AbstractSettings::styles() const
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ ClangDiagnosticConfig diagnosticConfig(const Utils::Id &diagConfigId)
|
|||||||
static QStringList extraOptions(const QString &envVar)
|
static QStringList extraOptions(const QString &envVar)
|
||||||
{
|
{
|
||||||
if (!qtcEnvironmentVariableIsSet(envVar))
|
if (!qtcEnvironmentVariableIsSet(envVar))
|
||||||
return QStringList();
|
return {};
|
||||||
QString arguments = qtcEnvironmentVariable(envVar);
|
QString arguments = qtcEnvironmentVariable(envVar);
|
||||||
return ProcessArgs::splitArgs(arguments, HostOsInfo::hostOs());
|
return ProcessArgs::splitArgs(arguments, HostOsInfo::hostOs());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -663,7 +663,7 @@ static QStringList findFilesInProject(const QString &name, const Project *projec
|
|||||||
qDebug() << Q_FUNC_INFO << name << project;
|
qDebug() << Q_FUNC_INFO << name << project;
|
||||||
|
|
||||||
if (!project)
|
if (!project)
|
||||||
return QStringList();
|
return {};
|
||||||
|
|
||||||
QString pattern = QString(1, QLatin1Char('/'));
|
QString pattern = QString(1, QLatin1Char('/'));
|
||||||
pattern += name;
|
pattern += name;
|
||||||
@@ -702,7 +702,7 @@ static QStringList matchingCandidateSuffixes(ProjectFile::Kind kind)
|
|||||||
case ProjectFile::OpenCLSource:
|
case ProjectFile::OpenCLSource:
|
||||||
return mimeTypeForName(Constants::CPP_HEADER_MIMETYPE).suffixes();
|
return mimeTypeForName(Constants::CPP_HEADER_MIMETYPE).suffixes();
|
||||||
default:
|
default:
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ VcsBase::BaseAnnotationHighlighter *CvsEditorWidget::createAnnotationHighlighter
|
|||||||
QStringList CvsEditorWidget::annotationPreviousVersions(const QString &revision) const
|
QStringList CvsEditorWidget::annotationPreviousVersions(const QString &revision) const
|
||||||
{
|
{
|
||||||
if (isFirstRevision(revision))
|
if (isFirstRevision(revision))
|
||||||
return QStringList();
|
return {};
|
||||||
return QStringList(previousRevision(revision));
|
return QStringList(previousRevision(revision));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ static QStringList readFlags(const QString &filePath)
|
|||||||
{
|
{
|
||||||
const QStringList lines = readLines(filePath);
|
const QStringList lines = readLines(filePath);
|
||||||
if (lines.isEmpty())
|
if (lines.isEmpty())
|
||||||
return QStringList();
|
return {};
|
||||||
QStringList flags;
|
QStringList flags;
|
||||||
for (const auto &line : lines)
|
for (const auto &line : lines)
|
||||||
flags.append(ProcessArgs::splitArgs(line, HostOsInfo::hostOs()));
|
flags.append(ProcessArgs::splitArgs(line, HostOsInfo::hostOs()));
|
||||||
|
|||||||
@@ -543,8 +543,7 @@ QString BranchModel::fullName(const QModelIndex &idx, bool includePrefix) const
|
|||||||
QStringList BranchModel::localBranchNames() const
|
QStringList BranchModel::localBranchNames() const
|
||||||
{
|
{
|
||||||
if (!d->rootNode || !d->rootNode->count())
|
if (!d->rootNode || !d->rootNode->count())
|
||||||
return QStringList();
|
return {};
|
||||||
|
|
||||||
return d->rootNode->children.at(LocalBranches)->childrenNames() + d->obsoleteLocalBranches;
|
return d->rootNode->children.at(LocalBranches)->childrenNames() + d->obsoleteLocalBranches;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ QStringList GitEditorWidget::annotationPreviousVersions(const QString &revision)
|
|||||||
if (!gitClient().synchronousParentRevisions(
|
if (!gitClient().synchronousParentRevisions(
|
||||||
sourceWorkingDirectory(), revision, &revisions, &errorMessage)) {
|
sourceWorkingDirectory(), revision, &revisions, &errorMessage)) {
|
||||||
VcsOutputWindow::appendSilently(errorMessage);
|
VcsOutputWindow::appendSilently(errorMessage);
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
return revisions;
|
return revisions;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ QStringList PerforceEditorWidget::annotationPreviousVersions(const QString &v) c
|
|||||||
bool ok;
|
bool ok;
|
||||||
const int changeList = v.toInt(&ok);
|
const int changeList = v.toInt(&ok);
|
||||||
if (!ok || changeList < 2)
|
if (!ok || changeList < 2)
|
||||||
return QStringList();
|
return {};
|
||||||
return QStringList(QString::number(changeList - 1));
|
return QStringList(QString::number(changeList - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ QStringList BindingModel::possibleTargetProperties(const BindingProperty &bindin
|
|||||||
|
|
||||||
if (!modelNode.isValid()) {
|
if (!modelNode.isValid()) {
|
||||||
qWarning() << " BindingModel::possibleTargetPropertiesForRow invalid model node";
|
qWarning() << " BindingModel::possibleTargetPropertiesForRow invalid model node";
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeMetaInfo metaInfo = modelNode.metaInfo();
|
NodeMetaInfo metaInfo = modelNode.metaInfo();
|
||||||
@@ -151,7 +151,7 @@ QStringList BindingModel::possibleTargetProperties(const BindingProperty &bindin
|
|||||||
return writableProperties;
|
return writableProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList BindingModel::possibleSourceProperties(const BindingProperty &bindingProperty) const
|
QStringList BindingModel::possibleSourceProperties(const BindingProperty &bindingProperty) const
|
||||||
@@ -191,7 +191,7 @@ QStringList BindingModel::possibleSourceProperties(const BindingProperty &bindin
|
|||||||
}
|
}
|
||||||
|
|
||||||
qWarning() << " BindingModel::possibleSourcePropertiesForRow invalid model node";
|
qWarning() << " BindingModel::possibleSourcePropertiesForRow invalid model node";
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeMetaInfo metaInfo = modelNode.metaInfo();
|
NodeMetaInfo metaInfo = modelNode.metaInfo();
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ QStringList DynamicPropertiesModel::possibleTargetProperties(const BindingProper
|
|||||||
|
|
||||||
if (!modelNode.isValid()) {
|
if (!modelNode.isValid()) {
|
||||||
qWarning() << " BindingModel::possibleTargetPropertiesForRow invalid model node";
|
qWarning() << " BindingModel::possibleTargetPropertiesForRow invalid model node";
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeMetaInfo metaInfo = modelNode.metaInfo();
|
NodeMetaInfo metaInfo = modelNode.metaInfo();
|
||||||
@@ -519,7 +519,7 @@ QStringList DynamicPropertiesModel::possibleSourceProperties(const BindingProper
|
|||||||
|
|
||||||
if (!modelNode.isValid()) {
|
if (!modelNode.isValid()) {
|
||||||
qWarning() << " BindingModel::possibleSourcePropertiesForRow invalid model node";
|
qWarning() << " BindingModel::possibleSourcePropertiesForRow invalid model node";
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeMetaInfo metaInfo = modelNode.metaInfo();
|
NodeMetaInfo metaInfo = modelNode.metaInfo();
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ QStringList PropertyEditorContextObject::autoComplete(const QString &text, int p
|
|||||||
return Utils::filtered(m_model->rewriterView()->autoComplete(text, pos, explicitComplete), [filter](const QString &string) {
|
return Utils::filtered(m_model->rewriterView()->autoComplete(text, pos, explicitComplete), [filter](const QString &string) {
|
||||||
return !filter || (!string.isEmpty() && string.at(0).isUpper()); });
|
return !filter || (!string.isEmpty() && string.at(0).isUpper()); });
|
||||||
|
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertyEditorContextObject::toogleExportAlias()
|
void PropertyEditorContextObject::toogleExportAlias()
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ QStringList StatesEditorModel::autoComplete(const QString &text, int pos, bool e
|
|||||||
if (model && model->rewriterView())
|
if (model && model->rewriterView())
|
||||||
return model->rewriterView()->autoComplete(text, pos, explicitComplete);
|
return model->rewriterView()->autoComplete(text, pos, explicitComplete);
|
||||||
|
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant StatesEditorModel::stateModelNode(int internalNodeId)
|
QVariant StatesEditorModel::stateModelNode(int internalNodeId)
|
||||||
|
|||||||
@@ -499,7 +499,7 @@ bool StatesEditorView::hasExtend() const
|
|||||||
QStringList StatesEditorView::extendedStates() const
|
QStringList StatesEditorView::extendedStates() const
|
||||||
{
|
{
|
||||||
if (!model())
|
if (!model())
|
||||||
return QStringList();
|
return {};
|
||||||
|
|
||||||
QStringList states;
|
QStringList states;
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
{ return false; }
|
{ return false; }
|
||||||
|
|
||||||
QStringList autoComplete(QTextDocument * /*textDocument*/, int /*position*/, bool /*explicitComplete*/) override
|
QStringList autoComplete(QTextDocument * /*textDocument*/, int /*position*/, bool /*explicitComplete*/) override
|
||||||
{ return QStringList(); }
|
{ return {}; }
|
||||||
|
|
||||||
bool moveToComponent(int /* nodeOffset */) override
|
bool moveToComponent(int /* nodeOffset */) override
|
||||||
{ return false; }
|
{ return false; }
|
||||||
|
|||||||
@@ -1167,11 +1167,11 @@ Model *NodeMetaInfoPrivate::model() const
|
|||||||
QStringList NodeMetaInfoPrivate::keysForEnum(const QString &enumName) const
|
QStringList NodeMetaInfoPrivate::keysForEnum(const QString &enumName) const
|
||||||
{
|
{
|
||||||
if (!isValid())
|
if (!isValid())
|
||||||
return QStringList();
|
return {};
|
||||||
|
|
||||||
const CppComponentValue *qmlObjectValue = getNearestCppComponentValue();
|
const CppComponentValue *qmlObjectValue = getNearestCppComponentValue();
|
||||||
if (!qmlObjectValue)
|
if (!qmlObjectValue)
|
||||||
return QStringList();
|
return {};
|
||||||
return qmlObjectValue->getEnum(enumName).keys();
|
return qmlObjectValue->getEnum(enumName).keys();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ QStringList SubComponentManager::importPaths() const
|
|||||||
if (model())
|
if (model())
|
||||||
return model()->importPaths();
|
return model()->importPaths();
|
||||||
|
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubComponentManager::parseQuick3DAssetsDir(const QString &quick3DAssetsPath)
|
void SubComponentManager::parseQuick3DAssetsDir(const QString &quick3DAssetsPath)
|
||||||
|
|||||||
@@ -132,5 +132,5 @@ QStringList BaseTextEditModifier::autoComplete(QTextDocument *textDocument, int
|
|||||||
document->filePath(),
|
document->filePath(),
|
||||||
explicitComplete ? TextEditor::ExplicitlyInvoked : TextEditor::ActivationCharacter,
|
explicitComplete ? TextEditor::ExplicitlyInvoked : TextEditor::ActivationCharacter,
|
||||||
document->semanticInfo());
|
document->semanticInfo());
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ QStringList WidgetPluginPath::libraryFilePaths(const QDir &dir)
|
|||||||
{
|
{
|
||||||
const QFileInfoList infoList = dir.entryInfoList(QDir::Files|QDir::Readable|QDir::NoDotAndDotDot);
|
const QFileInfoList infoList = dir.entryInfoList(QDir::Files|QDir::Readable|QDir::NoDotAndDotDot);
|
||||||
if (infoList.empty())
|
if (infoList.empty())
|
||||||
return QStringList();
|
return {};
|
||||||
// Load symbolic links but make sure all file names are unique as not
|
// Load symbolic links but make sure all file names are unique as not
|
||||||
// to fall for something like 'libplugin.so.1 -> libplugin.so'
|
// to fall for something like 'libplugin.so.1 -> libplugin.so'
|
||||||
QStringList result;
|
QStringList result;
|
||||||
|
|||||||
@@ -361,19 +361,19 @@ QStringList DocumentManager::isoIconsQmakeVariableValue(const QString &proPath)
|
|||||||
ProjectExplorer::Node *node = ProjectExplorer::ProjectTree::nodeForFile(Utils::FilePath::fromString(proPath));
|
ProjectExplorer::Node *node = ProjectExplorer::ProjectTree::nodeForFile(Utils::FilePath::fromString(proPath));
|
||||||
if (!node) {
|
if (!node) {
|
||||||
qCWarning(documentManagerLog) << "No node for .pro:" << proPath;
|
qCWarning(documentManagerLog) << "No node for .pro:" << proPath;
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::Node *parentNode = node->parentFolderNode();
|
ProjectExplorer::Node *parentNode = node->parentFolderNode();
|
||||||
if (!parentNode) {
|
if (!parentNode) {
|
||||||
qCWarning(documentManagerLog) << "No parent node for node at" << proPath;
|
qCWarning(documentManagerLog) << "No parent node for node at" << proPath;
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
auto proNode = dynamic_cast<QmakeProjectManager::QmakeProFileNode*>(parentNode);
|
auto proNode = dynamic_cast<QmakeProjectManager::QmakeProFileNode*>(parentNode);
|
||||||
if (!proNode) {
|
if (!proNode) {
|
||||||
qCWarning(documentManagerLog) << "Parent node for node at" << proPath << "could not be converted to a QmakeProFileNode";
|
qCWarning(documentManagerLog) << "Parent node for node at" << proPath << "could not be converted to a QmakeProFileNode";
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
return proNode->variableValue(QmakeProjectManager::Variable::IsoIcons);
|
return proNode->variableValue(QmakeProjectManager::Variable::IsoIcons);
|
||||||
|
|||||||
@@ -2116,7 +2116,7 @@ static QByteArray scanQtBinaryForBuildString(const FilePath &library)
|
|||||||
static QStringList extractFieldsFromBuildString(const QByteArray &buildString)
|
static QStringList extractFieldsFromBuildString(const QByteArray &buildString)
|
||||||
{
|
{
|
||||||
if (buildString.isEmpty() || buildString.size() > 4096)
|
if (buildString.isEmpty() || buildString.size() > 4096)
|
||||||
return QStringList();
|
return {};
|
||||||
|
|
||||||
const QRegularExpression buildStringMatcher("^Qt "
|
const QRegularExpression buildStringMatcher("^Qt "
|
||||||
"([\\d\\.a-zA-Z]*) " // Qt version
|
"([\\d\\.a-zA-Z]*) " // Qt version
|
||||||
@@ -2132,7 +2132,7 @@ static QStringList extractFieldsFromBuildString(const QByteArray &buildString)
|
|||||||
|
|
||||||
const QRegularExpressionMatch match = buildStringMatcher.match(QString::fromUtf8(buildString));
|
const QRegularExpressionMatch match = buildStringMatcher.match(QString::fromUtf8(buildString));
|
||||||
if (!match.hasMatch())
|
if (!match.hasMatch())
|
||||||
return QStringList();
|
return {};
|
||||||
|
|
||||||
QStringList result;
|
QStringList result;
|
||||||
result.append(match.captured(1)); // qtVersion
|
result.append(match.captured(1)); // qtVersion
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ QStringList PropertiesModel::allPropertyNames() const
|
|||||||
{
|
{
|
||||||
TreeItem *root = rootItem();
|
TreeItem *root = rootItem();
|
||||||
if (!root)
|
if (!root)
|
||||||
return QStringList();
|
return {};
|
||||||
|
|
||||||
QStringList result;
|
QStringList result;
|
||||||
result.reserve(root->childCount());
|
result.reserve(root->childCount());
|
||||||
|
|||||||
@@ -85,6 +85,6 @@ QStringList SubversionEditorWidget::annotationPreviousVersions(const QString &v)
|
|||||||
bool ok;
|
bool ok;
|
||||||
const int revision = v.toInt(&ok);
|
const int revision = v.toInt(&ok);
|
||||||
if (!ok || revision < 2)
|
if (!ok || revision < 2)
|
||||||
return QStringList();
|
return {};
|
||||||
return QStringList(QString::number(revision - 1));
|
return QStringList(QString::number(revision - 1));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ QStringList VcsBaseClientImpl::splitLines(const QString &s)
|
|||||||
if (output.endsWith(newLine))
|
if (output.endsWith(newLine))
|
||||||
output.truncate(output.size() - 1);
|
output.truncate(output.size() - 1);
|
||||||
if (output.isEmpty())
|
if (output.isEmpty())
|
||||||
return QStringList();
|
return {};
|
||||||
return output.split(newLine);
|
return output.split(newLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1454,7 +1454,7 @@ void VcsBaseEditorWidget::slotAnnotateRevision(const QString &change)
|
|||||||
|
|
||||||
QStringList VcsBaseEditorWidget::annotationPreviousVersions(const QString &) const
|
QStringList VcsBaseEditorWidget::annotationPreviousVersions(const QString &) const
|
||||||
{
|
{
|
||||||
return QStringList();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
void VcsBaseEditorWidget::slotPaste()
|
void VcsBaseEditorWidget::slotPaste()
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ SubmitFileModel *VcsBaseSubmitEditor::fileModel() const
|
|||||||
QStringList VcsBaseSubmitEditor::rowsToFiles(const QList<int> &rows) const
|
QStringList VcsBaseSubmitEditor::rowsToFiles(const QList<int> &rows) const
|
||||||
{
|
{
|
||||||
if (rows.empty())
|
if (rows.empty())
|
||||||
return QStringList();
|
return {};
|
||||||
|
|
||||||
QStringList rc;
|
QStringList rc;
|
||||||
const SubmitFileModel *model = fileModel();
|
const SubmitFileModel *model = fileModel();
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ static QStringList readSkipList(const QDir &dir, const QString &filename)
|
|||||||
QStringList result;
|
QStringList result;
|
||||||
|
|
||||||
if (!f.open(QIODevice::ReadOnly | QIODevice::Text))
|
if (!f.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||||
return QStringList();
|
return {};
|
||||||
|
|
||||||
while (!f.atEnd()) {
|
while (!f.atEnd()) {
|
||||||
const QString s = QString::fromUtf8(f.readLine().trimmed());
|
const QString s = QString::fromUtf8(f.readLine().trimmed());
|
||||||
|
|||||||
Reference in New Issue
Block a user