From 7aa96780ed77959d65440ee6d34fbc68db24e1bf Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 2 Dec 2020 15:09:37 +0100 Subject: [PATCH 01/30] CMake: Improve handling of QML Debugging and Profiling option The additional parameters to pass to CMake are set in a "extraCMakeArguments" property, but we had two places where this was set, overwriting each other: from the list widget where the user makes changes, and from the QML debugging option. Combine the two code paths. This has the additional advantage that the changing QML Debugging and Profiling option behaves the same as changing variables in the list - the "Apply Configuration Changes" button gets enabled when changing the option, and one can use it to apply the change. Task-number: QTCREATORBUG-24988 Change-Id: I785c6804c9597a9eba471f56babaae966ce84b17 Reviewed-by: Cristian Adam --- .../cmakebuildsettingswidget.cpp | 93 +++++++++---------- .../cmakebuildsettingswidget.h | 4 +- 2 files changed, 48 insertions(+), 49 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.cpp index a4ab52a1077..d9a05a20909 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.cpp @@ -115,8 +115,9 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc) ++row; auto qmlDebugAspect = bc->aspect(); - connect(qmlDebugAspect, &QtSupport::QmlDebuggingAspect::changed, - this, [this]() { handleQmlDebugCxxFlags(); }); + connect(qmlDebugAspect, &QtSupport::QmlDebuggingAspect::changed, this, [this]() { + updateButtonState(); + }); auto widget = new QWidget; LayoutBuilder builder(widget); qmlDebugAspect->addToLayout(builder); @@ -259,7 +260,6 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc) m_configView->setEnabled(true); stretcher->stretch(); updateButtonState(); - handleQmlDebugCxxFlags(); m_showProgressTimer.stop(); m_progressIndicator->hide(); }); @@ -360,43 +360,44 @@ void CMakeBuildSettingsWidget::setWarning(const QString &message) void CMakeBuildSettingsWidget::updateButtonState() { const bool isParsing = m_buildConfiguration->buildSystem()->isParsing(); - const bool hasChanges = m_configModel->hasChanges(); - m_resetButton->setEnabled(hasChanges && !isParsing); - m_reconfigureButton->setEnabled((hasChanges || m_configModel->hasCMakeChanges()) && !isParsing); // Update extra data in buildconfiguration const QList changes = m_configModel->configurationForCMake(); - const CMakeConfig configChanges = Utils::transform(changes, [](const ConfigModel::DataItem &i) { - CMakeConfigItem ni; - ni.key = i.key.toUtf8(); - ni.value = i.value.toUtf8(); - ni.documentation = i.description.toUtf8(); - ni.isAdvanced = i.isAdvanced; - ni.isUnset = i.isUnset; - ni.inCMakeCache = i.inCMakeCache; - ni.values = i.values; - switch (i.type) { - case CMakeProjectManager::ConfigModel::DataItem::BOOLEAN: - ni.type = CMakeConfigItem::BOOL; - break; - case CMakeProjectManager::ConfigModel::DataItem::FILE: - ni.type = CMakeConfigItem::FILEPATH; - break; - case CMakeProjectManager::ConfigModel::DataItem::DIRECTORY: - ni.type = CMakeConfigItem::PATH; - break; - case CMakeProjectManager::ConfigModel::DataItem::STRING: - ni.type = CMakeConfigItem::STRING; - break; - case CMakeProjectManager::ConfigModel::DataItem::UNKNOWN: - default: - ni.type = CMakeConfigItem::INTERNAL; - break; - } - return ni; - }); + const CMakeConfig configChanges + = getQmlDebugCxxFlags() + Utils::transform(changes, [](const ConfigModel::DataItem &i) { + CMakeConfigItem ni; + ni.key = i.key.toUtf8(); + ni.value = i.value.toUtf8(); + ni.documentation = i.description.toUtf8(); + ni.isAdvanced = i.isAdvanced; + ni.isUnset = i.isUnset; + ni.inCMakeCache = i.inCMakeCache; + ni.values = i.values; + switch (i.type) { + case CMakeProjectManager::ConfigModel::DataItem::BOOLEAN: + ni.type = CMakeConfigItem::BOOL; + break; + case CMakeProjectManager::ConfigModel::DataItem::FILE: + ni.type = CMakeConfigItem::FILEPATH; + break; + case CMakeProjectManager::ConfigModel::DataItem::DIRECTORY: + ni.type = CMakeConfigItem::PATH; + break; + case CMakeProjectManager::ConfigModel::DataItem::STRING: + ni.type = CMakeConfigItem::STRING; + break; + case CMakeProjectManager::ConfigModel::DataItem::UNKNOWN: + default: + ni.type = CMakeConfigItem::INTERNAL; + break; + } + return ni; + }); + m_resetButton->setEnabled(m_configModel->hasChanges() && !isParsing); + m_reconfigureButton->setEnabled((!configChanges.isEmpty() || m_configModel->hasCMakeChanges()) + && !isParsing); m_buildConfiguration->setExtraCMakeArguments( Utils::transform(configChanges, [](const CMakeConfigItem &i) { return i.toArgument(); })); } @@ -426,10 +427,12 @@ void CMakeBuildSettingsWidget::updateFromKit() m_configModel->setConfigurationFromKit(configHash); } -void CMakeBuildSettingsWidget::handleQmlDebugCxxFlags() +CMakeConfig CMakeBuildSettingsWidget::getQmlDebugCxxFlags() { - bool changed = false; const auto aspect = m_buildConfiguration->aspect(); + const TriState qmlDebuggingState = aspect->setting(); + if (qmlDebuggingState == TriState::Default) // don't touch anything + return {}; const bool enable = aspect->setting() == TriState::Enabled; const CMakeConfig configList = m_buildConfiguration->configurationFromCMake(); @@ -446,25 +449,19 @@ void CMakeBuildSettingsWidget::handleQmlDebugCxxFlags() CMakeConfigItem it(item); if (enable) { if (!it.value.contains(qmlDebug)) { - it.value = it.value.append(' ').append(qmlDebug); - changed = true; + it.value = it.value.append(' ').append(qmlDebug).trimmed(); + changedConfig.append(it); } } else { int index = it.value.indexOf(qmlDebug); if (index != -1) { it.value.remove(index, qmlDebug.length()); - changed = true; + it.value = it.value.trimmed(); + changedConfig.append(it); } } - it.value = it.value.trimmed(); - changedConfig.append(it); - } - - if (changed) { - m_buildConfiguration->setExtraCMakeArguments( - Utils::transform(changedConfig, - [](const CMakeConfigItem &i) { return i.toArgument(); })); } + return changedConfig; } void CMakeBuildSettingsWidget::updateSelection() diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.h b/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.h index da1d6facd6a..f999d3c6afa 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.h +++ b/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.h @@ -25,6 +25,8 @@ #pragma once +#include "cmakeconfigitem.h" + #include #include @@ -66,7 +68,7 @@ private: void updateButtonState(); void updateAdvancedCheckBox(); void updateFromKit(); - void handleQmlDebugCxxFlags(); + CMakeProjectManager::CMakeConfig getQmlDebugCxxFlags(); void updateSelection(); void setVariableUnsetFlag(bool unsetFlag); From eeea1e6c3232a5096a7747125d16c59ba34a3e8d Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 2 Dec 2020 17:55:30 +0100 Subject: [PATCH 02/30] CMake: Apply configuration changes to fresh build directories Fixes opening a new project without existing build folder, changing some configuration values, and pressing apply or choosing Run CMake. extraCMakeArguments contains the arguments needed to apply any changes done in e.g. the CMake configuration list in projects mode. When pressing Apply, the build directory gets created, and CMake run with REPARSE_FORCE_INITIAL_CONFIGURATION. But we may not remove REPARSE_FORCE_EXTRA_CONFIGURATION which might even just have been added a few lines above after asking the user via mustApplyExtraArguments(). Amends af4e74a9721a5fff29d3f11df6ab70b9890b64be Task-number: QTCREATORBUG-24936 Change-Id: I5e5547611262490ebdebb30dc1bfc690f1cdedde Reviewed-by: Cristian Adam --- src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index 88d1b561388..3e0c64bbb12 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -283,10 +283,6 @@ void CMakeBuildSystem::triggerParsing() reparseParameters |= REPARSE_FORCE_CMAKE_RUN | REPARSE_FORCE_EXTRA_CONFIGURATION; } - // Do not add extra args when doing initial configuration - if (0 != (reparseParameters & REPARSE_FORCE_INITIAL_CONFIGURATION)) - reparseParameters = reparseParameters ^ REPARSE_FORCE_EXTRA_CONFIGURATION; - qCDebug(cmakeBuildSystemLog) << "Asking reader to parse"; m_reader.parse(reparseParameters & REPARSE_FORCE_CMAKE_RUN, reparseParameters & REPARSE_FORCE_INITIAL_CONFIGURATION, From 0c29e50353e9bea781aa057dce610495188eaf54 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 30 Nov 2020 18:07:09 +0100 Subject: [PATCH 03/30] Doc: Describe building docs with CMake and using the online style You can now use CMake to build docs. You also have an option to use the online style, which enables you to check how the docs will look after release. Change-Id: I63f573a58a2daf3aa05a2f0dd57f33f859e25bc2 Reviewed-by: Eike Ziller --- .../src/qtcreator-documentation.qdoc | 223 ++++++++++++++---- 1 file changed, 178 insertions(+), 45 deletions(-) diff --git a/doc/qtcreatordev/src/qtcreator-documentation.qdoc b/doc/qtcreatordev/src/qtcreator-documentation.qdoc index 09d17bf0f32..c0be954940c 100644 --- a/doc/qtcreatordev/src/qtcreator-documentation.qdoc +++ b/doc/qtcreatordev/src/qtcreator-documentation.qdoc @@ -473,7 +473,7 @@ \section2 Setting Up Documentation Builds - You can run \c qmake from an installed Qt to build documentation. + You can configure documentation builds using CMake or qmake. \note Since \QC version 4.12, only Qt 5.14.0 or later is supported for building documentation. @@ -500,67 +500,145 @@ for publishing on the web \endlist - \note To have the correct fonts loaded for the online version, you must be - running it on a web server. - \note If the styles look wrong to you when reading help files in \QC or \QA, - you might be looking at them in the QTextBrowser instead of the Qt WebEngine - browser. This happens if you do not have Qt WebEngine installed. + you might be using the QTextBrowser as the help engine backend instead of + litehtml. For more information, see + \l {https://doc.qt.io/qtcreator/creator-help.html#selecting-the-help-viewer-backend} + {Selecting the Help Viewer Backend}. - \section2 Documentation Build Commands + To build documentation for the sources from the \c qtcreator master branch, + use build scripts defined in the doc.pri file. You can build the docs + using either the offline or online style. The offline style is used for + generating HTML files included in help files (.qch), whereas the online + style is used at \l{https://doc.qt.io/qtcreator/index.html}{doc.qt.io}. - To build documentation for the sources from the qtcreator master branch, use - build scripts defined in the doc.pri file. To build the docs in the - HTML format and to create help files (.qch), enter the following build - commands from the project folder (after running qmake): + \section3 Using CMake - \list - \li \c {nmake docs} (on Windows) + When using CMake, the docs are built in the \QC \e {build folder} or a + separate doc build folder, not in the project folder. - \li \c {make docs} (on Linux and \macos) + To get the correct product name and version when building \QDS Manual, you + must run CMake with the branding option. The branding data is located in + the \QDS (private) repository, \c tqtc-plugin-qtquickdesigner. + + To build docs with CMake in a separate doc build folder: + + \list 1 + \li Create a folder for the built docs and switch to it. For example, + \c {C:\dev\qtc-doc-build}. + \li In the doc build folder, enter the following command: + \badcode + cmake -DWITH_DOCS=ON "-DCMAKE_PREFIX_PATH=" + \endcode + For example (all on one line): + \badcode + C:\dev\qtc-doc-build>cmake -DWITH_DOCS=ON + "-DCMAKE_PREFIX_PATH=C:\Qt\5.15.1\msvc2019_64" + C:\dev\qtc-super\qtcreator + \endcode + \li To also build Extending \QC Manual, add the following option: + \c {-DBUILD_DEVELOPER_DOCS=ON} + \li To also build the \QDS Manual, add the following option: + \c {"-DCMAKE_MODULE_PATH=/studiodata/branding/"} + + For example: + \badcode + C:\dev\qtc-doc-build>cmake -DWITH_DOCS=ON -DBUILD_DEVELOPER_DOCS=ON + "-DCMAKE_MODULE_PATH=C:\dev\tqtc-plugin-qtquickdesigner\studiodata\branding" + "-DCMAKE_PREFIX_PATH=C:\Qt\5.15.1\msvc2019_64" + C:\dev\qtc-super\qtcreator + \endcode + \li To build the docs using the online style, use the following option + instead of \c {-DWITH_DOCS=ON}: + \c {-DWITH_ONLINE_DOCS=ON} + + For example: + \badcode + C:\dev\qtc-doc-build>cmake -DWITH_ONLINE_DOCS=ON + -DBUILD_DEVELOPER_DOCS=ON + "-DCMAKE_MODULE_PATH=C:\dev\tqtc-plugin-qtquickdesigner\studiodata\branding" + "-DCMAKE_PREFIX_PATH=C:\Qt\5.15.1\msvc2019_64" + C:\dev\qtc-super\qtcreator + \endcode + \note If you already ran CMake \c {-DWITH_DOCS=ON} in a folder and + want to switch to only online docs in that folder, you need to turn + the offline docs off again: + \badcode + cmake -DWITH_DOCS=OFF -DWITH_ONLINE_DOCS=ON + \endcode + \li Enter the following doc build command to build both HTML docs and + the help files (.qch): + \badcode + cmake --build . --target docs + \endcode + \li Alternatively, to build only the HTML docs, enter: + \badcode + cmake --build . --target html_docs + \endcode \endlist - The HTML documentation is generated in the following folders: + \note You can enter \c cmake-gui to open the graphical CMake configuration + tool, where you can select build options. + + The HTML files for the documentation are generated in the following + folders: \list \li \c doc/html/qtcreator - \li \c doc/html/qtcreatordev + \li \c doc/html/qtcreator-dev \li \c doc/html/qtdesignstudio + \li \c doc/html/qtcreator-online + \li \c doc/html/qtcreator-dev-online + \li \c doc/html/qtdesignstudio-online \endlist - The help files (\c {.qch}) are generated in the - \c {share/doc/qtcreator} directory in the \QC build directory on Windows and - Linux, and in the \c {bin/Qt Creator.app/Contents/Resources/app} directory + The help files (\c {.qch}) are generated in the \c {share/doc/qtcreator} + folder or in the \c {.app/Contents/Resources/doc\} folder on \macos. You can view the HTML files in a browser and the help files in - the \QC \uicontrol Help mode. For more information about adding the help - files to \QC, see + the \QC \uicontrol Help mode. For more information about adding + the help files to \QC, see \l{http://doc.qt.io/qtcreator/creator-help.html#adding-external-documentation} {Adding External Documentation}. - Besides \c docs, you have the following options for building a particular - document in a particular format: + \section3 Using qmake - \list - \li \c html_docs_qtcreator - build \QC Manual in help format, but do not - generate a help file + To build offline documentation using qmake: - \li \c html_docs_qtcreator-dev - build Extending \QC Manual in help - format, but do not generate a help file - - \li \c qch_docs_qtcreator - build \QC Manual in help format and generate - a help file (.qch) - - \li \c qch_docs_qtcreator-dev - build Extending \QC Manual in help format - and generate a help file (.qch) + \list 1 + \li In the project folder, run \c qmake from an installed Qt. + For example: + \badcode + C:\dev\qtc-super\qtcreator>..\..\..\Qt\5.15.1\msvc2019_64\bin\qmake.exe + \endcode + \li Enter the following doc build command: + \list + \li On Windows: \c {nmake docs} + \li On Linux and \macos: \c {make docs} + \endlist \endlist - \section3 Building the \QDS Manual + To build online documentation using qmake: - To get the correct product name and version, you must run \c {qmake -r} on - \c {qtcreator.pro} with the \c IDE_BRANDING_PRI option set to the absolute - path of \c {ide_branding.pri} in the \QDS (private) repository. + \list 1 + \li In the project folder, run \c qmake from an installed Qt with the + online configuration option. For example: + \badcode + C:\dev\qtc-super\qtcreator>..\..\..\Qt\5.15.1\msvc2019_64\bin\qmake.exe + "CONFIG+=build_online_docs" + \endcode + \li Enter the following doc build command: + \list + \li On Windows: \c {nmake html_docs} + \li On Linux and \macos: \c {make html_docs} + \endlist + \endlist + + To get the correct product name and version when building the \QDS + Manual, you must run \c {qmake -r} on \c {qtcreator.pro} with the + \c IDE_BRANDING_PRI option set to the absolute path of + \c {ide_branding.pri} in the \QDS (private) repository. For example, on Windows enter (all on one line): @@ -570,16 +648,71 @@ IDE_BRANDING_PRI=C:\dev\tqtc-plugin-qtquickdesigner\studiodata\branding\ide_branding.pri \endcode - To build the \QDS Manual: + To use the offline style to build the \QDS help with qmake: \list 1 - \li Run \c qmake from Qt 5.14.0, or later with the path to the branding - information as an option (all on one line): - - \c {/qmake.exe - qtcreator.pro -r - IDE_BRANDING_PRI=ide_branding.pri} + \li In the \c {doc/qtdesignstudio} folder, run \c qmake from Qt 5.14.0, + or later with the path to the branding information as an option + (all on one line): + \badcode + /qmake.exe qtcreator.pro -r + IDE_BRANDING_PRI=/ide_branding.pri + \endcode \li Run \c {make docs} on Linux and macOS or \c {nmake docs} on Windows. \endlist + + To use the online style to build the \QDS Manual with qmake: + + \list 1 + \li In the \c {doc/qtdesignstudio} folder, run \c qmake from Qt 5.14.0, + or later with the path to the branding information as an option + (all on one line): + \badcode + /qmake.exe qtcreator.pro -r + IDE_BRANDING_PRI=/ide_branding.pri + \endcode + \li Run \c {make html_docs} on Linux and macOS or \c {nmake html_docs} + on Windows. + \endlist + + The HTML files for the offline documentation are generated in the following + folders: + + \list + \li \c doc/html/qtcreator + \li \c doc/html/qtcreator-dev + \li \c doc/qtdesignstudio/doc/html/qtdesignstudio + \endlist + + The help files (\c {.qch}) are generated in the + \c {share/doc/qtcreator} directory in the \QC build directory on Windows and + Linux, and in the \c {bin/Qt Creator.app/Contents/Resources/app} directory + on \macos. + + The HTML files for the online documentation are generated in the following + folders: + + \list + \li \c doc/html/qtcreator-online + \li \c doc/html/qtcreator-dev-online + \li \c doc/qtdesignstudio/doc/html/qtdesignstudio-online + \endlist + + \section2 Additional Build Commands + + Besides \c docs and \c html_docs, you can use the following build targets: + + \list + \li \c html_docs_ - build the document (qtcreator/ + qtcreator-dev/qtdesignstudio) in help format, but do not generate a + help file (.qch) + + \li \c html_docs_-online - build the document + (qtcreator/qtcreator-dev/qtdesignstudio) in online format + + \li \c qch_docs_ - build the document (qtcreator/ + qtcreator-dev/qtdesignstudio) in help format and generate a + help file + \endlist */ From a02be5442eab39f5af21cd28e79beb2fb2824dc1 Mon Sep 17 00:00:00 2001 From: Knud Dollereder Date: Mon, 30 Nov 2020 12:26:57 +0100 Subject: [PATCH 04/30] Restore zoom-all special case for the flowview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ifbed53253b0f00773dcd040f0bd2b06a2b941bd4 Reviewed-by: Henning Gründl Reviewed-by: Thomas Hartmann --- .../components/formeditor/formeditorwidget.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp index 63c7e05d603..cf7a5759e25 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp @@ -26,6 +26,7 @@ #include "formeditorwidget.h" #include "designeractionmanager.h" #include "designersettings.h" +#include "formeditoritem.h" #include "formeditorscene.h" #include "qmldesignerconstants.h" #include "qmldesignericons.h" @@ -208,7 +209,19 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view) auto frameAll = [this, zoomOut]() { if (m_graphicsView) { - m_graphicsView->frame(m_graphicsView->rootItemRect()); + QRectF bounds; + if (QmlItemNode(m_formEditorView->rootModelNode()).isFlowView()) { + for (QGraphicsItem *item : m_formEditorView->scene()->items()) { + if (auto *fitem = FormEditorItem::fromQGraphicsItem(item)) { + if (!fitem->qmlItemNode().modelNode().isRootNode() + && !fitem->sceneBoundingRect().isNull()) + bounds |= fitem->sceneBoundingRect(); + } + } + } else { + bounds = m_graphicsView->rootItemRect(); + } + m_graphicsView->frame(bounds); zoomOut(); } }; From b385bf8eb5168ffd3bb95034336d13f9cd38e6e4 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 2 Dec 2020 15:25:57 +0100 Subject: [PATCH 05/30] RemoteLinux: Classify executables correctly ... in the MakeInstallStep. See also d56e88d36a. Fixes: QTCREATORBUG-25022 Change-Id: I0824355e0604cd4a7cc2ac9cdb4a55733cb0f706 Reviewed-by: hjk --- src/plugins/remotelinux/makeinstallstep.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/remotelinux/makeinstallstep.cpp b/src/plugins/remotelinux/makeinstallstep.cpp index 91a2d5e8d89..d919d885a20 100644 --- a/src/plugins/remotelinux/makeinstallstep.cpp +++ b/src/plugins/remotelinux/makeinstallstep.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include using namespace ProjectExplorer; @@ -182,11 +183,16 @@ void MakeInstallStep::finish(bool success) m_deploymentData.setLocalInstallRoot(installRoot()); QDirIterator dit(installRoot().toString(), QDir::Files | QDir::Hidden, QDirIterator::Subdirectories); + const auto appFileNames = transform>(buildSystem()->applicationTargets(), + [](const BuildTargetInfo &appTarget) { return appTarget.targetFilePath.fileName(); }); while (dit.hasNext()) { dit.next(); const QFileInfo fi = dit.fileInfo(); + const DeployableFile::Type type = appFileNames.contains(fi.fileName()) + ? DeployableFile::TypeExecutable + : DeployableFile::TypeNormal; m_deploymentData.addFile(fi.filePath(), - fi.dir().path().mid(installRoot().toString().length())); + fi.dir().path().mid(installRoot().toString().length()), type); } buildSystem()->setDeploymentData(m_deploymentData); } else if (m_noInstallTarget && m_isCmakeProject) { From ca405966d9d5c04cc244e05276201d709ea1cf0c Mon Sep 17 00:00:00 2001 From: Johanna Vanhatapio Date: Mon, 30 Nov 2020 15:51:29 +0200 Subject: [PATCH 06/30] Doc: Describe data collection Task-number: QDS-3197 Change-Id: Ic8f32b4ffe378b9baa2c354a57b6d387f82fa790 Reviewed-by: Leena Miettinen Reviewed-by: Mahmoud Badri --- .../src/howto/creator-external-tools.qdoc | 2 +- .../{creator-only => }/creator-telemetry.qdoc | 52 +++++++++++++++---- .../src/qtdesignstudio-advanced.qdoc | 6 +++ .../src/qtdesignstudio-help-overview.qdoc | 2 +- .../src/qtdesignstudio-toc.qdoc | 1 + 5 files changed, 50 insertions(+), 13 deletions(-) rename doc/qtcreator/src/howto/{creator-only => }/creator-telemetry.qdoc (68%) diff --git a/doc/qtcreator/src/howto/creator-external-tools.qdoc b/doc/qtcreator/src/howto/creator-external-tools.qdoc index c06ef08d7fc..986f371005a 100644 --- a/doc/qtcreator/src/howto/creator-external-tools.qdoc +++ b/doc/qtcreator/src/howto/creator-external-tools.qdoc @@ -33,7 +33,7 @@ \page creator-editor-external.html \if defined(qtdesignstudio) \previouspage creator-qml-performance-monitor.html - \nextpage studio-help.html + \nextpage creator-telemetry.html \else \previouspage creator-keyboard-shortcuts.html \nextpage creator-task-lists.html diff --git a/doc/qtcreator/src/howto/creator-only/creator-telemetry.qdoc b/doc/qtcreator/src/howto/creator-telemetry.qdoc similarity index 68% rename from doc/qtcreator/src/howto/creator-only/creator-telemetry.qdoc rename to doc/qtcreator/src/howto/creator-telemetry.qdoc index de1a9d66798..a8ebb892758 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-telemetry.qdoc +++ b/doc/qtcreator/src/howto/creator-telemetry.qdoc @@ -24,9 +24,14 @@ ****************************************************************************/ /*! - \previouspage creator-task-lists.html \page creator-telemetry.html + \if defined(qtdesignstudio) + \previouspage creator-editor-external.html + \nextpage studio-help.html + \else + \previouspage creator-task-lists.html \nextpage creator-help-overview.html + \endif \title Managing Data Collection Settings @@ -42,22 +47,28 @@ \section1 Principles of Data Collection + No personal data, such as names, IP addresses, MAC addresses, or project + and path names are collected. However, QUuid objects are used to identify + data records that belong to one user. The objects cannot be converted + back to the actual values from which they were generated. + + For more information about Qt privacy policy, select + \l{https://www.qt.io/terms-conditions/#privacy} + {Legal Notice and Privacy Policy}. + + \section1 Collecting Usage Statistics + The Telemetry plugin uses the \l{https://api.kde.org/frameworks/kuserfeedback/html/index.html} {KUserFeedback} framework to collect the usage data. The library has been designed from the user data privacy point of view and \QC respects the same privacy rules. - No personal data, such as names, IP addresses, MAC addresses, or project - and path names are collected. However, QUuid objects are used to identify - data records that belong to one user. The objects cannot be converted - back to the actual values from which they were generated. - The data is transmitted to the backend storage using an encrypted connection. The storage is located in the same Heroku backend as the Qt installer backend. Physically, data is stored in the Amazon cloud. - \section1 Specifying Telemetry Settings + \section2 Specifying Telemetry Settings To determine what data is transmitted to the backend storage: @@ -67,12 +78,31 @@ \image qtcreator-telemetry-settings.png \li In the \uicontrol {Telemetry mode} list, select the mode that determines what kind of data is collected. - \li In the \uicontrol {Data sources} list, select entries to view + \li In the \uicontrol {Data} list, select entries to view exactly what data is collected. Deselect check boxes for data that you do not want to transmit to the backend storage. \endlist - For more information about Qt privacy policy, select - \l{https://www.qt.io/terms-conditions/#privacy} - {Legal Notice and Privacy Policy}. + \if defined(qtdesignstudio) + \section1 Reporting Crashes + + You can enable \QDS to report crashes automatically. \QDS uses Google + Crashpad to collect crashes and report them to the Sentry backend storage + for processing. The purpose of Crashpad is to capture application state in + sufficient detail to allow developers to diagnose and, where possible, fix + the issue causing the crash. Crashpad may capture arbitrary contents from + the memory of a crashed process, including user sensitive information, URLs, + and other content provided by the users. The collected reports are used for + the sole purpose of fixing bugs. For more information on Crashpad, see the + \l {https://chromium.googlesource.com/crashpad/crashpad/+/master/doc/overview_design.md} + {documentation} by Google. For more information on processing and storing + of the collected data, see \l {https://sentry.io/security/} + {Security & Compliance} by Sentry. + + To enable sending crash reports, select \uicontrol Tools > \uicontrol + Options > \uicontrol Environment > \uicontrol System + (\uicontrol {Qt Design Studio} > \uicontrol Preferences > \uicontrol + Environment > \uicontrol System on \macos), and then select + \uicontrol {Enable crash reporting}. + \endif */ diff --git a/doc/qtdesignstudio/src/qtdesignstudio-advanced.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-advanced.qdoc index ab77f1386c6..f0c0b8b42fd 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-advanced.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-advanced.qdoc @@ -87,5 +87,11 @@ editor for your system, and the \c sort tool are preconfigured for use. You can change their default configurations and configure new tools. + \li \l{Managing Data Collection Settings} + + You can enable \QC to report crashes automatically. If you agreed to + pseudonymous user statistics collection during the \QC installation, + you can turn it on and determine what type of data is collected and + transmitted to the backend storage. \endlist */ diff --git a/doc/qtdesignstudio/src/qtdesignstudio-help-overview.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-help-overview.qdoc index 19551df97f9..e08929263d6 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-help-overview.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-help-overview.qdoc @@ -25,7 +25,7 @@ /*! \page studio-help.html - \previouspage creator-editor-external.html + \previouspage creator-telemetry.html \nextpage {Examples and Tutorials} \title Help diff --git a/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc index 450332556ba..a123301b5b7 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc @@ -180,6 +180,7 @@ \li \l{Profiling QML Applications} \endlist \li \l{Using External Tools} + \li \l{Managing Data Collection Settings} \endlist \li \l{Help} \list From 42bc7af96f0426639efbacdd1359311e0e860718 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 2 Dec 2020 13:33:59 +0100 Subject: [PATCH 07/30] Python: Do not pretend being C++ This avoids checking the debugger engine on Windows which may fail when using a wrong kit. Change-Id: I427281f6749cbccc3d3d85f6bdafa0138e1d54f0 Reviewed-by: Cristian Maureira-Fredes Reviewed-by: David Schulz Reviewed-by: hjk --- src/plugins/projectexplorer/projectexplorerconstants.h | 1 + src/plugins/python/pythonproject.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h index 08671c7c6c1..b91632e9b87 100644 --- a/src/plugins/projectexplorer/projectexplorerconstants.h +++ b/src/plugins/projectexplorer/projectexplorerconstants.h @@ -159,6 +159,7 @@ const char BUILDSTEPS_DEPLOY[] = "ProjectExplorer.BuildSteps.Deploy"; const char C_LANGUAGE_ID[] = "C"; const char CXX_LANGUAGE_ID[] = "Cxx"; const char QMLJS_LANGUAGE_ID[] = "QMLJS"; +const char PYTHON_LANGUAGE_ID[] = "Python"; // ToolChain TypeIds const char CLANG_TOOLCHAIN_TYPEID[] = "ProjectExplorer.ToolChain.Clang"; diff --git a/src/plugins/python/pythonproject.cpp b/src/plugins/python/pythonproject.cpp index 319fe245d68..9b568713844 100644 --- a/src/plugins/python/pythonproject.cpp +++ b/src/plugins/python/pythonproject.cpp @@ -214,7 +214,7 @@ PythonProject::PythonProject(const FilePath &fileName) : Project(Constants::C_PY_MIMETYPE, fileName) { setId(PythonProjectId); - setProjectLanguages(Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID)); + setProjectLanguages(Context(ProjectExplorer::Constants::PYTHON_LANGUAGE_ID)); setDisplayName(fileName.toFileInfo().completeBaseName()); setNeedsBuildConfigurations(false); From 5ed3357bed95dd83a1a29b1839a34441245637c3 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 2 Dec 2020 09:06:52 +0100 Subject: [PATCH 08/30] Tests: Fix expected type Amends e6873b5b2417eb. As on it fix handling for key, value handling for Qt6. Change-Id: Ie13b02f92fd56d9372150763a2d56df511185baf Reviewed-by: David Schulz --- tests/auto/debugger/tst_dumpers.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 5a08803e264..a56ab87ee6a 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -4040,20 +4040,20 @@ void tst_Dumpers::dumper_data() //+ Check("v1", "\"Some string\"", "@QVariant (QString)") + CheckType("v1", "@QVariant (QString)") - + Check("my", "<2 items>", TypePattern("@QMap|@QMap>|MyType")) - + Check("my.0.key", "1", "unsigned int") - + Check("my.0.value", "<1 items>", TypePattern("@QList<@QString>|@QStringList")) - + Check("my.0.value.0", "[0]", "\"Hello\"", "@QString") - + Check("my.1.key", "3", "unsigned int") - + Check("my.1.value", "<1 items>", TypePattern("@QList<@QString>|@QStringList")) - + Check("my.1.value.0", "[0]", "\"World\"", "@QString") + + Check("my", "<2 items>", TypePattern("@QMap|@QMap>|MyType")) + + CheckPairish("my.0.key", "1", "unsigned int") + + CheckPairish("my.0.value", "<1 items>", TypePattern("@QList<@QString>|@QStringList")) + + CheckPairish("my.0.value.0", "[0]", "\"Hello\"", "@QString") + + CheckPairish("my.1.key", "3", "unsigned int") + + CheckPairish("my.1.value", "<1 items>", TypePattern("@QList<@QString>|@QStringList")) + + CheckPairish("my.1.value.0", "[0]", "\"World\"", "@QString") //+ CheckType("v2", "@QVariant (MyType)") - + Check("v2.data.0.key", "1", "unsigned int") % NeedsInferiorCall - + Check("v2.data.0.value", "<1 items>", "@QStringList") % NeedsInferiorCall - + Check("v2.data.0.value.0", "[0]", "\"Hello\"", "@QString") % NeedsInferiorCall - + Check("v2.data.1.key", "3", "unsigned int") % NeedsInferiorCall - + Check("v2.data.1.value", "<1 items>", "@QStringList") % NeedsInferiorCall - + Check("v2.data.1.value.0", "[0]", "\"World\"", "@QString") % NeedsInferiorCall + + CheckPairish("v2.data.0.key", "1", "unsigned int") % NeedsInferiorCall + + CheckPairish("v2.data.0.value", "<1 items>", "@QStringList") % NeedsInferiorCall + + CheckPairish("v2.data.0.value.0", "[0]", "\"Hello\"", "@QString") % NeedsInferiorCall + + CheckPairish("v2.data.1.key", "3", "unsigned int") % NeedsInferiorCall + + CheckPairish("v2.data.1.value", "<1 items>", "@QStringList") % NeedsInferiorCall + + CheckPairish("v2.data.1.value.0", "[0]", "\"World\"", "@QString") % NeedsInferiorCall + Check("list", "<3 items>", "@QList") + Check("list.0", "[0]", "1", "int") From 7fbc926c642434cad71ef46ededfd279585716f6 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 30 Nov 2020 15:24:09 +0100 Subject: [PATCH 09/30] Dumper: Adapt Qt handling for Qt6 Task-number: QTCREATORBUG-24098 Change-Id: I62f2a4d91ed2f95ac167b836ea0e811599d0655f Reviewed-by: David Schulz --- share/qtcreator/debugger/cdbbridge.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/qtcreator/debugger/cdbbridge.py b/share/qtcreator/debugger/cdbbridge.py index 8f2dbada3b6..0f070682213 100644 --- a/share/qtcreator/debugger/cdbbridge.py +++ b/share/qtcreator/debugger/cdbbridge.py @@ -259,12 +259,12 @@ class Dumper(DumperBase): def qtCoreModuleName(self): modules = cdbext.listOfModules() # first check for an exact module name match - for coreName in ['Qt5Cored', 'Qt5Core', 'QtCored4', 'QtCore4']: + for coreName in ['Qt6Core', 'Qt6Cored', 'Qt5Cored', 'Qt5Core', 'QtCored4', 'QtCore4']: if coreName in modules: self.qtCoreModuleName = lambda: coreName return coreName # maybe we have a libinfix build. - for pattern in ['Qt5Core.*', 'QtCore.*']: + for pattern in ['Qt6Core.*', 'Qt5Core.*', 'QtCore.*']: matches = [module for module in modules if re.match(pattern, module)] if matches: coreName = matches[0] @@ -274,11 +274,11 @@ class Dumper(DumperBase): def qtDeclarativeModuleName(self): modules = cdbext.listOfModules() - for declarativeModuleName in ['Qt5Qmld', 'Qt5Qml']: + for declarativeModuleName in ['Qt6Qmld', 'Qt6Qml', 'Qt5Qmld', 'Qt5Qml']: if declarativeModuleName in modules: self.qtDeclarativeModuleName = lambda: declarativeModuleName return declarativeModuleName - matches = [module for module in modules if re.match('Qt5Qml.*', module)] + matches = [module for module in modules if re.match('Qt[56]Qml.*', module)] if matches: declarativeModuleName = matches[0] self.qtDeclarativeModuleName = lambda: declarativeModuleName From b7628865fb7365b78761242c626e8dfb6ebf7b6c Mon Sep 17 00:00:00 2001 From: Aleksei German Date: Thu, 3 Dec 2020 13:22:46 +0100 Subject: [PATCH 10/30] QmlDesigner: Fix for Image Browser cancel button Task: QDS-3243 Change-Id: I25ead59b39f33927bd7283b19da3b4910d9ecf83 Reviewed-by: Thomas Hartmann --- .../imports/HelperWidgets/UrlChooser.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/UrlChooser.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/UrlChooser.qml index 3c512543379..1ec22c0c397 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/UrlChooser.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/UrlChooser.qml @@ -220,7 +220,7 @@ RowLayout { iconColor: urlChooser.textColor onClicked: { fileModel.openFileDialog() - if (fileModel.path !== "") + if (fileModel.fileName !== "") urlChooser.backendValue.value = fileModel.fileName } } From ed23cecc44d26b45f19b9fa5000d25df2e80d9ad Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 3 Dec 2020 15:21:16 +0100 Subject: [PATCH 11/30] Bump version to 4.14.0 Change-Id: I419bf8e73519be8f796dbf4399ebebedf3d74ffb Reviewed-by: Eike Ziller --- cmake/QtCreatorIDEBranding.cmake | 6 +++--- qbs/modules/qtc/qtc.qbs | 10 +++++----- qtcreator_ide_branding.pri | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cmake/QtCreatorIDEBranding.cmake b/cmake/QtCreatorIDEBranding.cmake index 8fcd5862e7d..9ae08876d36 100644 --- a/cmake/QtCreatorIDEBranding.cmake +++ b/cmake/QtCreatorIDEBranding.cmake @@ -1,6 +1,6 @@ -set(IDE_VERSION "4.13.84") # The IDE version. -set(IDE_VERSION_COMPAT "4.13.84") # The IDE Compatibility version. -set(IDE_VERSION_DISPLAY "4.14.0-rc1") # The IDE display version. +set(IDE_VERSION "4.14.0") # The IDE version. +set(IDE_VERSION_COMPAT "4.14.0") # The IDE Compatibility version. +set(IDE_VERSION_DISPLAY "4.14.0") # 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 395258316aa..57b00a53cae 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -4,16 +4,16 @@ import qbs.FileInfo import "qtc.js" as HelperFunctions Module { - property string qtcreator_display_version: '4.14.0-rc1' + property string qtcreator_display_version: '4.14.0' property string ide_version_major: '4' - property string ide_version_minor: '13' - property string ide_version_release: '84' + property string ide_version_minor: '14' + property string ide_version_release: '0' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release property string ide_compat_version_major: '4' - property string ide_compat_version_minor: '13' - property string ide_compat_version_release: '84' + property string ide_compat_version_minor: '14' + property string ide_compat_version_release: '0' property string qtcreator_compat_version: ide_compat_version_major + '.' + ide_compat_version_minor + '.' + ide_compat_version_release diff --git a/qtcreator_ide_branding.pri b/qtcreator_ide_branding.pri index adcd8adf219..99c5f152382 100644 --- a/qtcreator_ide_branding.pri +++ b/qtcreator_ide_branding.pri @@ -1,6 +1,6 @@ -QTCREATOR_VERSION = 4.13.84 -QTCREATOR_COMPAT_VERSION = 4.13.84 -QTCREATOR_DISPLAY_VERSION = 4.14.0-rc1 +QTCREATOR_VERSION = 4.14.0 +QTCREATOR_COMPAT_VERSION = 4.14.0 +QTCREATOR_DISPLAY_VERSION = 4.14.0 QTCREATOR_COPYRIGHT_YEAR = 2020 IDE_DISPLAY_NAME = Qt Creator From e62d364d9732df74d1b3442a46fc6ac9d5d9eadd Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 1 Dec 2020 12:52:49 +0100 Subject: [PATCH 12/30] Debugger: Adapt QVariantMap dumper and test to Qt 6 Task-number: QTCREATORBUG-24098 Change-Id: I4e157a18ce5ff06a732fccbec1ec3d2ff507b961 Reviewed-by: Christian Stenger --- share/qtcreator/debugger/qttypes.py | 4 +++- tests/auto/debugger/tst_dumpers.cpp | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index cfc9bd4178e..5cf689a76a5 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -1284,7 +1284,8 @@ def qdumpHelper_Qt6_QMap(d, value, keyType, valueType): return m = value['d']['d']['m'] d.putItem(m) - d.putBetterType('QMap<%s, %s>' % (keyType.name, valueType.name)) + d.putBetterType('%sQMap<%s, %s>' + % (d.qtNamespace(), keyType.name, valueType.name)) def qform__QMap(): @@ -1330,6 +1331,7 @@ def qform__QVariantMap(): def qdump__QVariantMap(d, value): qdumpHelper_QMap(d, value, d.createType('@QString'), d.createType('@QVariant')) + d.putBetterType(d.qtNamespace() + 'QVariantMap') def qdump__QMetaMethod(d, value): diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index a56ab87ee6a..6bfe6dce82a 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -4334,13 +4334,13 @@ void tst_Dumpers::dumper_data() + Check("vm0", "<0 items>", TypeDef("@QMap<@QString,@QVariant>", "@QVariantMap")) + Check("vm1", "<6 items>", TypeDef("@QMap<@QString,@QVariant>", "@QVariantMap")) - + Check("vm1.0.key", "\"a\"", "@QString") - + Check("vm1.0.value", "1", "@QVariant (int)") - + Check("vm1.5.key", "\"f\"", "@QString") - + Check("vm1.5.value", "\"2Some String\"", "@QVariant (QString)") + + CheckPairish("vm1.0.key", "\"a\"", "@QString") + + CheckPairish("vm1.0.value", "1", "@QVariant (int)") + + CheckPairish("vm1.5.key", "\"f\"", "@QString") + + CheckPairish("vm1.5.value", "\"2Some String\"", "@QVariant (QString)") + Check("v", "<6 items>", "@QVariant (QVariantMap)") - + Check("v.0.key", "\"a\"", "@QString"); + + CheckPairish("v.0.key", "\"a\"", "@QString"); QTest::newRow("QVariantHash") From de3faf853daff1d89d4b57cbdf33728ab1d3f17c Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 3 Dec 2020 17:26:36 +0100 Subject: [PATCH 13/30] QmlDesigner: Update transitions if position changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie971ee68f9f0ea9b200955487fe53e6465030129 Reviewed-by: Henning Gründl Reviewed-by: Thomas Hartmann --- .../components/formeditor/formeditoritem.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp index 10eff821136..77d35ea6578 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp @@ -656,8 +656,23 @@ void FormEditorFlowActionItem::setDataModelPositionInBaseState(const QPointF &po void FormEditorFlowActionItem::updateGeometry() { FormEditorItem::updateGeometry(); - //const QPointF pos = qmlItemNode().flowPosition(); - //setTransform(QTransform::fromTranslate(pos.x(), pos.y())); + + const QPointF pos = qmlItemNode().instancePosition(); + + if (pos == m_oldPos) + return; + + m_oldPos = pos; + + // Call updateGeometry() on all related transitions + QmlFlowItemNode flowItem = QmlFlowActionAreaNode(qmlItemNode()).flowItemParent(); + if (flowItem.isValid() && flowItem.flowView().isValid()) { + const auto nodes = flowItem.flowView().transitions(); + for (const ModelNode &node : nodes) { + if (FormEditorItem *item = scene()->itemForQmlItemNode(node)) + item->updateGeometry(); + } + } } void FormEditorFlowActionItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) From 8d44cd1d5a561a00349ceb72edce8a01a9caa52c Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 3 Dec 2020 16:25:51 +0100 Subject: [PATCH 14/30] Doc: Update info about platform support for QDS Fixes: QDS-3245 Change-Id: Ifa434db2769331698956d7a2f0d037f0b0c0e137 Reviewed-by: Tim Jenssen --- doc/qtdesignstudio/src/qtdesignstudio-platforms.qdoc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/qtdesignstudio/src/qtdesignstudio-platforms.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-platforms.qdoc index ac9da974358..f22c988c771 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-platforms.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-platforms.qdoc @@ -38,9 +38,15 @@ \QDS is available in binary packages for the following operating systems: \list - \li \macOS 10.13 and 10.14.x - \li Ubuntu Linux 18.04 - \li Windows 10 + \li \macOS 10.15 + \li Linux: + \list + \li CentOS 8.1 + \li openSUSE Leap 15.1 + \li SUSE Linux Enterprise Server 15 (SLES 15) + \li Ubuntu 20.04 + \endlist + \li Windows 10, version 2004 \endlist \note For a good user experience on Windows 10, we recommend the following From 601c636e0e29e390f60a00ba3093b4a7c7635f00 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Thu, 3 Dec 2020 16:59:48 +0100 Subject: [PATCH 15/30] Update Qbs submodule to the top of 1.18 branch Change-Id: Iefc4d43e14ecd9a001b41191883c6ddd22a9320a Reviewed-by: Christian Kandeler --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index f89169ccb86..04810c92fce 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit f89169ccb8651613e5c97bd7db62a0d10e969e97 +Subproject commit 04810c92fce18d82648140e0670194bbf1e72a6f From 7a85771c20121bcb3f7d849f1f94c306a5d0b2d8 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 23 Nov 2020 21:46:09 +0100 Subject: [PATCH 16/30] Fix a warning about conversion from size_t to uint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix a warning: conversion from ‘size_t’ {aka ‘long unsigned int’} to ‘uint’ {aka ‘unsigned int’} changes value from ‘4939931809569846361’ to ‘3557831769’ [-Woverflow] Task-number: QTCREATORBUG-24098 Change-Id: Ibc123d8e28c7072dd947a1f8058dc8561ff7f6df Reviewed-by: hjk --- src/plugins/qmldesigner/designercore/model/internalnode.cpp | 2 +- src/plugins/qmldesigner/designercore/model/internalnode_p.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/model/internalnode.cpp b/src/plugins/qmldesigner/designercore/model/internalnode.cpp index 1f8b6227654..12cb2be92af 100644 --- a/src/plugins/qmldesigner/designercore/model/internalnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/internalnode.cpp @@ -159,7 +159,7 @@ bool InternalNode::hasId() const } -uint qHash(const InternalNodePointer& node) +Utils::QHashValueType qHash(const InternalNodePointer& node) { if (node.isNull()) return ::qHash(-1); diff --git a/src/plugins/qmldesigner/designercore/model/internalnode_p.h b/src/plugins/qmldesigner/designercore/model/internalnode_p.h index d8b0e314f84..c7b0ba4df1c 100644 --- a/src/plugins/qmldesigner/designercore/model/internalnode_p.h +++ b/src/plugins/qmldesigner/designercore/model/internalnode_p.h @@ -38,6 +38,8 @@ #include "internalnodeproperty.h" #include "internalnodeabstractproperty.h" +#include + namespace QmlDesigner { namespace Internal { @@ -150,7 +152,7 @@ private: int m_nodeSourceType = 0; }; -uint qHash(const InternalNodePointer& node); +Utils::QHashValueType qHash(const InternalNodePointer& node); bool operator <(const InternalNodePointer &firstNode, const InternalNodePointer &secondNode); } // Internal } // QtQmlDesigner From 98af1e503394909d5fd938cf902dee29ff4229ac Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 3 Dec 2020 16:46:19 +0200 Subject: [PATCH 17/30] QmlDesigner: Reset puppet alive timer when connection is cleared It is simpler to just recreate the timer than reuse the existing one. Change-Id: I50a8507a69b83917ff522bb5ae472285135c351c Fixes: QDS-3026 Reviewed-by: Marco Bubke Reviewed-by: Thomas Hartmann Reviewed-by: Mahmoud Badri --- .../designercore/instances/connectionmanagerinterface.cpp | 3 +-- .../designercore/instances/interactiveconnectionmanager.cpp | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/instances/connectionmanagerinterface.cpp b/src/plugins/qmldesigner/designercore/instances/connectionmanagerinterface.cpp index b4fdb707944..7e0114bd8e2 100644 --- a/src/plugins/qmldesigner/designercore/instances/connectionmanagerinterface.cpp +++ b/src/plugins/qmldesigner/designercore/instances/connectionmanagerinterface.cpp @@ -38,7 +38,6 @@ ConnectionManagerInterface::Connection::~Connection() = default; ConnectionManagerInterface::Connection::Connection(const QString &name, const QString &mode) : name{name} , mode{mode} - , timer{std::make_unique()} {} ConnectionManagerInterface::Connection::Connection(Connection &&connection) = default; @@ -49,7 +48,7 @@ void ConnectionManagerInterface::Connection::clear() socket.reset(); blockSize = 0; lastReadCommandCounter = 0; - timer->stop(); + timer.reset(); } } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.cpp b/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.cpp index cd9b5fc5cfa..57b66a7f800 100644 --- a/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.cpp +++ b/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.cpp @@ -52,8 +52,10 @@ void InteractiveConnectionManager::setUp(NodeInstanceServerInterface *nodeInstan DesignerSettings settings = QmlDesignerPlugin::instance()->settings(); int timeOutTime = settings.value(DesignerSettingsKey::PUPPET_KILL_TIMEOUT).toInt(); - for (Connection &connection : connections()) + for (Connection &connection : connections()) { + connection.timer.reset(new QTimer); connection.timer->setInterval(timeOutTime); + } if (QmlDesignerPlugin::instance() ->settings() From 78f0bbd5adaf933db14bd7382092d02ebacfa047 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 4 Dec 2020 11:34:44 +0100 Subject: [PATCH 18/30] Qbs submodule update for pulling fixes in Fixes after c21932163779bcfe4577ac2e3326b8c113884829 Change-Id: Ic72a76e824e68405bb1582c2b6b59bd59858212c Reviewed-by: Ivan Komissarov --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index 04810c92fce..9c8451e9a76 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 04810c92fce18d82648140e0670194bbf1e72a6f +Subproject commit 9c8451e9a76f1173d4c7fa4d538e2ed676743110 From 54f281944daeee3e898fcdcf2cbe8ec9db136e6f Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 1 Dec 2020 16:24:47 +0100 Subject: [PATCH 19/30] Debugger: Use @ as Qt namespace placeholder more widely Change-Id: I73a7abaed17c1a8a1461a66e66860cba64d4f9d9 Reviewed-by: Christian Stenger --- share/qtcreator/debugger/dumper.py | 2 +- share/qtcreator/debugger/qttypes.py | 94 ++++++++++++++--------------- 2 files changed, 46 insertions(+), 50 deletions(-) diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index b2d6e78755f..54efc94dcfd 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -1068,7 +1068,7 @@ class DumperBase(): if isinstance(typish, ReportItem): self.currentType.value = typish.value elif isinstance(typish, str): - self.currentType.value = typish + self.currentType.value = typish.replace('@', self.qtNamespace()) else: self.currentType.value = typish.name self.currentType.priority += 1 diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index 5cf689a76a5..ebe100ce436 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -1284,8 +1284,7 @@ def qdumpHelper_Qt6_QMap(d, value, keyType, valueType): return m = value['d']['d']['m'] d.putItem(m) - d.putBetterType('%sQMap<%s, %s>' - % (d.qtNamespace(), keyType.name, valueType.name)) + d.putBetterType('@QMap<%s, %s>' % (keyType.name, valueType.name)) def qform__QMap(): @@ -1316,7 +1315,7 @@ def qdumpHelper_Qt6_QMultiMap(d, value, keyType, valueType): return m = value['d']['d']['m'] d.putItem(m) - d.putBetterType('QMultiMap<%s, %s>' % (keyType.name, valueType.name)) + d.putBetterType('@QMultiMap<%s, %s>' % (keyType.name, valueType.name)) def qdump__QMultiMap(d, value): if d.qtVersion() >= 0x60000: @@ -1331,7 +1330,7 @@ def qform__QVariantMap(): def qdump__QVariantMap(d, value): qdumpHelper_QMap(d, value, d.createType('@QString'), d.createType('@QVariant')) - d.putBetterType(d.qtNamespace() + 'QVariantMap') + d.putBetterType('@QVariantMap') def qdump__QMetaMethod(d, value): @@ -1496,7 +1495,7 @@ def qdump__QScopedPointer(d, value): d.putValue(d.currentValue.value, d.currentValue.encoding) typeName = value.type.name if value.type[1].name == d.qtNamespace() + 'QScopedPointerDeleter<%s>' % value.type[0].name: - typeName = d.qtNamespace() + 'QScopedPointer<%s>' % value.type[0].name + typeName = '@QScopedPointer<%s>' % value.type[0].name d.putBetterType(typeName) @@ -1829,43 +1828,43 @@ def qdump__QUuid(d, value): def qdumpHelper_QVariant_0(d, value): # QVariant::Invalid - d.putBetterType('%sQVariant (invalid)' % d.qtNamespace()) + d.putBetterType('@QVariant (invalid)') d.putValue('(invalid)') def qdumpHelper_QVariant_1(d, value): # QVariant::Bool - d.putBetterType('%sQVariant (bool)' % d.qtNamespace()) + d.putBetterType('@QVariant (bool)') d.putValue('true' if value.to('b') else 'false') def qdumpHelper_QVariant_2(d, value): # QVariant::Int - d.putBetterType('%sQVariant (int)' % d.qtNamespace()) + d.putBetterType('@QVariant (int)') d.putValue(value.to('i')) def qdumpHelper_QVariant_3(d, value): # uint - d.putBetterType('%sQVariant (uint)' % d.qtNamespace()) + d.putBetterType('@QVariant (uint)') d.putValue(value.to('I')) def qdumpHelper_QVariant_4(d, value): # qlonglong - d.putBetterType('%sQVariant (qlonglong)' % d.qtNamespace()) + d.putBetterType('@QVariant (qlonglong)') d.putValue(value.to('q')) def qdumpHelper_QVariant_5(d, value): # qulonglong - d.putBetterType('%sQVariant (qulonglong)' % d.qtNamespace()) + d.putBetterType('@QVariant (qulonglong)') d.putValue(value.to('Q')) def qdumpHelper_QVariant_6(d, value): # QVariant::Double - d.putBetterType('%sQVariant (double)' % d.qtNamespace()) + d.putBetterType('@QVariant (double)') d.putValue(value.to('d')) @@ -1908,13 +1907,13 @@ qdumpHelper_QVariants_B = [ def qdumpHelper_QVariant_31(d, value): # QVariant::VoidStar - d.putBetterType('%sQVariant (void *)' % d.qtNamespace()) + d.putBetterType('@QVariant (void *)') d.putValue('0x%x' % d.extractPointer(value)) def qdumpHelper_QVariant_32(d, value): # QVariant::Long - d.putBetterType('%sQVariant (long)' % d.qtNamespace()) + d.putBetterType('@QVariant (long)') if d.ptrSize() == 4: d.putValue('%s' % d.extractInt(value)) else: @@ -1923,19 +1922,19 @@ def qdumpHelper_QVariant_32(d, value): def qdumpHelper_QVariant_33(d, value): # QVariant::Short - d.putBetterType('%sQVariant (short)' % d.qtNamespace()) + d.putBetterType('@QVariant (short)') d.putValue('%s' % d.extractShort(value)) def qdumpHelper_QVariant_34(d, value): # QVariant::Char - d.putBetterType('%sQVariant (char)' % d.qtNamespace()) + d.putBetterType('@QVariant (char)') d.putValue('%s' % d.extractByte(value)) def qdumpHelper_QVariant_35(d, value): # QVariant::ULong - d.putBetterType('%sQVariant (unsigned long)' % d.qtNamespace()) + d.putBetterType('@QVariant (unsigned long)') if d.ptrSize() == 4: d.putValue('%s' % d.extractUInt(value)) else: @@ -1944,19 +1943,19 @@ def qdumpHelper_QVariant_35(d, value): def qdumpHelper_QVariant_36(d, value): # QVariant::UShort - d.putBetterType('%sQVariant (unsigned short)' % d.qtNamespace()) + d.putBetterType('@QVariant (unsigned short)') d.putValue('%s' % d.extractUShort(value)) def qdumpHelper_QVariant_37(d, value): # QVariant::UChar - d.putBetterType('%sQVariant (unsigned char)' % d.qtNamespace()) + d.putBetterType('@QVariant (unsigned char)') d.putValue('%s' % d.extractByte(value)) def qdumpHelper_QVariant_38(d, value): # QVariant::Float - d.putBetterType('%sQVariant (float)' % d.qtNamespace()) + d.putBetterType('@QVariant (float)') d.putValue(value.to('f')) @@ -2041,7 +2040,7 @@ def qdumpHelper__QVariant6(d, value): else: d.putItem(d.createValue(data, typeName)) - d.putBetterType('%sQVariant (%s)' % (d.qtNamespace(), typeName)) + d.putBetterType('@QVariant (%s)' % typeName) def qdumpHelper__QVariant45(d, value): @@ -2062,7 +2061,7 @@ def qdumpHelper__QVariant45(d, value): # Extended Core type (Qt 4) if variantType >= 128 and variantType <= 135 and d.qtVersion() < 0x050000: if variantType == 128: - d.putBetterType('%sQVariant (void *)' % d.qtNamespace()) + d.putBetterType('@QVariant (void *)') d.putValue('0x%x' % value.extractPointer()) else: if variantType == 135: # Float @@ -2103,7 +2102,7 @@ def qdumpHelper__QVariant45(d, value): d.putEmptyValue(-99) d.putItem(val) - d.putBetterType('%sQVariant (%s)' % (d.qtNamespace(), innert)) + d.putBetterType('@QVariant (%s)' % innert) return innert @@ -2247,8 +2246,7 @@ def qdump__QXmlAttributes__Attribute(d, value): def qdump__QXmlAttributes(d, value): vptr, atts = value.split('p{@QList<@QXmlAttributes::Attribute>}') _, att_size, _ = d.describeStruct('{@QString}' * 4) - innerType = d.createType(d.qtNamespace() + 'QXmlAttributes::Attribute', - att_size) + innerType = d.createType('@QXmlAttributes::Attribute', att_size) qdumpHelper_QList(d, atts, innerType) @@ -2387,21 +2385,20 @@ def qdump__QV4__PropertyHash(d, value): data = value.extractPointer() (ref, alloc, size, numBits, entries) = d.split('iiiip', data) n = 0 - innerType = d.qtNamespace() + 'QV4::Identifier' with Children(d): for i in range(alloc): (identifier, index) = d.split('pI', entries + i * 2 * d.ptrSize()) if identifier != 0: n += 1 with SubItem(d): - d.putItem(d, d.createValue(identifier, innerType)) + d.putItem(d, d.createValue(identifier, '@QV4::Identifier')) d.put('keysuffix', ' %d' % index) d.putItemCount(n) d.putPlainChildren(value) def qdump__QV4__InternalClass__Transition(d, value): - identifier = d.createValue(value.extractPointer(), d.qtNamespace() + 'QV4::Identifier') + identifier = d.createValue(value.extractPointer(), '@QV4::Identifier') d.putStringValue(identifier) d.putPlainChildren(value) @@ -2426,14 +2423,13 @@ def qdump__QV4__SharedInternalClassData(d, value): def qdump__QV4__IdentifierTable(d, value): (engine, alloc, size, numBits, pad, entries) = value.split('piiiip') n = 0 - innerType = d.qtNamespace() + 'QV4::Heap::String' with Children(d): for i in range(alloc): identifierPtr = d.extractPointer(entries + i * d.ptrSize()) if identifierPtr != 0: n += 1 with SubItem(d, None): - d.putItem(d.createValue(identifierPtr, innerType)) + d.putItem(d.createValue(identifierPtr, '@QV4::Heap::String')) d.putItemCount(n) d.putPlainChildren(value) @@ -2535,20 +2531,20 @@ def qdump_32__QV4__Value(d, value): val = v & 0xffffffff if (tag & 0x7fff2000) == 0x7fff2000: # Int d.putValue(val) - d.putBetterType('%sQV4::Value (int32)' % ns) + d.putBetterType('@QV4::Value (int32)') elif (tag & 0x7fff4000) == 0x7fff4000: # Bool d.putValue(val) - d.putBetterType('%sQV4::Value (bool)' % ns) + d.putBetterType('@QV4::Value (bool)') elif (tag & 0x7fff0000) == 0x7fff0000: # Null d.putValue(val) - d.putBetterType('%sQV4::Value (null)' % ns) + d.putBetterType('@QV4::Value (null)') elif (tag & 0x7ffa0000) != 0x7ffa0000: # Double d.putValue(value.split('d')[0]) - d.putBetterType('%sQV4::Value (double)' % ns) + d.putBetterType('@QV4::Value (double)') elif tag == 0x7ffa0000: if val == 0: d.putValue('(undefined)') - d.putBetterType('%sQV4::Value (undefined)' % ns) + d.putBetterType('@QV4::Value (undefined)') else: managed = d.createValue(val, ns + 'QV4::Heap::Base') qdump__QV4__Heap__Base(d, managed) @@ -2627,45 +2623,45 @@ def qdump_64__QV4__Value(d, value): vtable = v & QV4_PointerMask ns = d.qtNamespace() if (v >> QV4_IsNumber_Shift) == 1: - d.putBetterType('%sQV4::Value (int32)' % ns) + d.putBetterType('@QV4::Value (int32)') vv = v & 0xffffffff vv = vv if vv < 0x80000000 else -(0x100000000 - vv) - d.putBetterType('%sQV4::Value (int32)' % ns) + d.putBetterType('@QV4::Value (int32)') d.putValue('%d' % vv) elif (v >> QV4_IsDouble_Shift): - d.putBetterType('%sQV4::Value (double)' % ns) + d.putBetterType('@QV4::Value (double)') d.putValue('%0.16x' % (v ^ QV4_NaNEncodeMask), 'float:8') elif tag == QV4_ValueType_Undefined_Type and not new: - d.putBetterType('%sQV4::Value (undefined)' % ns) + d.putBetterType('@QV4::Value (undefined)') d.putValue('(undefined)') elif tag == QV4_ValueTypeInternal_Null_Type_Internal: - d.putBetterType('%sQV4::Value (null?)' % ns) + d.putBetterType('@QV4::Value (null?)') d.putValue('(null?)') elif v == 0: if new: - d.putBetterType('%sQV4::Value (undefined)' % ns) + d.putBetterType('@QV4::Value (undefined)') d.putValue('(undefined)') else: - d.putBetterType('%sQV4::Value (null)' % ns) + d.putBetterType('@QV4::Value (null)') d.putValue('(null)') #elif ((v >> QV4_IsManaged_Shift) & ~1) == 1: - # d.putBetterType('%sQV4::Value (null/undef)' % ns) + # d.putBetterType('@QV4::Value (null/undef)') # d.putValue('(null/undef)') #elif v & QV4_IsNullOrBooleanMask: - # d.putBetterType('%sQV4::Value (null/bool)' % ns) + # d.putBetterType('@QV4::Value (null/bool)') # d.putValue('(null/bool)') # d.putValue(v & 1) else: (parentv, flags, pad, className) = d.split('pIIp', vtable) #vtable = value['m']['vtable'] if flags & 2: # isString' - d.putBetterType('%sQV4::Value (string)' % ns) + d.putBetterType('@QV4::Value (string)') qdump__QV4__Heap__String(d, d.createValue(v, ns + 'QV4::Heap::String')) #d.putStringValue(d.extractPointer(value) + 2 * d.ptrSize()) #d.putValue('ptr: 0x%x' % d.extractPointer(value)) return elif flags & 4: # isObject - d.putBetterType('%sQV4::Value (object)' % ns) + d.putBetterType('@QV4::Value (object)') #QV4_putObjectValue(d, d.extractPointer(value) + 2 * d.ptrSize()) arrayVTable = d.symbolAddress(ns + 'QV4::ArrayObject::static_vtbl') #DumperBase.warn('ARRAY VTABLE: 0x%x' % arrayVTable) @@ -2673,10 +2669,10 @@ def qdump_64__QV4__Value(d, value): d.putItem(d.createValue(d.extractPointer(value) + 2 * d.ptrSize(), ns + 'QV4::Object')) return elif flags & 8: # isFunction - d.putBetterType('%sQV4::Value (function)' % ns) + d.putBetterType('@QV4::Value (function)') d.putEmptyValue() else: - d.putBetterType('%sQV4::Value (unknown)' % ns) + d.putBetterType('@QV4::Value (unknown)') #d.putValue('[0x%x]' % v) d.putValue('[0x%x : flag 0x%x : tag 0x%x]' % (v, flags, tag)) if d.isExpanded(): @@ -2913,7 +2909,7 @@ def qdump__QScriptValue(d, value): #d.putSubItem('variant', variant) t = qdump__QVariant(d, variant) # Override the 'QVariant (foo)' output - d.putBetterType('%sQScriptValue (%s)' % (ns, t)) + d.putBetterType('@QScriptValue (%s)' % t) if t != 'JSCoreValue': return except: From d861778ff1d53b2b4f800a0c4452481e821528fc Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 3 Dec 2020 13:13:02 +0100 Subject: [PATCH 20/30] Debugger: Adapt Qt6 QVariant(QHostAddress) dumper test Just brush over the differences between the versions, the actual contents is ok. Change-Id: I4fe8e1a0e87ab6c4157a048f215b8abb13887cd4 Reviewed-by: Christian Stenger --- tests/auto/debugger/tst_dumpers.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 6bfe6dce82a..7c79aa5720f 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -4277,8 +4277,11 @@ void tst_Dumpers::dumper_data() //+ Check("ha1.protocol", "IPv4Protocol", // "@QAbstractSocket::NetworkLayerProtocol") % LldbEngine + Check("ha1.scopeId", "\"\"", "@QString") - + Check("var", "", "@QVariant (@QHostAddress)") % NeedsInferiorCall - + Check("var.data", ValuePattern(".*127.0.0.1.*"), "@QHostAddress") % NeedsInferiorCall; + + Check5("var", "", "@QVariant (@QHostAddress)") % NeedsInferiorCall + + Check5("var.data", ValuePattern(".*127.0.0.1.*"), + "@QHostAddress") % NeedsInferiorCall + + Check6("var", ValuePattern(".*127.0.0.1.*"), + "@QVariant(@QHostAddress)") % NeedsInferiorCall; QTest::newRow("QVariantList") From 5ca4427bb77d09a4d699de3fe254dd8a6834c4af Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 3 Dec 2020 15:23:49 +0100 Subject: [PATCH 21/30] Debugger: Create list of arguments for manually created template types This is one of the roadblocks for the current failing Qt 6 QVariant dumper for self-registered types. Change-Id: I304ce8e8aa3dfc5b3694b65198fbac4f42de6d4b Reviewed-by: Christian Stenger --- share/qtcreator/debugger/dumper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index 54efc94dcfd..c7b1362a819 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -3852,6 +3852,7 @@ class DumperBase(): tdata = self.TypeData(self) tdata.name = typish tdata.typeId = typish + tdata.templateArguments = self.listTemplateParameters(typish) if size is not None: tdata.lbitsize = 8 * size From f45cfbe6341fc6695e27eccd6b687b9108e34b83 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Fri, 4 Dec 2020 14:12:46 +0100 Subject: [PATCH 22/30] Update Qbs submodule to the top of 1.18 branch Change-Id: I9bca087996cad51c2bfe015e739d06ef73dac9cf Reviewed-by: Eike Ziller --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index 9c8451e9a76..80cb55a1fb4 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 9c8451e9a76f1173d4c7fa4d538e2ed676743110 +Subproject commit 80cb55a1fb4d8d762003f1fc766365196cc6a450 From 60e2a1b1288f48c8d1b9b9b436b515e6066c248c Mon Sep 17 00:00:00 2001 From: Aleksei German Date: Fri, 4 Dec 2020 15:42:40 +0100 Subject: [PATCH 23/30] QmlDesigner: Fix for Rotation tool for FlowItem Change-Id: Ic4c8c488d91e5983da6da1b424b52a4b240ded37 Reviewed-by: Thomas Hartmann --- .../qmldesigner/components/formeditor/rotationindicator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/formeditor/rotationindicator.cpp b/src/plugins/qmldesigner/components/formeditor/rotationindicator.cpp index a47aa0ec907..0a0f223bf42 100644 --- a/src/plugins/qmldesigner/components/formeditor/rotationindicator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/rotationindicator.cpp @@ -63,7 +63,8 @@ static bool itemIsRotatable(const QmlItemNode &qmlItemNode) && qmlItemNode.instanceIsResizable() && qmlItemNode.modelIsMovable() && qmlItemNode.modelIsRotatable() - && !qmlItemNode.instanceIsInLayoutable(); + && !qmlItemNode.instanceIsInLayoutable() + && !qmlItemNode.isFlowItem(); } void RotationIndicator::setItems(const QList &itemList) From 79c4df1ea17e5697695df135784c291c455cd49e Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 4 Dec 2020 08:47:55 +0100 Subject: [PATCH 24/30] McuSupport: Register all .qch files in the SDK's docs/ directory Instead of having a hard-coded list of .qch file names to register, register all .qch files that are present in the Qt for MCUs SDK's docs/ directory. Turning docs registration into a self-maintaining feature. Fixes: QTCREATORBUG-25043 Change-Id: Idc7afb78b256bcbb3e8cd7f80fab6a356eb47aa3 Reviewed-by: Eike Ziller Reviewed-by: Yoann Lopes Reviewed-by: Alessandro Portale --- src/plugins/mcusupport/mcusupportoptions.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/plugins/mcusupport/mcusupportoptions.cpp b/src/plugins/mcusupport/mcusupportoptions.cpp index 304e2c6e519..9de0d0b0b7b 100644 --- a/src/plugins/mcusupport/mcusupportoptions.cpp +++ b/src/plugins/mcusupport/mcusupportoptions.cpp @@ -510,12 +510,11 @@ void McuSupportOptions::registerQchFiles() if (docsDir.isEmpty()) return; - const QStringList qchFiles = { - docsDir + "/quickultralite.qch", - docsDir + "/quickultralitecmake.qch" - }; + const QFileInfoList qchFiles = QDir(docsDir, "*.qch").entryInfoList(); Core::HelpManager::registerDocumentation( - Utils::filtered(qchFiles, [](const QString &f) { return QFileInfo::exists(f); } )); + Utils::transform(qchFiles, [](const QFileInfo &fi){ + return fi.absoluteFilePath(); + })); } void McuSupportOptions::registerExamples() From 1d9be08e90f89622b58874d7b711668e1d407f5b Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Thu, 3 Dec 2020 14:48:06 +0100 Subject: [PATCH 25/30] Git: Pass only project path to Init Repository dialog It makes no sense to have the project file here, and under Windows it even creates confusion as you have to delete the project file name from the "Get Existing Directory" dialog. Change-Id: I51887d5665b4c61b507d64f8bdcc50f3d10c49c4 Reviewed-by: Orgad Shaneh --- src/plugins/vcsbase/vcsbaseplugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp index aa077410a15..9ff8a0b9977 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.cpp +++ b/src/plugins/vcsbase/vcsbaseplugin.cpp @@ -640,7 +640,7 @@ void VcsBasePluginPrivate::createRepository() // Find current starting directory QString directory; if (const Project *currentProject = ProjectTree::currentProject()) - directory = currentProject->projectFilePath().toString(); + directory = currentProject->projectFilePath().absolutePath().toString(); // Prompt for a directory that is not under version control yet QWidget *mw = ICore::dialogParent(); do { From 7e8c212c1ac3d8418a961ba72b6218c5d9a5b0da Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 4 Dec 2020 17:43:58 +0100 Subject: [PATCH 26/30] Coding style: Remove outdated recommendation of foreach() Change-Id: I01eadfdbefededf3b71df492a0e29abdd3a3a93f Reviewed-by: Leena Miettinen Reviewed-by: Eike Ziller --- doc/qtcreatordev/src/coding-style.qdoc | 29 -------------------------- 1 file changed, 29 deletions(-) diff --git a/doc/qtcreatordev/src/coding-style.qdoc b/doc/qtcreatordev/src/coding-style.qdoc index 5e8dc6e1367..d429ea917ca 100644 --- a/doc/qtcreatordev/src/coding-style.qdoc +++ b/doc/qtcreatordev/src/coding-style.qdoc @@ -202,35 +202,6 @@ } \endcode - - \li You can use the Qt \c foreach loop in non-time-critical code with a Qt - container. It is a nice way to keep line noise down and to give the - loop variable a proper name: - - \code - foreach (QWidget *widget, container) - doSomething(widget); - - -NOT- - - Container::iterator end = container.end(); - for (Container::iterator it = container.begin(); it != end; ++it) - doSomething(*it); - \endcode - - Make the loop variable const, if possible. This might prevent - unnecessary detaching of shared data: - - \code - foreach (const QString &name, someListOfNames) - doSomething(name); - - - NOT - - - foreach (QString name, someListOfNames) - doSomething(name); - \endcode - \endlist \section1 Formatting From aa9e1ec106ba3b1530c00d666249cd71b5ae43f3 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 4 Dec 2020 09:29:53 +0100 Subject: [PATCH 27/30] Debugger: Adapt QSet dumper and tests to Qt6 Task-number: QTCREATORBUG-24098 Change-Id: Ib9b2c53ee763871873f0cc3ad4f8ba0152999328 Reviewed-by: Christian Stenger --- share/qtcreator/debugger/qttypes.py | 35 +++++++++++++++++++++++++++++ tests/auto/debugger/tst_dumpers.cpp | 27 ++++++++++++++++------ 2 files changed, 55 insertions(+), 7 deletions(-) diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index ebe100ce436..df9913c4f87 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -1500,7 +1500,42 @@ def qdump__QScopedPointer(d, value): def qdump__QSet(d, value): + if d.qtVersion() >= 0x060000: + qdumpHelper_QSet6(d, value) + else: + qdumpHelper_QSet45(d, value) +def qdumpHelper_QSet6(d, value): + dptr = d.extractPointer(value) + if dptr == 0: + d.putItemCount(0) + return + + ref, _, size, buckets, seed, spans = d.split('i@qqqp', dptr) + + d.check(0 <= size and size <= 100 * 1000 * 1000) + d.check(-1 <= ref and ref < 100000) + d.putItemCount(size) + + if d.isExpanded(): + value_type = value.type[0] + value_size = value_type.size() + with Children(d, size): + span_size = 128 + 2 * d.ptrSize() # Including tail padding. + nspans = int((buckets + 127) / 128) + count = 0 + for b in range(nspans): + span = spans + b * span_size + offsets, entries, allocated, next_free = d.split('128spbb', span) + for i in range(128): + offset = offsets[i] + if offset != 255: # Entry is used + entry = entries + offset * value_size + d.putSubItem(count, d.createValue(entry, value_type)) + count += 1 + + +def qdumpHelper_QSet45(d, value): def hashDataFirstNode(): b = buckets n = numBuckets diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 7c79aa5720f..fdb084bdfc4 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -396,6 +396,11 @@ struct Value5 : Value Value5(const QString &value) : Value(value) { qtVersion = 5; } }; +struct Value6 : Value +{ + Value6(const QString &value) : Value(value) { qtVersion = 6; } +}; + struct UnsubstitutedValue : Value { UnsubstitutedValue(const QString &value) : Value(value) { substituteNamespace = false; } @@ -2006,6 +2011,8 @@ void tst_Dumpers::dumper() } if (!setok) { qDebug() << "NO CHECK IN SET PASSED"; + for (const Check &check : checkset.checks) + qDebug() << check; ok = false; } } @@ -3388,6 +3395,8 @@ void tst_Dumpers::dumper_data() "uint qHash(const QPointer &p) { return (quintptr)p.data(); }\n" "QT_END_NAMESPACE\n", + "QSet s0;\n" + "QSet s1;\n" "s1.insert(11);\n" "s1.insert(22);\n\n" @@ -3403,19 +3412,23 @@ void tst_Dumpers::dumper_data() "s3.insert(ptr);\n" "s3.insert(ptr);\n", - "&s1, &s2, &s3") + "&s0, &s1, &s2, &s3") + CoreProfile() + + Check("s0", "<0 items>", "@QSet") + + Check("s1", "<2 items>", "@QSet") - + Check("s1.0", "[0]", "22", "int") - + Check("s1.1", "[1]", "11", "int") + + CheckSet({{"s1.0", "[0]", "22", "int"}, + {"s1.0", "[0]", "11", "int"}}) + + CheckSet({{"s1.1", "[1]", "22", "int"}, + {"s1.1", "[1]", "11", "int"}}) + Check("s2", "<2 items>", "@QSet<@QString>") - + Check("s2.0", "[0]", Value4("\"11.0\""), "@QString") - + Check("s2.0", "[0]", Value5("\"22.0\""), "@QString") - + Check("s2.1", "[1]", Value4("\"22.0\""), "@QString") - + Check("s2.1", "[1]", Value5("\"11.0\""), "@QString") + + CheckSet({{"s2.0", "[0]", "\"11.0\"", "@QString"}, + {"s2.0", "[0]", "\"22.0\"", "@QString"}}) + + CheckSet({{"s2.1", "[1]", "\"11.0\"", "@QString"}, + {"s2.1", "[1]", "\"22.0\"", "@QString"}}) + Check("s3", "<1 items>", "@QSet<@QPointer<@QObject>>") + Check("s3.0", "[0]", "", "@QPointer<@QObject>"); From fba5effd41d98865e3f99d847750bd1702f78800 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 4 Dec 2020 10:02:54 +0100 Subject: [PATCH 28/30] Debugger: Adapt QMultiMap dumper test to Qt6 Task-number: QTCREATORBUG-24098 Change-Id: Iec811d90accd6fada7883e8bcb548ec0ab4c38f6 Reviewed-by: Christian Stenger --- tests/auto/debugger/tst_dumpers.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index fdb084bdfc4..a969a79046f 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -2973,26 +2973,26 @@ void tst_Dumpers::dumper_data() + Check("m1.5", "[5] 22", FloatValue("22"), "") + Check("m2", "<1 items>", "@QMultiMap<@QString, float>") - + Check("m2.0.key", "\"22.0\"", "@QString") - + Check("m2.0.value", FloatValue("22"), "float") + + CheckPairish("m2.0.key", "\"22.0\"", "@QString") + + CheckPairish("m2.0.value", FloatValue("22"), "float") + CoreProfile() + Check("m3", "<1 items>", "@QMultiMap") - + Check("m3.0.key", "22", "int") - + Check("m3.0.value", "\"22.0\"", "@QString") + + CheckPairish("m3.0.key", "22", "int") + + CheckPairish("m3.0.value", "\"22.0\"", "@QString") + CoreProfile() + Check("m4", "<3 items>", "@QMultiMap<@QString, Foo>") - + Check("m4.0.key", "\"22.0\"", "@QString") - + Check("m4.0.value", "", "Foo") - + Check("m4.0.value.a", "22", "int") + + CheckPairish("m4.0.key", "\"22.0\"", "@QString") + + CheckPairish("m4.0.value", "", "Foo") + + CheckPairish("m4.0.value.a", "22", "int") + Check("m5", "<4 items>", "@QMultiMap<@QString, @QPointer<@QObject>>") - + Check("m5.0.key", "\".\"", "@QString") - + Check("m5.0.value", "", "@QPointer<@QObject>") - + Check("m5.1.key", "\".\"", "@QString") - + Check("m5.2.key", "\"Hallo\"", "@QString") - + Check("m5.3.key", "\"Welt\"", "@QString"); + + CheckPairish("m5.0.key", "\".\"", "@QString") + + CheckPairish("m5.0.value", "", "@QPointer<@QObject>") + + CheckPairish("m5.1.key", "\".\"", "@QString") + + CheckPairish("m5.2.key", "\"Hallo\"", "@QString") + + CheckPairish("m5.3.key", "\"Welt\"", "@QString"); QTest::newRow("QObject1") From f9b255b679dcd7c916a075ed1a04c8ce9ad956d5 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 7 Dec 2020 11:26:47 +0100 Subject: [PATCH 29/30] Doc: Hide QDS specific info from Qt Creator Manual Group type and Event List are only available for QDS. Change-Id: I244a774de07260b4cdad8769aba7cd4761029c05 Reviewed-by: Leena Miettinen --- .../src/qtquick/qtquick-component-context-menu.qdocinc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/qtcreator/src/qtquick/qtquick-component-context-menu.qdocinc b/doc/qtcreator/src/qtquick/qtquick-component-context-menu.qdocinc index 5c73bcf1562..1dc19f288d3 100644 --- a/doc/qtcreator/src/qtquick/qtquick-component-context-menu.qdocinc +++ b/doc/qtcreator/src/qtquick/qtquick-component-context-menu.qdocinc @@ -44,9 +44,11 @@ \row \li Anchors \li \l{Setting Anchors and Margins} + \if defined(qtdesignstudio) \row \li Group \li \l Group + \endif \row \li Position \li \l{Using Positioners} @@ -59,9 +61,11 @@ \row \li Timeline \li \l{Creating Timelines} + \if defined(qtdesignstudio) \row \li Event List \li \l{Simulating Events} + \endif \row \li Edit Color \li \l{Editing Properties Inline} From 7622cc4c09abfb75b4e20d6578bddfdf16c41161 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 7 Dec 2020 11:17:47 +0100 Subject: [PATCH 30/30] QmlDesigner: Bring back the preview zoom factor combobox Fixes: QTCREATORBUG-25057 Change-Id: I52dadc8798a5271cef2dbca718a3e33dc3998958 Reviewed-by: Tim Jenssen --- src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewplugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewplugin.cpp b/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewplugin.cpp index 95440ae077f..0975acfde30 100644 --- a/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewplugin.cpp +++ b/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewplugin.cpp @@ -150,7 +150,7 @@ float QmlPreviewPlugin::zoomFactor() void QmlPreviewPlugin::setZoomFactor(float zoomFactor) { - if (s_previewPlugin) { + if (auto s_previewPlugin = getPreviewPlugin()) { bool hasZoomFactor = s_previewPlugin->setProperty("zoomFactor", zoomFactor); QTC_CHECK(hasZoomFactor); }