diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index e430f35ebde..30dae550023 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -123,7 +123,8 @@ jobs: ) execute_process( COMMAND - sudo apt install libgl1-mesa-dev libvulkan-dev libxcb-xinput-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev + sudo apt install chrpath + libgl1-mesa-dev libvulkan-dev libxcb-xinput-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1 libxcb-randr0 libxcb-icccm4 xvfb RESULT_VARIABLE result @@ -458,31 +459,33 @@ jobs: string(JSON artifacts_length LENGTH "${artifacts_json}" "artifacts") math(EXPR artifacts_length "${artifacts_length} - 1") - foreach(idx RANGE 0 ${artifacts_length}) - string(JSON artifact_js GET "${artifacts_json}" "artifacts" ${idx}) - string(JSON name GET "${artifact_js}" "name") - if ("${name}" STREQUAL "${{ steps.ccache.outputs.archive_name }}") - string(JSON download_url GET "${artifact_js}" "archive_download_url") + if(${artifacts_length} GREATER_EQUAL 0) + foreach(idx RANGE 0 ${artifacts_length}) + string(JSON artifact_js GET "${artifacts_json}" "artifacts" ${idx}) + string(JSON name GET "${artifact_js}" "name") + if ("${name}" STREQUAL "${{ steps.ccache.outputs.archive_name }}") + string(JSON download_url GET "${artifact_js}" "archive_download_url") - foreach(retry RANGE 10) - file(DOWNLOAD "${download_url}" - "${{ steps.ccache.outputs.archive_name }}.zip" - NETRC_FILE "$ENV{GITHUB_WORKSPACE}/netrc.txt" - NETRC REQUIRED - SHOW_PROGRESS) - file(SIZE "${{ steps.ccache.outputs.archive_name }}.zip" fileSize) - if (fileSize GREATER 0) - break() - endif() - endforeach() + foreach(retry RANGE 10) + file(DOWNLOAD "${download_url}" + "${{ steps.ccache.outputs.archive_name }}.zip" + NETRC_FILE "$ENV{GITHUB_WORKSPACE}/netrc.txt" + NETRC REQUIRED + SHOW_PROGRESS) + file(SIZE "${{ steps.ccache.outputs.archive_name }}.zip" fileSize) + if (fileSize GREATER 0) + break() + endif() + endforeach() - execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf "${{ steps.ccache.outputs.archive_name }}.zip") - file(MAKE_DIRECTORY .ccache) - execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "../${{ steps.ccache.outputs.archive_name }}.tar" WORKING_DIRECTORY .ccache) + execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf "${{ steps.ccache.outputs.archive_name }}.zip") + file(MAKE_DIRECTORY .ccache) + execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "../${{ steps.ccache.outputs.archive_name }}.tar" WORKING_DIRECTORY .ccache) - return() - endif() - endforeach() + return() + endif() + endforeach() + endif() endforeach() - name: Build @@ -578,6 +581,7 @@ jobs: --add-config=-DIDE_REVISION_URL=https://github.com/$ENV{GITHUB_REPOSITORY}/commits/$ENV{GITHUB_SHA} --zip-infix=-${{ matrix.config.artifact }}-${{ github.run_id }} --no-qbs + --with-cpack RESULT_VARIABLE result COMMAND_ECHO STDOUT OUTPUT_VARIABLE output @@ -665,6 +669,13 @@ jobs: path: build/qtcreatorcdbext-${{ matrix.config.artifact }}-${{ github.run_id }}.7z name: qtcreatorcdbext-${{ matrix.config.artifact }}-${{ github.run_id }}.7z + - name: Upload Debian package + if: runner.os == 'Linux' + uses: actions/upload-artifact@v3 + with: + path: build/build/qtcreator-${{ matrix.config.artifact }}-${{ github.run_id }}.deb + name: qtcreator-${{ matrix.config.artifact }}-${{ github.run_id }}.deb + - name: Upload disk image if: runner.os == 'macOS' && contains(github.ref, 'tags/v') uses: actions/upload-artifact@v3 @@ -761,6 +772,13 @@ jobs: name: qtcreatorcdbext-${{ matrix.config.artifact }}-${{ github.run_id }}.7z path: ./ + - name: Download Debian package artifact + if: matrix.config.artifact == 'Linux' + uses: actions/download-artifact@v3 + with: + name: qtcreator-${{ matrix.config.artifact }}-${{ github.run_id }}.deb + path: ./ + - name: Download disk image artifact if: matrix.config.artifact == 'macOS' uses: actions/download-artifact@v3 @@ -820,6 +838,17 @@ jobs: asset_name: qtcreatorcdbext-${{ matrix.config.artifact }}-${{ github.run_id }}.7z asset_content_type: application/x-gtar + - name: Upload Debian package to Release + if: matrix.config.artifact == 'Linux' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.set_upload_url.outputs.upload_url }} + asset_path: ./qtcreator-${{ matrix.config.artifact }}-${{ github.run_id }}.deb + asset_name: qtcreator-${{ matrix.config.artifact }}-${{ github.run_id }}.deb + asset_content_type: application/x-gtar + - name: Upload disk image to Release if: matrix.config.artifact == 'macOS' uses: actions/upload-release-asset@v1 diff --git a/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp b/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp index f9dcdd745e4..43f1915709f 100644 --- a/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp @@ -61,8 +61,9 @@ static std::vector> autoDetectCMakeTools() if (HostOsInfo::isMacHost()) { path.append("/Applications/CMake.app/Contents/bin"); - path.append("/usr/local/bin"); - path.append("/opt/local/bin"); + path.append("/usr/local/bin"); // homebrew intel + path.append("/opt/homebrew/bin"); // homebrew arm + path.append("/opt/local/bin"); // macports } FilePaths suspects; diff --git a/src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp b/src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp index 6e7a8986a07..c8db1a85cb6 100644 --- a/src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp +++ b/src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp @@ -95,7 +95,7 @@ void ConfigModelItemDelegate::setModelData(QWidget *editor, QAbstractItemModel * if (data.type == ConfigModel::DataItem::FILE || data.type == ConfigModel::DataItem::DIRECTORY) { auto edit = static_cast(editor); if (edit->rawFilePath().toString() != data.value) - model->setData(index, edit->filePath().toString(), Qt::EditRole); + model->setData(index, edit->rawFilePath().toString(), Qt::EditRole); return; } else if (!data.values.isEmpty()) { auto edit = static_cast(editor); diff --git a/src/plugins/texteditor/codestyleselectorwidget.cpp b/src/plugins/texteditor/codestyleselectorwidget.cpp index f9b458452b8..6e53b07cd37 100644 --- a/src/plugins/texteditor/codestyleselectorwidget.cpp +++ b/src/plugins/texteditor/codestyleselectorwidget.cpp @@ -207,8 +207,10 @@ void CodeStyleSelectorWidget::slotImportClicked() if (importedStyle) m_codeStyle->setCurrentDelegate(importedStyle); else - QMessageBox::warning(this, Tr::tr("Import Code Style"), - Tr::tr("Cannot import code style from %1"), fileName.toUserOutput()); + QMessageBox::warning(this, + Tr::tr("Import Code Style"), + Tr::tr("Cannot import code style from %1") + .arg(fileName.toUserOutput())); } } diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index 6957d6dbbe4..2e96dd9ba5d 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -56,7 +56,7 @@ def waitForCompile(timeout=60000): def dumpBuildIssues(listModel): issueDump = [] for index in dumpIndices(listModel): - issueDump.extend([[index.data(role).toString() for role + issueDump.extend([[str(index.data(role).toString()) for role in range(Qt.UserRole, Qt.UserRole + 6)]]) return issueDump diff --git a/tests/system/suite_editors/tst_modify_readonly/test.py b/tests/system/suite_editors/tst_modify_readonly/test.py index 446ca3569bb..cf348bbed2c 100644 --- a/tests/system/suite_editors/tst_modify_readonly/test.py +++ b/tests/system/suite_editors/tst_modify_readonly/test.py @@ -85,6 +85,13 @@ def testSaveChangesAndMakeWritable(modifiedFiles, readOnlyFiles): except: test.fatal("Missing dialog regarding missing permission on read only files.") exitCanceled = False + + # workaround crashing test + # (AUT stopped responding / AUT '' did not respond to network communication) + __shutdownDone__ = lambda : not currentApplicationContext().isRunning + if test.verify(waitFor(__shutdownDone__, 1000), "Clean exit of Qt Creator."): + return + try: mBoxStr = "{type='QMessageBox' unnamed='1' visible='1' text?='*Could not save the files.'}" msgBox = waitForObject(mBoxStr, 3000)