diff --git a/dist/changelog/changes-11.0.1.md b/dist/changelog/changes-11.0.1.md new file mode 100644 index 00000000000..3c187b0c41d --- /dev/null +++ b/dist/changelog/changes-11.0.1.md @@ -0,0 +1,77 @@ +Qt Creator 11.0.1 +================= + +Qt Creator version 11.0.1 contains bug fixes. + +The most important changes are listed in this document. For a complete list of +changes, see the Git log for the Qt Creator sources that you can check out from +the public Git repository. For example: + + git clone git://code.qt.io/qt-creator/qt-creator.git + git log --cherry-pick --pretty=oneline origin/v11.0.0..v11.0.1 + +General +------- + +* Fixed writing configuration files with `sdktool` +* Fixed exporting keyboard shortcut schemes + ([QTCREATORBUG-29431](https://bugreports.qt.io/browse/QTCREATORBUG-29431)) + +Editing +------- + +### SCXML + +* Fixed a crash when `onEntry`/`onExit` events and transitions where displayed + together + ([QTCREATORBUG-29429](https://bugreports.qt.io/browse/QTCREATORBUG-29429)) + +### Beautifier + +* Fixed setting a customized Clang Format style + ([QTCREATORBUG-28525](https://bugreports.qt.io/browse/QTCREATORBUG-28525)) + +Projects +-------- + +* Fixed a crash when editing kits + ([QTCREATORBUG-29382](https://bugreports.qt.io/browse/QTCREATORBUG-29382), + [QTCREATORBUG-29425](https://bugreports.qt.io/browse/QTCREATORBUG-29425)) +* Fixed a crash when manually re-detecting toolchains + ([QTCREATORBUG-29430](https://bugreports.qt.io/browse/QTCREATORBUG-29430)) +* Fixed the pasting of large texts in integrated terminal +* Incredibuild + * Fixed missing UI in the build steps + +### CMake + +* Fixed an issue with framework paths with CMake >= 3.27 + ([QTCREATORBUG-29450](https://bugreports.qt.io/browse/QTCREATORBUG-29450)) + +Debugging +--------- + +* Fixed the button state in the dialog for loading core files +* Fixed debugging with debuggers that still use Python 2.7 + ([QTCREATORBUG-29440](https://bugreports.qt.io/browse/QTCREATORBUG-29440)) +* GDB + * Fixed `Use common locations for debug information` + +Version Control Systems +----------------------- + +### Git + +* Fixed a crash when tools are not found in `PATH` + +Credits for these changes go to: +-------------------------------- +Aleksei German +André Pönitz +Christian Kandeler +Christian Stenger +Cristian Adam +Eike Ziller +Leena Miettinen +Marcus Tillmanns +Robert Löhning diff --git a/doc/qtcreator/src/overview/creator-tech-support.qdoc b/doc/qtcreator/src/overview/creator-tech-support.qdoc index d7d5f000f27..af87b414bcc 100644 --- a/doc/qtcreator/src/overview/creator-tech-support.qdoc +++ b/doc/qtcreator/src/overview/creator-tech-support.qdoc @@ -34,7 +34,7 @@ \if defined(qtcreator) \row \li View examples of what you can do with Qt - \li \l{List of Qt Examples} + \li \l{Qt Examples and Tutorials} \row \li Develop Qt applications for desktop and \l{glossary-device}{devices} diff --git a/src/plugins/beautifier/clangformat/clangformat.cpp b/src/plugins/beautifier/clangformat/clangformat.cpp index 9ed2d4f4a40..43580eeff0e 100644 --- a/src/plugins/beautifier/clangformat/clangformat.cpp +++ b/src/plugins/beautifier/clangformat/clangformat.cpp @@ -297,7 +297,8 @@ public: connect(styleButtonGroup, &QButtonGroup::buttonClicked, this, updateEnabled); connect(&s.predefinedStyle, &SelectionAspect::volatileValueChanged, this, updateEnabled); - setOnApply([configurations] { + setOnApply([configurations, customizedStyleButton] { + settings().usePredefinedStyle.setValue(!customizedStyleButton->isChecked()); settings().customStyle.setValue(configurations->currentConfiguration()); settings().save(); }); diff --git a/src/plugins/cmakeprojectmanager/fileapiparser.cpp b/src/plugins/cmakeprojectmanager/fileapiparser.cpp index c64b921edeb..921df86841a 100644 --- a/src/plugins/cmakeprojectmanager/fileapiparser.cpp +++ b/src/plugins/cmakeprojectmanager/fileapiparser.cpp @@ -485,6 +485,26 @@ static std::vector extractFragments(const QJsonObj }); } +static void addIncludeInfo(std::vector *includes, + const QJsonObject &compileGroups, + const QString §ion) +{ + const std::vector add + = transform(compileGroups.value(section).toArray(), [](const QJsonValue &v) { + const QJsonObject i = v.toObject(); + const QString path = i.value("path").toString(); + const bool isSystem = i.value("isSystem").toBool(); + const ProjectExplorer::HeaderPath hp(path, + isSystem + ? ProjectExplorer::HeaderPathType::System + : ProjectExplorer::HeaderPathType::User); + + return IncludeInfo{ProjectExplorer::RawProjectPart::frameworkDetectionHeuristic(hp), + i.value("backtrace").toInt(-1)}; + }); + std::copy(add.cbegin(), add.cend(), std::back_inserter(*includes)); +} + static TargetDetails extractTargetDetails(const QJsonObject &root, QString &errorMessage) { TargetDetails t; @@ -580,6 +600,10 @@ static TargetDetails extractTargetDetails(const QJsonObject &root, QString &erro const QJsonArray compileGroups = root.value("compileGroups").toArray(); t.compileGroups = transform(compileGroups, [](const QJsonValue &v) { const QJsonObject o = v.toObject(); + std::vector includes; + addIncludeInfo(&includes, o, "includes"); + // new in CMake 3.27+: + addIncludeInfo(&includes, o, "frameworks"); return CompileInfo{ transform(o.value("sourceIndexes").toArray(), [](const QJsonValue &v) { return v.toInt(-1); }), @@ -589,21 +613,7 @@ static TargetDetails extractTargetDetails(const QJsonObject &root, QString &erro const QJsonObject o = v.toObject(); return o.value("fragment").toString(); }), - transform( - o.value("includes").toArray(), - [](const QJsonValue &v) { - const QJsonObject i = v.toObject(); - const QString path = i.value("path").toString(); - const bool isSystem = i.value("isSystem").toBool(); - const ProjectExplorer::HeaderPath - hp(path, - isSystem ? ProjectExplorer::HeaderPathType::System - : ProjectExplorer::HeaderPathType::User); - - return IncludeInfo{ - ProjectExplorer::RawProjectPart::frameworkDetectionHeuristic(hp), - i.value("backtrace").toInt(-1)}; - }), + includes, transform(o.value("defines").toArray(), [](const QJsonValue &v) { const QJsonObject d = v.toObject(); diff --git a/src/plugins/cppeditor/compileroptionsbuilder.cpp b/src/plugins/cppeditor/compileroptionsbuilder.cpp index 8b7dd11b2d7..317cf7b25dd 100644 --- a/src/plugins/cppeditor/compileroptionsbuilder.cpp +++ b/src/plugins/cppeditor/compileroptionsbuilder.cpp @@ -64,6 +64,13 @@ static QString defineDirectiveToDefineOption(const Macro ¯o) return QString::fromUtf8(option); } +static QStringList cpuBlacklist() +{ + QStringList blacklist = qtcEnvironmentVariable("QTC_CLANGD_CPU_BLACKLIST") + .split(':', Qt::SkipEmptyParts); + return blacklist << "cortex-a72.cortex-a53"; // See QTCREATORBUG-29304 +} + QStringList XclangArgs(const QStringList &args) { QStringList options; @@ -270,6 +277,7 @@ void CompilerOptionsBuilder::addPicIfCompilerFlagsContainsIt() void CompilerOptionsBuilder::addCompilerFlags() { add(m_compilerFlags.flags); + removeUnsupportedCpuFlags(); } void CompilerOptionsBuilder::addMsvcExceptions() @@ -375,6 +383,17 @@ void CompilerOptionsBuilder::addIncludeFile(const QString &file) } } +void CompilerOptionsBuilder::removeUnsupportedCpuFlags() +{ + const QStringList blacklist = cpuBlacklist(); + for (auto it = m_options.begin(); it != m_options.end();) { + if (it->startsWith("-mcpu=") && blacklist.contains(it->mid(6))) + it = m_options.erase(it); + else + ++it; + } +} + void CompilerOptionsBuilder::addIncludedFiles(const QStringList &files) { for (const QString &file : files) { diff --git a/src/plugins/cppeditor/compileroptionsbuilder.h b/src/plugins/cppeditor/compileroptionsbuilder.h index d47a7e87e3d..55d775120aa 100644 --- a/src/plugins/cppeditor/compileroptionsbuilder.h +++ b/src/plugins/cppeditor/compileroptionsbuilder.h @@ -87,6 +87,7 @@ private: QStringList wrappedMingwHeadersIncludePath() const; QByteArray msvcVersion() const; void addIncludeFile(const QString &file); + void removeUnsupportedCpuFlags(); private: const ProjectPart &m_projectPart; diff --git a/src/plugins/incredibuild/commandbuilderaspect.cpp b/src/plugins/incredibuild/commandbuilderaspect.cpp index 5cfbac953b1..3eced7c144f 100644 --- a/src/plugins/incredibuild/commandbuilderaspect.cpp +++ b/src/plugins/incredibuild/commandbuilderaspect.cpp @@ -61,7 +61,8 @@ public: }; CommandBuilderAspect::CommandBuilderAspect(BuildStep *step) - : d(new CommandBuilderAspectPrivate(step)) + : BaseAspect(step) + , d(new CommandBuilderAspectPrivate(step)) { } diff --git a/src/plugins/projectexplorer/kitinformation.cpp b/src/plugins/projectexplorer/kitinformation.cpp index 84c203ddcf6..12aac6ebae9 100644 --- a/src/plugins/projectexplorer/kitinformation.cpp +++ b/src/plugins/projectexplorer/kitinformation.cpp @@ -1376,6 +1376,17 @@ void BuildDeviceKitAspect::devicesChanged() // -------------------------------------------------------------------------- // EnvironmentKitAspect: // -------------------------------------------------------------------------- +static EnvironmentItem forceMSVCEnglishItem() +{ + static EnvironmentItem item("VSLANG", "1033"); + return item; +} + +static bool enforcesMSVCEnglish(const EnvironmentItems &changes) +{ + return changes.contains(forceMSVCEnglishItem()); +} + namespace Internal { class EnvironmentKitAspectWidget final : public KitAspectWidget { @@ -1410,7 +1421,7 @@ private: void refresh() override { - const EnvironmentItems changes = currentEnvironment(); + const EnvironmentItems changes = envWithoutMSVCEnglishEnforcement(); const QString shortSummary = EnvironmentItem::toStringList(changes).join("; "); m_summaryLabel->setText(shortSummary.isEmpty() ? Tr::tr("No changes to apply.") : shortSummary); } @@ -1422,32 +1433,29 @@ private: VariableChooser::addSupportForChildWidgets(w, expander); }; auto changes = EnvironmentDialog::getEnvironmentItems(m_summaryLabel, - currentEnvironment(), + envWithoutMSVCEnglishEnforcement(), QString(), polisher); if (!changes) return; if (HostOsInfo::isWindowsHost()) { - const EnvironmentItem forceMSVCEnglishItem("VSLANG", "1033"); - if (m_vslangCheckbox->isChecked() && changes->indexOf(forceMSVCEnglishItem) < 0) - changes->append(forceMSVCEnglishItem); + // re-add what envWithoutMSVCEnglishEnforcement removed + // or update vslang checkbox if user added it manually + if (m_vslangCheckbox->isChecked() && !enforcesMSVCEnglish(*changes)) + changes->append(forceMSVCEnglishItem()); + else if (enforcesMSVCEnglish(*changes)) + m_vslangCheckbox->setChecked(true); } - EnvironmentKitAspect::setEnvironmentChanges(m_kit, *changes); } - EnvironmentItems currentEnvironment() const + EnvironmentItems envWithoutMSVCEnglishEnforcement() const { EnvironmentItems changes = EnvironmentKitAspect::environmentChanges(m_kit); - if (HostOsInfo::isWindowsHost()) { - const EnvironmentItem forceMSVCEnglishItem("VSLANG", "1033"); - if (changes.indexOf(forceMSVCEnglishItem) >= 0) { - m_vslangCheckbox->setCheckState(Qt::Checked); - changes.removeAll(forceMSVCEnglishItem); - } - } + if (HostOsInfo::isWindowsHost()) + changes.removeAll(forceMSVCEnglishItem()); return sorted(std::move(changes), [](const EnvironmentItem &lhs, const EnvironmentItem &rhs) { return QString::localeAwareCompare(lhs.name, rhs.name) < 0; }); @@ -1460,13 +1468,14 @@ private: m_vslangCheckbox->setToolTip(Tr::tr("Either switches MSVC to English or keeps the language and " "just forces UTF-8 output (may vary depending on the used MSVC " "compiler).")); - connect(m_vslangCheckbox, &QCheckBox::toggled, this, [this](bool checked) { + if (enforcesMSVCEnglish(EnvironmentKitAspect::environmentChanges(m_kit))) + m_vslangCheckbox->setChecked(true); + connect(m_vslangCheckbox, &QCheckBox::clicked, this, [this](bool checked) { EnvironmentItems changes = EnvironmentKitAspect::environmentChanges(m_kit); - const EnvironmentItem forceMSVCEnglishItem("VSLANG", "1033"); - if (!checked && changes.indexOf(forceMSVCEnglishItem) >= 0) - changes.removeAll(forceMSVCEnglishItem); - if (checked && changes.indexOf(forceMSVCEnglishItem) < 0) - changes.append(forceMSVCEnglishItem); + if (!checked && changes.indexOf(forceMSVCEnglishItem()) >= 0) + changes.removeAll(forceMSVCEnglishItem()); + if (checked && changes.indexOf(forceMSVCEnglishItem()) < 0) + changes.append(forceMSVCEnglishItem()); EnvironmentKitAspect::setEnvironmentChanges(m_kit, changes); }); } diff --git a/src/plugins/scxmleditor/plugin_interface/eventitem.cpp b/src/plugins/scxmleditor/plugin_interface/eventitem.cpp index f61517f7cf6..af0827257f3 100644 --- a/src/plugins/scxmleditor/plugin_interface/eventitem.cpp +++ b/src/plugins/scxmleditor/plugin_interface/eventitem.cpp @@ -18,7 +18,7 @@ EventItem::EventItem(const QPointF &pos, BaseItem *parent) { m_eventNameItem = new TextItem(this); m_eventNameItem->setParentItem(this); - QFont serifFont("Times", 13, QFont::Normal); + QFont serifFont("Times", 10, QFont::Normal); m_eventNameItem->setFont(serifFont); QString color = editorInfo("fontColor"); @@ -49,7 +49,7 @@ OnEntryExitItem::OnEntryExitItem(BaseItem *parent) { m_eventNameItem = new TextItem(this); m_eventNameItem->setParentItem(this); - QFont serifFont("Times", 13, QFont::Normal); + QFont serifFont("Times", 10, QFont::Normal); m_eventNameItem->setFont(serifFont); m_eventNameItem->setDefaultTextColor(Qt::black); m_eventNameItem->setTextInteractionFlags(Qt::NoTextInteraction); diff --git a/src/plugins/scxmleditor/plugin_interface/stateitem.cpp b/src/plugins/scxmleditor/plugin_interface/stateitem.cpp index e53bd8c894e..0dc525e6443 100644 --- a/src/plugins/scxmleditor/plugin_interface/stateitem.cpp +++ b/src/plugins/scxmleditor/plugin_interface/stateitem.cpp @@ -232,6 +232,9 @@ void StateItem::transitionsChanged() } m_transitionRect = rectInternalTransitions; + positionOnEntryItems(); + positionOnExitItems(); + updateBoundingRect(); } @@ -437,8 +440,7 @@ void StateItem::updatePolygon() f.setPixelSize(m_titleRect.height() * 0.65); m_stateNameItem->setFont(f); - if (m_onEntryItem) - m_onEntryItem->setPos(m_titleRect.x(), m_titleRect.bottom()); + positionOnEntryItems(); positionOnExitItems(); updateTextPositions(); @@ -552,7 +554,7 @@ void StateItem::addChild(ScxmlTag *child) item->setTag(child); item->finalizeCreation(); item->updateAttributes(); - m_onEntryItem->setPos(m_titleRect.x(), m_titleRect.bottom()); + positionOnEntryItems(); } else if (child->tagName() == "onexit") { OnEntryExitItem *item = new OnEntryExitItem(this); m_onExitItem = item; @@ -566,8 +568,18 @@ void StateItem::addChild(ScxmlTag *child) void StateItem::positionOnExitItems() { int offset = m_onEntryItem ? m_onEntryItem->boundingRect().height() : 0; - if (m_onExitItem) - m_onExitItem->setPos(m_titleRect.x(), m_titleRect.bottom() + offset); + if (m_onExitItem) { + auto x = m_transitionRect.isValid() ? m_transitionRect.right() : m_titleRect.x(); + m_onExitItem->setPos(x, m_titleRect.bottom() + offset); + } +} + +void StateItem::positionOnEntryItems() +{ + if (m_onEntryItem) { + auto x = m_transitionRect.isValid() ? m_transitionRect.right() : m_titleRect.x(); + m_onEntryItem->setPos(x, m_titleRect.bottom()); + } } QString StateItem::itemId() const diff --git a/src/plugins/scxmleditor/plugin_interface/stateitem.h b/src/plugins/scxmleditor/plugin_interface/stateitem.h index beaebe9ebd7..ad3617cc3d5 100644 --- a/src/plugins/scxmleditor/plugin_interface/stateitem.h +++ b/src/plugins/scxmleditor/plugin_interface/stateitem.h @@ -75,6 +75,7 @@ private: void checkParentBoundingRect(); void checkWarningItems(); void positionOnExitItems(); + void positionOnEntryItems(); TextItem *m_stateNameItem; StateWarningItem *m_stateWarningItem = nullptr; diff --git a/src/shared/qbs b/src/shared/qbs index 2e6eb75c76c..d8c97a5f0b1 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 2e6eb75c76c2d042eb07a8e6bcb4aa03b8843205 +Subproject commit d8c97a5f0b1f85e79829dbcc63b82bc5b1d83233 diff --git a/tests/system/suite_CSUP/tst_CSUP02/test.py b/tests/system/suite_CSUP/tst_CSUP02/test.py index de1633e6b79..b5959b55f35 100644 --- a/tests/system/suite_CSUP/tst_CSUP02/test.py +++ b/tests/system/suite_CSUP/tst_CSUP02/test.py @@ -59,12 +59,15 @@ def main(): type(editorWidget, "") type(editorWidget, "Myname") result = re.search(pattern.replace("name", "Myname"), str(editorWidget.plainText)) + failMsg = ("Step 5: Seems that not all instances of variable had been renamed " + "- Content of editor:\n%s" % editorWidget.plainText) if result: test.passes("Step 5: Verifying if: A value for a variable is inserted and all " "instances of the variable within the snippet are renamed.") + elif JIRA.isBugStillOpen(29012): + test.xfail(failMsg) else: - test.fail("Step 5: Seems that not all instances of variable had been renamed " - "- Content of editor:\n%s" % editorWidget.plainText) + test.fail(failMsg) invokeMenuItem('File', 'Revert "main.cpp" to Saved') clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton")) invokeMenuItem("File", "Exit")