diff options
author | Eike Ziller <eike.ziller@qt.io> | 2023-05-12 12:24:39 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2023-05-12 12:24:39 +0200 |
commit | 51df19270ba9a933732c369b47f0d4d80e7771f0 (patch) | |
tree | 9bc20e6aafd9179cb00d0b3efd77987d2d79ce45 | |
parent | aca8e5906b83373d54025bae5c4ddb998ceff86c (diff) | |
parent | af5e50edf73b98fc7b995906b8ddd492756bff52 (diff) | |
download | qt-creator-51df19270ba9a933732c369b47f0d4d80e7771f0.tar.gz |
Merge remote-tracking branch 'origin/10.0'
Change-Id: I7cfdfc13097d5037fea597ecba98ae902a0c5afb
-rw-r--r-- | .github/workflows/build_cmake.yml | 6 | ||||
-rw-r--r-- | src/plugins/autotest/gtest/gtestoutputreader.cpp | 2 | ||||
-rw-r--r-- | src/plugins/clangformat/clangformatbaseindenter.cpp | 3 | ||||
-rw-r--r-- | src/plugins/clangformat/clangformatfile.cpp | 16 | ||||
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp | 3 |
5 files changed, 22 insertions, 8 deletions
diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 17cb3ea370..661b6365b2 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -577,7 +577,11 @@ jobs: endif() if ("${{ runner.os }}" STREQUAL "macOS") - set(ENV{CMAKE_OSX_ARCHITECTURES} "x86_64;arm64") + if (${{github.ref}} MATCHES "tags/v(.*)") + set(ENV{CMAKE_OSX_ARCHITECTURES} "x86_64;arm64") + else() + set(ENV{CMAKE_OSX_ARCHITECTURES} "x86_64") + endif() endif() execute_process( diff --git a/src/plugins/autotest/gtest/gtestoutputreader.cpp b/src/plugins/autotest/gtest/gtestoutputreader.cpp index 12e0424016..1e980c06d0 100644 --- a/src/plugins/autotest/gtest/gtestoutputreader.cpp +++ b/src/plugins/autotest/gtest/gtestoutputreader.cpp @@ -209,7 +209,7 @@ void GTestOutputReader::handleDescriptionAndReportResult(const TestResult &testR } } result.setDescription(resultDescription.join('\n')); - reportResult(testResult); + reportResult(result); resultDescription.clear(); result = createDefaultResult(); diff --git a/src/plugins/clangformat/clangformatbaseindenter.cpp b/src/plugins/clangformat/clangformatbaseindenter.cpp index 65a1fe3c9d..5138e03510 100644 --- a/src/plugins/clangformat/clangformatbaseindenter.cpp +++ b/src/plugins/clangformat/clangformatbaseindenter.cpp @@ -56,9 +56,6 @@ void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style, return; style.ColumnLimit = 0; -#ifdef KEEP_LINE_BREAKS_FOR_NON_EMPTY_LINES_BACKPORTED - style.KeepLineBreaksForNonEmptyLines = true; -#endif } llvm::StringRef clearExtraNewline(llvm::StringRef text) diff --git a/src/plugins/clangformat/clangformatfile.cpp b/src/plugins/clangformat/clangformatfile.cpp index 7023645cc8..f0c4809913 100644 --- a/src/plugins/clangformat/clangformatfile.cpp +++ b/src/plugins/clangformat/clangformatfile.cpp @@ -169,6 +169,12 @@ CppEditor::CppCodeStyleSettings ClangFormatFile::toCppCodeStyleSettings( 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; } @@ -188,6 +194,9 @@ void ClangFormatFile::fromCppCodeStyleSettings(const CppEditor::CppCodeStyleSett if (settings.indentClassBraces || settings.indentEnumBraces || settings.indentBlockBraces || settings.indentFunctionBraces) m_style.BreakBeforeBraces = FormatStyle::BS_Whitesmiths; + else + m_style.BreakBeforeBraces = FormatStyle::BS_Custom; + m_style.IndentCaseLabels = settings.indentSwitchLabels; #if LLVM_VERSION_MAJOR >= 11 @@ -196,11 +205,12 @@ void ClangFormatFile::fromCppCodeStyleSettings(const CppEditor::CppCodeStyleSett || settings.indentControlFlowRelativeToSwitchLabels; #endif - if (settings.alignAssignments) - m_style.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment; - if (settings.extraPaddingForConditionsIfConfusingAlign) 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 || settings.bindStarToLeftSpecifier diff --git a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp index 2a6dba5b8e..8d63ee0fa9 100644 --- a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp @@ -102,6 +102,9 @@ static void buildAcceptor(const FilePath &projectPath, const QString &displayNam || !cmakeProject->activeTarget()->activeBuildConfiguration()) return; + if (BuildManager::isBuilding(cmakeProject)) + BuildManager::cancel(); + // Find the make step const BuildStepList *buildStepList = cmakeProject->activeTarget()->activeBuildConfiguration()->buildSteps(); |