From f915a18a9e2661891dfc79a23d554dd946ad2a10 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 3 Nov 2023 11:45:08 +0100 Subject: [PATCH 1/5] Process test: Adjust timeouts to minimize a chance for flakiness The flakiness happened on mac inside recursiveBlockingProcess test. Change-Id: I4d461fcdae1ecbf29f89bfdb4ad7ba017724f14b Reviewed-by: Marcus Tillmanns --- .../utils/process/processtestapp/processtestapp.cpp | 4 ++-- tests/auto/utils/process/tst_process.cpp | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/auto/utils/process/processtestapp/processtestapp.cpp b/tests/auto/utils/process/processtestapp/processtestapp.cpp index 77f36a362ec..d85288514ea 100644 --- a/tests/auto/utils/process/processtestapp/processtestapp.cpp +++ b/tests/auto/utils/process/processtestapp/processtestapp.cpp @@ -245,7 +245,7 @@ int ProcessTestApp::RecursiveBlockingProcess::main() std::cout << s_leafProcessStarted << std::flush; while (true) { // TODO: make it configurable so that we could test the reaper timeout - QThread::msleep(100); + QThread::msleep(10); #ifndef Q_OS_WIN if (s_terminate.load()) { std::cout << s_leafProcessTerminated << std::flush; @@ -260,7 +260,7 @@ int ProcessTestApp::RecursiveBlockingProcess::main() process.setProcessChannelMode(QProcess::ForwardedChannels); process.start(); while (true) { - if (process.waitForFinished(1000)) + if (process.waitForFinished(10)) return 0; #ifndef Q_OS_WIN if (s_terminate.load()) { diff --git a/tests/auto/utils/process/tst_process.cpp b/tests/auto/utils/process/tst_process.cpp index 52e4658778f..334c9754ba4 100644 --- a/tests/auto/utils/process/tst_process.cpp +++ b/tests/auto/utils/process/tst_process.cpp @@ -1370,14 +1370,17 @@ void tst_Process::recursiveBlockingProcess() subConfig.setupSubProcess(&process); process.start(); QVERIFY(process.waitForStarted(1000)); - QVERIFY(process.waitForReadyRead(1000)); + // The readyRead() is generated from the innermost nested process, so it means + // we need to give enough time for all nested processes to start their + // process launchers successfully. + QVERIFY(process.waitForReadyRead(2000)); QCOMPARE(process.readAllRawStandardOutput(), s_leafProcessStarted); QCOMPARE(runningTestProcessCount(), recursionDepth); - QVERIFY(!process.waitForFinished(1000)); + QVERIFY(!process.waitForFinished(10)); process.terminate(); - QVERIFY(process.waitForReadyRead()); + QVERIFY(process.waitForReadyRead(1000)); QCOMPARE(process.readAllRawStandardOutput(), s_leafProcessTerminated); - QVERIFY(process.waitForFinished()); + QVERIFY(process.waitForFinished(1000)); QCOMPARE(process.exitStatus(), QProcess::NormalExit); QCOMPARE(process.exitCode(), s_crashCode); } From 18817c4088e51b2db50bc6cecf8533abd7102e5a Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 31 Oct 2023 22:07:05 +0100 Subject: [PATCH 2/5] Designer: Remove extra contents margins in the settings dialog Task-number: QTCREATORBUG-29108 Change-Id: If3c6b0bcf9e1f05705c7e85fd814740235dbc7a6 Reviewed-by: Reviewed-by: Eike Ziller --- src/plugins/designer/settingspage.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/designer/settingspage.cpp b/src/plugins/designer/settingspage.cpp index 4fdee045a78..5532ae8c77f 100644 --- a/src/plugins/designer/settingspage.cpp +++ b/src/plugins/designer/settingspage.cpp @@ -25,6 +25,7 @@ public: { auto vbox = new QVBoxLayout(this); vbox->addWidget(m_designerPage->createPage(nullptr)); + vbox->setContentsMargins({}); } void apply() { m_designerPage->apply(); } From 42cc29902b04ab03d9a306bcb153bd30b36398e1 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Fri, 3 Nov 2023 14:25:34 +0100 Subject: [PATCH 3/5] CMakePM: Detect C/C++ object extension for single source build When using CMake package manager auto-setup the CMAKE_C| XX_OUTPUT_EXTENSION is stored in the CMake cache. This way CMake project manager can know about the correct extension when building a single source file. If CMAKE_C|XX_OUTPUT_EXTENSION is not found in cache it will only use ".obj" for Clang-Cl/MSVC/MinGW toolchains. Task-number: QTCREATORBUG-27471 Change-Id: Ib9b75608d5a6834014150c57f3098f79284d8276 Reviewed-by: Orgad Shaneh --- .../cmakeprojectmanager.cpp | 31 +++++++++++++++++-- .../3rdparty/package-manager/auto-setup.cmake | 6 ++++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp index eb1c68eae36..1dfc03af62f 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -42,6 +43,7 @@ #include #include +using namespace CppEditor; using namespace ProjectExplorer; using namespace Utils; @@ -402,7 +404,6 @@ void CMakeManager::buildFile(Node *node) QTC_ASSERT(target, return); const QString generator = CMakeGeneratorKitAspect::generator(target->kit()); const QString relativeSource = filePath.relativeChildPath(targetNode->filePath()).toString(); - const QString objExtension = Utils::HostOsInfo::isWindowsHost() ? QString(".obj") : QString(".o"); Utils::FilePath targetBase; BuildConfiguration *bc = target->activeBuildConfiguration(); QTC_ASSERT(bc, return); @@ -416,8 +417,32 @@ void CMakeManager::buildFile(Node *node) return; } - static_cast(bc->buildSystem()) - ->buildCMakeTarget(targetBase.pathAppended(relativeSource).toString() + objExtension); + auto cbc = static_cast(bc->buildSystem()); + const QString sourceFile = targetBase.pathAppended(relativeSource).toString(); + const QString objExtension = [&]() -> QString { + const auto sourceKind = ProjectFile::classify(relativeSource); + const QByteArray cmakeLangExtension = ProjectFile::isCxx(sourceKind) + ? "CMAKE_CXX_OUTPUT_EXTENSION" + : "CMAKE_C_OUTPUT_EXTENSION"; + const QString extension = cbc->configurationFromCMake().stringValueOf(cmakeLangExtension); + if (!extension.isEmpty()) + return extension; + + const auto toolchain = ProjectFile::isCxx(sourceKind) + ? ToolChainKitAspect::cxxToolChain(target->kit()) + : ToolChainKitAspect::cToolChain(target->kit()); + using namespace ProjectExplorer::Constants; + static QSet objIds{ + CLANG_CL_TOOLCHAIN_TYPEID, + MSVC_TOOLCHAIN_TYPEID, + MINGW_TOOLCHAIN_TYPEID, + }; + if (objIds.contains(toolchain->typeId())) + return ".obj"; + return ".o"; + }(); + + cbc->buildCMakeTarget(sourceFile + objExtension); } void CMakeManager::buildFileContextMenu() diff --git a/src/share/3rdparty/package-manager/auto-setup.cmake b/src/share/3rdparty/package-manager/auto-setup.cmake index bae90ee6429..59a43692dfb 100644 --- a/src/share/3rdparty/package-manager/auto-setup.cmake +++ b/src/share/3rdparty/package-manager/auto-setup.cmake @@ -16,6 +16,12 @@ if (QT_CREATOR_SKIP_PACKAGE_MANAGER_SETUP) endif() option(QT_CREATOR_SKIP_PACKAGE_MANAGER_SETUP "Skip Qt Creator's package manager auto-setup" OFF) +# Store the C/C++ object output extension +if (CMAKE_VERSION GREATER_EQUAL "3.19") + cmake_language(DEFER CALL set CMAKE_C_OUTPUT_EXTENSION "${CMAKE_C_OUTPUT_EXTENSION}" CACHE STRING "" FORCE) + cmake_language(DEFER CALL set CMAKE_CXX_OUTPUT_EXTENSION "${CMAKE_CXX_OUTPUT_EXTENSION}" CACHE STRING "" FORCE) +endif() + macro(qtc_auto_setup_compiler_standard toolchainFile) foreach(lang_var C CXX CUDA OBJC OBJCXX) foreach(prop_var STANDARD STANDARD_REQUIRED EXTENSIONS) From 201857fa68c3fb86a9b0d8123229d09edecfd023 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Mon, 6 Nov 2023 09:17:54 +0100 Subject: [PATCH 4/5] Terminal: Fix Url handling FilePath::toUrl does not pass queries correctly to QUrl. So we use QUrl::fromUserInput directly. Fixes: QTCREATORBUG-29850 Change-Id: If0706b3b37d03eeea87247b44f07f8a0f8915a95 Reviewed-by: Cristian Adam --- src/plugins/terminal/terminalwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/terminal/terminalwidget.cpp b/src/plugins/terminal/terminalwidget.cpp index 69f0256ef5c..c9b52f6bf35 100644 --- a/src/plugins/terminal/terminalwidget.cpp +++ b/src/plugins/terminal/terminalwidget.cpp @@ -472,7 +472,7 @@ void TerminalWidget::linkActivated(const Link &link) FilePath filePath = FilePath::fromUserInput(link.text); if (filePath.scheme().toString().startsWith("http")) { - QDesktopServices::openUrl(filePath.toUrl()); + QDesktopServices::openUrl(QUrl::fromUserInput(link.text)); return; } From 34150b0344a0e454f8fbcb37cfd395bc0c0ded21 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 30 Oct 2023 12:24:17 +0100 Subject: [PATCH 5/5] German translation: CompilerExplorer, ScreenRecorder Change-Id: I4a7a2af047c3c7b6a0fbe759ec658f0ac39c85eb Reviewed-by: Alessandro Portale --- share/qtcreator/translations/qtcreator_de.ts | 164 +++++++++---------- 1 file changed, 82 insertions(+), 82 deletions(-) diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index f7190e13fc7..420a51f1abc 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -17319,127 +17319,127 @@ Setzen Sie erst eine gültige ausführbare Datei. QtC::CompilerExplorer Not found - + Nicht gefunden Reset used libraries - + Benutzte Bibliotheken zurücksetzen No libraries selected - + Keine Bibliotheken ausgewählt Edit - + Bearbeiten Add Compiler - + Compiler hinzufügen Remove Source - + Quelle entfernen Advanced Options - + Erweiterte Optionen Remove Compiler - + Compiler entfernen Bytes - Bytes + Bytes Failed to compile: "%1". - + Compilierung fehlgeschlagen: "%1". Add Source Code - + Quelltext hinzufügen No source code added yet. Add some using the button below. - + Es wurde noch kein Quelltext hinzugefügt. Benutzen Sie die Schaltfläche unten, um einen Code-Editor hinzuzufügen. Add Source - + Quelle hinzufügen powered by %1 - + Powered by %1 Compiler Explorer Editor - + Compiler Explorer-Editor Open Compiler Explorer - + Compiler Explorer öffnen Compiler Explorer - + Compiler Explorer Language: - Sprache: + Sprache: Compiler: - Compiler: + Compiler: Compiler options: - + Compiler-Optionen: Arguments passed to the compiler. - + Argumente, die an den Compiler übergeben werden. Libraries: - + Bibliotheken: Execute the code - + Code ausführen Compile to binary object - + Zu Binärobjekt compilieren Intel asm syntax - + Intel ASM-Syntax Demangle identifiers - + Bezeichner entschlüsseln Failed to fetch libraries: "%1". - + Abrufen von Bibliotheken fehlgeschlagen: "%1". Failed to fetch languages: "%1". - + Abrufen von Sprachen fehlgeschlagen: "%1". Failed to fetch compilers: "%1". - + Abrufen von Compilern fehlgeschlagen: "%1". Compiler Explorer URL: - + Compiler Explorer-URL: URL of the Compiler Explorer instance to use. - + URL der zu benutzenden Compiler Explorer-Instanz. @@ -48945,207 +48945,207 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e QtC::ScreenRecorder Save current, cropped frame as image file. - + Aktuellen, zugeschnittenen Frame als Bilddatei speichern. Copy current, cropped frame as image to the clipboard. - + Aktuellen, zugeschnittenen Frame als Bild in die Zwischenablage kopieren. X: - + X: Y: - + Y: Width: - Breite: + Breite: Height: - Höhe: + Höhe: Save Current Frame As - + Aktuellen Frame speichern als Start: - + Anfang: End: - + Ende: Trimming - + Trimmen Range: - + Bereich: Crop and Trim - + Zuschneiden und trimmen Crop and Trim... - + Zuschneiden und trimmen... Crop to %1x%2px. - + Auf %1x%2px zuschneiden. Complete area. - + Gesamter Bereich. Frames %1 to %2. - + Frames %1 bis %2. Complete clip. - + Gesamter Clip. Video - + Video Animated image - + Animiertes Bild Lossy - + Verlustbehaftet Lossless - + Verlustfrei Export... - Exportieren... + Exportieren... Save As - Speichern unter + Speichern unter Exporting Screen Recording - + Bildschirmaufnahme exportieren Width and height are not both divisible by 2. The video export for some of the lossy formats will not work. - + Breite und Höhe sind nicht beide durch 2 teilbar. Der Videoexport wird für einige verlustbehaftete Formate nicht funktionieren. Screen Recording Options - + Optionen für die Bildschirmaufnahme Display: - + Anzeige: FPS: - + FPS: Recorded screen area: - + Aufgenommener Bildschirmbereich: Open Mov/qtrle rgb24 File - + Mov/qtrle-rgb24-Datei öffnen Cannot Open Clip - + Clip kann nicht geöffnet werden FFmpeg cannot open %1. - + FFmpeg kann %1 nicht öffnen. Clip Not Supported - + Clip wird nicht unterstützt Choose a clip with the "qtrle" codec and pixel format "rgb24". - + Wählen Sie einen Clip mit dem "qtrle"-Codec und dem Pixelformat "rgb24". Record Screen - + Bildschirmaufnahme Record Screen... - + Bildschirmaufnahme... ffmpeg tool: - + ffmpeg-Werkzeug: ffprobe tool: - + ffprobe-Werkzeug: Capture the mouse cursor - + Mauszeiger aufnehmen Capture the screen mouse clicks - + Mausklicks aufnehmen Capture device/filter: - + Aufnahmegerät/-filter: Size limit for intermediate output file - + Größenbegrenzung für die Zwischenausgabedatei RAM buffer for real-time frames - + RAM-Puffer für Echtzeitframes Write command line of FFmpeg calls to General Messages - + Kommandozeilenaufrufe von FFmpeg in die Allgemeinen Ausgaben schreiben Export animated images as infinite loop - + Animierte Bilder als Endlosschleifen exportieren Recording frame rate: - + Bildrate für die Aufnahme: Screen ID: - + Bildschirm-ID: FFmpeg Installation - + FFmpeg-Installation Record Settings - + Aufnahmeeinstellungen Export Settings - + Export-Einstellungen Screen Recording - + Bildschirmaufnahme