From 979f938aa5003d52b4e0ff275180219c1c82b9e3 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 12 May 2023 08:16:11 +0200 Subject: AutoTest: Fix handling of multiple fails of tests Broke with d05c5b7d07194b7c0fe938e88e63cfaab9ee5f4d. Fixes: QTCREATORBUG-29146 Change-Id: If7cc7f943c16113785a21b661a545e00331f1dcd Reviewed-by: Jarek Kobus Reviewed-by: David Schulz --- src/plugins/autotest/gtest/gtestoutputreader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/autotest/gtest/gtestoutputreader.cpp b/src/plugins/autotest/gtest/gtestoutputreader.cpp index a24377bef7..7c6365d2f0 100644 --- a/src/plugins/autotest/gtest/gtestoutputreader.cpp +++ b/src/plugins/autotest/gtest/gtestoutputreader.cpp @@ -210,7 +210,7 @@ void GTestOutputReader::handleDescriptionAndReportResult(const TestResult &testR } } result.setDescription(resultDescription.join('\n')); - reportResult(testResult); + reportResult(result); resultDescription.clear(); result = createDefaultResult(); -- cgit v1.2.1 From ef06d8925578a43c9c45832b38839755d5e59a7d Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Mon, 8 May 2023 11:39:33 +0200 Subject: ClangFormat: Improve conversion from and to ClangFormat style Improved conversion from ClangFormat style settings to CppCode style settings and the other way around. Task-number: QTCREATORBUG-29069 Change-Id: If4f75259f7fe77397fc144a83370749a49d25297 Reviewed-by: Reviewed-by: Christian Kandeler --- src/plugins/clangformat/clangformatfile.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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 -- cgit v1.2.1 From b28df28660eb301024af2a029b880707e9753f9e Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Thu, 11 May 2023 10:30:19 +0200 Subject: ClangFormat: Remove redundant KeepLineBreaks property Change-Id: I74250bde4a224d89b078f127da4e7b63454b03a6 Reviewed-by: Christian Kandeler Reviewed-by: --- src/plugins/clangformat/clangformatbaseindenter.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/plugins/clangformat/clangformatbaseindenter.cpp b/src/plugins/clangformat/clangformatbaseindenter.cpp index affabfec67..45e55495a5 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) -- cgit v1.2.1 From 430f07cf383954312c4ee2908b0c344b207cab9e Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Thu, 11 May 2023 16:30:19 +0200 Subject: GitHub Actions: Use universal for macOS only for releases For the regular checks we should be as fast as possible. Change-Id: If5b14f6ac48aebdefced137f74fc8ecdd72f741b Reviewed-by: Eike Ziller --- .github/workflows/build_cmake.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 8a623779f1..14f4a74751 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( -- cgit v1.2.1 From af5e50edf73b98fc7b995906b8ddd492756bff52 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Mon, 8 May 2023 17:59:26 +0200 Subject: CMakePM: Cancel current build before locator "cm " In case the current project is building and the user starts a "cm " in Locator, now the build is canceled before starting a a "cmake --build --target ". Fixes: QTCREATORBUG-26699 Change-Id: I27ed9ba5b8d917dce94835a5462e4e64e7515bd9 Reviewed-by: hjk --- src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp index ab646d1fa6..0eab601200 100644 --- a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp @@ -122,6 +122,9 @@ void BuildCMakeTargetLocatorFilter::accept(const Core::LocatorFilterEntry &selec || !cmakeProject->activeTarget()->activeBuildConfiguration()) return; + if (BuildManager::isBuilding(cmakeProject)) + BuildManager::cancel(); + // Find the make step BuildStepList *buildStepList = cmakeProject->activeTarget()->activeBuildConfiguration()->buildSteps(); -- cgit v1.2.1