From a749b6691e49ad91170c9912baf590cf49292d75 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 17 Sep 2020 11:18:42 +0200 Subject: [PATCH 01/20] Update 4.13.1 changes with last-minute updates Change-Id: I789f4fb10c950114ed0737dcb90460d90386e2f3 Reviewed-by: Leena Miettinen --- dist/changes-4.13.1.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/changes-4.13.1.md b/dist/changes-4.13.1.md index 597c20850c9..a49946e8ed4 100644 --- a/dist/changes-4.13.1.md +++ b/dist/changes-4.13.1.md @@ -19,6 +19,7 @@ Editing ### C++ * Fixed crash with adjacent raw string literals (QTCREATORBUG-24577) +* Fixed highlighting of template aliases (QTCREATORBUG-24552) ### QML @@ -37,6 +38,8 @@ Projects ### qmake * Fixed handling of unset environment variables (QTCREATORBUG-21729) +* Fixed that changes to sub-projects triggered full re-parse + (QTCREATORBUG-24572) ### CMake @@ -80,6 +83,7 @@ Platforms ### macOS * Fixed Clazy (QTCREATORBUG-24567) +* Fixed debugger locals view for newest LLDB (QTCREATORBUG-24596) Credits for these changes go to: -------------------------------- From 0198aca20512138eaa67e5c269b8dfbab4a12db5 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 17 Sep 2020 10:51:05 +0200 Subject: [PATCH 02/20] Editor: set deleteStartOfLine default shortcut on mac Fixes: QTCREATORBUG-9219 Change-Id: I26f991641efbc914d848591931756666e34c26b7 Reviewed-by: Eike Ziller --- src/plugins/texteditor/texteditoractionhandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index e6ac56e0857..ce340e803f5 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -240,7 +240,8 @@ void TextEditorActionHandlerPrivate::createActions() m_deleteEndOfWordCamelCaseAction = registerAction(DELETE_END_OF_WORD_CAMEL_CASE, [] (TextEditorWidget *w) { w->deleteEndOfWordCamelCase(); }, true, tr("Delete Word Camel Case from Cursor On")); m_deleteStartOfLineAction = registerAction(DELETE_START_OF_LINE, - [] (TextEditorWidget *w) { w->deleteStartOfLine(); }, true, tr("Delete Line up to Cursor")); + [] (TextEditorWidget *w) { w->deleteStartOfLine(); }, true, tr("Delete Line up to Cursor"), + Core::useMacShortcuts ? QKeySequence(tr("Ctrl+Backspace")) : QKeySequence()); m_deleteStartOfWordAction = registerAction(DELETE_START_OF_WORD, [] (TextEditorWidget *w) { w->deleteStartOfWord(); }, true, tr("Delete Word up to Cursor")); m_deleteStartOfWordCamelCaseAction = registerAction(DELETE_START_OF_WORD_CAMEL_CASE, From fc9ad36e407454528ad2ab3cfbe8e4d5483991d1 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Thu, 17 Sep 2020 10:14:28 +0200 Subject: [PATCH 03/20] QmlDesigner: Add GridView to ListModelEditor We could simply test for the model property but this can lead to strange behaviour. Change-Id: I4e326890fb02d312b5210089c957dce026a09f94 Reviewed-by: Thomas Hartmann --- .../components/componentcore/designeractionmanager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp index b1aaeb3fe77..014fc2d4596 100644 --- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp +++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp @@ -368,8 +368,10 @@ public: static bool isListViewInBaseState(const SelectionContext &selectionState) { return selectionState.isInBaseState() && selectionState.singleNodeIsSelected() - && selectionState.currentSingleSelectedNode().metaInfo().isSubclassOf( - "QtQuick.ListView"); + && (selectionState.currentSingleSelectedNode().metaInfo().isSubclassOf( + "QtQuick.ListView") + || selectionState.currentSingleSelectedNode().metaInfo().isSubclassOf( + "QtQuick.GridView")); } bool isEnabled(const SelectionContext &) const override { return true; } From 18be09f55af08ba3ffc4bb1a68b2f34f5e32238c Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Thu, 17 Sep 2020 11:11:22 +0200 Subject: [PATCH 04/20] QmlDesigner: Fix StateEditor show event update Task-number: QDS-2798 Change-Id: Ic27e7491012b227e144cdae68ead8ac534cc0d5a Reviewed-by: Thomas Hartmann --- .../qmldesigner/components/stateseditor/stateseditorwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp index dee2e864013..b6b301b855a 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp @@ -132,7 +132,7 @@ void StatesEditorWidget::toggleStatesViewExpanded() void StatesEditorWidget::showEvent(QShowEvent *event) { - Q_UNUSED(event) + QQuickWidget::showEvent(event); update(); } From b74ec903a700729fbbfe0dbef98ba8ef0788a0ab Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 17 Sep 2020 11:17:03 +0200 Subject: [PATCH 05/20] AutoTest: Fix construction of file paths for catch results Using Catch2 on Windows with CMake lead to not having file information as the file information was generated differently. Change-Id: I3e0951b517a4a8a86f1ffa1009c1a2815565f3b3 Reviewed-by: David Schulz --- src/plugins/autotest/catch/catchoutputreader.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/plugins/autotest/catch/catchoutputreader.cpp b/src/plugins/autotest/catch/catchoutputreader.cpp index 68d4f0b260c..7837cce3f97 100644 --- a/src/plugins/autotest/catch/catchoutputreader.cpp +++ b/src/plugins/autotest/catch/catchoutputreader.cpp @@ -27,6 +27,7 @@ #include "../testtreeitem.h" +#include #include #include @@ -172,10 +173,12 @@ TestResultPtr CatchOutputReader::createDefaultResult() const result = new CatchResult(id(), m_testCaseInfo.first().name); result->setDescription(m_testCaseInfo.last().name); result->setLine(m_testCaseInfo.last().line); - const QString &relativePathFromBuildDir = m_testCaseInfo.last().filename; - if (!relativePathFromBuildDir.isEmpty()) { - const QFileInfo fileInfo(m_buildDir + '/' + relativePathFromBuildDir); - result->setFileName(fileInfo.canonicalFilePath()); + const QFileInfo fileInfo(m_testCaseInfo.last().filename); + const Utils::FilePath filePath = Utils::FilePath::fromFileInfo(fileInfo); + if (!filePath.isEmpty()) { + result->setFileName(fileInfo.isAbsolute() + ? filePath.toString() + : QFileInfo(m_buildDir + '/' + filePath.toString()).canonicalFilePath()); } } else { result = new CatchResult(id(), QString()); From 0831c07cb3d512e865c21453c5a1cc7cd48dbc80 Mon Sep 17 00:00:00 2001 From: Lukasz Ornatek Date: Wed, 16 Sep 2020 09:21:46 +0200 Subject: [PATCH 06/20] Make Translation Tests ignore imported files Change-Id: I4abd222bd15da79a1fe14d01b8a4a1f25d935b3b Reviewed-by: Tim Jenssen --- .../projectfileselectionswidget.cpp | 7 ++-- .../qmlpreview/qmldebugtranslationwidget.cpp | 36 +++++++++---------- .../qmlpreview/qmldebugtranslationwidget.h | 4 +++ 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/src/plugins/qmlpreview/projectfileselectionswidget.cpp b/src/plugins/qmlpreview/projectfileselectionswidget.cpp index f6f20fc2d4c..44b8451dfcb 100644 --- a/src/plugins/qmlpreview/projectfileselectionswidget.cpp +++ b/src/plugins/qmlpreview/projectfileselectionswidget.cpp @@ -125,8 +125,11 @@ ProjectFileSelectionsWidget::ProjectFileSelectionsWidget(const QString &projectS const auto settingsDisabledFiles = project->namedSettings(m_projectSettingsKey).toStringList(); if (auto rootProjectNode = project->rootProjectNode()) { - rootProjectNode->forEachNode([this, settingsDisabledFiles, model](ProjectExplorer::FileNode *fileNode) { - if (fileNode->fileType() == m_fileType) { + auto rootPath = rootProjectNode->filePath(); + + rootProjectNode->forEachNode([this, settingsDisabledFiles, model, rootPath](ProjectExplorer::FileNode *fileNode) { + if (fileNode->fileType() == m_fileType + && !fileNode->filePath().relativeChildPath(rootPath).startsWith("imports/")) { bool isDisabled = settingsDisabledFiles.contains(fileNode->filePath().toString()); model->rootItem()->appendChild(new ProjectFileItem(fileNode->filePath(), isDisabled)); } diff --git a/src/plugins/qmlpreview/qmldebugtranslationwidget.cpp b/src/plugins/qmlpreview/qmldebugtranslationwidget.cpp index 3de3eff2c21..20a35a280b8 100644 --- a/src/plugins/qmlpreview/qmldebugtranslationwidget.cpp +++ b/src/plugins/qmlpreview/qmldebugtranslationwidget.cpp @@ -104,21 +104,17 @@ QmlDebugTranslationWidget::QmlDebugTranslationWidget(QWidget *parent) const QString projectSettingsKey = "QmlPreview.DisabledDebugTranslationFiles"; const ProjectExplorer::FileType filterFileType = ProjectExplorer::FileType::QML; - auto checkableProjectFileView = new ProjectFileSelectionsWidget(projectSettingsKey, filterFileType); - checkableProjectFileView->setVisible(false); - connect(checkableProjectFileView, &ProjectFileSelectionsWidget::selectionChanged, this, &QmlDebugTranslationWidget::setFiles); + m_checkableProjectFileView = new ProjectFileSelectionsWidget(projectSettingsKey, filterFileType); + m_checkableProjectFileView->setVisible(false); + connect(m_checkableProjectFileView, &ProjectFileSelectionsWidget::selectionChanged, this, &QmlDebugTranslationWidget::setFiles); m_multipleFileButton = new QRadioButton(tr("multiple files")); - // TODO: fix multiple files issues, because it have some issues disable it for now - m_multipleFileButton->setDisabled(true); buttonGroup->addButton(m_multipleFileButton); - connect(m_multipleFileButton, &QAbstractButton::toggled, [checkableProjectFileView, this](bool checked) { - checkableProjectFileView->setVisible(checked); - setFiles(checkableProjectFileView->checkedFiles()); - }); + connect(m_multipleFileButton, &QAbstractButton::toggled, m_checkableProjectFileView, &QWidget::setVisible); + connect(m_multipleFileButton, &QAbstractButton::toggled, this, &QmlDebugTranslationWidget::updateFiles); mainLayout->addWidget(m_singleFileButton); mainLayout->addWidget(m_multipleFileButton); - mainLayout->addWidget(checkableProjectFileView); + mainLayout->addWidget(m_checkableProjectFileView); // language checkboxes are add in updateAvailableTranslations method m_selectLanguageLayout = new QHBoxLayout; @@ -226,7 +222,7 @@ void QmlDebugTranslationWidget::updateCurrentEditor(const Core::IEditor *editor) else m_currentFilePath.clear(); m_singleFileButton->setText(singleFileButtonText(m_currentFilePath.toString())); - + updateFiles(); } void QmlDebugTranslationWidget::updateStartupProjectTranslations() @@ -253,6 +249,7 @@ void QmlDebugTranslationWidget::updateCurrentTranslations(ProjectExplorer::Proje tr("Current language is \'%1\' can be changed in the 'Translation' tab.") .arg(multiLanguageAspect->currentLocale()))); m_testLanguages.clear(); + m_testLanguages.append(multiLanguageAspect->currentLocale()); } else { m_selectLanguageLayout->addWidget(new QLabel(tr("Select which language should be tested:"))); QString errorMessage; @@ -272,6 +269,14 @@ void QmlDebugTranslationWidget::updateCurrentTranslations(ProjectExplorer::Proje } } +void QmlDebugTranslationWidget::updateFiles() +{ + if (m_multipleFileButton->isChecked()) + setFiles(m_checkableProjectFileView->checkedFiles()); + else + setFiles({m_currentFilePath}); +} + void QmlDebugTranslationWidget::setFiles(const Utils::FilePaths &filePathes) { m_selectedFilePaths = filePathes; @@ -305,14 +310,9 @@ void QmlDebugTranslationWidget::runTest() }); } }; - if (m_multipleFileButton->isChecked()) { - for (auto filePath : m_selectedFilePaths) { - testLanguages(timerCounter++, filePath.toString()); - } - } else { - testLanguages(timerCounter, QString()); + for (auto filePath : m_selectedFilePaths) { + testLanguages(timerCounter++, filePath.toString()); } - }); connect(runControl, &ProjectExplorer::RunControl::stopped, [this]() { m_runTestButton->setChecked(false); diff --git a/src/plugins/qmlpreview/qmldebugtranslationwidget.h b/src/plugins/qmlpreview/qmldebugtranslationwidget.h index ef9deb14e91..944c7a59b93 100644 --- a/src/plugins/qmlpreview/qmldebugtranslationwidget.h +++ b/src/plugins/qmlpreview/qmldebugtranslationwidget.h @@ -49,6 +49,8 @@ class RunControl; namespace QmlPreview { +class ProjectFileSelectionsWidget; + class QMLPREVIEW_EXPORT QmlDebugTranslationWidget : public QWidget { Q_OBJECT @@ -62,6 +64,7 @@ public: private: void updateCurrentEditor(const Core::IEditor *editor); void updateCurrentTranslations(ProjectExplorer::Project *project); + void updateFiles(); void runTest(); void appendMessage(const QString &message, Utils::OutputFormat format); void clear(); @@ -81,6 +84,7 @@ private: QRadioButton *m_singleFileButton = nullptr; QRadioButton *m_multipleFileButton = nullptr; + ProjectFileSelectionsWidget *m_checkableProjectFileView = nullptr; QPushButton *m_runTestButton = nullptr; Utils::FilePath m_currentFilePath; From 64d0043a96bebbd510ae3bfcb45b80fba6ff94e7 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 18 Sep 2020 11:08:45 +0200 Subject: [PATCH 07/20] cdbext: fix mingw compile Fixes: QTCREATORBUG-24653 Change-Id: I40071a0022be809266b98e1e898e969493b927aa Reviewed-by: Eike Ziller --- src/libs/libs.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/libs.pro b/src/libs/libs.pro index 9675dca0495..c420c0a4198 100644 --- a/src/libs/libs.pro +++ b/src/libs/libs.pro @@ -65,7 +65,7 @@ isEmpty(KSYNTAXHIGHLIGHTING_LIB_DIR) { win32:SUBDIRS += utils/process_ctrlc_stub.pro -win32: isEmpty(QTC_SKIP_CDBEXT) { +msvc: isEmpty(QTC_SKIP_CDBEXT) { SUBDIRS += qtcreatorcdbext } From bdbb0baa0f1b8411226c5c22493e074ed477ee40 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 18 Sep 2020 15:23:14 +0200 Subject: [PATCH 08/20] QmlDesigner: Fix range for "Fixed Frame" in Timeline settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I71bdae7144ae91b9b8b8c8e2088b87310d2f4a2e Reviewed-by: Henning Gründl Reviewed-by: Thomas Hartmann --- .../components/timelineeditor/timelinesettingsmodel.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp index bdde94cf22a..308a8d5052a 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp @@ -95,6 +95,13 @@ TimelineEditorDelegate::TimelineEditorDelegate(QWidget *parent) setItemEditorFactory(factory); } +QSpinBox *createSpinBox(QWidget *parent) +{ + auto spinBox = new QSpinBox(parent); + spinBox->setRange(-10000, 10000); + return spinBox; +} + QWidget *TimelineEditorDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const @@ -102,7 +109,7 @@ QWidget *TimelineEditorDelegate::createEditor(QWidget *parent, QWidget *widget = nullptr; if (index.column() == TimelineSettingsModel::FixedFrameRow) - widget = new QSpinBox(parent); + widget = createSpinBox(parent); else widget = QStyledItemDelegate::createEditor(parent, option, index); From 7d21caabdb98660439f81da51bb212d5d857ce02 Mon Sep 17 00:00:00 2001 From: Aleksei German Date: Fri, 18 Sep 2020 16:15:09 +0200 Subject: [PATCH 09/20] QmlDesigner: Minor Fixes for QDS MCU compatibility Change-Id: I401ecf9ce12d7020e78a5449b321fb7927caffed Reviewed-by: Thomas Hartmann --- .../propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml | 3 ++- .../components/connectioneditor/connectionmodel.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml index 3cd5d90399f..f743af96e05 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml @@ -64,18 +64,19 @@ Column { anchors.left: parent.left anchors.right: parent.right caption: "Rectangle" - visible: backendValues.border_color.isAvailable SectionLayout { rows: 2 Label { text: qsTr("Border") + disabledState: !backendValues.border_width.isAvailable } SecondColumnLayout { SpinBox { backendValue: backendValues.border_width hasSlider: true Layout.preferredWidth: 120 + enabled: backendValue.isAvailable } ExpandingSpacer { diff --git a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp index 2fd2364596c..69e0e202f40 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp +++ b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp @@ -303,7 +303,7 @@ void ConnectionModel::addConnection() ModelNode newNode = connectionView()->createModelNode("QtQuick.Connections", nodeMetaInfo.majorVersion(), nodeMetaInfo.minorVersion()); - QString source = "print(\"clicked\")"; + QString source = "console.log(\"clicked\")"; if (connectionView()->selectedModelNodes().count() == 1) { ModelNode selectedNode = connectionView()->selectedModelNodes().constFirst(); From d99e00c49f8b15f05225d4fa160e8ed94026a83f Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 18 Sep 2020 13:37:37 +0200 Subject: [PATCH 10/20] TextEditor: allow highlightings in selections If the selection foregound color is undefined do not overwrite the already applied highlighting. Fixes: QTCREATORBUG-24656 Change-Id: Ia125e8e6b9efba73d5a13facc2446a793d59f5c3 Reviewed-by: Christian Stenger --- src/plugins/texteditor/texteditor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 07f85704834..8a2036f5244 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -4724,8 +4724,7 @@ void TextEditorWidgetPrivate::setupSelections(const PaintEventData &data, const QTextCharFormat selectionFormat = data.fontSettings.toTextCharFormat(C_SELECTION); if (selectionFormat.background().style() != Qt::NoBrush) o.format.setBackground(selectionFormat.background()); - if (selectionFormat.foreground().style() != Qt::NoBrush) - o.format.setForeground(selectionFormat.foreground()); + o.format.setForeground(selectionFormat.foreground()); } if ((data.textCursor.hasSelection() && i == data.context.selections.size() - 1) || (o.format.foreground().style() == Qt::NoBrush From 1c26d6db686e97f29ee60996e1ae5fd30d848f63 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 11 Sep 2020 16:29:40 +0200 Subject: [PATCH 11/20] Doc: Add OFL-1.1 to Acknowledgments Fixes: QTCREATORBUG-24630 Change-Id: Iaaa64bb9936a80805affe992f64e24d1c586496a Reviewed-by: Kai Koehne Reviewed-by: Eike Ziller --- README.md | 95 ++++++++++++++++++ .../overview/creator-acknowledgements.qdoc | 98 +++++++++++++++++++ 2 files changed, 193 insertions(+) diff --git a/README.md b/README.md index cbebc279564..1d3be2fbde5 100644 --- a/README.md +++ b/README.md @@ -659,3 +659,98 @@ SQLite (https://www.sqlite.org) is in the Public Domain. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +### SourceCodePro fonts + + Qt Creator ships with the following fonts licensed under OFL-1.1: + + * SourceCodePro-Regular.ttf + * SourceCodePro-It.ttf + * SourceCodePro-Bold.ttf + + SIL OPEN FONT LICENSE + + Version 1.1 - 26 February 2007 + + PREAMBLE + The goals of the Open Font License (OFL) are to stimulate worldwide + development of collaborative font projects, to support the font creation + efforts of academic and linguistic communities, and to provide a free and + open framework in which fonts may be shared and improved in partnership + with others. + + The OFL allows the licensed fonts to be used, studied, modified and + redistributed freely as long as they are not sold by themselves. The + fonts, including any derivative works, can be bundled, embedded, + redistributed and/or sold with any software provided that any reserved + names are not used by derivative works. The fonts and derivatives, + however, cannot be released under any other type of license. The + requirement for fonts to remain under this license does not apply + to any document created using the fonts or their derivatives. + + DEFINITIONS + "Font Software" refers to the set of files released by the Copyright + Holder(s) under this license and clearly marked as such. This may + include source files, build scripts and documentation. + + "Reserved Font Name" refers to any names specified as such after the + copyright statement(s). + + "Original Version" refers to the collection of Font Software components as + distributed by the Copyright Holder(s). + + "Modified Version" refers to any derivative made by adding to, deleting, + or substituting - in part or in whole - any of the components of the + Original Version, by changing formats or by porting the Font Software to a + new environment. + + "Author" refers to any designer, engineer, programmer, technical + writer or other person who contributed to the Font Software. + + PERMISSION & CONDITIONS + Permission is hereby granted, free of charge, to any person obtaining + a copy of the Font Software, to use, study, copy, merge, embed, modify, + redistribute, and sell modified and unmodified copies of the Font + Software, subject to the following conditions: + + 1) Neither the Font Software nor any of its individual components, + in Original or Modified Versions, may be sold by itself. + + 2) Original or Modified Versions of the Font Software may be bundled, + redistributed and/or sold with any software, provided that each copy + contains the above copyright notice and this license. These can be + included either as stand-alone text files, human-readable headers or + in the appropriate machine-readable metadata fields within text or + binary files as long as those fields can be easily viewed by the user. + + 3) No Modified Version of the Font Software may use the Reserved Font + Name(s) unless explicit written permission is granted by the corresponding + Copyright Holder. This restriction only applies to the primary font name as + presented to the users. + + 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font + Software shall not be used to promote, endorse or advertise any + Modified Version, except to acknowledge the contribution(s) of the + Copyright Holder(s) and the Author(s) or with their explicit written + permission. + + 5) The Font Software, modified or unmodified, in part or in whole, + must be distributed entirely under this license, and must not be + distributed under any other license. The requirement for fonts to + remain under this license does not apply to any document created + using the Font Software. + + TERMINATION + This license becomes null and void if any of the above conditions are + not met. + + DISCLAIMER + THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT + OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE + COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL + DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM + OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/doc/qtcreator/src/overview/creator-acknowledgements.qdoc b/doc/qtcreator/src/overview/creator-acknowledgements.qdoc index 41bc076f7a7..a49a2540282 100644 --- a/doc/qtcreator/src/overview/creator-acknowledgements.qdoc +++ b/doc/qtcreator/src/overview/creator-acknowledgements.qdoc @@ -664,5 +664,103 @@ all copies or substantial portions of the Software. \endcode + \li \b {SourceCodePro fonts} + + \QC ships with the following fonts licensed under OFL-1.1: + + \list + \li SourceCodePro-Regular.ttf + \li SourceCodePro-It.ttf + \li SourceCodePro-Bold.ttf + \endlist + + \badcode + SIL OPEN FONT LICENSE + + Version 1.1 - 26 February 2007 + + PREAMBLE + The goals of the Open Font License (OFL) are to stimulate worldwide + development of collaborative font projects, to support the font creation + efforts of academic and linguistic communities, and to provide a free and + open framework in which fonts may be shared and improved in partnership + with others. + + The OFL allows the licensed fonts to be used, studied, modified and + redistributed freely as long as they are not sold by themselves. The + fonts, including any derivative works, can be bundled, embedded, + redistributed and/or sold with any software provided that any reserved + names are not used by derivative works. The fonts and derivatives, + however, cannot be released under any other type of license. The + requirement for fonts to remain under this license does not apply + to any document created using the fonts or their derivatives. + + DEFINITIONS + "Font Software" refers to the set of files released by the Copyright + Holder(s) under this license and clearly marked as such. This may + include source files, build scripts and documentation. + + "Reserved Font Name" refers to any names specified as such after the + copyright statement(s). + + "Original Version" refers to the collection of Font Software components as + distributed by the Copyright Holder(s). + + "Modified Version" refers to any derivative made by adding to, deleting, + or substituting - in part or in whole - any of the components of the + Original Version, by changing formats or by porting the Font Software to a + new environment. + + "Author" refers to any designer, engineer, programmer, technical + writer or other person who contributed to the Font Software. + + PERMISSION & CONDITIONS + Permission is hereby granted, free of charge, to any person obtaining + a copy of the Font Software, to use, study, copy, merge, embed, modify, + redistribute, and sell modified and unmodified copies of the Font + Software, subject to the following conditions: + + 1) Neither the Font Software nor any of its individual components, + in Original or Modified Versions, may be sold by itself. + + 2) Original or Modified Versions of the Font Software may be bundled, + redistributed and/or sold with any software, provided that each copy + contains the above copyright notice and this license. These can be + included either as stand-alone text files, human-readable headers or + in the appropriate machine-readable metadata fields within text or + binary files as long as those fields can be easily viewed by the user. + + 3) No Modified Version of the Font Software may use the Reserved Font + Name(s) unless explicit written permission is granted by the corresponding + Copyright Holder. This restriction only applies to the primary font name as + presented to the users. + + 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font + Software shall not be used to promote, endorse or advertise any + Modified Version, except to acknowledge the contribution(s) of the + Copyright Holder(s) and the Author(s) or with their explicit written + permission. + + 5) The Font Software, modified or unmodified, in part or in whole, + must be distributed entirely under this license, and must not be + distributed under any other license. The requirement for fonts to + remain under this license does not apply to any document created + using the Font Software. + + TERMINATION + This license becomes null and void if any of the above conditions are + not met. + + DISCLAIMER + THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT + OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE + COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL + DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM + OTHER DEALINGS IN THE FONT SOFTWARE. + \endcode \endlist */ From 6e4de116bf1c3e96a7091212d0b897c83b633c92 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 21 Sep 2020 09:39:01 +0200 Subject: [PATCH 12/20] Doc: Clarify info about installing Qt Bridge for Sketch Fixes: QDS-2809 Change-Id: I869019d347d0726911183d2014ffa0b5a66d59e3 Reviewed-by: Brook Cronin Reviewed-by: Thomas Hartmann --- .../src/qtbridge/qtbridge-sketch-setup.qdoc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-setup.qdoc b/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-setup.qdoc index dcf7e15730b..bb5d83186bf 100644 --- a/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-setup.qdoc +++ b/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-setup.qdoc @@ -32,13 +32,16 @@ You can purchase a \QBSK license from the \l{https://marketplace.qt.io/} {Qt Marketplace}, and then use the Qt online installer to have the \QBSK - installation package copied to the following path in your Qt installation - folder: \c {QtDesignStudio\sketch_bridge}. You can use the installation - package to install the \QBSK plugin to Sketch. + plugin package copied to the following path in your Qt installation + folder: \c {QtDesignStudio\sketch_bridge\io.qt.qtbridge.sketchplugin}. \note Install the Sketch app before installing the plugin. - To install the \QBSK plugin to Sketch, double-click the executable file. + To install the \QBSK plugin to Sketch, double-click + \c io.qt.qtbridge.sketchplugin in the \c sketch_bridge + folder in the installation directory of \QDS. Sketch + will automatically install \QBSK. - The plugin is available at \uicontrol Plugins > \uicontrol {\QB}. + You can launch the Sketch plugin from \uicontrol Plugins > + \uicontrol {\QB} in Sketch. */ From da2e8bbf7ba3300b7c41220071fbcdd2d2a8d9ef Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 21 Sep 2020 10:03:48 +0200 Subject: [PATCH 13/20] Editor: fix hanging when using invalid printer page rect Some printer seem to return an empty page rect for some configuration which results in an invalide page count and a freezing ui. Do not print anything and return in that case. Fixes: QTCREATORBUG-24110 Change-Id: I42349bc97734e3f6a67502482d2b02959e865665 Reviewed-by: Eike Ziller --- src/plugins/texteditor/texteditor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 8a2036f5244..7e2d990fe5a 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -1164,6 +1164,10 @@ void TextEditorWidgetPrivate::print(QPrinter *printer) if (!p.isActive()) return; + QRectF pageRect(printer->pageRect()); + if (pageRect.isEmpty()) + return; + doc = doc->clone(doc); Utils::ExecuteOnDestruction docDeleter([doc]() { delete doc; }); @@ -1217,7 +1221,6 @@ void TextEditorWidgetPrivate::print(QPrinter *printer) fmt.setMargin(margin); doc->rootFrame()->setFrameFormat(fmt); - QRectF pageRect(printer->pageRect()); QRectF body = QRectF(0, 0, pageRect.width(), pageRect.height()); QFontMetrics fontMetrics(doc->defaultFont(), p.device()); From 781a4484a143919c9047fa8f669d4e8672fa6973 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 14 Sep 2020 16:32:50 +0200 Subject: [PATCH 14/20] ProjectExplorer: Remove replacement kits ... for which the original kit has turned up again. Otherwise we'd have more than one kit with the same id. Fixes: QTCREATORBUG-24589 Change-Id: I7ce16615694d3d2c5a5441f676ecb7dc85c2239c Reviewed-by: David Schulz --- src/plugins/projectexplorer/kit.cpp | 13 +++++++++++++ src/plugins/projectexplorer/kit.h | 3 +++ src/plugins/projectexplorer/kitmanager.cpp | 7 +++++++ src/plugins/projectexplorer/project.cpp | 1 + 4 files changed, 24 insertions(+) diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp index e38c78fbc88..949b3c480ef 100644 --- a/src/plugins/projectexplorer/kit.cpp +++ b/src/plugins/projectexplorer/kit.cpp @@ -736,4 +736,17 @@ void Kit::kitUpdated() d->m_mustNotify = false; } + +static Id replacementKey() { return "IsReplacementKit"; } + +void ProjectExplorer::Kit::makeReplacementKit() +{ + setValueSilently(replacementKey(), true); +} + +bool Kit::isReplacementKit() const +{ + return value(replacementKey()).toBool(); +} + } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/kit.h b/src/plugins/projectexplorer/kit.h index 24d16b3ed92..f7c75c50296 100644 --- a/src/plugins/projectexplorer/kit.h +++ b/src/plugins/projectexplorer/kit.h @@ -132,6 +132,9 @@ public: void setMutable(Utils::Id id, bool b); bool isMutable(Utils::Id id) const; + void makeReplacementKit(); + bool isReplacementKit() const; + void setIrrelevantAspects(const QSet &irrelevant); QSet irrelevantAspects() const; diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp index 14288d7bb2b..70151b58002 100644 --- a/src/plugins/projectexplorer/kitmanager.cpp +++ b/src/plugins/projectexplorer/kitmanager.cpp @@ -235,6 +235,13 @@ void KitManager::restoreKits() // Delete all loaded autodetected kits that were not rediscovered: kitsToCheck.clear(); + // Remove replacement kits for which the original kit has turned up again. + erase(resultList, [&resultList](const std::unique_ptr &k) { + return k->isReplacementKit() && contains(resultList, [&k](const std::unique_ptr &other) { + return other->id() == k->id() && other != k; + }); + }); + static const auto kitMatchesAbiList = [](const Kit *kit, const Abis &abis) { const QList toolchains = ToolChainKitAspect::toolChains(kit); for (const ToolChain * const tc : toolchains) { diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp index 7f32733e1aa..1ae6d334709 100644 --- a/src/plugins/projectexplorer/project.cpp +++ b/src/plugins/projectexplorer/project.cpp @@ -776,6 +776,7 @@ void Project::createTargetFromMap(const QVariantMap &map, int index) Utils::transform(KitManager::kits(), &Kit::unexpandedDisplayName)); kit->setUnexpandedDisplayName(tempKitName); DeviceTypeKitAspect::setDeviceTypeId(kit, deviceTypeId); + kit->makeReplacementKit(); kit->setup(); }, id); TaskHub::addTask(BuildSystemTask(Task::Warning, tr("Project \"%1\" was configured for " From 87cf6400fcf791160c0e4e04da0f4b9e2ede9a46 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 21 Sep 2020 11:19:15 +0200 Subject: [PATCH 15/20] ImageViewer: Change license of files to Commercial/GPLv3 Task-number: QTCREATORBUG-24620 Change-Id: I8c76b312d4e93346ca70eec92b8b7ac8dfa455d1 Reviewed-by: Denis Mingulov Reviewed-by: Eike Ziller --- src/plugins/imageviewer/imageview.cpp | 40 ++++++--------------------- src/plugins/imageviewer/imageview.h | 40 ++++++--------------------- 2 files changed, 16 insertions(+), 64 deletions(-) diff --git a/src/plugins/imageviewer/imageview.cpp b/src/plugins/imageviewer/imageview.cpp index 611d494e883..269c5501629 100644 --- a/src/plugins/imageviewer/imageview.cpp +++ b/src/plugins/imageviewer/imageview.cpp @@ -2,11 +2,9 @@ ** ** Copyright (C) 2016 Denis Mingulov. ** Copyright (C) 2016 The Qt Company Ltd. -** Copyright (C) 2016 Denis Mingulov. -** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** -** This file is part of Qt Creator +** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in @@ -16,35 +14,13 @@ ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ diff --git a/src/plugins/imageviewer/imageview.h b/src/plugins/imageviewer/imageview.h index ab5cee16cbf..5404c69d7d7 100644 --- a/src/plugins/imageviewer/imageview.h +++ b/src/plugins/imageviewer/imageview.h @@ -2,11 +2,9 @@ ** ** Copyright (C) 2016 Denis Mingulov. ** Copyright (C) 2016 The Qt Company Ltd. -** Copyright (C) 2016 Denis Mingulov. -** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** -** This file is part of Qt Creator +** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in @@ -16,35 +14,13 @@ ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ From 71e2138517f0c597499364ed8b44c4cdaea8e76c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 21 Sep 2020 11:34:14 +0200 Subject: [PATCH 16/20] Fix copyright/license of vcsconfigurationpage.cpp The copyright and license was changed as part of the 397e7f48 mass change, arguably by erroneously copying it from imageviewer/imageview.h or imageviewer/imageview.cpp. Fixes: QTCREATORBUG-24620 Change-Id: I1f6a631c3b0a437af862d929a921693db367cef2 Reviewed-by: Denis Mingulov Reviewed-by: Eike Ziller --- .../vcsbase/wizard/vcsconfigurationpage.cpp | 39 ++++--------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/src/plugins/vcsbase/wizard/vcsconfigurationpage.cpp b/src/plugins/vcsbase/wizard/vcsconfigurationpage.cpp index 8dddc44bad1..81597558146 100644 --- a/src/plugins/vcsbase/wizard/vcsconfigurationpage.cpp +++ b/src/plugins/vcsbase/wizard/vcsconfigurationpage.cpp @@ -1,7 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 Denis Mingulov, The Qt Company Ltd. -** Copyright (C) 2016 Denis Mingulov, The Qt Company Ltd. +** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. @@ -14,35 +13,13 @@ ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ From 49d20960b9b55da04213d433408b4771bdc030e4 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 21 Sep 2020 09:00:58 +0200 Subject: [PATCH 17/20] Doc: Show "Managing Sessions" topic in QDS Manual - Moved the topic from the creator-only folder to the howto folder root to have it included in the doc builds. - Added the topic to the toc and fixed the navigation links around it. - Used defines to hide text that does not apply to QDS. Fixes: QDS-2805 Change-Id: I583324a1d0bc60c1b6448a52e48b3f09b1039b7f Reviewed-by: Thomas Hartmann --- .../{creator-only => }/creator-sessions.qdoc | 16 +++++++++++++--- doc/qtcreator/src/howto/creator-workspaces.qdoc | 2 +- doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc | 1 + .../src/qtdesignstudio-tutorials.qdoc | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) rename doc/qtcreator/src/howto/{creator-only => }/creator-sessions.qdoc (92%) diff --git a/doc/qtcreator/src/howto/creator-only/creator-sessions.qdoc b/doc/qtcreator/src/howto/creator-sessions.qdoc similarity index 92% rename from doc/qtcreator/src/howto/creator-only/creator-sessions.qdoc rename to doc/qtcreator/src/howto/creator-sessions.qdoc index e2c3816f86e..7e74a9a259f 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-sessions.qdoc +++ b/doc/qtcreator/src/howto/creator-sessions.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -30,9 +30,14 @@ // ********************************************************************** /*! - \previouspage creator-sharing-project-settings.html \page creator-project-managing-sessions.html + \if defined(qtdesignstudio) + \previouspage creator-project-managing-workspaces.html + \nextpage {Tutorials} + \else + \previouspage creator-sharing-project-settings.html \nextpage creator-design-mode.html + \endif \title Managing Sessions @@ -46,7 +51,10 @@ \list - \li Projects with their dependencies (including SUBDIRS projects) + \li Projects + \if defined(qtcreator) + with their dependencies (including SUBDIRS projects) + \endif \li Editors @@ -91,6 +99,7 @@ To switch between sessions, select \uicontrol {Switch To}. + \if defined(qtcreator) When you launch \QC, a list of existing sessions is displayed in the \uicontrol Welcome mode. To open a session, select it or press \key Ctrl+Alt+, where \e is the number of the session to @@ -109,5 +118,6 @@ a session as argument and \QC will start with this session. For more information, see \l{Using Command Line Options}. + \endif */ diff --git a/doc/qtcreator/src/howto/creator-workspaces.qdoc b/doc/qtcreator/src/howto/creator-workspaces.qdoc index d3e48090897..704a221e6b1 100644 --- a/doc/qtcreator/src/howto/creator-workspaces.qdoc +++ b/doc/qtcreator/src/howto/creator-workspaces.qdoc @@ -27,7 +27,7 @@ \page creator-project-managing-workspaces.html \if defined(qtdesignstudio) \previouspage creator-using-qt-quick-designer.html - \nextpage {Tutorials} + \nextpage creator-project-managing-sessions.html \else \previouspage creator-sidebars.html \nextpage creator-output-panes.html diff --git a/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc index a758f444d46..41fc8926cf0 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc @@ -55,6 +55,7 @@ \li \l{Editing QML Files in Design Mode} \list \li \l{Managing Workspaces} + \li \l{Managing Sessions} \endlist \li \l{Tutorials} \endlist diff --git a/doc/qtdesignstudio/src/qtdesignstudio-tutorials.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-tutorials.qdoc index 6968e3f55e6..9e35d320809 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-tutorials.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-tutorials.qdoc @@ -24,8 +24,8 @@ ****************************************************************************/ /*! - \previouspage creator-project-managing-workspaces.html \group gstutorials + \previouspage creator-project-managing-sessions.html \nextpage studio-projects-managing.html \title Tutorials From 698a0dd8c8362495256fabe6f555d9ead1debee5 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 22 Sep 2020 08:26:19 +0200 Subject: [PATCH 18/20] Bump version to 4.13.2 Change-Id: I5566275aceb3161d04c89c6d6ef5603d8de03994 Reviewed-by: Eike Ziller --- cmake/QtCreatorIDEBranding.cmake | 4 ++-- qbs/modules/qtc/qtc.qbs | 4 ++-- qtcreator_ide_branding.pri | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/QtCreatorIDEBranding.cmake b/cmake/QtCreatorIDEBranding.cmake index 89d226541e4..0dea6a2eb35 100644 --- a/cmake/QtCreatorIDEBranding.cmake +++ b/cmake/QtCreatorIDEBranding.cmake @@ -1,8 +1,8 @@ #PROJECT_USER_FILE_EXTENSION = .user -set(IDE_VERSION "4.13.1") # The IDE version. +set(IDE_VERSION "4.13.2") # The IDE version. set(IDE_VERSION_COMPAT "4.13.0") # The IDE Compatibility version. -set(IDE_VERSION_DISPLAY "4.13.1") # The IDE display version. +set(IDE_VERSION_DISPLAY "4.13.2") # The IDE display version. set(IDE_COPYRIGHT_YEAR "2020") # The IDE current copyright year. set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation. diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index ce3291cbda9..c44068dc28e 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -4,10 +4,10 @@ import qbs.FileInfo import "qtc.js" as HelperFunctions Module { - property string qtcreator_display_version: '4.13.1' + property string qtcreator_display_version: '4.13.2' property string ide_version_major: '4' property string ide_version_minor: '13' - property string ide_version_release: '1' + property string ide_version_release: '2' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release diff --git a/qtcreator_ide_branding.pri b/qtcreator_ide_branding.pri index ed192fb68a0..bdb4f4e5299 100644 --- a/qtcreator_ide_branding.pri +++ b/qtcreator_ide_branding.pri @@ -1,6 +1,6 @@ -QTCREATOR_VERSION = 4.13.1 +QTCREATOR_VERSION = 4.13.2 QTCREATOR_COMPAT_VERSION = 4.13.0 -QTCREATOR_DISPLAY_VERSION = 4.13.1 +QTCREATOR_DISPLAY_VERSION = 4.13.2 QTCREATOR_COPYRIGHT_YEAR = 2020 IDE_DISPLAY_NAME = Qt Creator From 08541305b6edabd00b80f46f16945e28f03dafda Mon Sep 17 00:00:00 2001 From: Jacek Nijaki Date: Fri, 18 Sep 2020 11:16:37 +0200 Subject: [PATCH 19/20] McuSupport: Add support for desktop backend JSON file Starting from Qul 1.5 json kit file will be shipped for desktop platform. This change is backward compatible with previous Qul version - if no desktop specific json file is found a legacy code is executed. This change removes "desktop" toolchain, instead "msvc" and "gcc" toolchains are introduced. Additional parameter was introduced to the josn kit file: "platformName" which enables using different strings in kit name and in QUL_PLATFORM cmake variable. Change-Id: Ie0a212aaad47a8033e9a81467f60a23c2bc19a51 Reviewed-by: Alessandro Portale --- src/plugins/mcusupport/mcusupportoptions.cpp | 88 ++++++----- src/plugins/mcusupport/mcusupportoptions.h | 27 ++-- src/plugins/mcusupport/mcusupportsdk.cpp | 147 ++++++++++++------- 3 files changed, 164 insertions(+), 98 deletions(-) diff --git a/src/plugins/mcusupport/mcusupportoptions.cpp b/src/plugins/mcusupport/mcusupportoptions.cpp index 16a36bebd94..7fa6c98ceb9 100644 --- a/src/plugins/mcusupport/mcusupportoptions.cpp +++ b/src/plugins/mcusupport/mcusupportoptions.cpp @@ -61,7 +61,7 @@ namespace McuSupport { namespace Internal { -static const int KIT_VERSION = 6; // Bumps up whenever details in Kit creation change +static const int KIT_VERSION = 7; // Bumps up whenever details in Kit creation change static QString packagePathFromSettings(const QString &settingsKey, QSettings::Scope scope = QSettings::UserScope, @@ -227,8 +227,10 @@ void McuPackage::updateStatus() m_path != m_defaultPath); } -McuToolChainPackage::McuToolChainPackage(const QString &label, const QString &defaultPath, - const QString &detectionPath, const QString &settingsKey, +McuToolChainPackage::McuToolChainPackage(const QString &label, + const QString &defaultPath, + const QString &detectionPath, + const QString &settingsKey, McuToolChainPackage::Type type) : McuPackage(label, defaultPath, detectionPath, settingsKey) , m_type(type) @@ -240,15 +242,32 @@ McuToolChainPackage::Type McuToolChainPackage::type() const return m_type; } -static ProjectExplorer::ToolChain *desktopToolChain(Utils::Id language) +bool McuToolChainPackage::isDesktopToolchain() const +{ + return m_type == TypeMSVC || m_type == TypeGCC; +} + +static ProjectExplorer::ToolChain *msvcToolChain(Utils::Id language) { using namespace ProjectExplorer; ToolChain *toolChain = ToolChainManager::toolChain([language](const ToolChain *t) { const Abi abi = t->targetAbi(); - return (abi.os() != Abi::WindowsOS - || (abi.osFlavor() == Abi::WindowsMsvc2017Flavor - || abi.osFlavor() == Abi::WindowsMsvc2019Flavor)) + return (abi.osFlavor() == Abi::WindowsMsvc2017Flavor || abi.osFlavor() == Abi::WindowsMsvc2019Flavor) + && abi.architecture() == Abi::X86Architecture + && abi.wordWidth() == 64 + && t->language() == language; + }); + return toolChain; +} + +static ProjectExplorer::ToolChain *gccToolChain(Utils::Id language) +{ + using namespace ProjectExplorer; + + ToolChain *toolChain = ToolChainManager::toolChain([language](const ToolChain *t) { + const Abi abi = t->targetAbi(); + return abi.os() != Abi::WindowsOS && abi.architecture() == Abi::X86Architecture && abi.wordWidth() == 64 && t->language() == language; @@ -285,9 +304,11 @@ static ProjectExplorer::ToolChain* armGccToolChain(const Utils::FilePath &path, ProjectExplorer::ToolChain *McuToolChainPackage::toolChain(Utils::Id language) const { ProjectExplorer::ToolChain *tc = nullptr; - if (m_type == TypeDesktop) { - tc = desktopToolChain(language); - } else { + if (m_type == TypeMSVC) + tc = msvcToolChain(language); + else if (m_type == TypeGCC) + tc = gccToolChain(language); + else { const QLatin1String compilerName( language == ProjectExplorer::Constants::C_LANGUAGE_ID ? "gcc" : "g++"); const Utils::FilePath compiler = Utils::FilePath::fromUserInput( @@ -336,24 +357,18 @@ QVariant McuToolChainPackage::debuggerId() const return debuggerId; } -McuTarget::McuTarget(const QVersionNumber &qulVersion, const QString &vendor, - const QString &platform, OS os, +McuTarget::McuTarget(const QVersionNumber &qulVersion, + const Platform &platform, OS os, const QVector &packages, const McuToolChainPackage *toolChainPackage) : m_qulVersion(qulVersion) - , m_vendor(vendor) - , m_qulPlatform(platform) + , m_platform(platform) , m_os(os) , m_packages(packages) , m_toolChainPackage(toolChainPackage) { } -QString McuTarget::vendor() const -{ - return m_vendor; -} - QVector McuTarget::packages() const { return m_packages; @@ -369,9 +384,9 @@ McuTarget::OS McuTarget::os() const return m_os; } -QString McuTarget::qulPlatform() const +McuTarget::Platform McuTarget::platform() const { - return m_qulPlatform; + return m_platform; } bool McuTarget::isValid() const @@ -502,15 +517,15 @@ static void setKitProperties(const QString &kitName, ProjectExplorer::Kit *k, using namespace Constants; k->setUnexpandedDisplayName(kitName); - k->setValue(KIT_MCUTARGET_VENDOR_KEY, mcuTarget->vendor()); - k->setValue(KIT_MCUTARGET_MODEL_KEY, mcuTarget->qulPlatform()); + k->setValue(KIT_MCUTARGET_VENDOR_KEY, mcuTarget->platform().vendor); + k->setValue(KIT_MCUTARGET_MODEL_KEY, mcuTarget->platform().name); k->setValue(KIT_MCUTARGET_COLORDEPTH_KEY, mcuTarget->colorDepth()); k->setValue(KIT_MCUTARGET_SDKVERSION_KEY, mcuTarget->qulVersion().toString()); k->setValue(KIT_MCUTARGET_KITVERSION_KEY, KIT_VERSION); k->setValue(KIT_MCUTARGET_OS_KEY, static_cast(mcuTarget->os())); k->setAutoDetected(true); k->makeSticky(); - if (mcuTarget->toolChainPackage()->type() == McuToolChainPackage::TypeDesktop) + if (mcuTarget->toolChainPackage()->isDesktopToolchain()) k->setDeviceTypeForIcon(DEVICE_TYPE); QSet irrelevant = { SysRootKitAspect::id(), @@ -537,7 +552,7 @@ static void setKitDebugger(ProjectExplorer::Kit *k, const McuToolChainPackage *t { // Qt Creator seems to be smart enough to deduce the right Kit debugger from the ToolChain // We rely on that at least in the Desktop case. - if (tcPackage->type() == McuToolChainPackage::TypeDesktop + if (tcPackage->isDesktopToolchain() // No Green Hills debugger, because support for it is missing. || tcPackage->type() == McuToolChainPackage::TypeGHS) return; @@ -548,7 +563,7 @@ static void setKitDebugger(ProjectExplorer::Kit *k, const McuToolChainPackage *t static void setKitDevice(ProjectExplorer::Kit *k, const McuTarget* mcuTarget) { // "Device Type" Desktop is the default. We use that for the Qt for MCUs Desktop Kit - if (mcuTarget->toolChainPackage()->type() == McuToolChainPackage::TypeDesktop) + if (mcuTarget->toolChainPackage()->isDesktopToolchain()) return; ProjectExplorer::DeviceTypeKitAspect::setDeviceTypeId(k, Constants::DEVICE_TYPE); @@ -565,7 +580,7 @@ static void setKitEnvironment(ProjectExplorer::Kit *k, const McuTarget* mcuTarge // The Desktop version depends on the Qt shared libs in Qul_DIR/bin. // If CMake's fileApi is avaialble, we can rely on the "Add library search path to PATH" // feature of the run configuration. Otherwise, we just prepend the path, here. - if (mcuTarget->toolChainPackage()->type() == McuToolChainPackage::TypeDesktop + if (mcuTarget->toolChainPackage()->isDesktopToolchain() && !CMakeProjectManager::CMakeToolManager::defaultCMakeTool()->hasFileApi()) pathAdditions.append(QDir::toNativeSeparators(qtForMCUsSdkPackage->path() + "/bin")); @@ -598,7 +613,7 @@ static void setKitCMakeOptions(ProjectExplorer::Kit *k, const McuTarget* mcuTarg config.append(CMakeConfigItem("CMAKE_CXX_COMPILER", "%{Compiler:Executable:Cxx}")); config.append(CMakeConfigItem("CMAKE_C_COMPILER", "%{Compiler:Executable:C}")); } - if (mcuTarget->toolChainPackage()->type() != McuToolChainPackage::TypeDesktop) + if (!mcuTarget->toolChainPackage()->isDesktopToolchain()) config.append(CMakeConfigItem( "CMAKE_TOOLCHAIN_FILE", (qulDir + "/lib/cmake/Qul/toolchain/" @@ -606,7 +621,7 @@ static void setKitCMakeOptions(ProjectExplorer::Kit *k, const McuTarget* mcuTarg config.append(CMakeConfigItem("QUL_GENERATORS", (qulDir + "/lib/cmake/Qul/QulGenerators.cmake").toUtf8())); config.append(CMakeConfigItem("QUL_PLATFORM", - mcuTarget->qulPlatform().toUtf8())); + mcuTarget->platform().name.toUtf8())); if (mcuTarget->qulVersion() <= QVersionNumber{1,3} // OS variable was removed in Qul 1.4 && mcuTarget->os() == McuTarget::OS::FreeRTOS) @@ -630,19 +645,16 @@ static void setKitQtVersionOptions(ProjectExplorer::Kit *k) QString McuSupportOptions::kitName(const McuTarget *mcuTarget) { QString os; - if (mcuTarget->qulVersion() <= QVersionNumber{1,3} && mcuTarget->os() == McuTarget::OS::FreeRTOS) { + if (mcuTarget->qulVersion() <= QVersionNumber{1,3} && mcuTarget->os() == McuTarget::OS::FreeRTOS) // Starting from Qul 1.4 each OS is a separate platform os = QLatin1String(" FreeRTOS"); - } const QString colorDepth = mcuTarget->colorDepth() > 0 ? QString::fromLatin1(" %1bpp").arg(mcuTarget->colorDepth()) : ""; - // Hack: Use the platform name in the kit name. Exception for the "Qt" platform: use "Desktop" - const QString targetName = - mcuTarget->toolChainPackage()->type() == McuToolChainPackage::TypeDesktop - ? "Desktop" - : mcuTarget->qulPlatform(); + const QString targetName = mcuTarget->platform().displayName.isEmpty() + ? mcuTarget->platform().name + : mcuTarget->platform().displayName; return QString::fromLatin1("Qt for MCUs %1.%2 - %3%4%5") .arg(QString::number(mcuTarget->qulVersion().majorVersion()), QString::number(mcuTarget->qulVersion().minorVersion()), @@ -659,8 +671,8 @@ QList McuSupportOptions::existingKits(const McuTarget *m return kit->isAutoDetected() && kit->value(KIT_MCUTARGET_KITVERSION_KEY) == KIT_VERSION && (!mcuTarget || ( - kit->value(KIT_MCUTARGET_VENDOR_KEY) == mcuTarget->vendor() - && kit->value(KIT_MCUTARGET_MODEL_KEY) == mcuTarget->qulPlatform() + kit->value(KIT_MCUTARGET_VENDOR_KEY) == mcuTarget->platform().vendor + && kit->value(KIT_MCUTARGET_MODEL_KEY) == mcuTarget->platform().name && kit->value(KIT_MCUTARGET_COLORDEPTH_KEY) == mcuTarget->colorDepth() && kit->value(KIT_MCUTARGET_OS_KEY).toInt() == static_cast(mcuTarget->os()) diff --git a/src/plugins/mcusupport/mcusupportoptions.h b/src/plugins/mcusupport/mcusupportoptions.h index f8a9ac52bf9..afed7dcf5e1 100644 --- a/src/plugins/mcusupport/mcusupportoptions.h +++ b/src/plugins/mcusupport/mcusupportoptions.h @@ -110,13 +110,18 @@ public: TypeIAR, TypeKEIL, TypeGHS, - TypeDesktop + TypeMSVC, + TypeGCC }; - McuToolChainPackage(const QString &label, const QString &defaultPath, - const QString &detectionPath, const QString &settingsKey, Type type); + McuToolChainPackage(const QString &label, + const QString &defaultPath, + const QString &detectionPath, + const QString &settingsKey, + Type type); Type type() const; + bool isDesktopToolchain() const; ProjectExplorer::ToolChain *toolChain(Utils::Id language) const; QString cmakeToolChainFileName() const; QVariant debuggerId() const; @@ -136,15 +141,20 @@ public: FreeRTOS }; - McuTarget(const QVersionNumber &qulVersion, const QString &vendor, const QString &platform, - OS os, const QVector &packages, + struct Platform { + QString name; + QString displayName; + QString vendor; + }; + + McuTarget(const QVersionNumber &qulVersion, const Platform &platform, OS os, + const QVector &packages, const McuToolChainPackage *toolChainPackage); QVersionNumber qulVersion() const; - QString vendor() const; QVector packages() const; const McuToolChainPackage *toolChainPackage() const; - QString qulPlatform() const; + Platform platform() const; OS os() const; void setColorDepth(int colorDepth); int colorDepth() const; @@ -152,8 +162,7 @@ public: private: const QVersionNumber m_qulVersion; - const QString m_vendor; - const QString m_qulPlatform; + const Platform m_platform; const OS m_os = OS::BareMetal; const QVector m_packages; const McuToolChainPackage *m_toolChainPackage; diff --git a/src/plugins/mcusupport/mcusupportsdk.cpp b/src/plugins/mcusupport/mcusupportsdk.cpp index 7af61105799..7f61a24728f 100644 --- a/src/plugins/mcusupport/mcusupportsdk.cpp +++ b/src/plugins/mcusupport/mcusupportsdk.cpp @@ -68,9 +68,14 @@ McuPackage *createQtForMCUsPackage() return result; } -static McuToolChainPackage *createDesktopToolChainPackage() +static McuToolChainPackage *createMsvcToolChainPackage() { - return new McuToolChainPackage({}, {}, {}, {}, McuToolChainPackage::TypeDesktop); + return new McuToolChainPackage({}, {}, {}, {}, McuToolChainPackage::TypeMSVC); +} + +static McuToolChainPackage *createGccToolChainPackage() +{ + return new McuToolChainPackage({}, {}, {}, {}, McuToolChainPackage::TypeGCC); } static McuToolChainPackage *createArmGccPackage() @@ -203,8 +208,14 @@ static McuPackage *createMcuXpressoIdePackage() struct McuTargetDescription { + enum class TargetType { + MCU, + Desktop + }; + QString qulVersion; QString platform; + QString platformName; QString platformVendor; QVector colorDepths; QString toolchainId; @@ -213,6 +224,7 @@ struct McuTargetDescription QString boardSdkDefaultPath; QString freeRTOSEnvVar; QString freeRTOSBoardSdkSubDir; + TargetType type; }; static McuPackage *createBoardSdkPackage(const McuTargetDescription& desc) @@ -253,7 +265,7 @@ static McuPackage *createBoardSdkPackage(const McuTargetDescription& desc) static McuPackage *createFreeRTOSSourcesPackage(const QString &envVar, const QString &boardSdkDir, const QString &freeRTOSBoardSdkSubDir) { - const QString envVarPrefix = envVar.chopped(strlen("_FREERTOS_DIR")); + const QString envVarPrefix = envVar.chopped(int(strlen("_FREERTOS_DIR"))); QString defaultPath; if (qEnvironmentVariableIsSet(envVar.toLatin1())) @@ -283,16 +295,16 @@ struct McuTargetFactory QVector createTargets(const McuTargetDescription& description) { - if (description.toolchainId == "desktop") { - return createDesktopTargets(description); - } auto qulVersion = QVersionNumber::fromString(description.qulVersion); if (qulVersion <= QVersionNumber({1,3})) { + if (description.type == McuTargetDescription::TargetType::Desktop) + return createDesktopTargetsLegacy(description); + // There was a platform backends related refactoring in Qul 1.4 // This requires different processing of McuTargetDescriptions return createMcuTargetsLegacy(description); } - return createMcuTargets(description); + return createTargetsImpl(description); } QVector getMcuPackages() const @@ -305,16 +317,16 @@ struct McuTargetFactory protected: // Implementation for Qul version <= 1.3 - QVector createMcuTargetsLegacy(const McuTargetDescription& desc) + QVector createMcuTargetsLegacy(const McuTargetDescription &desc) { QVector mcuTargets; - auto tcPkg = tcPkgs.value(desc.toolchainId); + McuToolChainPackage *tcPkg = tcPkgs.value(desc.toolchainId); for (auto os : {McuTarget::OS::BareMetal, McuTarget::OS::FreeRTOS}) { for (int colorDepth : desc.colorDepths) { QVector required3rdPartyPkgs = { tcPkg }; - if (vendorPkgs.contains(desc.platformVendor)) { + if (vendorPkgs.contains(desc.platformVendor)) required3rdPartyPkgs.push_back(vendorPkgs.value(desc.platformVendor)); - } + QString boardSdkDefaultPath; if (!desc.boardSdkEnvVar.isEmpty()) { if (!boardSdkPkgs.contains(desc.boardSdkEnvVar)) { @@ -340,9 +352,9 @@ protected: } } + const auto platform = McuTarget::Platform{ desc.platform, desc.platformName, desc.platformVendor }; auto mcuTarget = new McuTarget(QVersionNumber::fromString(desc.qulVersion), - desc.platformVendor, desc.platform, os, - required3rdPartyPkgs, tcPkg); + platform, os, required3rdPartyPkgs, tcPkg); if (desc.colorDepths.count() > 1) mcuTarget->setColorDepth(colorDepth); mcuTargets.append(mcuTarget); @@ -351,15 +363,39 @@ protected: return mcuTargets; } - QVector createMcuTargets(const McuTargetDescription& desc) + QVector createDesktopTargetsLegacy(const McuTargetDescription& desc) { + McuToolChainPackage *tcPkg = tcPkgs.value(desc.toolchainId); + const auto platform = McuTarget::Platform{ desc.platform, desc.platformName, desc.platformVendor }; + auto desktopTarget = new McuTarget(QVersionNumber::fromString(desc.qulVersion), + platform, McuTarget::OS::Desktop, {}, tcPkg); + return { desktopTarget }; + } + + QVector createTargetsImpl(const McuTargetDescription& desc) + { + // OS deduction + const auto os = [&] { + if (desc.type == McuTargetDescription::TargetType::Desktop) + return McuTarget::OS::Desktop; + else if (!desc.freeRTOSEnvVar.isEmpty()) + return McuTarget::OS::FreeRTOS; + return McuTarget::OS::BareMetal; + }(); + QVector mcuTargets; - auto tcPkg = tcPkgs.value(desc.toolchainId); + McuToolChainPackage *tcPkg = tcPkgs.value(desc.toolchainId); for (int colorDepth : desc.colorDepths) { - QVector required3rdPartyPkgs = { tcPkg }; - if (vendorPkgs.contains(desc.platformVendor)) { + QVector required3rdPartyPkgs; + // Desktop toolchains don't need any additional settings + if (tcPkg && !tcPkg->isDesktopToolchain()) + required3rdPartyPkgs.append(tcPkg); + + // Add setting specific to platform IDE + if (vendorPkgs.contains(desc.platformVendor)) required3rdPartyPkgs.push_back(vendorPkgs.value(desc.platformVendor)); - } + + // Board SDK specific settings QString boardSdkDefaultPath; if (!desc.boardSdkEnvVar.isEmpty()) { if (!boardSdkPkgs.contains(desc.boardSdkEnvVar)) { @@ -371,9 +407,8 @@ protected: required3rdPartyPkgs.append(boardSdkPkg); } - auto os = McuTarget::OS::BareMetal; + // Free RTOS specific settings if (!desc.freeRTOSEnvVar.isEmpty()) { - os = McuTarget::OS::FreeRTOS; if (!freeRTOSPkgs.contains(desc.freeRTOSEnvVar)) { freeRTOSPkgs.insert(desc.freeRTOSEnvVar, createFreeRTOSSourcesPackage( desc.freeRTOSEnvVar, boardSdkDefaultPath, @@ -382,24 +417,15 @@ protected: required3rdPartyPkgs.append(freeRTOSPkgs.value(desc.freeRTOSEnvVar)); } + const auto platform = McuTarget::Platform{ desc.platform, desc.platformName, desc.platformVendor }; auto mcuTarget = new McuTarget(QVersionNumber::fromString(desc.qulVersion), - desc.platformVendor, desc.platform, os, - required3rdPartyPkgs, tcPkg); + platform, os, required3rdPartyPkgs, tcPkg); mcuTarget->setColorDepth(colorDepth); mcuTargets.append(mcuTarget); } return mcuTargets; } - QVector createDesktopTargets(const McuTargetDescription& desc) - { - auto tcPkg = tcPkgs.value(desc.toolchainId); - auto desktopTarget = new McuTarget(QVersionNumber::fromString(desc.qulVersion), - desc.platformVendor, desc.platform, - McuTarget::OS::Desktop, {}, tcPkg); - return { desktopTarget }; - } - private: const QHash &tcPkgs; const QHash &vendorPkgs; @@ -414,7 +440,8 @@ static QVector targetsFromDescriptions(const QList tcPkgs = { {{"armgcc"}, createArmGccPackage()}, {{"greenhills"}, createGhsToolchainPackage()}, - {{"desktop"}, createDesktopToolChainPackage()}, + {{"msvc"}, createMsvcToolChainPackage()}, + {{"gcc"}, createGccToolChainPackage()}, }; const QHash vendorPkgs = { @@ -452,15 +479,14 @@ static McuTargetDescription parseDescriptionJson(const QByteArray &data) const QJsonObject boardSdk = target.value("boardSdk").toObject(); const QJsonObject freeRTOS = target.value("freeRTOS").toObject(); - const QString platform = target.value("platform").toString(); - const QVariantList colorDepths = target.value("colorDepths").toArray().toVariantList(); const auto colorDepthsVector = Utils::transform >( colorDepths, [&](const QVariant &colorDepth) { return colorDepth.toInt(); }); return { target.value("qulVersion").toString(), - platform, + target.value("platform").toString(), + target.value("platformName").toString(), target.value("platformVendor").toString(), colorDepthsVector, toolchain.value("id").toString(), @@ -468,7 +494,8 @@ static McuTargetDescription parseDescriptionJson(const QByteArray &data) boardSdk.value("name").toString(), boardSdk.value("defaultPath").toString(), freeRTOS.value("envVar").toString(), - freeRTOS.value("boardSdkSubDir").toString() + freeRTOS.value("boardSdkSubDir").toString(), + boardSdk.empty() ? McuTargetDescription::TargetType::Desktop : McuTargetDescription::TargetType::MCU }; } @@ -487,25 +514,43 @@ void targetsAndPackages(const Utils::FilePath &dir, QVector *packa descriptions.append(desc); } - // Workaround for missing JSON file for Desktop target: - Utils::FilePath desktopLib; - if (Utils::HostOsInfo::isWindowsHost()) - desktopLib = dir / "lib/QulQuickUltralite_QT_32bpp_Windows_Release.lib"; - else - desktopLib = dir / "lib/libQulQuickUltralite_QT_32bpp_Linux_Debug.a"; + // Workaround for missing JSON file for Desktop target. + // Desktop JSON file is shipped starting from Qul 1.5. + // This whole section could be removed when minimalQulVersion will reach 1.5 or above + { + const bool hasDesktopDescription = Utils::contains(descriptions, [](const McuTargetDescription &desc) { + return desc.type == McuTargetDescription::TargetType::Desktop; + }); - if (desktopLib.exists()) { - McuTargetDescription desktopDescription; - desktopDescription.qulVersion = descriptions.empty() ? - McuSupportOptions::minimalQulVersion().toString() - : descriptions.first().qulVersion; - desktopDescription.platform = desktopDescription.platformVendor = "Qt"; - desktopDescription.colorDepths = {32}; - desktopDescription.toolchainId = "desktop"; - descriptions.prepend(desktopDescription); + if (!hasDesktopDescription) { + Utils::FilePath desktopLib; + if (Utils::HostOsInfo::isWindowsHost()) + desktopLib = dir / "lib/QulQuickUltralite_QT_32bpp_Windows_Release.lib"; + else + desktopLib = dir / "lib/libQulQuickUltralite_QT_32bpp_Linux_Debug.a"; + + if (desktopLib.exists()) { + McuTargetDescription desktopDescription; + desktopDescription.qulVersion = descriptions.empty() ? + McuSupportOptions::minimalQulVersion().toString() + : descriptions.first().qulVersion; + desktopDescription.platform = "Qt"; + desktopDescription.platformName = "Desktop"; + desktopDescription.platformVendor = "Qt"; + desktopDescription.colorDepths = {32}; + desktopDescription.toolchainId = Utils::HostOsInfo::isWindowsHost() ? QString("msvc") : QString("gcc"); + desktopDescription.type = McuTargetDescription::TargetType::Desktop; + descriptions.prepend(desktopDescription); + } + } } mcuTargets->append(targetsFromDescriptions(descriptions, packages)); + + // Keep targets sorted lexicographically + std::sort(mcuTargets->begin(), mcuTargets->end(), [] (const McuTarget* lhs, const McuTarget* rhs) { + return McuSupportOptions::kitName(lhs) < McuSupportOptions::kitName(rhs); + }); } } // namespace Sdk From a003a2e9f3a45413480bb7070ad9da5621094d0e Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 22 Sep 2020 10:10:31 +0200 Subject: [PATCH 20/20] QmlDesigner: Fix construction order The connections have to be destructed before the local server. Change-Id: Ie1c349b72c67c4359eba78e9567e38f577c7bc10 Reviewed-by: Thomas Hartmann --- .../qmldesigner/designercore/instances/connectionmanager.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/instances/connectionmanager.h b/src/plugins/qmldesigner/designercore/instances/connectionmanager.h index 4bb85b5ff25..3e8ef26744f 100644 --- a/src/plugins/qmldesigner/designercore/instances/connectionmanager.h +++ b/src/plugins/qmldesigner/designercore/instances/connectionmanager.h @@ -66,12 +66,12 @@ private: void printProcessOutput(QProcess *process, const QString &connectionName); void closeSocketsAndKillProcesses(); +private: + std::unique_ptr m_localServer; + protected: std::vector m_connections; quint32 m_writeCommandCounter = 0; - -private: - std::unique_ptr m_localServer; }; } // namespace QmlDesigner