Merge "Merge remote-tracking branch 'origin/10.0'"

This commit is contained in:
The Qt Project
2023-05-12 10:42:27 +00:00
5 changed files with 22 additions and 8 deletions

View File

@@ -577,7 +577,11 @@ jobs:
endif() endif()
if ("${{ runner.os }}" STREQUAL "macOS") if ("${{ runner.os }}" STREQUAL "macOS")
if (${{github.ref}} MATCHES "tags/v(.*)")
set(ENV{CMAKE_OSX_ARCHITECTURES} "x86_64;arm64") set(ENV{CMAKE_OSX_ARCHITECTURES} "x86_64;arm64")
else()
set(ENV{CMAKE_OSX_ARCHITECTURES} "x86_64")
endif()
endif() endif()
execute_process( execute_process(

View File

@@ -209,7 +209,7 @@ void GTestOutputReader::handleDescriptionAndReportResult(const TestResult &testR
} }
} }
result.setDescription(resultDescription.join('\n')); result.setDescription(resultDescription.join('\n'));
reportResult(testResult); reportResult(result);
resultDescription.clear(); resultDescription.clear();
result = createDefaultResult(); result = createDefaultResult();

View File

@@ -56,9 +56,6 @@ void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style,
return; return;
style.ColumnLimit = 0; style.ColumnLimit = 0;
#ifdef KEEP_LINE_BREAKS_FOR_NON_EMPTY_LINES_BACKPORTED
style.KeepLineBreaksForNonEmptyLines = true;
#endif
} }
llvm::StringRef clearExtraNewline(llvm::StringRef text) llvm::StringRef clearExtraNewline(llvm::StringRef text)

View File

@@ -169,6 +169,12 @@ CppEditor::CppCodeStyleSettings ClangFormatFile::toCppCodeStyleSettings(
settings.bindStarToRightSpecifier = style.PointerAlignment == FormatStyle::PAS_Right; settings.bindStarToRightSpecifier = style.PointerAlignment == FormatStyle::PAS_Right;
} }
settings.extraPaddingForConditionsIfConfusingAlign = style.BreakBeforeBinaryOperators
== FormatStyle::BOS_All;
settings.alignAssignments = style.BreakBeforeBinaryOperators == FormatStyle::BOS_All
|| style.BreakBeforeBinaryOperators
== FormatStyle::BOS_NonAssignment;
return settings; return settings;
} }
@@ -188,6 +194,9 @@ void ClangFormatFile::fromCppCodeStyleSettings(const CppEditor::CppCodeStyleSett
if (settings.indentClassBraces || settings.indentEnumBraces || settings.indentBlockBraces if (settings.indentClassBraces || settings.indentEnumBraces || settings.indentBlockBraces
|| settings.indentFunctionBraces) || settings.indentFunctionBraces)
m_style.BreakBeforeBraces = FormatStyle::BS_Whitesmiths; m_style.BreakBeforeBraces = FormatStyle::BS_Whitesmiths;
else
m_style.BreakBeforeBraces = FormatStyle::BS_Custom;
m_style.IndentCaseLabels = settings.indentSwitchLabels; m_style.IndentCaseLabels = settings.indentSwitchLabels;
#if LLVM_VERSION_MAJOR >= 11 #if LLVM_VERSION_MAJOR >= 11
@@ -196,11 +205,12 @@ void ClangFormatFile::fromCppCodeStyleSettings(const CppEditor::CppCodeStyleSett
|| settings.indentControlFlowRelativeToSwitchLabels; || settings.indentControlFlowRelativeToSwitchLabels;
#endif #endif
if (settings.alignAssignments)
m_style.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment;
if (settings.extraPaddingForConditionsIfConfusingAlign) if (settings.extraPaddingForConditionsIfConfusingAlign)
m_style.BreakBeforeBinaryOperators = FormatStyle::BOS_All; m_style.BreakBeforeBinaryOperators = FormatStyle::BOS_All;
else if (settings.alignAssignments)
m_style.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment;
else
m_style.BreakBeforeBinaryOperators = FormatStyle::BOS_None;
m_style.DerivePointerAlignment = settings.bindStarToIdentifier || settings.bindStarToTypeName m_style.DerivePointerAlignment = settings.bindStarToIdentifier || settings.bindStarToTypeName
|| settings.bindStarToLeftSpecifier || settings.bindStarToLeftSpecifier

View File

@@ -102,6 +102,9 @@ static void buildAcceptor(const FilePath &projectPath, const QString &displayNam
|| !cmakeProject->activeTarget()->activeBuildConfiguration()) || !cmakeProject->activeTarget()->activeBuildConfiguration())
return; return;
if (BuildManager::isBuilding(cmakeProject))
BuildManager::cancel();
// Find the make step // Find the make step
const BuildStepList *buildStepList = const BuildStepList *buildStepList =
cmakeProject->activeTarget()->activeBuildConfiguration()->buildSteps(); cmakeProject->activeTarget()->activeBuildConfiguration()->buildSteps();