From 049ac852a6863830f34ca55f2b56035486a257d4 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 11 Dec 2023 11:16:31 +0100 Subject: [PATCH 1/6] Change log: Add some more items, convert bug numbers to links Change-Id: Ic9b3d3f9a7441fd6bec0ffee4fee7082e91d5a95 Reviewed-by: Leena Miettinen --- dist/changelog/changes-12.0.1.md | 45 +++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/dist/changelog/changes-12.0.1.md b/dist/changelog/changes-12.0.1.md index 0883f186020..fbe70abb89d 100644 --- a/dist/changelog/changes-12.0.1.md +++ b/dist/changelog/changes-12.0.1.md @@ -14,7 +14,7 @@ General ------- * Fixed opening files with drag and drop on Qt Creator - (QTCREATORBUG-29961) + ([QTCREATORBUG-29961](https://bugreports.qt.io/browse/QTCREATORBUG-29961)) Editing ------- @@ -22,28 +22,45 @@ Editing ### C++ * Fixed a crash while parsing - (QTCREATORBUG-29847) + ([QTCREATORBUG-29847](https://bugreports.qt.io/browse/QTCREATORBUG-29847)) * Fixed a freeze when hovering over a class declaration - (QTCREATORBUG-29975) + ([QTCREATORBUG-29975](https://bugreports.qt.io/browse/QTCREATORBUG-29975)) * Fixed the renaming of virtual functions * Fixed `Select Block Up` for string literals - (QTCREATORBUG-29844) + ([QTCREATORBUG-29844](https://bugreports.qt.io/browse/QTCREATORBUG-29844)) * Fixed the conversion between comment styles for certain indented comments +* Clang Format + * Fixed the indentation after multi-byte UTF-8 characters + ([QTCREATORBUG-29927](https://bugreports.qt.io/browse/QTCREATORBUG-29927)) + +### Widget Designer + +* Fixed that the buttons for editing signals and slots and editing buddies + were switched + ([QTCREATORBUG-30017](https://bugreports.qt.io/browse/QTCREATORBUG-30017)) Projects -------- * Fixed the restoring of custom Kit data - (QTCREATORBUG-29970) + ([QTCREATORBUG-29970](https://bugreports.qt.io/browse/QTCREATORBUG-29970)) * Fixed overlapping labels in the target selector - (QTCREATORBUG-29990) + ([QTCREATORBUG-29990](https://bugreports.qt.io/browse/QTCREATORBUG-29990)) * Fixed the label for `Custom Executable` run configurations - (QTCREATORBUG-29983) + ([QTCREATORBUG-29983](https://bugreports.qt.io/browse/QTCREATORBUG-29983)) ### CMake * Fixed a crash when opening projects - (QTCREATORBUG-29965) + ([QTCREATORBUG-29965](https://bugreports.qt.io/browse/QTCREATORBUG-29965)) +* Fixed a crash when editing CMake files without a project + ([QTCREATORBUG-30023](https://bugreports.qt.io/browse/QTCREATORBUG-30023)) +* Fixed that directories were marked as invalid for the `Staging Directory` + ([QTCREATORBUG-29997](https://bugreports.qt.io/browse/QTCREATORBUG-29997)) + +### Qbs + +* Fixed a crash when parsing projects Analyzer -------- @@ -51,7 +68,7 @@ Analyzer ### Valgrind * Fixed stopping the Valgrind process - (QTCREATORBUG-29948) + ([QTCREATORBUG-29948](https://bugreports.qt.io/browse/QTCREATORBUG-29948)) Version Control Systems ----------------------- @@ -60,7 +77,7 @@ Version Control Systems * Fixed that empty blame annotations are shown after saving a file outside of the version control directory - (QTCREATORBUG-29991) + ([QTCREATORBUG-29991](https://bugreports.qt.io/browse/QTCREATORBUG-29991)) Platforms --------- @@ -68,26 +85,28 @@ Platforms ### Linux * Added an error dialog for errors when loading the Qt platform plugin - (QTCREATORBUG-30004) + ([QTCREATORBUG-30004](https://bugreports.qt.io/browse/QTCREATORBUG-30004)) ### Boot2Qt * Fixed deployment on Windows - (QTCREATORBUG-29971) + ([QTCREATORBUG-29971](https://bugreports.qt.io/browse/QTCREATORBUG-29971)) ### MCU * Fixed `Replace existing kits` after changing MCU SDK path - (QTCREATORBUG-29960) + ([QTCREATORBUG-29960](https://bugreports.qt.io/browse/QTCREATORBUG-29960)) Credits for these changes go to: -------------------------------- Alessandro Portale Andre Hartmann +Artem Sokolovskii Christian Kandeler Christian Stenger Cristian Adam Eike Ziller +Friedemann Kleint Jaroslaw Kobus Marcus Tillmanns Orgad Shaneh From 1633d76b7674ff07e8938aa8f81ef2b07c92a202 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 7 Dec 2023 13:35:58 +0100 Subject: [PATCH 2/6] SquishTests: Allow designer test to progress further MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explicitly chose a newer kit as the kit we would use by default lacks some compiler features on Windows. This patch here only fixes the test crash when trying to access a disabled menu item due to cmake dropping out with error when parsing the project with the active kit. Drive by change: removed workaround for fixed bug. Change-Id: I783626f30d27ab1852536ae0d1f936ec8323feb8 Reviewed-by: Robert Löhning --- tests/system/shared/project.py | 17 +++++++++++++---- .../tst_designer_autocomplete/test.py | 9 +++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 317067142a4..5bb724a0b1d 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -139,8 +139,13 @@ def __createProjectHandleQtQuickSelection__(minimumQtVersion): # param buildSystem is a string holding the build system selected for the project # param checks turns tests in the function on if set to True # param available a list holding the available targets -def __selectQtVersionDesktop__(buildSystem, checks, available=None): - wanted = Targets.desktopTargetClasses() +# param targets a list holding the wanted targets - defaults to all desktop targets if empty +# returns checked targets +def __selectQtVersionDesktop__(buildSystem, checks, available=None, targets=[]): + if len(targets): + wanted = targets + else: + wanted = Targets.desktopTargetClasses() checkedTargets = __chooseTargets__(wanted, available) if checks: for target in checkedTargets: @@ -162,6 +167,7 @@ def __selectQtVersionDesktop__(buildSystem, checks, available=None): verifyChecked(cbObject % ("Profile", objectMap.realName(detailsWidget))) clickButton(detailsButton) clickButton(waitForObject(":Next_QPushButton")) + return checkedTargets def __createProjectHandleLastPage__(expectedFiles=[], addToVersionControl="", addToProject=None): if len(expectedFiles): @@ -205,8 +211,10 @@ def __getProjectFileName__(projectName, buildSystem): # param checks turns tests in the function on if set to True # param addToVersionControl selects the specified VCS from Creator's wizard # param buildSystem selects the specified build system from Creator's wizard +# param targets specifies targets that should be checked +# returns the checked targets def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="", - buildSystem=None): + buildSystem=None, targets=[]): template = "Qt Widgets Application" available = __createProjectOrFileSelectType__(" Application (Qt)", template) __createProjectSetNameAndPath__(path, projectName, checks) @@ -229,7 +237,7 @@ def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl=" Date: Mon, 11 Dec 2023 08:11:23 +0100 Subject: [PATCH 3/6] CMake Debugging: Do not build/deploy Fixes: QTCREATORBUG-30045 Change-Id: I478abaf29462d9413f3285527459a98b1cae899d Reviewed-by: Artem Sokolovskii Reviewed-by: Cristian Adam --- .../cmakeprojectmanager/cmakeprojectmanager.cpp | 2 +- src/plugins/debugger/debuggerplugin.cpp | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp index 1dfc03af62f..9720c134608 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp @@ -171,7 +171,7 @@ CMakeManager::CMakeManager() mdebugger->addAction(command, Constants::CMAKE_DEBUGGING_GROUP); connect(m_cmakeDebuggerAction, &QAction::triggered, this, [] { ProjectExplorerPlugin::runStartupProject(ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE, - false); + true); }); connect(ProjectManager::instance(), &ProjectManager::startupProjectChanged, this, [this] { diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index bb90a260cc9..6b74567e359 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1243,13 +1243,15 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo { QString name; char const *runMode; + bool forceSkipDeploy = false; }; const QList perspectiveList = { - DapPerspective{Tr::tr("CMake Preset"), ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE}, + DapPerspective{Tr::tr("CMake Preset"), + ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE, + /*forceSkipDeploy=*/true}, DapPerspective{Tr::tr("GDB Preset"), ProjectExplorer::Constants::DAP_GDB_DEBUG_RUN_MODE}, - DapPerspective{Tr::tr("Python Preset"), - ProjectExplorer::Constants::DAP_PY_DEBUG_RUN_MODE}, + DapPerspective{Tr::tr("Python Preset"), ProjectExplorer::Constants::DAP_PY_DEBUG_RUN_MODE}, }; for (const DapPerspective &dp : perspectiveList) @@ -1257,10 +1259,11 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo connect(&m_startDapAction, &QAction::triggered, this, [perspectiveList] { QComboBox *combo = qobject_cast(EngineManager::dapEngineChooser()); - if (perspectiveList.size() > combo->currentIndex()) - ProjectExplorerPlugin::runStartupProject(perspectiveList.at(combo->currentIndex()) - .runMode, - false); + if (perspectiveList.size() > combo->currentIndex()) { + const DapPerspective dapPerspective = perspectiveList.at(combo->currentIndex()); + ProjectExplorerPlugin::runStartupProject(dapPerspective.runMode, + dapPerspective.forceSkipDeploy); + } }); auto breakpointManagerView = createBreakpointManagerView("DAPDebugger.BreakWindow"); From c7f88ced89dc0f23c2ad1b6c31f89982bba90f68 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 8 Dec 2023 13:41:24 +0100 Subject: [PATCH 4/6] ProjectExplorer: Fix FilePath construction for git paths Change-Id: If29c0afcd41789ded5eccc6e098b3fadb390287d Reviewed-by: Reviewed-by: Qt CI Bot Reviewed-by: hjk --- src/plugins/projectexplorer/projectexplorer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 98c8690900c..a2fbb7cb288 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -2098,7 +2098,7 @@ void ProjectExplorerPlugin::extensionsInitialized() const QStringList rawGitSearchPaths = ICore::settings()->value("Git/Path") .toString().split(':', Qt::SkipEmptyParts); const FilePaths gitSearchPaths = Utils::transform(rawGitSearchPaths, - [](const QString &rawPath) { return FilePath::fromString(rawPath); }); + [](const QString &rawPath) { return FilePath::fromUserInput(rawPath); }); const FilePath fullGitPath = Environment::systemEnvironment() .searchInPath(gitBinary, gitSearchPaths); if (!fullGitPath.isEmpty()) { From 1365ee7cb2be79912a3de995e71f45a1e344e4ab Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 7 Dec 2023 18:01:24 +0100 Subject: [PATCH 5/6] CppEditor: Add assertions to CppRefactoringFile::{start,end}Of(AST *) I've seen this crash once with a null pointer. Change-Id: I162e36155f030712f697da0bbf39ea5fef849db3 Reviewed-by: Qt CI Bot Reviewed-by: Reviewed-by: Christian Stenger --- src/plugins/cppeditor/cpprefactoringchanges.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/cppeditor/cpprefactoringchanges.cpp b/src/plugins/cppeditor/cpprefactoringchanges.cpp index f4bcc471ad8..bf6faa7733b 100644 --- a/src/plugins/cppeditor/cpprefactoringchanges.cpp +++ b/src/plugins/cppeditor/cpprefactoringchanges.cpp @@ -191,6 +191,7 @@ int CppRefactoringFile::startOf(unsigned index) const int CppRefactoringFile::startOf(const AST *ast) const { + QTC_ASSERT(ast, return 0); int firstToken = ast->firstToken(); const int lastToken = ast->lastToken(); while (tokenAt(firstToken).generated() && firstToken < lastToken) @@ -207,6 +208,7 @@ int CppRefactoringFile::endOf(unsigned index) const int CppRefactoringFile::endOf(const AST *ast) const { + QTC_ASSERT(ast, return 0); int lastToken = ast->lastToken() - 1; QTC_ASSERT(lastToken >= 0, return -1); const int firstToken = ast->firstToken(); From c4464eb072dfff073809fc3207a29c55773dcb9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Sat, 9 Dec 2023 00:23:33 +0100 Subject: [PATCH 6/6] Add logo and title to PySide install dialog Change-Id: I7888ee906334de2c93c24c5da2394c9e73101a28 Fixes: QTCREATORBUG-30041 Reviewed-by: Reviewed-by: Alessandro Portale Reviewed-by: David Schulz --- .../python/images/qtforpython_neon.png | Bin 0 -> 1049 bytes src/plugins/python/pyside.cpp | 30 +++++++++++++++--- src/plugins/python/python.qrc | 1 + 3 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 src/plugins/python/images/qtforpython_neon.png diff --git a/src/plugins/python/images/qtforpython_neon.png b/src/plugins/python/images/qtforpython_neon.png new file mode 100644 index 0000000000000000000000000000000000000000..71a7299c3910771477bacb0e785ec46641e5158d GIT binary patch literal 1049 zcmeAS@N?(olHy`uVBq!ia0y~yU~phyV9?`WW?*1g@A>{10|R4ifKQ0)|Ns9PK&T<~ z|0?4%GqtZaDBN$beB7t^qFeiFgUam&-G}Ykj~fhcx9Qw#)qmWgce_*bUW>u~cFnuZ z`ghy(?ltQ?Xx4t%ruCp*??J2Xop$ZJ?b`QRwC=a*-EYx-(57>zMf+}x?!6Y>`)xY+ zo3$Ub>fLSCz1ysFuT}egtL}qVox80%ciXh@L6w2T@3rdQZ`HZi1|sjaY2R(pzSpXA zzf~Kgu|?-zs}9JtR^7X8I(J*OLCV@d3c%vp_gl2@wt@_~4>lQ0f@PuNAY(x)K?Z`1 z0;|`(2Qe0G4p=)_3Sz*1PHrAPK_O9bX&HG1RW)@@Ekh$?Q!{f5ODh{Ydk05n7gu*rZy(>_(3rS{ORq!*3p+}*J`6Vq zH1685;GizYsRv!&0)n@AC%UqV2F6@m5Ex>jvsmEF&$n@BL`1cxyez3NugyAV9D4UM zGegOmQ-zP}&h35R`=-KgUKV1DS+r_X94N*K*n%-S|F z)t=$o`D&&uHKmNtxLTbaz763&AS#|<8yUkMq{{ywoUP&+;|raFc>i9*qbfhsdMY#c zpD-@wd=NLuhspWdfzStST@K}wV%XwtFxwv3aE0sTR*THmkQCmKZ;btqukV|tBHHNp z+jkD@4;^2|?W&&q4ZE)$_!Fm~p2_%Pg34E>_pg|pk4apv-z9m&OxZJcLv3hKDu2o; z-n*@goP$3grW9C`L=}%Z}*ngSw`0Qc~p$ z#<=V?WBnlmp3__X*UslW9D5;V75ks`Yh?!lD;YK)(3MYMsCddO)Al8wKVjjk>ruAe z+YTrvEHR6-OXL2+^gjFd@r|r`&py{mM}J*wUf3OJ*(feh`iRvfwu15E${qj3Gab%m V>@_{Qn}LCW!PC{xWt~$(69AZo>-_)# literal 0 HcmV?d00001 diff --git a/src/plugins/python/pyside.cpp b/src/plugins/python/pyside.cpp index b2483c7cac6..d6ce264ccb4 100644 --- a/src/plugins/python/pyside.cpp +++ b/src/plugins/python/pyside.cpp @@ -128,20 +128,40 @@ void PySideInstaller::installPyside(const FilePath &python, } else { QDialog dialog; dialog.setWindowTitle(Tr::tr("Select PySide Version")); - dialog.setLayout(new QVBoxLayout()); - dialog.layout()->addWidget(new QLabel(Tr::tr("Select which PySide version to install:"))); + + // Logo for the corner in the QDialog + QPixmap logo(":/python/images/qtforpython_neon.png"); + QLabel *logoLabel = new QLabel(); + logoLabel->setPixmap(logo); + + QVBoxLayout *dialogLayout = new QVBoxLayout(); + QHBoxLayout *hlayout = new QHBoxLayout(); + hlayout->addWidget(logoLabel); + hlayout->addWidget(new QLabel("" + Tr::tr("Installing PySide") + "")); + dialogLayout->addLayout(hlayout); + + QLabel *installDescription = new QLabel(Tr::tr("You can install PySide " + "from PyPi (Community OSS version) or from your Qt " + "installation location, if you are using the Qt " + "Installer and have a commercial license.")); + installDescription->setWordWrap(true); + dialogLayout->addWidget(installDescription); + + dialogLayout->addWidget(new QLabel(Tr::tr("Select which version to install:"))); QComboBox *pySideSelector = new QComboBox(); - pySideSelector->addItem(Tr::tr("Latest PySide from the Python Package Index")); + pySideSelector->addItem(Tr::tr("Latest PySide from the PyPI")); for (const Utils::FilePath &version : std::as_const(availablePySides)) { const FilePath dir = version.parentDir(); const QString text = Tr::tr("PySide %1 Wheel (%2)").arg(dir.fileName(), dir.toUserOutput()); pySideSelector->addItem(text, version.toVariant()); } - dialog.layout()->addWidget(pySideSelector); + dialogLayout->addWidget(pySideSelector); QDialogButtonBox box; box.setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); - dialog.layout()->addWidget(&box); + dialogLayout->addWidget(&box); + + dialog.setLayout(dialogLayout); connect(&box, &QDialogButtonBox::accepted, &dialog, &QDialog::accept); connect(&box, &QDialogButtonBox::rejected, &dialog, &QDialog::reject); diff --git a/src/plugins/python/python.qrc b/src/plugins/python/python.qrc index 1a6da2a242b..6b0fe17637a 100644 --- a/src/plugins/python/python.qrc +++ b/src/plugins/python/python.qrc @@ -2,5 +2,6 @@ images/settingscategory_python.png images/settingscategory_python@2x.png + images/qtforpython_neon.png