forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/11.0'
Conflicts: src/plugins/clangformat/clangformatutils.cpp Change-Id: Ide285cc25fca9101843ab9dca01c5a33644aca7f
This commit is contained in:
@@ -89,7 +89,7 @@ QString CMakeAutoCompleter::insertMatchingQuote(const QTextCursor &cursor,
|
||||
int CMakeAutoCompleter::paragraphSeparatorAboutToBeInserted(QTextCursor &cursor)
|
||||
{
|
||||
const QString line = cursor.block().text().trimmed();
|
||||
if (line.contains(QRegularExpression(QStringLiteral("^(endfunction|endmacro|endif|endforeach|endwhile)\\w*\\("))))
|
||||
if (line.contains(QRegularExpression(QStringLiteral("^(endfunction|endmacro|endif|endforeach|endwhile|endblock)\\w*\\("))))
|
||||
tabSettings().indentLine(cursor.block(), tabSettings().indentationColumn(cursor.block().text()));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -175,8 +175,8 @@ void CMakeBuildSystem::triggerParsing()
|
||||
qCDebug(cmakeBuildSystemLog) << "Parse called with flags:"
|
||||
<< reparseParametersString(reparseParameters);
|
||||
|
||||
const QString cache = m_parameters.buildDirectory.pathAppended("CMakeCache.txt").toString();
|
||||
if (!QFileInfo::exists(cache)) {
|
||||
const FilePath cache = m_parameters.buildDirectory.pathAppended("CMakeCache.txt");
|
||||
if (!cache.exists()) {
|
||||
reparseParameters |= REPARSE_FORCE_INITIAL_CONFIGURATION | REPARSE_FORCE_CMAKE_RUN;
|
||||
qCDebug(cmakeBuildSystemLog)
|
||||
<< "No" << cache
|
||||
|
||||
@@ -52,7 +52,8 @@ static bool lineStartsBlock(const QString &line)
|
||||
lineContainsFunction(line, QStringLiteral("while")) ||
|
||||
lineContainsFunction(line, QStringLiteral("if")) ||
|
||||
lineContainsFunction(line, QStringLiteral("elseif")) ||
|
||||
lineContainsFunction(line, QStringLiteral("else"));
|
||||
lineContainsFunction(line, QStringLiteral("else")) ||
|
||||
lineContainsFunction(line, QStringLiteral("block"));
|
||||
}
|
||||
static bool lineEndsBlock(const QString &line)
|
||||
{
|
||||
@@ -62,7 +63,8 @@ static bool lineEndsBlock(const QString &line)
|
||||
lineContainsFunction(line, QStringLiteral("endwhile")) ||
|
||||
lineContainsFunction(line, QStringLiteral("endif")) ||
|
||||
lineContainsFunction(line, QStringLiteral("elseif")) ||
|
||||
lineContainsFunction(line, QStringLiteral("else"));
|
||||
lineContainsFunction(line, QStringLiteral("else")) ||
|
||||
lineContainsFunction(line, QStringLiteral("endblock"));
|
||||
}
|
||||
static bool lineIsEmpty(const QString &line)
|
||||
{
|
||||
|
||||
@@ -115,7 +115,16 @@ Internal::PresetsData CMakeProject::combinePresets(Internal::PresetsData &cmakeP
|
||||
&& left.inherits.value() == right.inherits.value();
|
||||
const bool leftInheritsRight = left.inherits
|
||||
&& left.inherits.value().contains(right.name);
|
||||
if ((left.inherits && !right.inherits) || leftInheritsRight || sameInheritance)
|
||||
|
||||
const bool inheritsGreater = left.inherits && right.inherits
|
||||
&& left.inherits.value().first()
|
||||
> right.inherits.value().first();
|
||||
|
||||
const bool noInheritsGreater = !left.inherits && !right.inherits
|
||||
&& left.name > right.name;
|
||||
|
||||
if ((left.inherits && !right.inherits) || leftInheritsRight || sameInheritance
|
||||
|| inheritsGreater || noInheritsGreater)
|
||||
return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user