From 01610a983a28a30dade273bdfdbd0ca208bf1f2b Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Wed, 8 Jan 2025 12:39:12 +0100 Subject: [PATCH 01/16] CMakePM: Do not mark targetless CMakeLists.txt files as generated These files are not generated, but they were meant to be hidden. It's better to restore the previous file system view of CMakeLists.txt, until the project view receives a feature to mark files are hidden. Fixes: QTCREATORBUG-32283 Fixes: QTCREATORBUG-32298 Change-Id: Ib1f41339f195eefd96151022c4919b7ac8127f6b Reviewed-by: Eike Ziller --- src/plugins/cmakeprojectmanager/fileapidataextractor.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp b/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp index 9ef2d86e8ef..9c8c06185a4 100644 --- a/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp +++ b/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp @@ -113,11 +113,6 @@ static CMakeFileResult extractCMakeFilesData(const QFuture &cancelFuture, auto node = std::make_unique(info.path, FileType::Project); node->setIsGenerated(info.isGenerated); - // We will have the CMakeLists.txt file in the Target nodes as a child node. - // Except the root CMakeLists.txt file. - if (info.isCMakeListsDotTxt && info.path.parentDir() != sourceDirectory) - node->setIsGenerated(true); - if (info.isCMakeListsDotTxt) { result.cmakeListNodes.emplace_back(std::move(node)); } else if (info.path.isChildOf(sourceDirectory)) { From bd702590290a2acb800deb242e5754363228bfb7 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Fri, 10 Jan 2025 18:16:52 +0100 Subject: [PATCH 02/16] lldb.exe: use python dependencies generic deployment By using file globbing expressions, the python*.dll|zip file names do not have to be hardcoded with their respective version numbers. Fixes: QTCREATORBUG-32310 Change-Id: I6a8f6bbd75530a16f54a2fd4d7030e88d3f82888 Reviewed-by: Eike Ziller --- src/libs/qtcreatorcdbext/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/qtcreatorcdbext/CMakeLists.txt b/src/libs/qtcreatorcdbext/CMakeLists.txt index fb405758414..884f75bfee4 100644 --- a/src/libs/qtcreatorcdbext/CMakeLists.txt +++ b/src/libs/qtcreatorcdbext/CMakeLists.txt @@ -286,7 +286,8 @@ if (_library_enabled) # Deploy lldb.exe and its Python dependency find_package(Clang QUIET) if (LLVM_TOOLS_BINARY_DIR AND LLVM_LIBRARY_DIRS) - foreach(lldb_file lldb.exe lldb-dap.exe liblldb.dll python311.zip python311.dll) + file(GLOB python_files RELATIVE ${LLVM_TOOLS_BINARY_DIR} "${LLVM_TOOLS_BINARY_DIR}/python*") + foreach(lldb_file lldb.exe lldb-dap.exe liblldb.dll ${python_files}) if (EXISTS ${LLVM_TOOLS_BINARY_DIR}/${lldb_file}) install(FILES ${LLVM_TOOLS_BINARY_DIR}/${lldb_file} DESTINATION bin/clang/bin @@ -298,7 +299,7 @@ if (_library_enabled) install(DIRECTORY ${LLVM_LIBRARY_DIRS}/site-packages DESTINATION bin/clang/lib COMPONENT qtcreatorcdbext - PATTERN _lldb.cp311-win_amd64.pyd EXCLUDE) + PATTERN "_lldb.cp*64.pyd" EXCLUDE) endif() endif() endif() From 0ad4bafa040464a2c95624b4c1c40de7b9b2d585 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 6 Jan 2025 09:46:53 +0200 Subject: [PATCH 03/16] Debugger: Fix support for big-endian targets Amends 67072d3f5bb1b425a2b9d3bf30d57542e9f88902. Change-Id: I7c3c08d970e837f77f7194aa80ad403da1ddd4e9 Reviewed-by: Christian Stenger Reviewed-by: hjk --- share/qtcreator/debugger-with-python2/dumper.py | 7 ++++--- share/qtcreator/debugger-with-python2/gdbbridge.py | 1 + share/qtcreator/debugger/dumper.py | 13 +++++++------ share/qtcreator/debugger/gdbbridge.py | 1 + share/qtcreator/debugger/lldbbridge.py | 5 ++++- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/share/qtcreator/debugger-with-python2/dumper.py b/share/qtcreator/debugger-with-python2/dumper.py index 1fd42848d4e..7fd12eb5f09 100644 --- a/share/qtcreator/debugger-with-python2/dumper.py +++ b/share/qtcreator/debugger-with-python2/dumper.py @@ -188,6 +188,7 @@ class DumperBase(): self.typeData = {} self.isBigEndian = False self.packCode = '<' + self.byteorder = 'little' self.resetCaches() self.resetStats() @@ -1560,17 +1561,17 @@ class DumperBase(): primaryOpcode = data[0] if primaryOpcode == relativeJumpCode: # relative jump on 32 and 64 bit with a 32bit offset - offset = int.from_bytes(data[1:5], byteorder='little') + offset = int.from_bytes(data[1:5], byteorder=self.byteorder) return address + 5 + offset if primaryOpcode == jumpCode: if data[1] != 0x25: # check for known extended opcode return 0 # 0xff25 is a relative jump on 64bit and an absolute jump on 32 bit if self.ptrSize() == 8: - offset = int.from_bytes(data[2:6], byteorder='little') + offset = int.from_bytes(data[2:6], byteorder=self.byteorder) return address + 6 + offset else: - return int.from_bytes(data[2:6], byteorder='little') + return int.from_bytes(data[2:6], byteorder=self.byteorder) return 0 # Do not try to extract a function pointer if there are no values to compare with diff --git a/share/qtcreator/debugger-with-python2/gdbbridge.py b/share/qtcreator/debugger-with-python2/gdbbridge.py index 9699e518fe3..822e995f0ff 100644 --- a/share/qtcreator/debugger-with-python2/gdbbridge.py +++ b/share/qtcreator/debugger-with-python2/gdbbridge.py @@ -666,6 +666,7 @@ class Dumper(DumperBase): self.isBigEndian = gdb.execute('show endian', to_string=True).find('big endian') > 0 self.packCode = '>' if self.isBigEndian else '<' + self.byteorder = 'big' if self.isBigEndian else 'little' (ok, res) = self.tryFetchInterpreterVariables(args) if ok: diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index e7e25a482fe..677943ca34a 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -178,6 +178,7 @@ class DumperBase(): self.isBigEndian = False self.packCode = '<' + self.byteorder = 'little' self.resetCaches() self.resetStats() @@ -1767,17 +1768,17 @@ class DumperBase(): primaryOpcode = data[0] if primaryOpcode == relativeJumpCode: # relative jump on 32 and 64 bit with a 32bit offset - offset = int.from_bytes(data[1:5], byteorder='little') + offset = int.from_bytes(data[1:5], byteorder=self.byteorder) return address + 5 + offset if primaryOpcode == jumpCode: if data[1] != 0x25: # check for known extended opcode return 0 # 0xff25 is a relative jump on 64bit and an absolute jump on 32 bit if self.ptrSize() == 8: - offset = int.from_bytes(data[2:6], byteorder='little') + offset = int.from_bytes(data[2:6], byteorder=self.byteorder) return address + 6 + offset else: - return int.from_bytes(data[2:6], byteorder='little') + return int.from_bytes(data[2:6], byteorder=self.byteorder) return 0 # Do not try to extract a function pointer if there are no values to compare with @@ -2532,7 +2533,7 @@ typename)) def extract_pointer_at_address(self, address): blob = self.value_data_from_address(address, self.ptrSize()) - return int.from_bytes(blob, byteorder='little') + return int.from_bytes(blob, byteorder=self.byteorder) def value_extract_integer(self, value, size, signed): if isinstance(value.lvalue, int): @@ -2542,7 +2543,7 @@ typename)) #with self.dumper.timer('extractInt'): value.check() blob = self.value_data(value, size) - return int.from_bytes(blob, byteorder='little', signed=signed) + return int.from_bytes(blob, byteorder=self.byteorder, signed=signed) def value_extract_something(self, valuish, size, signed=False): if isinstance(valuish, int): @@ -2551,7 +2552,7 @@ typename)) blob = self.value_data(valuish, size) else: raise RuntimeError('CANT EXTRACT FROM %s' % type(valuish)) - res = int.from_bytes(blob, byteorder='little', signed=signed) + res = int.from_bytes(blob, byteorder=self.byteorder, signed=signed) #self.warn("EXTRACTED %s SIZE %s FROM %s" % (res, size, blob)) return res diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py index fec4ee84b3d..cbda6aa7ce6 100644 --- a/share/qtcreator/debugger/gdbbridge.py +++ b/share/qtcreator/debugger/gdbbridge.py @@ -679,6 +679,7 @@ class Dumper(DumperBase): self.isBigEndian = gdb.execute('show endian', to_string=True).find('big endian') > 0 self.packCode = '>' if self.isBigEndian else '<' + self.byteorder = 'big' if self.isBigEndian else 'little' #(ok, res) = self.tryFetchInterpreterVariables(args) #if ok: diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index 4863a0b3f58..52288f07869 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -145,7 +145,7 @@ class Dumper(DumperBase): target_typeid = self.from_native_type(nativeTargetType) target_address = nativeValue.GetValueAsUnsigned() val = self.Value(self) - val.ldata = target_address.to_bytes(self.ptrSize(), 'little') + val.ldata = target_address.to_bytes(self.ptrSize(), self.byteorder) if self.useDynamicType: target_typeid = self.dynamic_typeid_at_address(target_typeid, target_address) val.typeid = self.create_reference_typeid(target_typeid) @@ -1354,6 +1354,9 @@ class Dumper(DumperBase): return self.isArmMac = frame.module.triple.startswith('arm64-apple') + self.isBigEndian = frame.module.byte_order == lldb.eByteOrderBig + self.packCode = '>' if self.isBigEndian else '<' + self.byteorder = 'big' if self.isBigEndian else 'little' self.output = [] isPartial = len(self.partialVariable) > 0 From 5b9f6d9c33071ca5ca3b65468233264d89d4182b Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Fri, 1 Nov 2024 11:15:39 +0100 Subject: [PATCH 04/16] Git: Fix Instant Blame not working after first editor open For the very first opened editor, we were unable to get a workingDirectory with currentState().currentFileTopLevel() within the lambda setupBlameForEditor(). The workingDirectory was always empty and therefore Instant Blame only worked after a force or editor change. This and also some still failing ClearCase auto tests were broken by ce9826ae6e727e344c13762eb92e1882768f4a2d. Change-Id: I06239351274cf3aa01be66bc614ec8991274b4a6 Reviewed-by: Orgad Shaneh Reviewed-by: Eike Ziller --- src/plugins/vcsbase/vcsbaseplugin.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp index 631eb0f248f..559583db006 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.cpp +++ b/src/plugins/vcsbase/vcsbaseplugin.cpp @@ -309,10 +309,13 @@ void StateListener::slotStateChanged() state.clearPatchFile(); // Need a repository to patch qCDebug(stateLog).noquote() << "VC:" << (vc ? vc->displayName() : QString("None")) << state; - QTimer::singleShot(500, this, [this, state, vc] { + + auto updateState = [this, state, vc] { EditorManager::updateWindowTitles(); emit stateChanged(state, vc); - }); + }; + updateState(); + QTimer::singleShot(500, this, updateState); // QTCREATORBUG-31815 } } // namespace Internal From 6fd2164c4a57a0bd7e08fb6beda5c12241384c5f Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Thu, 9 Jan 2025 20:51:47 +0100 Subject: [PATCH 05/16] Utils: Fix template arguments replacement for unarchiver This makes sure that paths containing spaces will not cause issues. Fixes: QTCREATORBUG-32308 Change-Id: Idf044c5e48058c620ec0a4b4154a07d088790b9c Reviewed-by: Eike Ziller --- src/libs/utils/unarchiver.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/utils/unarchiver.cpp b/src/libs/utils/unarchiver.cpp index d9092e4ca95..21504439391 100644 --- a/src/libs/utils/unarchiver.cpp +++ b/src/libs/utils/unarchiver.cpp @@ -127,10 +127,10 @@ expected_str Unarchiver::sourceAndCommand(const Fi static CommandLine unarchiveCommand(const CommandLine &commandTemplate, const FilePath &sourceFile, const FilePath &destDir) { - CommandLine command = commandTemplate; - command.setArguments(command.arguments().replace("%{src}", sourceFile.path()) - .replace("%{dest}", destDir.path())); - return command; + const QStringList args = Utils::transform(commandTemplate.splitArguments(), [&](auto arg) { + return arg.replace("%{src}", sourceFile.path()).replace("%{dest}", destDir.path()); + }); + return CommandLine(commandTemplate.executable(), args); } void Unarchiver::start() From 21fe38942a382d57165aa73c92ecdc2aca7e0b61 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 13 Jan 2025 14:14:49 +0100 Subject: [PATCH 06/16] Doc: List clangd as an example of a language server Change-Id: Iacf31d7add662ba60893ea25bbedbb304105fbc5 Reviewed-by: Christian Kandeler --- .../src/editors/creator-only/creator-coding-edit-mode.qdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/qtcreator/src/editors/creator-only/creator-coding-edit-mode.qdoc b/doc/qtcreator/src/editors/creator-only/creator-coding-edit-mode.qdoc index 6afb21972d8..a3fc429466b 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-coding-edit-mode.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-coding-edit-mode.qdoc @@ -103,7 +103,8 @@ \li \l{Change text encoding} \row \li \inlineimage icons/languageclient.png - \li View the language server for the current project, restart it, select + \li View the language server for the current project (such as clangd), + restart it, select another one, \l{Inspect language clients}{inspect the communication} between \QC and language servers, view server capabilities, and set language server preferences. From b1cd0ff57aa8f331f8ef96d7dfb3f56790b4b018 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Mon, 13 Jan 2025 14:53:53 +0100 Subject: [PATCH 07/16] Core: Reformat legal text to fit the dialog Change-Id: Ica816733dadc53c15905f5934da6eeb4130ba459 Reviewed-by: Cristian Adam --- src/plugins/coreplugin/plugininstallwizard.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/coreplugin/plugininstallwizard.cpp b/src/plugins/coreplugin/plugininstallwizard.cpp index b9db2f26ef3..c252a21e38c 100644 --- a/src/plugins/coreplugin/plugininstallwizard.cpp +++ b/src/plugins/coreplugin/plugininstallwizard.cpp @@ -420,11 +420,11 @@ public: setTitle(Tr::tr("Accept Terms and Conditions")); const QLatin1String legal = QLatin1String( - "I confirm that I have reviewed and accept the terms and conditions " - "of this extension. I confirm that I have the authority and ability to " - "accept the terms and conditions of this extension for the customer. " - "I acknowledge that if the customer and the Qt Company already have a " - "valid agreement in place, that agreement shall apply, but these terms " + "I confirm that I have reviewed and accept the terms and conditions\n" + "of this extension. I confirm that I have the authority and ability to\n" + "accept the terms and conditions of this extension for the customer.\n" + "I acknowledge that if the customer and the Qt Company already have a\n" + "valid agreement in place, that agreement shall apply, but these terms\n" "shall govern the use of this extension."); using namespace Layouting; From d39abfd31a43ffdb216c620cf5d4720db71c1dc3 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 13 Jan 2025 14:53:32 +0100 Subject: [PATCH 08/16] qbs build: Use the same deprecation flags as the cmake build Change-Id: I5b07c5e8f9a02448b819d7d7b8f815f6139be9b2 Reviewed-by: Christian Stenger --- qbs/modules/qtc/qtc.qbs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 2235d7c5ed5..fc32606b907 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -91,6 +91,8 @@ Module { "QT_RESTRICTED_CAST_FROM_ASCII", "QT_NO_FOREACH", "QT_DISABLE_DEPRECATED_BEFORE=0x050900", + "QT_WARN_DEPRECATED_BEFORE=0x060400", + "QT_WARN_DEPRECATED_UP_TO=0x060400", "QT_USE_QSTRINGBUILDER", "QT_NO_QSNPRINTF", ].concat(withPluginTests ? ["WITH_TESTS"] : []) From 471b7531a532caf8afee0261155cfda8bb66c2ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Thu, 9 Jan 2025 22:18:46 +0100 Subject: [PATCH 09/16] SquishTests: Improve tst_git_local for slow machines Change-Id: I8ad2b9a2e7118527a898bd6868e72346837d02c7 Reviewed-by: Christian Stenger --- tests/system/suite_tools/tst_git_local/test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/system/suite_tools/tst_git_local/test.py b/tests/system/suite_tools/tst_git_local/test.py index 44083878bed..d01ff7de22b 100644 --- a/tests/system/suite_tools/tst_git_local/test.py +++ b/tests/system/suite_tools/tst_git_local/test.py @@ -31,7 +31,9 @@ def commit(commitMessage, expectedLogMessage, uncheckUntracked=False): def verifyItemsInGit(commitMessages): gitEditor = waitForObject(":Qt Creator_Git::Internal::GitEditor") - waitFor("len(str(gitEditor.plainText)) > 0 and str(gitEditor.plainText) != 'Working...'", 20000) + if not waitFor("len(str(gitEditor.plainText))>0 and str(gitEditor.plainText)!='Working...'", + 40000): + test.warning("Waiting for GitEditor timed out.") plainText = str(gitEditor.plainText) verifyItemOrder(commitMessages, plainText) return plainText From 1c49cf4fc2af97dc7bb3dc21f6fd948203b9288a Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 14 Jan 2025 11:16:51 +0100 Subject: [PATCH 10/16] Doc: Add the "Use Git" category to the sidebar TOC under "How To" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6388ef67ffd931120d1a819326dd1e575d98d7aa Reviewed-by: André Hartmann --- doc/qtcreator/config/style/qt5-sidebar.html | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/qtcreator/config/style/qt5-sidebar.html b/doc/qtcreator/config/style/qt5-sidebar.html index e9bdbfb1da8..aa6f91a8799 100644 --- a/doc/qtcreator/config/style/qt5-sidebar.html +++ b/doc/qtcreator/config/style/qt5-sidebar.html @@ -60,6 +60,7 @@
  • Manage Projects
  • Read Documentation
  • Test
  • +
  • Use Git
  • Use Qt Creator
  • Use the UI
  • How To
  • From 5f047c3c1b1b1682bc88dbe4ad2332eff4d34def Mon Sep 17 00:00:00 2001 From: Artur Twardy Date: Wed, 15 Jan 2025 10:53:42 +0100 Subject: [PATCH 11/16] Lua: Add minimumWidth property to WidgetOptions Change-Id: I7c7ed3fc8b5ac907f9e6fc7ea161d1b263c9a5de Reviewed-by: Reviewed-by: Marcus Tillmanns --- src/libs/utils/layoutbuilder.cpp | 5 +++++ src/libs/utils/layoutbuilder.h | 1 + src/plugins/lua/bindings/gui.cpp | 7 +++++++ src/plugins/lua/meta/gui.lua | 1 + 4 files changed, 14 insertions(+) diff --git a/src/libs/utils/layoutbuilder.cpp b/src/libs/utils/layoutbuilder.cpp index 3caeca5664d..3f403418a50 100644 --- a/src/libs/utils/layoutbuilder.cpp +++ b/src/libs/utils/layoutbuilder.cpp @@ -792,6 +792,11 @@ void Widget::setCursor(Qt::CursorShape shape) access(this)->setCursor(shape); } +void Widget::setMinimumWidth(int minw) +{ + access(this)->setMinimumWidth(minw); +} + void Widget::setSizePolicy(const QSizePolicy &policy) { access(this)->setSizePolicy(policy); diff --git a/src/libs/utils/layoutbuilder.h b/src/libs/utils/layoutbuilder.h index f195f30ca06..93be17bb740 100644 --- a/src/libs/utils/layoutbuilder.h +++ b/src/libs/utils/layoutbuilder.h @@ -261,6 +261,7 @@ public: void setNormalMargins(int = 0); void setContentsMargins(int left, int top, int right, int bottom); void setCursor(Qt::CursorShape shape); + void setMinimumWidth(int); void activateWindow(); void close(); diff --git a/src/plugins/lua/bindings/gui.cpp b/src/plugins/lua/bindings/gui.cpp index 17f6016c7ae..9ebedea3ecc 100644 --- a/src/plugins/lua/bindings/gui.cpp +++ b/src/plugins/lua/bindings/gui.cpp @@ -114,6 +114,7 @@ CREATE_HAS_FUNC(setVisible, bool()) CREATE_HAS_FUNC(setIcon, Utils::Icon()); CREATE_HAS_FUNC(setContentsMargins, int(), int(), int(), int()); CREATE_HAS_FUNC(setCursor, Qt::CursorShape()) +CREATE_HAS_FUNC(setMinimumWidth, int()); template void setProperties(std::unique_ptr &item, const sol::table &children, QObject *guard) @@ -130,6 +131,12 @@ void setProperties(std::unique_ptr &item, const sol::table &children, QObject item->setCursor(*cursor); } + if constexpr (has_setMinimumWidth) { + const auto minw = children.get>("minimumWidth"); + if (minw) + item->setMinimumWidth(*minw); + } + if constexpr (has_setVisible) { const auto visible = children.get>("visible"); if (visible) diff --git a/src/plugins/lua/meta/gui.lua b/src/plugins/lua/meta/gui.lua index a12173f96a8..661b86a7024 100644 --- a/src/plugins/lua/meta/gui.lua +++ b/src/plugins/lua/meta/gui.lua @@ -41,6 +41,7 @@ gui.baseWidgetOptions = {} ---@field fixedSize? integer[] Two integers representing the width and height ---@field contentMargins? integer[] Four integers represending left, top, right and bottom margins. ---@field cursor? CursorShape The cursor shape for the widget. +---@field minimumWidth? integer The minimum width in pixels. gui.widgetOptions = {} ---@param options WidgetOptions From 3cfd66adbe3458490444b973cc587c01c5b20cb3 Mon Sep 17 00:00:00 2001 From: Artur Twardy Date: Tue, 14 Jan 2025 15:24:20 +0100 Subject: [PATCH 12/16] Lua: Expose stretch function in box layout Change-Id: I52bb81e01561950785252d362d31d6142844fcac Reviewed-by: Reviewed-by: Marcus Tillmanns --- src/libs/utils/layoutbuilder.cpp | 11 +++++++++++ src/libs/utils/layoutbuilder.h | 2 ++ src/plugins/lua/bindings/gui.cpp | 1 + src/plugins/lua/meta/gui.lua | 5 +++++ 4 files changed, 19 insertions(+) diff --git a/src/libs/utils/layoutbuilder.cpp b/src/libs/utils/layoutbuilder.cpp index 3f403418a50..1c5dc1448fe 100644 --- a/src/libs/utils/layoutbuilder.cpp +++ b/src/libs/utils/layoutbuilder.cpp @@ -686,6 +686,12 @@ void Layout::setFieldGrowthPolicy(int policy) lt->setFieldGrowthPolicy(QFormLayout::FieldGrowthPolicy(policy)); } +void Layout::setStretch(int index, int stretch) +{ + if (auto lt = asBox()) + lt->setStretch(index, stretch); +} + QWidget *Layout::emerge() const { const_cast(this)->flush(); @@ -1143,6 +1149,11 @@ LayoutModifier spacing(int space) return [space](Layout *layout) { layout->setSpacing(space); }; } +LayoutModifier stretch(int index, int stretch) +{ + return [index, stretch](Layout *layout) { layout->setStretch(index, stretch); }; +} + void addToLayout(Layout *layout, const Space &inner) { if (auto lt = layout->asBox()) diff --git a/src/libs/utils/layoutbuilder.h b/src/libs/utils/layoutbuilder.h index 93be17bb740..6b98d5d59ac 100644 --- a/src/libs/utils/layoutbuilder.h +++ b/src/libs/utils/layoutbuilder.h @@ -122,6 +122,7 @@ public: void setColumnStretch(int cols, int rows); void setSpacing(int space); void setFieldGrowthPolicy(int policy); + void setStretch(int index, int stretch); void attachTo(QWidget *); @@ -614,6 +615,7 @@ QTCREATOR_UTILS_EXPORT void hr(Layout *); QTCREATOR_UTILS_EXPORT void tight(Layout *); // noMargin + spacing(0) QTCREATOR_UTILS_EXPORT LayoutModifier spacing(int space); +QTCREATOR_UTILS_EXPORT LayoutModifier stretch(int index, int stretch); // Convenience diff --git a/src/plugins/lua/bindings/gui.cpp b/src/plugins/lua/bindings/gui.cpp index 9ebedea3ecc..60bb05e5ba1 100644 --- a/src/plugins/lua/bindings/gui.cpp +++ b/src/plugins/lua/bindings/gui.cpp @@ -700,6 +700,7 @@ void setupGuiModule() gui["normalMargin"] = &normalMargin; gui["withFormAlignment"] = &withFormAlignment; gui["spacing"] = &spacing; + gui["stretch"] = &stretch; return gui; }); diff --git a/src/plugins/lua/meta/gui.lua b/src/plugins/lua/meta/gui.lua index 661b86a7024..a4ca4badb51 100644 --- a/src/plugins/lua/meta/gui.lua +++ b/src/plugins/lua/meta/gui.lua @@ -260,6 +260,11 @@ function gui.normalMargin() end ---Sets the alignment of a Grid layout according to the Form layout rules. function gui.withFormAlignment() end +---Sets the stretch factor at position index to stretch. +---@param index integer The widget index. +---@param stretch integer The stretch factor. +function gui.stretch(index, stretch) end + --- Enum representing Text interaction flags ---@enum TextInteractionFlag gui.TextInteractionFlag { From 16c697cfa1cc548cf9b3c2fcf76d6f9c840e0100 Mon Sep 17 00:00:00 2001 From: Ville Lavonius Date: Wed, 15 Jan 2025 14:21:53 +0200 Subject: [PATCH 13/16] Welcome: Fix the parameters of two academy links Change-Id: I34dcccc4b4170d01c2055ad22502fc5c90120fed Reviewed-by: Alessandro Portale --- src/plugins/qtsupport/qtcreator_tutorials.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qtsupport/qtcreator_tutorials.xml b/src/plugins/qtsupport/qtcreator_tutorials.xml index c3b9d03d261..6be99872b12 100644 --- a/src/plugins/qtsupport/qtcreator_tutorials.xml +++ b/src/plugins/qtsupport/qtcreator_tutorials.xml @@ -91,7 +91,7 @@ - + qt creator,ui,welcome,qt widgets designer,widgets,editing,debugging,learning,2024 @@ -129,7 +129,7 @@ - + qt,qt quick,2024 From e03a924992a5f62001ae2887456f5aa04dd56738 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 13 Jan 2025 08:46:48 +0100 Subject: [PATCH 14/16] Crashpad: Explicitly enable handling if crashpad is enabled This defaults to kUnset, which is interpreted as enabled by vanilla Crashpad. We want to turn that around, so we have more control over which processes are handled by Crashpad. Change-Id: I877acd5b6fa1e222648f031e68be3837422e96d9 Reviewed-by: hjk --- src/app/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/main.cpp b/src/app/main.cpp index 365887dfc4e..5d2fa201df9 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -450,6 +450,11 @@ void startCrashpad(const AppInfo &appInfo, bool crashReportingEnabled) ->set_gather_indirectly_referenced_memory(crashpad::TriState::kEnabled, 0); } + // Explicitly enable Crashpad handling. This is the default in vanilla Crashpad, + // but we use a version that only handles processes that enable it explicitly, + // so we do not handle arbitrary subprocesses + CrashpadInfo::GetCrashpadInfo()->set_crashpad_handler_behavior(crashpad::TriState::kEnabled); + // Optional arguments to pass to the handler std::vector arguments; arguments.push_back("--no-rate-limit"); From 40480c24fc287eadb794450d87dbc8ad5bf9a0d8 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 15 Jan 2025 13:25:40 +0100 Subject: [PATCH 15/16] Crashpad: Fix linking on Windows Looks like symbols moved to client/common.lib (CrashReportDatabase, CrashpadInfo, Settings) in newer versions of Crashpad. Need to link against it to avoid missing symbols. Change-Id: I18506105c098379ee9325138ca4a5197a622e2f7 Reviewed-by: Tim Jenssen --- cmake/FindCrashpad.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/FindCrashpad.cmake b/cmake/FindCrashpad.cmake index 181c4b0518d..ad28475a06a 100644 --- a/cmake/FindCrashpad.cmake +++ b/cmake/FindCrashpad.cmake @@ -69,10 +69,16 @@ if(Crashpad_FOUND) "${CRASHPAD_INCLUDE_DIR}/third_party/mini_chromium/mini_chromium" "${CRASHPAD_GEN_DIR}") if(WIN32) + set(COMMON_LIB "${CRASHPAD_LIB_DIR}/client/common.lib") + # might not exist in older versions + if (NOT EXISTS "${COMMON_LIB}") + set(COMMON_LIB "") + endif() target_link_libraries(Crashpad::Crashpad INTERFACE "${CRASHPAD_LIB_DIR}/third_party/mini_chromium/mini_chromium/base/base.lib" "${CRASHPAD_LIB_DIR}/util/util.lib" "${CRASHPAD_LIB_DIR}/client/client.lib" + "${COMMON_LIB}" advapi32) set_target_properties(Crashpad::Crashpad PROPERTIES IMPORTED_LOCATION "${CRASHPAD_LIB_DIR}/client/client.lib") From 0ee72f78f1943c5cc83b21394422689671a74c4e Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 13 Jan 2025 10:24:06 +0100 Subject: [PATCH 16/16] Utils: Add a missing #include This is needed to make it compile with current Qt 6.9. Change-Id: I1ef7d906ad5d5dba18c5180ca2606e19c4580610 Reviewed-by: Jarek Kobus --- src/libs/utils/url.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/utils/url.cpp b/src/libs/utils/url.cpp index b96e51955da..fad881699b8 100644 --- a/src/libs/utils/url.cpp +++ b/src/libs/utils/url.cpp @@ -5,6 +5,7 @@ #include "temporaryfile.h" +#include #include #include #include