From e1370a01ff14b71adc9d601be6621851be2ac357 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 2 Dec 2021 09:10:05 +0100 Subject: [PATCH 01/77] Debugger: Fix interrupting via console Amends 89646aadce. Change-Id: Ibb644dc8897a967bd691155fe5be2eb2165b01f9 Reviewed-by: Christian Stenger Reviewed-by: --- src/libs/utils/process_stub_unix.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libs/utils/process_stub_unix.c b/src/libs/utils/process_stub_unix.c index 856efa26af9..1cb3e8aa264 100644 --- a/src/libs/utils/process_stub_unix.c +++ b/src/libs/utils/process_stub_unix.c @@ -325,6 +325,13 @@ int main(int argc, char *argv[]) kill(chldPid, SIGKILL); } break; + case 'i': + if (chldPid > 0) { + int res = kill(chldPid, SIGINT); + if (res) + perror("Stub could not interrupt inferior"); + } + break; case 'c': { int res = write(blockingPipe[1], &c, 1); if (res < 0) From 0e696e19fe42043720031f2421c15d76da192e19 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 29 Nov 2021 12:24:26 +0100 Subject: [PATCH 02/77] QmlJsCheck: Allow new connection syntax in Connections Change-Id: Ibbef3f8e8230d727d3183fa1615e0f38373a3c7f Reviewed-by: Qt CI Bot Reviewed-by: Reviewed-by: Ulf Hermann --- src/libs/qmljs/qmljscheck.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index f280b53c01a..21c501791c6 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -1236,7 +1236,11 @@ bool Check::visit(FunctionExpression *ast) } } - addMessage(ErrFunctionsNotSupportedInQmlUi, locationFromRange(locfunc, loclparen)); + const bool isDirectInConnectionsScope = + (!m_typeStack.isEmpty() && m_typeStack.last() == "Connections"); + + if (!isDirectInConnectionsScope) + addMessage(ErrFunctionsNotSupportedInQmlUi, locationFromRange(locfunc, loclparen)); DeclarationsCheck bodyCheck; addMessages(bodyCheck(ast)); From 4cbfdecaf3be9d27d4c7f2090ac02aaaba7265e3 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 2 Dec 2021 11:39:25 +0100 Subject: [PATCH 03/77] Bump version to 6.0.1 Change-Id: Idc7519d7b74968cb6bdb473ff3dabff18ad0cee5 Reviewed-by: David Schulz --- 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 270e0fe174c..b27542f98f9 100644 --- a/cmake/QtCreatorIDEBranding.cmake +++ b/cmake/QtCreatorIDEBranding.cmake @@ -1,6 +1,6 @@ -set(IDE_VERSION "6.0.0") # The IDE version. +set(IDE_VERSION "6.0.1") # The IDE version. set(IDE_VERSION_COMPAT "6.0.0") # The IDE Compatibility version. -set(IDE_VERSION_DISPLAY "6.0.0") # The IDE display version. +set(IDE_VERSION_DISPLAY "6.0.1") # The IDE display version. set(IDE_COPYRIGHT_YEAR "2021") # 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 925d7d615f6..18180fbdb9c 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -3,10 +3,10 @@ import qbs.Environment import qbs.FileInfo Module { - property string qtcreator_display_version: '6.0.0' + property string qtcreator_display_version: '6.0.1' property string ide_version_major: '6' property string ide_version_minor: '0' - property string ide_version_release: '0' + property string ide_version_release: '1' 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 364f1a70691..26d92194228 100644 --- a/qtcreator_ide_branding.pri +++ b/qtcreator_ide_branding.pri @@ -1,6 +1,6 @@ -QTCREATOR_VERSION = 6.0.0 +QTCREATOR_VERSION = 6.0.1 QTCREATOR_COMPAT_VERSION = 6.0.0 -QTCREATOR_DISPLAY_VERSION = 6.0.0 +QTCREATOR_DISPLAY_VERSION = 6.0.1 QTCREATOR_COPYRIGHT_YEAR = 2021 IDE_DISPLAY_NAME = Qt Creator From 2e42c99522537bc3102aeff4f01671c0234c11b8 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 2 Dec 2021 11:01:46 +0100 Subject: [PATCH 04/77] Prevent litehtml from downloading googletest, take 2 Put BUILD_TESTING into the cache, so it doesn't get overridden by the default option in a clean build via policy CMP0077 Fixes: QTCREATORBUG-26626 Change-Id: I8b90286c82a60ba30eb9b036dac8fca3be82cc2e Reviewed-by: Cristian Adam Reviewed-by: Youri Westerman --- src/libs/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/CMakeLists.txt b/src/libs/CMakeLists.txt index 1fd49e178e1..df1826f7342 100644 --- a/src/libs/CMakeLists.txt +++ b/src/libs/CMakeLists.txt @@ -31,7 +31,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qlitehtml/src/CMakeLists.txt) set(QLITEHTML_DEVEL_EXCLUDE_FROM_ALL ON) set(QLITEHTML_HEADER_PATH "${IDE_HEADER_INSTALL_PATH}/src/lib/qlitehtml") set(QT_VERSION_MAJOR ${Qt5_VERSION_MAJOR}) - set(BUILD_TESTING OFF) # otherwise litehtml downloads googletest + option(BUILD_TESTING "Build litehtml tests" OFF) # otherwise litehtml downloads googletest add_subdirectory(qlitehtml/src) endif() if(TARGET qlitehtml) From dbc4cd6f4a353c2d48c3ca214088759489b3fceb Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 2 Dec 2021 10:16:42 +0100 Subject: [PATCH 05/77] TextEditor: always replace cursor Otherwise some internal data might be outdated. For example inserting text resets the QTextCursorPrivate::x which is used to calculate positions when moving the cursor up or down. Fixes: QTCREATORBUG-26635 Change-Id: I9fee7436a3648f9d3eab7b30f8a09a134c5be356 Reviewed-by: Eike Ziller --- src/plugins/texteditor/texteditor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 28fe278cabd..c1a272a2728 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -6257,10 +6257,10 @@ MultiTextCursor TextEditorWidget::multiTextCursor() const void TextEditorWidget::setMultiTextCursor(const Utils::MultiTextCursor &cursor) { - if (d->m_cursors == cursor) - return; - MultiTextCursor oldCursor = d->m_cursors; + const MultiTextCursor oldCursor = d->m_cursors; const_cast(d->m_cursors) = cursor; + if (oldCursor == d->m_cursors) + return; doSetTextCursor(d->m_cursors.mainCursor(), /*keepMultiSelection*/ true); QRect updateRect = d->cursorUpdateRect(oldCursor); if (d->m_highlightCurrentLine) From 16c8f1a9b6f7658225c1c3f2a4ae6cecd97a5dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Thu, 2 Dec 2021 16:41:20 +0100 Subject: [PATCH 06/77] Android: Fix use of keytool on Windows Fixes: QTCREATORBUG-26647 Change-Id: I34fd2b4304480186d1a05e2c9101b2cfbd1e8e47 Reviewed-by: Alessandro Portale --- src/plugins/android/androidconfigurations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index 0fb2b476e54..6128109e57a 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -590,7 +590,7 @@ FilePath AndroidConfig::openJDKBinPath() const FilePath AndroidConfig::keytoolPath() const { - return openJDKBinPath().pathAppended(keytoolName); + return openJDKBinPath().pathAppended(keytoolName).withExecutableSuffix(); } QVector AndroidConfig::connectedDevices(QString *error) const From 73fb01f4b201f8b9cc4ff195c0068e5466e93712 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Thu, 2 Dec 2021 13:18:02 +0100 Subject: [PATCH 07/77] QmlDesigner: Add support for video assets * Add *.mp3 as sound asset * Add *.mp4 as video asset Change-Id: If96bab257abf9d0264e374b5f1f92b807b5349a2 Reviewed-by: Mahmoud Badri Reviewed-by: Tim Jenssen --- .../componentcore/componentcore_constants.h | 1 + .../componentcore/designeractionmanager.cpp | 5 ++++- .../componentcore/modelnodeoperations.cpp | 5 +++++ .../componentcore/modelnodeoperations.h | 1 + .../itemlibrary/images/item-video-icon.png | Bin 0 -> 286 bytes .../itemlibrary/images/item-video-icon@2x.png | Bin 0 -> 399 bytes .../components/itemlibrary/itemlibrary.qrc | 2 ++ .../itemlibrary/itemlibraryassetsiconprovider.cpp | 2 ++ .../itemlibrary/itemlibraryassetsmodel.cpp | 9 ++++++++- .../itemlibrary/itemlibraryassetsmodel.h | 1 + .../components/itemlibrary/itemlibrarywidget.cpp | 3 +++ 11 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/plugins/qmldesigner/components/itemlibrary/images/item-video-icon.png create mode 100644 src/plugins/qmldesigner/components/itemlibrary/images/item-video-icon@2x.png diff --git a/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h b/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h index 49505d2ca7d..6911ab27c7a 100644 --- a/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h +++ b/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h @@ -221,6 +221,7 @@ const int priorityLast = 60; const char addImagesDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Image Files"); const char addFontsDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Font Files"); const char addSoundsDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Sound Files"); +const char addVideosDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Video Files"); const char addShadersDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "Shader Files"); const char add3DAssetsDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", "3D Assets"); const char addQt3DSPresentationsDisplayString[] = QT_TRANSLATE_NOOP("QmlDesignerAddResources", diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp index 13774c12651..4ac3692589d 100644 --- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp +++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp @@ -1557,12 +1557,15 @@ void DesignerActionManager::createDefaultAddResourceHandler() registerHandlers({"*.otf", "*.ttf"}, ModelNodeOperations::addFontToProject, ComponentCoreConstants::addFontsDisplayString); - registerHandlers({"*.wav"}, + registerHandlers({"*.wav", "*.mp3"}, ModelNodeOperations::addSoundToProject, ComponentCoreConstants::addSoundsDisplayString); registerHandlers({"*.glsl", "*.glslv", "*.glslf", "*.vsh", "*.fsh", "*.vert", "*.frag"}, ModelNodeOperations::addShaderToProject, ComponentCoreConstants::addShadersDisplayString); + registerHandlers({"*.mp4"}, + ModelNodeOperations::addVideoToProject, + ComponentCoreConstants::addVideosDisplayString); } void DesignerActionManager::createDefaultModelNodePreviewImageHandlers() diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp index b4867404954..02633df9f85 100644 --- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp +++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp @@ -1077,6 +1077,11 @@ AddFilesResult addImageToProject(const QStringList &fileNames, const QString &de return addFilesToProject(fileNames, getAssetDefaultDirectory("images", defaultDirectory)); } +AddFilesResult addVideoToProject(const QStringList &fileNames, const QString &defaultDirectory) +{ + return addFilesToProject(fileNames, getAssetDefaultDirectory("videos", defaultDirectory)); +} + void createFlowActionArea(const SelectionContext &selectionContext) { AbstractView *view = selectionContext.view(); diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h index feb7faa556f..f9e39c06f48 100644 --- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h +++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h @@ -80,6 +80,7 @@ AddFilesResult addImageToProject(const QStringList &fileNames, const QString &di AddFilesResult addFontToProject(const QStringList &fileNames, const QString &directory); AddFilesResult addSoundToProject(const QStringList &fileNames, const QString &directory); AddFilesResult addShaderToProject(const QStringList &fileNames, const QString &directory); +AddFilesResult addVideoToProject(const QStringList &fileNames, const QString &directory); void createFlowActionArea(const SelectionContext &selectionContext); void addTransition(const SelectionContext &selectionState); void addFlowEffect(const SelectionContext &selectionState, const TypeName &typeName); diff --git a/src/plugins/qmldesigner/components/itemlibrary/images/item-video-icon.png b/src/plugins/qmldesigner/components/itemlibrary/images/item-video-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..df1b84e5c99654bc885875e39a7db24db89f20b0 GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4mJh`h6m-gKNuJoo_e}ChIn+oy}HoL#ZjdF zaUTMeiw<@guf*YG-ZN3QK>DBb;=+M4q4;Wsz?Y=0jr~GKq q^^T76IjL#v+yQ6zop~up{WcE3=E#GelF{r5}E*sDSRFP literal 0 HcmV?d00001 diff --git a/src/plugins/qmldesigner/components/itemlibrary/images/item-video-icon@2x.png b/src/plugins/qmldesigner/components/itemlibrary/images/item-video-icon@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..4b9f31faf390bcf63565bd4405cf088cd9c26c70 GIT binary patch literal 399 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_8UuVnTp1V`{{R2KV&H&& zMK&h`1A|sckY6wZ0}BVAps1LHl(ek2jh$y|c0pn3#7UE<&D_4@>Vt=mpFDs4_TBpr zfBycP8pD5yfq`MNr;B5V$MLsQJ^7m)B%HOm@*cEVE9kAb@&7-wt%sAr#D(gfGs=HY z+LxmDc7ZyR_7-Obx7kmQ%Fo%BTqArZ!re@Jar4nrM^%z-zh?@TPYeIlA?qt+_p{Px zl4a210!9XVExijq^7sCEI!dgQe|phn#hzWA4%!h9;}1oOKCugtRxgi=<1L)7RQS^= i{C?Q))KZrU=A+`5reqtLeqdl=VDNPHb6Mw<&;$SyR=YU> literal 0 HcmV?d00001 diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.qrc b/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.qrc index b1777bbbec6..c6d60413d07 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.qrc +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.qrc @@ -33,5 +33,7 @@ images/x@2x.png images/browse.png images/browse@2x.png + images/item-video-icon.png + images/item-video-icon@2x.png diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetsiconprovider.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetsiconprovider.cpp index ece6e8abaab..ad6f3136837 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetsiconprovider.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetsiconprovider.cpp @@ -54,6 +54,8 @@ QPixmap ItemLibraryAssetsIconProvider::requestPixmap(const QString &id, QSize *s pixmap = Utils::StyleHelper::dpiSpecificImageFile(":/ItemLibrary/images/asset_shader_48.png"); else if (ItemLibraryAssetsModel::supportedAudioSuffixes().contains(suffix)) pixmap = Utils::StyleHelper::dpiSpecificImageFile(":/ItemLibrary/images/asset_sound_48.png"); + else if (ItemLibraryAssetsModel::supportedVideoSuffixes().contains(suffix)) + pixmap = Utils::StyleHelper::dpiSpecificImageFile(":/ItemLibrary/images/item-video-icon.png"); if (size) { size->setWidth(pixmap.width()); diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetsmodel.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetsmodel.cpp index caaaa374528..5fa13c3c16b 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetsmodel.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetsmodel.cpp @@ -167,7 +167,13 @@ const QStringList &ItemLibraryAssetsModel::supportedFontSuffixes() const QStringList &ItemLibraryAssetsModel::supportedAudioSuffixes() { - static const QStringList retList {"*.wav"}; + static const QStringList retList {"*.wav", "*.mp3"}; + return retList; +} + +const QStringList &ItemLibraryAssetsModel::supportedVideoSuffixes() +{ + static const QStringList retList {"*.mp4"}; return retList; } @@ -300,6 +306,7 @@ const QSet &ItemLibraryAssetsModel::supportedSuffixes() const insertSuffixes(supportedShaderSuffixes()); insertSuffixes(supportedFontSuffixes()); insertSuffixes(supportedAudioSuffixes()); + insertSuffixes(supportedVideoSuffixes()); insertSuffixes(supportedTexture3DSuffixes()); } return allSuffixes; diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetsmodel.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetsmodel.h index c1dcc845da0..f7621563492 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetsmodel.h +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetsmodel.h @@ -66,6 +66,7 @@ public: static const QStringList &supportedShaderSuffixes(); static const QStringList &supportedFontSuffixes(); static const QStringList &supportedAudioSuffixes(); + static const QStringList &supportedVideoSuffixes(); static const QStringList &supportedTexture3DSuffixes(); const QSet &previewableSuffixes() const; diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp index 4c02b25433b..c8720385c07 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp @@ -552,6 +552,9 @@ QPair ItemLibraryWidget::getAssetTypeAndData(const QString } else if (ItemLibraryAssetsModel::supportedAudioSuffixes().contains(suffix)) { // No extra data for sounds return {"application/vnd.bauhaus.libraryresource.sound", {}}; + } else if (ItemLibraryAssetsModel::supportedVideoSuffixes().contains(suffix)) { + // No extra data for videos + return {"application/vnd.bauhaus.libraryresource.video", {}}; } else if (ItemLibraryAssetsModel::supportedTexture3DSuffixes().contains(suffix)) { // Data: Image format (suffix) return {"application/vnd.bauhaus.libraryresource.texture3d", suffix.toUtf8()}; From 9dd6635970c0921ec7e97cc9a36bb3e7cf06c87f Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Thu, 2 Dec 2021 13:04:39 +0100 Subject: [PATCH 08/77] QmlDesigner: Add VideoOutput * Add VideoOutput * Add ComboBoxes to MediaPlayer specifics for selecting audio and video output ids Change-Id: I52ea764b1301492754676a97d8d122275ba6dd81 Reviewed-by: Reviewed-by: Tim Jenssen --- .../QtMultimedia/MediaPlayerSection.qml | 36 ++++++++++++++++++ .../QtMultimedia/VideoOutputSpecifics.qml | 37 +++++++++++++++++++ .../qmldesigner/qtquickplugin/quick.metainfo | 20 ++++++++++ 3 files changed, 93 insertions(+) create mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/VideoOutputSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSection.qml index b76a1bd0fb5..979a276e6e2 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSection.qml @@ -52,5 +52,41 @@ Section { ExpandingSpacer {} } + + PropertyLabel { + text: qsTr("Audio Output") + tooltip: qsTr("Holds the target audio output.") + } + + SecondColumnLayout { + ItemFilterComboBox { + implicitWidth: StudioTheme.Values.singleControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + width: implicitWidth + typeFilter: "QtQuick.AudioOutput" + validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } + backendValue: backendValues.audioOutput + } + + ExpandingSpacer {} + } + + PropertyLabel { + text: qsTr("Video Output") + tooltip: qsTr("Holds the target video output.") + } + + SecondColumnLayout { + ItemFilterComboBox { + implicitWidth: StudioTheme.Values.singleControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + width: implicitWidth + typeFilter: "QtQuick.VideoOutput" + validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } + backendValue: backendValues.videoOutput + } + + ExpandingSpacer {} + } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/VideoOutputSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/VideoOutputSpecifics.qml new file mode 100644 index 00000000000..66f29f1cada --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/VideoOutputSpecifics.qml @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** 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. +** +****************************************************************************/ + +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import HelperWidgets 2.0 +import StudioControls 1.0 as StudioControls +import StudioTheme 1.0 as StudioTheme + +Column { + anchors.left: parent.left + anchors.right: parent.right + + VideoSection {} +} diff --git a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo index 7858ca08ea1..ef81ae181bf 100644 --- a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo +++ b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo @@ -564,6 +564,26 @@ MetaInfo { } } + Type { + name: "QtMultimedia.VideoOutput" + icon: ":/qtquickplugin/images/video-output-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Video Output" + category: "f.Qt Quick - Multimedia" + libraryIcon: ":/qtquickplugin/images/video-output-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + } + } + Type { name: "QtMultimedia.Video" icon: ":/qtquickplugin/images/video-16px.png" From 40c2d9a06bfa3adb4670fdc2e5bef7659d83bd04 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Thu, 2 Dec 2021 12:05:31 +0100 Subject: [PATCH 09/77] QmlDesigner: Remove audio wrapper Remove the custom audio convenience type which should mimic the QML Video convenience type only for audio. The custom convenience wrapper is not working, because MediaPlayer is a QObject and can't have children. Change-Id: Ic8d06e6397d8b7bb3bc531d47c1cb0b92142a742 Reviewed-by: Reviewed-by: Tim Jenssen --- .../QtMultimedia/AudioSection.qml | 67 ------------------ .../qtquickplugin/images/audio-16px.png | Bin 267 -> 0 bytes .../qtquickplugin/images/audio-24px.png | Bin 521 -> 0 bytes .../qtquickplugin/images/audio-24px@2x.png | Bin 1026 -> 0 bytes .../qtquickplugin/qtquickplugin.qrc | 4 -- .../qmldesigner/qtquickplugin/quick.metainfo | 22 ------ .../qtquickplugin/source/audio.qml | 35 --------- 7 files changed, 128 deletions(-) delete mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/AudioSection.qml delete mode 100644 src/plugins/qmldesigner/qtquickplugin/images/audio-16px.png delete mode 100644 src/plugins/qmldesigner/qtquickplugin/images/audio-24px.png delete mode 100644 src/plugins/qmldesigner/qtquickplugin/images/audio-24px@2x.png delete mode 100644 src/plugins/qmldesigner/qtquickplugin/source/audio.qml diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/AudioSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/AudioSection.qml deleted file mode 100644 index db226e755a9..00000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/AudioSection.qml +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** 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. -** -****************************************************************************/ - -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import HelperWidgets 2.0 -import StudioControls 1.0 as StudioControls -import StudioTheme 1.0 as StudioTheme - -Section { - caption: qsTr("Audio") - - anchors.left: parent.left - anchors.right: parent.right - - SectionLayout { - PropertyLabel { text: qsTr("Volume") } - - SecondColumnLayout { - SpinBox { - implicitWidth: StudioTheme.Values.twoControlColumnWidth - + StudioTheme.Values.actionIndicatorWidth - backendValue: backendValues.volume - decimals: 1 - minimumValue: 0.0 - maximumValue: 1.0 - } - - ExpandingSpacer {} - } - - PropertyLabel { text: qsTr("Muted") } - - SecondColumnLayout { - CheckBox { - implicitWidth: StudioTheme.Values.twoControlColumnWidth - + StudioTheme.Values.actionIndicatorWidth - backendValue: backendValues.muted - text: backendValues.muted.valueToString - } - - ExpandingSpacer {} - } - } -} diff --git a/src/plugins/qmldesigner/qtquickplugin/images/audio-16px.png b/src/plugins/qmldesigner/qtquickplugin/images/audio-16px.png deleted file mode 100644 index d9fd2f57bf4498e4abbbbfd4645bfa62e272bdbd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 267 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4i*LmhONKMUokK+T=H~r4AD5>I&nX@W1z@! zeL+_Zv%$%fP@7I6)bCt#Yr*nS) zy>rg?`KsB!bb}upS-y`w^V*mBmDA?@%$qsegZn7N%u0I8OQzxj}t_grVr$ zdEb~<6sfwpt(sIN>85aGnqgVk79B=MsYyFu8vbN6*?D3!JI~taBbJwss`dt4S<(GW z-l0|5kSplvSHrzg;j#rMCkUG9e3S^E`ZysXq+M9^^Qy&X;vD9*T+P2xFr)8Z?RVJ= YF%LrTFVdQ&MBb@0DvcRdjJ3c diff --git a/src/plugins/qmldesigner/qtquickplugin/images/audio-24px.png b/src/plugins/qmldesigner/qtquickplugin/images/audio-24px.png deleted file mode 100644 index 9e477c806db00f9ddc7552df5db78f6d551c6887..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 521 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4mJh`h6m-gKNuJoFL=5*hIn*dy=I*)8Ysg0 z;Qc)guNnuIgKBOY1%!@>BXX~w>>MYv9Qm!UP#RNriL~6D+nJM15 zv0{Nxi-{7)v1~(iA-$PT+OoOKd7huK%f2@2c-(KF#aFW;PiL&tw3b@Un4TtFJEObf z{@j?$AB9t%2`u}_>z-xscjnE_S&e6G+OJFKtemH6@c2i^@|ibpPjpDjJ9kFYXHmJO zj@h(AmhVQJH?DC=<9n>@x6WaY!1al#bt2*mCeD1lVI^-3*Yyqi+TKLC*qk|IcjtKe zoN&>z(mW5f%S=Bq73Us5V)UdtS)#o_DqQ)I`noAw-&))`a*eO!)gw{4=|7*Ixznru zBcMn*R&s4cqRjq~siihbQ5BI2&9T;&O8Zv)as2x3VX)-(zpukC-n$VM%boI!?~V5I z_or^eAG^7Z#VdNp(odIdbP0l+XkKxDV|Q diff --git a/src/plugins/qmldesigner/qtquickplugin/images/audio-24px@2x.png b/src/plugins/qmldesigner/qtquickplugin/images/audio-24px@2x.png deleted file mode 100644 index 41948718fd106fedca16814c3235746ecd293604..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1026 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_%L9BuTp1V`{{R2KVieFf z1o~zc|6yQYs3{5Z3ua(oWMXDvW9Q=K;};MV5*87YkdakTR?*PZ($P0CF|)L?v9ot{ zcJuJ|^$Q3NNk~jiOV7wFC@QP0u4!m&YH9E2>gk;@anj@|Q)kSbw|MD_HETC*-o9h! zu08t>96ojC{N*b*Zr;B0;Nhbu&tJTJ{pQ`L&tJZN`~KtC?>~S4O?+#$oq>UIpQnps zh{y4#*KP)14iGv1aem-ME-sBN57>en*DUH#;NU7{6c=+{yXac4YtF&F0vY@3_wbv{ z%-lA6-=oS?KIhVl{EOaOUTm~-{>|9pa{bi$xTE~pSK40w_<45y0Y{!{O7AK)*MZgASH|Mx;jtHOe62Aj{%=AUvl zxS+!@J?pdn{{#F+-JfMAN!c;gY*1OfcCQrw0sdXuANB@cnkm~*_tG@c@a?qSvkJtv zY6$YOF;pn6+{<*MS1rMo{f4h+6?4H=mXarvi)~p9l38|f1Z-I%a=_a7f_Q`9$zRMO zNe%4`*HvoSybKR;9N4hL#(~Fxt6(#q0kc6s?4|b-3A_(Vw!T=OHi7X*NnG|h4xwy@ z{<-|+_gSRwF-^I<_F_KMb;gQUIr}aJ?(JX`W;p%sTik?_HJSQ-_chrYHk*kAzhm^e zUe=T3a8Ximages/text-edit-icon16.png images/text-input-icon16.png images/webview-icon16.png - source/audio.qml source/listview.qml source/listviewv2.qml source/gridview.qml @@ -84,9 +83,6 @@ images/loader-icon.png images/loader-icon@2x.png images/loader-icon16.png - images/audio-16px.png - images/audio-24px.png - images/audio-24px@2x.png images/audio-output-16px.png images/audio-output-24px.png images/audio-output-24px@2x.png diff --git a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo index ef81ae181bf..d21d8420b4b 100644 --- a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo +++ b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo @@ -522,28 +522,6 @@ MetaInfo { } } - Type { - name: "QtMultimedia.MediaPlayer" - icon: ":/qtquickplugin/images/audio-16px.png" - - Hints { - visibleInNavigator: true - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Audio" - category: "f.Qt Quick - Multimedia" - libraryIcon: ":/qtquickplugin/images/audio-24px.png" - version: "6.0" - requiredImport: "QtMultimedia" - - QmlSource { source: ":/qtquickplugin/source/audio.qml" } - } - } - Type { name: "QtMultimedia.AudioOutput" icon: ":/qtquickplugin/images/audio-output-16px.png" diff --git a/src/plugins/qmldesigner/qtquickplugin/source/audio.qml b/src/plugins/qmldesigner/qtquickplugin/source/audio.qml deleted file mode 100644 index b3d1347e85e..00000000000 --- a/src/plugins/qmldesigner/qtquickplugin/source/audio.qml +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** 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. -** -****************************************************************************/ - -import QtQuick 2.0 -import QtMultimedia 6.0 - -MediaPlayer { - audioOutput: output - - AudioOutput { - id: output - } -} From 4a5603b15c1470a23e739c713e8df61b9388f6f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaj=20Gr=C3=B6nholm?= Date: Wed, 1 Dec 2021 08:39:48 +0200 Subject: [PATCH 10/77] Adjust to model bounds calculation API change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Model bounds API changed with 25b757b7b0a286a392b3 so switch to new API with version checks. Task-number: QDS-5657 Change-Id: I6d880f179fc277f94ea9ac610ae682e9afbefe39 Reviewed-by: Antti Määttä Reviewed-by: Andy Nichols Reviewed-by: Qt CI Bot Reviewed-by: Miikka Heikkinen --- .../qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp | 4 ++++ .../qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp index 67d134f6b32..8c632625140 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp @@ -215,7 +215,11 @@ QVector4D GeneralHelper::focusNodesToCamera(QQuick3DCamera *camera, float defaul bounds = geometry->bounds(); } else { auto bufferManager = context->bufferManager(); +#if QT_VERSION < QT_VERSION_CHECK(6, 3, 0) bounds = renderModel->getModelBounds(bufferManager); +#else + bounds = bufferManager->getModelBounds(renderModel); +#endif } center = renderModel->globalTransform.map(bounds.center()); diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp index 9e2bd181dbd..4a67141f246 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp @@ -306,7 +306,11 @@ void SelectionBoxGeometry::getBounds( #endif if (!context.isNull()) { auto bufferManager = context->bufferManager(); +#if QT_VERSION < QT_VERSION_CHECK(6, 3, 0) QSSGBounds3 bounds = renderModel->getModelBounds(bufferManager); +#else + QSSGBounds3 bounds = bufferManager->getModelBounds(renderModel); +#endif QVector3D center = bounds.center(); QVector3D extents = bounds.extents(); QVector3D localMin = center - extents; From 47367a13bad3e2e3b64892c31d4abff63ef985f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Thu, 2 Dec 2021 17:30:51 +0100 Subject: [PATCH 11/77] Android: Use native separators in installation step ui Change-Id: I724f91d8387cfd3138faa847d06674707d4d0f10 Reviewed-by: Alessandro Portale Reviewed-by: Reviewed-by: hjk --- src/plugins/android/androidpackageinstallationstep.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/android/androidpackageinstallationstep.cpp b/src/plugins/android/androidpackageinstallationstep.cpp index ba7f0700aba..5fe710b6b7b 100644 --- a/src/plugins/android/androidpackageinstallationstep.cpp +++ b/src/plugins/android/androidpackageinstallationstep.cpp @@ -84,7 +84,8 @@ AndroidPackageInstallationStep::AndroidPackageInstallationStep(BuildStepList *bs setWidgetExpandedByDefault(false); setImmutable(true); setSummaryUpdater([this] { - return tr("Make install: Copy App Files to %1").arg(nativeAndroidBuildPath()); + return tr("Make install: Copy App Files to %1") + .arg(QDir::toNativeSeparators(nativeAndroidBuildPath())); }); setUseEnglishOutput(); } From be059ac11a7e028c40fe94efee65e620b3ae0867 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 2 Dec 2021 17:08:08 +0100 Subject: [PATCH 12/77] Doc: Fix info about qtc_runnable for CMake and qmake Combine the sections and fix misleading information. Task-number: QTCREATORBUG-26616 Change-Id: I6349d7f6d6765b8f76d391a48c232bf68ed124f6 Reviewed-by: Eike Ziller --- .../creator-projects-settings-run.qdoc | 43 +++++++++++++------ 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc index 4235705623b..3ad33409075 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc @@ -66,32 +66,49 @@ parsed .pro files. For more information on how the commands are constructed, see \l{Starting External Processes}. - \QC automatically adds run configurations for all targets specified in the - CMake project file, \c {CMakeLists.txt}. - - \QC automatically adds run configurations for all targets declared with - \c {executable()} function in Meson build descriptions. - \section1 Selecting Default Run Target - \QC has multiple executables, but when you run a project you typically want - to run \c qtcreator and not the first executable in the list. To filter the - run target list, set \c qtc_runnable as the value of the \c FOLDER property + If a project has multiple executables, you need to tell \QC which one it + should run. + + \section2 CMake Run Targets + + When using CMake, you can filter the run target list by setting + \c qtc_runnable as the value of the \c FOLDER property in the \c {CMakeLists.txt} file for the project. For example: \badcode set_target_properties(main_executable PROPERTIES FOLDER "qtc_runnable") \endcode - \section1 Creating Run Configurations for Subprojects + If you do not specify \c qtc_runnable for any project, \QC automatically + adds run configurations for all targets specified in \c {CMakeLists.txt}. - To prevent \QC from automatically creating run configurations for SUBDIRS - projects, specify the following variable in the .pro file of the SUBDIRS - project: \c {CONFIG += qtc_runnable}. + \section2 qmake Run Targets + When using qmake, you can prevent \QC from automatically creating run + configurations for subprojects by specifying the \c qtc_runnable + variable in the .pro files of the application projects (\c TEMPLATE=app) + that you want to run. For example + + \badcode + CONFIG += qtc_runnable + \endcode + + If none of your application projects specifies \c qtc_runnable, \QC creates + run configurations for all application projects. + + If any of your application projects specifies \c qtc_runnable, \QC creates run configurations only for subprojects that also have \c {CONFIG += qtc_runnable} set in their .pro files. + For more information about qmake project templates, see \l {TEMPLATE}. + + \section2 Meson Run Targets + + \QC automatically adds run configurations for all targets declared with + \c {executable()} function in Meson build descriptions. + \include creator-projects-settings-run-desktop.qdocinc run settings desktop \include creator-projects-settings-run-analyze.qdocinc settings valgrind \include creator-projects-settings-run-debug.qdocinc run settings debugger From 0a8ab22f4129836641a3e063da239e30dc5eec7c Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Wed, 1 Dec 2021 18:43:02 +0200 Subject: [PATCH 13/77] QmlDesigner: Fix states context menu not working in certain areas Fixed 2 issues with the context menu: - Left clicking the area to the right of the states doesn't close the context menu. The issues seems to be a bug in the ListView, solved by limiting the width of the ListView to the states area width. - Clicking (left or right) below the states area doesn't work. This is because the height of the states view was fixed to the height needed. Solved by not restricting the view height and do necessary changes. Also some cleanups and removing unnecessary stuff. Fixes: QDS-5324 Change-Id: Ic1e3f5d0776bb4770a3276c93ad1aee7a0049388 Reviewed-by: Samuel Ghinet Reviewed-by: Reviewed-by: Miikka Heikkinen Reviewed-by: Qt CI Bot Reviewed-by: Thomas Hartmann --- .../statesEditorQmlSources/StatesList.qml | 91 ++++++------------- .../stateseditor/stateseditorwidget.cpp | 7 +- 2 files changed, 28 insertions(+), 70 deletions(-) diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml index 9defca106fe..5bb834011f3 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml @@ -38,11 +38,7 @@ FocusScope { property int delegateColumnSpacing: 2 property int delegateStateMargin: 16 property int delegatePreviewMargin: 16 - - height: (root.expanded ? (root.delegateTopAreaHeight + root.delegateBottomAreaHeight + root.delegateColumnSpacing) - : root.delegateTopAreaHeight) - + StudioTheme.Values.scrollBarThickness - + 2 * (root.delegateStateMargin + StudioTheme.Values.border + root.padding) + property int effectiveHeight: root.expanded ? 287 : 85 // height of the states area signal createNewState signal deleteState(int internalNodeId) @@ -52,7 +48,7 @@ FocusScope { property int padding: 2 property int delegateWidth: root.stateImageSize + 2 * (root.delegateStateMargin + root.delegatePreviewMargin) - property int delegateHeight: root.height + property int delegateHeight: effectiveHeight - StudioTheme.Values.scrollBarThickness - 2 * (root.padding + StudioTheme.Values.border) property int innerSpacing: 2 @@ -65,10 +61,6 @@ FocusScope { function onChangedToState(n) { root.currentStateInternalId = n } } - SystemPalette { - id: palette - } - Rectangle { id: background anchors.fill: parent @@ -93,70 +85,51 @@ FocusScope { StudioControls.MenuItem { text: root.expanded ? qsTr("Collapse") : qsTr("Expand") - onTriggered: { - root.expanded = !root.expanded - } + onTriggered: root.expanded = !root.expanded } } } - function closeContextMenu() { - if (contextMenu.open) - contextMenu.dismiss() - } - - Item { - id: addStateItem - - property int buttonLeftSpacing: 8 * (root.expanded ? 1 : 2) + AbstractButton { + id: addStateButton + buttonIcon: root.expanded ? qsTr("Create New State") : StudioTheme.Constants.plus + iconFont: root.expanded ? StudioTheme.Constants.font : StudioTheme.Constants.iconFont + iconSize: root.expanded ? StudioTheme.Values.myFontSize : StudioTheme.Values.myIconFontSize + iconItalic: root.expanded + tooltip: qsTr("Add a new state.") + visible: canAddNewStates anchors.right: parent.right - width: root.delegateHeight / 2 + buttonLeftSpacing - height: root.delegateHeight + anchors.rightMargin: 8 + y: (Math.min(effectiveHeight, root.height) - height) / 2 + width: Math.max(root.delegateHeight / 2 - 8, 18) + height: root.expanded ? 60 : width - AbstractButton { - id: addStateButton - - buttonIcon: root.expanded ? qsTr("Create New State") : StudioTheme.Constants.plus - iconFont: root.expanded ? StudioTheme.Constants.font : StudioTheme.Constants.iconFont - iconSize: root.expanded ? StudioTheme.Values.myFontSize : StudioTheme.Values.myIconFontSize - iconItalic: root.expanded ? true : false - tooltip: qsTr("Add a new state.") - visible: canAddNewStates - anchors.right: parent.right - anchors.rightMargin: 8 - anchors.verticalCenter: parent.verticalCenter - width: Math.max(parent.height / 2 - 8, 18) - height: root.expanded ? 80 : width - - onClicked: { - root.closeContextMenu() - root.createNewState() - } + onClicked: { + contextMenu.dismiss() + root.createNewState() } } - Rectangle { + Rectangle { // separator lines between state items color: StudioTheme.Values.themeStateSeparator x: root.padding y: root.padding - width: Math.min((root.delegateWidth * flickable.count) + (2 * (flickable.count - 1)), - flickable.width) + width: statesListView.width height: root.delegateHeight } ListView { - id: flickable + id: statesListView boundsBehavior: Flickable.StopAtBounds clip: true - anchors.left: parent.left - anchors.right: addStateItem.left - height: root.delegateHeight + StudioTheme.Values.scrollBarThickness + x: root.padding y: root.padding - anchors.leftMargin: root.padding - anchors.rightMargin: root.padding + width: Math.min(root.delegateWidth * statesListView.count + root.innerSpacing * (statesListView.count - 1), + root.width - addStateButton.width - root.padding - 16) // 16 = 2 * 8 (addStateButton margin) + height: root.delegateHeight + StudioTheme.Values.scrollBarThickness model: statesEditorModel orientation: ListView.Horizontal @@ -174,7 +147,7 @@ FocusScope { delegateStateImageSize: stateImageSize delegateHasWhenCondition: hasWhenCondition delegateWhenConditionString: whenConditionString - onDelegateInteraction: root.closeContextMenu() + onDelegateInteraction: contextMenu.dismiss() columnSpacing: root.delegateColumnSpacing topAreaHeight: root.delegateTopAreaHeight @@ -183,16 +156,6 @@ FocusScope { previewMargin: root.delegatePreviewMargin } - property bool bothVisible: horizontal.scrollBarVisible && vertical.scrollBarVisible - - ScrollBar.horizontal: HorizontalScrollBar { - id: horizontal - parent: flickable - } - - ScrollBar.vertical: VerticalScrollBar { - id: vertical - parent: flickable - } + ScrollBar.horizontal: HorizontalScrollBar {} } } diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp index d94f21bd352..4701a4079eb 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp @@ -168,12 +168,9 @@ void StatesEditorWidget::reloadQmlSource() connect(rootObject(), SIGNAL(createNewState()), m_statesEditorView.data(), SLOT(createNewState())); connect(rootObject(), SIGNAL(deleteState(int)), m_statesEditorView.data(), SLOT(removeState(int))); m_statesEditorView.data()->synchonizeCurrentStateFromWidget(); - setFixedHeight(initialSize().height()); - if (!DesignerSettings::getValue(DesignerSettingsKey::STATESEDITOR_EXPANDED).toBool()) { + if (!DesignerSettings::getValue(DesignerSettingsKey::STATESEDITOR_EXPANDED).toBool()) toggleStatesViewExpanded(); - setFixedHeight(rootObject()->height()); - } connect(rootObject(), SIGNAL(expandedChanged()), this, SLOT(handleExpandedChanged())); } @@ -184,7 +181,5 @@ void StatesEditorWidget::handleExpandedChanged() bool expanded = rootObject()->property("expanded").toBool(); DesignerSettings::setValue(DesignerSettingsKey::STATESEDITOR_EXPANDED, expanded); - - setFixedHeight(rootObject()->height()); } } From ccc5223d94b76bcd7c70b27797d4eff73430993a Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 3 Dec 2021 11:42:13 +0100 Subject: [PATCH 14/77] Doc: Describe adding other projects to CMake projects Mostly, this is explained in CMake documentation. There is currently no special support for this in Qt Creator. Task-number: QTCREATORBUG-26616 Change-Id: I7981324e04be6fc716256754db9f2089eaffee73 Reviewed-by: Eike Ziller --- .../creator-only/creator-projects-creating.qdoc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc index 76a67382562..43d5ab1c944 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc @@ -467,9 +467,20 @@ The procedure of adding a library to a project depends on the build system that you use. - When you create a new project, you can add it to another project as a - subproject in the \uicontrol{Project Management} dialog. However, the root project - must specify that qmake uses the \c subdirs template to build the project. + \section2 CMake Projects + + You can add CMakeLists.txt files to any project by using the + \l{https://cmake.org/cmake/help/latest/command/add_subdirectory.html} + {add_subdirectory} command. The files can define complete projects that + are included into the top-level project or any other CMake commands. + + \section2 qmake Projects + + When you create a new project and select qmake as the build system, + you can add it to another project as a subproject in the + \uicontrol{Project Management} dialog. However, the root project + must specify that qmake uses the \c subdirs \l{TEMPLATE}{template} to + build the project. To create a root project, select \uicontrol File > \uicontrol {New File or Project} > \uicontrol {Other Project} > From 41fe7eec6566992adf06df103564a50311b765fe Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Fri, 3 Dec 2021 13:09:46 +0200 Subject: [PATCH 15/77] LanguageClient: fix textDocument/didChange Fixes: QTCREATORBUG-26651 Change-Id: I640558bc321112f8dd568a4cefc306eb209af7b0 Reviewed-by: David Schulz Reviewed-by: Qt CI Bot --- src/plugins/languageclient/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp index b452341d0d3..202ea7363cd 100644 --- a/src/plugins/languageclient/client.cpp +++ b/src/plugins/languageclient/client.cpp @@ -707,7 +707,7 @@ void Client::documentContentsChanged(TextEditor::TextDocument *document, const QString method(DidChangeTextDocumentNotification::methodName); TextDocumentSyncKind syncKind = m_serverCapabilities.textDocumentSyncKindHelper(); if (Utils::optional registered = m_dynamicCapabilities.isRegistered(method)) { - syncKind = registered.value() ? TextDocumentSyncKind::None : TextDocumentSyncKind::Full; + syncKind = registered.value() ? TextDocumentSyncKind::Full : TextDocumentSyncKind::None; if (syncKind != TextDocumentSyncKind::None) { const TextDocumentChangeRegistrationOptions option( m_dynamicCapabilities.option(method).toObject()); From 5a6c625c5e46aef442689a2bc691679da7a562db Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Fri, 3 Dec 2021 13:52:21 +0100 Subject: [PATCH 16/77] CppEditor: Fix codemodel highlighting for QNX The code model will get the necessary bits so that it can successfully parse the QNX code. Fixes: QTCREATORBUG-23483 Change-Id: Id9488f644ace23952edf7a7cb5da7ca138182134 Reviewed-by: Christian Kandeler --- .../cppeditor/compileroptionsbuilder.cpp | 18 ++++++++++++++++-- src/plugins/cppeditor/compileroptionsbuilder.h | 2 ++ src/plugins/qnx/qnxtoolchain.cpp | 8 +++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/plugins/cppeditor/compileroptionsbuilder.cpp b/src/plugins/cppeditor/compileroptionsbuilder.cpp index e80de33f2b4..73994fd9c98 100644 --- a/src/plugins/cppeditor/compileroptionsbuilder.cpp +++ b/src/plugins/cppeditor/compileroptionsbuilder.cpp @@ -35,6 +35,8 @@ #include #include +#include + #include #include #include @@ -152,6 +154,7 @@ QStringList CompilerOptionsBuilder::build(ProjectFile::Kind fileKind, undefineClangVersionMacrosForMsvc(); undefineCppLanguageFeatureMacrosForMsvc2015(); addDefineFunctionMacrosMsvc(); + addDefineFunctionMacrosQnx(); addHeaderPathOptions(); @@ -404,8 +407,8 @@ void CompilerOptionsBuilder::addProjectMacros() static const int useMacros = qEnvironmentVariableIntValue("QTC_CLANG_USE_TOOLCHAIN_MACROS"); if (m_projectPart.toolchainType == ProjectExplorer::Constants::CUSTOM_TOOLCHAIN_TYPEID - || m_projectPart.toolchainType.name().contains("BareMetal") - || useMacros) { + || m_projectPart.toolchainType == Qnx::Constants::QNX_TOOLCHAIN_ID + || m_projectPart.toolchainType.name().contains("BareMetal") || useMacros) { addMacros(m_projectPart.toolChainMacros); } @@ -771,6 +774,17 @@ void CompilerOptionsBuilder::undefineClangVersionMacrosForMsvc() } } +void CompilerOptionsBuilder::addDefineFunctionMacrosQnx() +{ + // QNX 7.0+ uses GCC with LIBCPP from Clang, and in that context GCC is giving + // the builtin operator new and delete. + // + // In our case we have only Clang and need to instruct LIBCPP that it doesn't + // have these operators. This makes the code model happy and doesn't produce errors. + if (m_projectPart.toolchainType == Qnx::Constants::QNX_TOOLCHAIN_ID) + addMacros({{"_LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE"}}); +} + void CompilerOptionsBuilder::reset() { m_options.clear(); diff --git a/src/plugins/cppeditor/compileroptionsbuilder.h b/src/plugins/cppeditor/compileroptionsbuilder.h index cc75e984bed..6ae97323354 100644 --- a/src/plugins/cppeditor/compileroptionsbuilder.h +++ b/src/plugins/cppeditor/compileroptionsbuilder.h @@ -84,6 +84,8 @@ public: void addProjectConfigFileInclude(); void undefineClangVersionMacrosForMsvc(); + void addDefineFunctionMacrosQnx(); + // Add custom options void add(const QString &arg, bool gccOnlyOption = false); void prepend(const QString &arg); diff --git a/src/plugins/qnx/qnxtoolchain.cpp b/src/plugins/qnx/qnxtoolchain.cpp index 984d593b4e0..354de0bb93f 100644 --- a/src/plugins/qnx/qnxtoolchain.cpp +++ b/src/plugins/qnx/qnxtoolchain.cpp @@ -185,7 +185,13 @@ void QnxToolChain::setCpuDir(const QString &cpuDir) GccToolChain::DetectedAbisResult QnxToolChain::detectSupportedAbis() const { - return detectTargetAbis(m_sdpPath); + // "unknown-qnx-gnu"is needed to get the "--target=xxx" parameter sent code model, + // which gets translated as "x86_64-qnx-gnu", which gets Clang to happily parse + // the QNX code. + // + // Without it on Windows Clang defaults to a MSVC mode, which breaks with + // the QNX code, which is mostly GNU based. + return GccToolChain::DetectedAbisResult{detectTargetAbis(m_sdpPath), "unknown-qnx-gnu"}; } bool QnxToolChain::operator ==(const ToolChain &other) const From 3f83fb91d620479b7465a4bd66ced1f8f5a5c5fe Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Thu, 2 Dec 2021 16:33:07 +0200 Subject: [PATCH 17/77] QmlDesigner: Animate item library controls' hovering Added animation behavior for hovering. Also added top padding to the search field so that the text is correctly aligned vertically. Change-Id: I51273373aa43ceb3a3faca6a9f76b613fdd0be69 Reviewed-by: Miikka Heikkinen Reviewed-by: Qt CI Bot Reviewed-by: Thomas Hartmann --- .../itemLibraryQmlSources/ItemDelegate.qml | 6 ++++++ .../itemLibraryQmlSources/LibraryHeader.qml | 17 ++++++++++++++++- .../imports/StudioTheme/Values.qml | 4 ++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml index 1a2775e8f1b..c2bf8fb4b8d 100644 --- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml +++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml @@ -42,6 +42,12 @@ Item { anchors.fill: parent color: mouseRegion.containsMouse ? StudioTheme.Values.themeControlBackgroundHover : StudioTheme.Values.themePanelBackground + Behavior on color { + ColorAnimation { + duration: StudioTheme.Values.hoverDuration + easing.type: StudioTheme.Values.hoverEasing + } + } Image { id: itemIcon // to be set by model diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml index 36c823ec631..c68891f3318 100644 --- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml +++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml @@ -96,6 +96,14 @@ Item { color: mouseArea.containsMouse && enabled ? StudioTheme.Values.themeControlBackgroundHover : StudioTheme.Values.themeControlBackground + + Behavior on color { + ColorAnimation { + duration: StudioTheme.Values.hoverDuration + easing.type: StudioTheme.Values.hoverEasing + } + } + enabled: index !== 0 || !rootView.subCompEditMode Label { // + sign @@ -150,13 +158,20 @@ Item { color: StudioTheme.Values.themeControlBackground border.color: StudioTheme.Values.themeControlOutline border.width: StudioTheme.Values.border + + Behavior on color { + ColorAnimation { + duration: StudioTheme.Values.hoverDuration + easing.type: StudioTheme.Values.hoverEasing + } + } } height: StudioTheme.Values.defaultControlHeight leftPadding: 32 rightPadding: 30 - + topPadding: 6 anchors.left: parent.left anchors.right: parent.right anchors.leftMargin: 5 diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml index 031921c8ba0..031e8d8946f 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml @@ -91,6 +91,10 @@ QtObject { property real toolTipHeight: 25 property int toolTipDelay: 1000 + // Controls hover animation params + property int hoverDuration: 500 + property int hoverEasing: Easing.OutExpo + // Layout sizes property real sectionColumnSpacing: 20 // distance between label and sliderControlSize property real sectionRowSpacing: 5 From d8ccadb3c40487f493a5d34ca78bd81d06a6a98d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20=C5=9Aliwa?= Date: Fri, 3 Dec 2021 16:14:29 +0100 Subject: [PATCH 18/77] mcusupport: ASM_MASM language added to project in CMakeLists template After modification of how fontcompiler is linking font binaries into executale CMake project needs to have Microsoft Assembler language option added (ASM_MASM). Fixes: UL-5059 Change-Id: I593ca6230e8fbaf70a4061a12b6606843ab9bd46 Reviewed-by: Alessandro Portale --- src/plugins/mcusupport/wizards/application/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/mcusupport/wizards/application/CMakeLists.txt b/src/plugins/mcusupport/wizards/application/CMakeLists.txt index 71c4e023432..74c1c8357ba 100644 --- a/src/plugins/mcusupport/wizards/application/CMakeLists.txt +++ b/src/plugins/mcusupport/wizards/application/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.15) -project(%{ProjectName} VERSION 0.0.1 LANGUAGES C CXX ASM) +project(%{ProjectName} VERSION 0.0.1 LANGUAGES C CXX ASM ASM_MASM) find_package(Qul) From 295effd735970137abdfc7f005d5a5cba0a7abc8 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 3 Dec 2021 10:58:40 +0100 Subject: [PATCH 19/77] ProjectExplorer: raise the timeout for the msvc detection Calling the msvc vars bat can take a considerable amount of time on a loaded system. Since we cache the environment modifications from previous runs it's okay to raise the bar here. Change-Id: Icda91d6682396e6f73946ccd379b88631590536c Reviewed-by: Eike Ziller Reviewed-by: Reviewed-by: Alessandro Portale --- src/plugins/projectexplorer/msvctoolchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp index 56b7431073c..ec0bfdcfdcc 100644 --- a/src/plugins/projectexplorer/msvctoolchain.cpp +++ b/src/plugins/projectexplorer/msvctoolchain.cpp @@ -2116,7 +2116,7 @@ Utils::optional MsvcToolChain::generateEnvironmentSettings(const Utils: Utils::Environment runEnv = env; runEnv.unset(QLatin1String("ORIGINALPATH")); run.setEnvironment(runEnv); - run.setTimeoutS(30); + run.setTimeoutS(60); Utils::FilePath cmdPath = Utils::FilePath::fromUserInput( QString::fromLocal8Bit(qgetenv("COMSPEC"))); if (cmdPath.isEmpty()) From 02d6dfdfec09ca3c5e39df0e01c20896f6a50431 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 3 Dec 2021 12:52:20 +0100 Subject: [PATCH 20/77] TextEditor: fix delete(Start/End)OfWord without camelcase Fixes: QTCREATORBUG-26646 Change-Id: I0f9a4ad56ef96632fbf5de490f089bf7ff3b12ee Reviewed-by: Christian Stenger --- src/plugins/texteditor/texteditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index c1a272a2728..19c59388620 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -2400,7 +2400,7 @@ void TextEditorWidget::keyPressEvent(QKeyEvent *e) if (camelCaseNavigationEnabled()) CamelCaseCursor::left(&cursor, this, QTextCursor::KeepAnchor); else - d->moveCursor(QTextCursor::PreviousWord, QTextCursor::KeepAnchor); + cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor); } cursor.removeSelectedText(); setMultiTextCursor(cursor); @@ -2411,7 +2411,7 @@ void TextEditorWidget::keyPressEvent(QKeyEvent *e) if (camelCaseNavigationEnabled()) CamelCaseCursor::right(&cursor, this, QTextCursor::KeepAnchor); else - d->moveCursor(QTextCursor::NextWord, QTextCursor::KeepAnchor); + cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor); } cursor.removeSelectedText(); setMultiTextCursor(cursor); From 4a37833803f0c8a702017a641dcfd36812fa81c1 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 3 Dec 2021 17:08:04 +0100 Subject: [PATCH 21/77] Doc: Improve FAQ answer about QML imports Even though CMake was mentioned, the text could be made more general. Task-number: QTCREATORBUG-26616 Change-Id: I6ff59e96559579c773d8ae1313f96800597e0ccc Reviewed-by: Thomas Hartmann --- .../src/howto/creator-only/qtcreator-faq.qdoc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc b/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc index 0493b0dc278..26fcb631b6b 100644 --- a/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc +++ b/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -83,14 +83,15 @@ By default, \QC looks in the QML import path of Qt for QML modules. Sometimes, it does not get it right and you need to tell it where the - modules are by specifying the \c{QML_IMPORT_PATH} in the \c{.pro} file of - your application. + modules are. When using qmake as the build system, specify the + \c{QML_IMPORT_PATH} in the \c{.pro} file of your application. When + using CMake, add the \c set command to the CMakeLists.txt file. This also enables code completion of QML code and removes error messages. - The following example illustrates how to specify the import path so that - it works when switching between build and run kits for different target - platforms: + The following example illustrates how to specify the import path for qmake + projects so that it works when switching between build and run kits for + different target platforms: \code TEMPNAME = $${QMAKE_QMAKE} @@ -99,8 +100,8 @@ message("my QML Import Path: "$$QML_IMPORT_PATH) \endcode - For more information about how to set the import path when using CMake, see - \l {Importing QML Modules}. + For more information about how to set the import path for CMake projects, + see \l {Importing QML Modules}. \b {What should I do when \QC complains about missing OpenGL support?} From 8d08196a21184330f18343921f523966d778a739 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 3 Dec 2021 12:22:16 +0100 Subject: [PATCH 22/77] Fix crash when removing built-in snippets Snippets collection managed the snippets with persistent iterators to the "end" of the active snippets. Qt 5's QList was nicely updating iterators even on non-const operations, but that has changed in Qt 6. Don't use iterators, simply work with the count of active items. Fixes: QTCREATORBUG-26648 Task-number: QTCREATORBUG-24098 Change-Id: Icc13274daf0e87d0562d80d7bc763c863d5da075 Reviewed-by: Qt CI Bot Reviewed-by: David Schulz --- .../snippets/snippetscollection.cpp | 46 +++++++++++-------- .../texteditor/snippets/snippetscollection.h | 2 +- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/plugins/texteditor/snippets/snippetscollection.cpp b/src/plugins/texteditor/snippets/snippetscollection.cpp index d47e50fdf75..61a94bc4379 100644 --- a/src/plugins/texteditor/snippets/snippetscollection.cpp +++ b/src/plugins/texteditor/snippets/snippetscollection.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -112,7 +113,7 @@ void SnippetsCollection::insertSnippet(const Snippet &snippet, const Hint &hint) { const int group = groupIndex(snippet.groupId()); if (snippet.isBuiltIn() && snippet.isRemoved()) { - m_activeSnippetsEnd[group] = m_snippets[group].insert(m_activeSnippetsEnd[group], snippet); + m_snippets[group].append(snippet); } else { m_snippets[group].insert(hint.m_it, snippet); updateActiveSnippetsEnd(group); @@ -123,8 +124,11 @@ SnippetsCollection::Hint SnippetsCollection::computeInsertionHint(const Snippet { const int group = groupIndex(snippet.groupId()); QList &snippets = m_snippets[group]; - QList::iterator it = std::upper_bound(snippets.begin(), m_activeSnippetsEnd.at(group), - snippet, snippetComp); + QList::iterator it = std::upper_bound(snippets.begin(), + snippets.begin() + + m_activeSnippetsCount.at(group), + snippet, + snippetComp); return Hint(static_cast(std::distance(snippets.begin(), it)), it); } @@ -158,12 +162,15 @@ SnippetsCollection::Hint SnippetsCollection::computeReplacementHint(int index, { const int group = groupIndex(snippet.groupId()); QList &snippets = m_snippets[group]; - QList::iterator it = std::lower_bound(snippets.begin(), m_activeSnippetsEnd.at(group), - snippet, snippetComp); + auto activeSnippetsEnd = snippets.begin() + m_activeSnippetsCount.at(group); + QList::iterator it = std::lower_bound(snippets.begin(), + activeSnippetsEnd, + snippet, + snippetComp); int hintIndex = static_cast(std::distance(snippets.begin(), it)); if (index < hintIndex - 1) return Hint(hintIndex - 1, it); - it = std::upper_bound(it, m_activeSnippetsEnd.at(group), snippet, snippetComp); + it = std::upper_bound(it, activeSnippetsEnd, snippet, snippetComp); hintIndex = static_cast(std::distance(snippets.begin(), it)); if (index > hintIndex) return Hint(hintIndex, it); @@ -176,11 +183,10 @@ void SnippetsCollection::removeSnippet(int index, const QString &groupId) const int group = groupIndex(groupId); Snippet snippet(m_snippets.at(group).at(index)); m_snippets[group].removeAt(index); + updateActiveSnippetsEnd(group); if (snippet.isBuiltIn()) { snippet.setIsRemoved(true); - m_activeSnippetsEnd[group] = m_snippets[group].insert(m_activeSnippetsEnd[group], snippet); - } else { - updateActiveSnippetsEnd(group); + m_snippets[group].append(snippet); } } @@ -202,8 +208,7 @@ void SnippetsCollection::setSnippetContent(int index, int SnippetsCollection::totalActiveSnippets(const QString &groupId) const { const int group = groupIndex(groupId); - return std::distance::const_iterator>(m_snippets.at(group).begin(), - QList::const_iterator(m_activeSnippetsEnd.at(group))); + return m_activeSnippetsCount.at(group); } int SnippetsCollection::totalSnippets(const QString &groupId) const @@ -225,14 +230,14 @@ void SnippetsCollection::clearSnippets() void SnippetsCollection::clearSnippets(int groupIndex) { m_snippets[groupIndex].clear(); - m_activeSnippetsEnd[groupIndex] = m_snippets[groupIndex].end(); + m_activeSnippetsCount[groupIndex] = m_snippets[groupIndex].size(); } void SnippetsCollection::updateActiveSnippetsEnd(int groupIndex) { - m_activeSnippetsEnd[groupIndex] = std::find_if(m_snippets[groupIndex].begin(), - m_snippets[groupIndex].end(), - [](const Snippet &s) { return s.isRemoved(); }); + const int index = Utils::indexOf(m_snippets[groupIndex], + [](const Snippet &s) { return s.isRemoved(); }); + m_activeSnippetsCount[groupIndex] = index < 0 ? m_snippets[groupIndex].size() : index; } void SnippetsCollection::restoreRemovedSnippets(const QString &groupId) @@ -240,9 +245,10 @@ void SnippetsCollection::restoreRemovedSnippets(const QString &groupId) // The version restored contains the last modifications (if any) by the user. // Reverting the snippet can still bring it to the original version const int group = groupIndex(groupId); - QVector toRestore(std::distance(m_activeSnippetsEnd[group], m_snippets[group].end())); - std::copy(m_activeSnippetsEnd[group], m_snippets[group].end(), toRestore.begin()); - m_snippets[group].erase(m_activeSnippetsEnd[group], m_snippets[group].end()); + if (m_activeSnippetsCount[group] == m_snippets[group].size()) // no removed snippets + return; + const QVector toRestore = m_snippets[group].mid(m_activeSnippetsCount[group]); + m_snippets[group].resize(m_activeSnippetsCount[group]); for (Snippet snippet : qAsConst(toRestore)) { snippet.setIsRemoved(false); insertSnippet(snippet); @@ -425,8 +431,8 @@ void SnippetsCollection::identifyGroups() const int groupIndex = m_groupIndexById.size(); m_groupIndexById.insert(provider.groupId(), groupIndex); m_snippets.resize(groupIndex + 1); - m_activeSnippetsEnd.resize(groupIndex + 1); - m_activeSnippetsEnd[groupIndex] = m_snippets[groupIndex].end(); + m_activeSnippetsCount.resize(groupIndex + 1); + m_activeSnippetsCount[groupIndex] = m_snippets[groupIndex].size(); } reload(); diff --git a/src/plugins/texteditor/snippets/snippetscollection.h b/src/plugins/texteditor/snippets/snippetscollection.h index 98be56b452f..3c2b4984754 100644 --- a/src/plugins/texteditor/snippets/snippetscollection.h +++ b/src/plugins/texteditor/snippets/snippetscollection.h @@ -121,7 +121,7 @@ private: // active. Specifically, removed built-in snippets are kept as the last ones (for each // group there is a iterator that marks the logical end). QVector > m_snippets; - QVector::iterator> m_activeSnippetsEnd; + QVector m_activeSnippetsCount; QHash m_groupIndexById; }; From 7d948b0c5ddba598b74cba3bbfe5275d16a80e10 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 3 Dec 2021 14:15:01 +0100 Subject: [PATCH 23/77] Do not link packages against libGLX and libOpenGL Work around QTBUG-89754 Fixes: QTCREATORBUG-26652 Change-Id: I9fb7ba2127a93460184154a9eb2d4c053f8fc22d Reviewed-by: Reviewed-by: Alexandru Croitor --- scripts/build.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/build.py b/scripts/build.py index 776914175c1..e723f101b34 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -146,6 +146,10 @@ def common_cmake_arguments(args): pch_option = 'ON' if args.with_pch else 'OFF' cmake_args += ['-DBUILD_WITH_PCH=' + pch_option] + # work around QTBUG-89754 + # Qt otherwise adds dependencies on libGLX and libOpenGL + cmake_args += ['-DOpenGL_GL_PREFERENCE=LEGACY'] + return cmake_args def build_qtcreator(args, paths): From 366c6fde89bce8e4a3a69718ee7927694c1ca2f7 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 3 Dec 2021 13:43:56 +0100 Subject: [PATCH 24/77] CppEditor: Run the built-in "local uses" code even with clangd enabled The built-in code model treats the "local uses" result state as an indicator of whether to provide quickfix operations. It's unclear what kind of side effects would result from removing this condition, so we always run the built-in variant of the "local uses" code, and only refrain from actually updating the selections in the clangd case. Amends 0c53c2daef. Fixes: QTCREATORBUG-26649 Change-Id: I9e1a3e3ad08bf13bcb35efe996a61aa34302b166 Reviewed-by: David Schulz --- .../cppeditor/cppuseselectionsupdater.cpp | 21 +++++++++---------- .../cppeditor/cppuseselectionsupdater.h | 1 + 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/plugins/cppeditor/cppuseselectionsupdater.cpp b/src/plugins/cppeditor/cppuseselectionsupdater.cpp index 99e0f8befc5..b26165ca023 100644 --- a/src/plugins/cppeditor/cppuseselectionsupdater.cpp +++ b/src/plugins/cppeditor/cppuseselectionsupdater.cpp @@ -74,8 +74,7 @@ CppUseSelectionsUpdater::RunnerInfo CppUseSelectionsUpdater::update(CallType cal auto *cppEditorDocument = qobject_cast(cppEditorWidget->textDocument()); QTC_ASSERT(cppEditorDocument, return RunnerInfo::FailedToStart); - if (!CppModelManager::instance()->supportsLocalUses(cppEditorDocument)) - return RunnerInfo::AlreadyUpToDate; + m_updateSelections = CppModelManager::instance()->supportsLocalUses(cppEditorDocument); CursorInfoParams params; params.semanticInfo = cppEditorWidget->semanticInfo(); @@ -130,16 +129,16 @@ bool CppUseSelectionsUpdater::isSameIdentifierAsBefore(const QTextCursor &cursor void CppUseSelectionsUpdater::processResults(const CursorInfo &result) { - ExtraSelections localVariableSelections; - if (!result.useRanges.isEmpty() || !currentUseSelections().isEmpty()) { - ExtraSelections selections = updateUseSelections(result.useRanges); - if (result.areUseRangesForLocalVariable) - localVariableSelections = selections; + if (m_updateSelections) { + ExtraSelections localVariableSelections; + if (!result.useRanges.isEmpty() || !currentUseSelections().isEmpty()) { + ExtraSelections selections = updateUseSelections(result.useRanges); + if (result.areUseRangesForLocalVariable) + localVariableSelections = selections; + } + updateUnusedSelections(result.unusedVariablesRanges); + emit selectionsForVariableUnderCursorUpdated(localVariableSelections); } - - updateUnusedSelections(result.unusedVariablesRanges); - - emit selectionsForVariableUnderCursorUpdated(localVariableSelections); emit finished(result.localUses, true); } diff --git a/src/plugins/cppeditor/cppuseselectionsupdater.h b/src/plugins/cppeditor/cppuseselectionsupdater.h index 925b3fba2e5..83552fc259c 100644 --- a/src/plugins/cppeditor/cppuseselectionsupdater.h +++ b/src/plugins/cppeditor/cppuseselectionsupdater.h @@ -79,6 +79,7 @@ private: QScopedPointer> m_runnerWatcher; int m_runnerRevision = -1; int m_runnerWordStartPosition = -1; + bool m_updateSelections = true; }; } // namespace Internal From 5e8fd8d0f8a72f36d8c7fd93a9f2bdddb6900907 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Fri, 3 Dec 2021 16:24:55 +0100 Subject: [PATCH 25/77] GitHub Actions: Limit the number of cores to 75% for testing Hopefully this will help with the macOS host which tends to fail at running tests with: The hosted runner: GitHub Actions X lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error. Change-Id: I2ead1efd1526332cc2045fee7db4a76831f2e333 Reviewed-by: Reviewed-by: Eike Ziller --- .github/workflows/build_cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index d09b385b87e..2d83c2663d8 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -541,6 +541,7 @@ jobs: run: | include(ProcessorCount) ProcessorCount(N) + math(EXPR N "(75 * ${N}) / 100") set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON") From 1ee33048a88cb97f925485f5fc0847cbf8f0171e Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 6 Dec 2021 13:32:14 +0100 Subject: [PATCH 26/77] QmlDesigner: Fix crash Task-number: QDS-5535 Change-Id: I7e568efb39637faf8cd17255440e06d98b768f1e Reviewed-by: Tim Jenssen --- .../components/itemlibrary/itemlibrarywidget.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp index c8720385c07..2bb563ded3a 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp @@ -656,10 +656,12 @@ void ItemLibraryWidget::addResources(const QStringList &files) QStringList fileNames = categoryFileNames.values(category); AddResourceOperation operation = categoryToOperation.value(category); QmlDesignerPlugin::emitUsageStatistics(Constants::EVENT_RESOURCE_IMPORTED + category); - AddFilesResult result = operation(fileNames, document->fileName().parentDir().toString()); - if (result == AddFilesResult::Failed) { - Core::AsynchronousMessageBox::warning(tr("Failed to Add Files"), - tr("Could not add %1 to project.").arg(fileNames.join(' '))); + if (operation) { + AddFilesResult result = operation(fileNames, document->fileName().parentDir().toString()); + if (result == AddFilesResult::Failed) { + Core::AsynchronousMessageBox::warning(tr("Failed to Add Files"), + tr("Could not add %1 to project.").arg(fileNames.join(' '))); + } } } } From db1c6f5b081ee886f06c6277f93c7b3e465e309e Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 6 Dec 2021 12:57:33 +0100 Subject: [PATCH 27/77] TextEditor: Fix compile with Qt 5 Amends 8d08196a2118433. Change-Id: I8f67ee0549c621d168bacb57cd4ce0ad226cf852 Reviewed-by: Eike Ziller Reviewed-by: Qt CI Bot Reviewed-by: Christian Stenger --- .../texteditor/snippets/snippetscollection.cpp | 17 +++++++++-------- .../texteditor/snippets/snippetscollection.h | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/plugins/texteditor/snippets/snippetscollection.cpp b/src/plugins/texteditor/snippets/snippetscollection.cpp index 61a94bc4379..e678a93ef25 100644 --- a/src/plugins/texteditor/snippets/snippetscollection.cpp +++ b/src/plugins/texteditor/snippets/snippetscollection.cpp @@ -78,7 +78,7 @@ const QLatin1String kModified("modified"); SnippetsCollection::Hint::Hint(int index) : m_index(index) {} -SnippetsCollection::Hint::Hint(int index, QList::iterator it) : m_index(index), m_it(it) +SnippetsCollection::Hint::Hint(int index, QVector::iterator it) : m_index(index), m_it(it) {} int SnippetsCollection::Hint::index() const @@ -123,8 +123,8 @@ void SnippetsCollection::insertSnippet(const Snippet &snippet, const Hint &hint) SnippetsCollection::Hint SnippetsCollection::computeInsertionHint(const Snippet &snippet) { const int group = groupIndex(snippet.groupId()); - QList &snippets = m_snippets[group]; - QList::iterator it = std::upper_bound(snippets.begin(), + QVector &snippets = m_snippets[group]; + QVector::iterator it = std::upper_bound(snippets.begin(), snippets.begin() + m_activeSnippetsCount.at(group), snippet, @@ -161,12 +161,12 @@ SnippetsCollection::Hint SnippetsCollection::computeReplacementHint(int index, const Snippet &snippet) { const int group = groupIndex(snippet.groupId()); - QList &snippets = m_snippets[group]; + QVector &snippets = m_snippets[group]; auto activeSnippetsEnd = snippets.begin() + m_activeSnippetsCount.at(group); - QList::iterator it = std::lower_bound(snippets.begin(), - activeSnippetsEnd, - snippet, - snippetComp); + QVector::iterator it = std::lower_bound(snippets.begin(), + activeSnippetsEnd, + snippet, + snippetComp); int hintIndex = static_cast(std::distance(snippets.begin(), it)); if (index < hintIndex - 1) return Hint(hintIndex - 1, it); @@ -249,6 +249,7 @@ void SnippetsCollection::restoreRemovedSnippets(const QString &groupId) return; const QVector toRestore = m_snippets[group].mid(m_activeSnippetsCount[group]); m_snippets[group].resize(m_activeSnippetsCount[group]); + for (Snippet snippet : qAsConst(toRestore)) { snippet.setIsRemoved(false); insertSnippet(snippet); diff --git a/src/plugins/texteditor/snippets/snippetscollection.h b/src/plugins/texteditor/snippets/snippetscollection.h index 3c2b4984754..3a0ad474c17 100644 --- a/src/plugins/texteditor/snippets/snippetscollection.h +++ b/src/plugins/texteditor/snippets/snippetscollection.h @@ -61,9 +61,9 @@ public: int index() const; private: explicit Hint(int index); - Hint(int index, QList::iterator it); + Hint(int index, QVector::iterator it); int m_index; - QList::iterator m_it; + QVector::iterator m_it; }; void insertSnippet(const Snippet &snippet); @@ -120,7 +120,7 @@ private: // Snippets for each group are kept in a list. However, not all of them are necessarily // active. Specifically, removed built-in snippets are kept as the last ones (for each // group there is a iterator that marks the logical end). - QVector > m_snippets; + QVector > m_snippets; QVector m_activeSnippetsCount; QHash m_groupIndexById; From 02f93f68d64ea72e6cfd57ed2b14b344d26b05b0 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 6 Dec 2021 14:50:06 +0100 Subject: [PATCH 28/77] QbsProjectManager: Consider "c++23" for cpp.cxxLanguageVersion Fixes: QTCREATORBUG-26663 Change-Id: Ie22ce49cb724c434121c3d4b62b4580139a4706b Reviewed-by: Christian Stenger --- src/plugins/qbsprojectmanager/qbsproject.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index b1402e70f2f..25e49a5d908 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -794,7 +794,9 @@ static void getExpandedCompilerFlags(QStringList &cFlags, QStringList &cxxFlags, cFlags = cxxFlags = commonFlags; const auto cxxLanguageVersion = arrayToStringList(getCppProp("cxxLanguageVersion")); - if (cxxLanguageVersion.contains("c++20")) + if (cxxLanguageVersion.contains("c++23")) + cxxFlags << "-std=c++2b"; + else if (cxxLanguageVersion.contains("c++20")) cxxFlags << "-std=c++20"; else if (cxxLanguageVersion.contains("c++17")) cxxFlags << "-std=c++17"; @@ -850,9 +852,12 @@ static void getExpandedCompilerFlags(QStringList &cFlags, QStringList &cxxFlags, cxxFlags << "/TP"; if (!enableRtti.isUndefined()) cxxFlags << QLatin1String(enableRtti.toBool() ? "/GR" : "/GR-"); - if (getCppProp("cxxLanguageVersion").toArray().contains("c++20")) + const QJsonArray cxxLanguageVersion = getCppProp("cxxLanguageVersion").toArray(); + if (cxxLanguageVersion.contains("c++23")) + cxxFlags << "/std:c++latest"; + else if (cxxLanguageVersion.contains("c++20")) cxxFlags << "/std:c++20"; - else if (getCppProp("cxxLanguageVersion").toArray().contains("c++17")) + else if (cxxLanguageVersion.contains("c++17")) cxxFlags << "/std:c++17"; } } From 9b4e68dd842618ab96f8a63f75ee65f5756283b7 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 3 Dec 2021 17:57:21 +0100 Subject: [PATCH 29/77] Doc: Describe creating GUI apps and app bundles using CMake The default behavior is opposite from when using qmake. Task-number: QTCREATORBUG-26616 Change-Id: I9ec0f1a961e8d0cb25957dddcceec79cffbf292b Reviewed-by: Eike Ziller --- .../src/howto/creator-only/qtcreator-faq.qdoc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc b/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc index 26fcb631b6b..03f91f65fef 100644 --- a/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc +++ b/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc @@ -266,8 +266,16 @@ \b {On Windows:} Output is displayed differently for \e{console applications} and \e{GUI applications}. - The setting \c {CONFIG += console} in the .pro file specifies that the - application is built as a console application using some other runtime. + For qmake projects, the \c {CONFIG += console} setting in the .pro file + specifies that the application is built as a console application using + some other runtime. + + This is the standard behavior for CMake projects. To create a GUI + application on Windows or an application bundle on \macos, you must + specify the \c WIN32 or \c MACOSX_BUNDLE property for the + \l{https://doc.qt.io/qt-6/qt-add-executable.html}{qt_add_executable} + command in the CMakeLists.txt file. + When you run a console application, you can view the output in the console window of the calling application. If the calling application is a GUI application (for example, a release-built From eba2a0520bb322be7e9c5e5612edc44b1fe6e6a5 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 3 Dec 2021 16:30:35 +0200 Subject: [PATCH 30/77] QmlDesigner: Fix picking issues We now check also the parent chain for pickability, because a node is not pickable if one of the ancestors is not pickable, as all properties picking depends on (visibility, locked state) are implicitly inherited by descendants. Rotate gizmo rings default to regular View3D picking when the angle is so steep that the plane intersection is not reliable. With new global picking enabled handling we need to check all hits instead of just the first one. Change-Id: Ib1aa604b06f7db1041f5d4c3019cc2badf29a20f Fixes: QDS-5679 Reviewed-by: Qt CI Bot Reviewed-by: Thomas Hartmann --- .../qml2puppet/editor3d/generalhelper.cpp | 18 ++++++++++++++---- .../qml2puppet/editor3d/generalhelper.h | 6 +++--- .../qml2puppet/editor3d/mousearea3d.cpp | 12 ++++++++++-- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp index 8c632625140..4d6c87a901f 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp @@ -337,7 +337,7 @@ void GeneralHelper::unregisterGizmoTarget(QQuick3DNode *node) } } -bool GeneralHelper::isLocked(QQuick3DNode *node) +bool GeneralHelper::isLocked(QQuick3DNode *node) const { if (node) { QVariant lockValue = node->property("_edit3dLocked"); @@ -346,7 +346,7 @@ bool GeneralHelper::isLocked(QQuick3DNode *node) return false; } -bool GeneralHelper::isHidden(QQuick3DNode *node) +bool GeneralHelper::isHidden(QQuick3DNode *node) const { if (node) { QVariant hideValue = node->property("_edit3dHidden"); @@ -355,8 +355,18 @@ bool GeneralHelper::isHidden(QQuick3DNode *node) return false; } -bool GeneralHelper::isPickable(QQuick3DNode *node) { - return (node && !isLocked(node) && !isHidden(node) && node->visible()); +bool GeneralHelper::isPickable(QQuick3DNode *node) const +{ + if (!node) + return false; + + QQuick3DNode *n = node; + while (n) { + if (!n->visible() || isLocked(n) || isHidden(n)) + return false; + n = n->parentNode(); + } + return true; } void GeneralHelper::storeToolState(const QString &sceneId, const QString &tool, const QVariant &state, diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.h index 381082415bc..4751bb3d316 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.h @@ -80,9 +80,9 @@ public: Q_INVOKABLE void registerGizmoTarget(QQuick3DNode *node); Q_INVOKABLE void unregisterGizmoTarget(QQuick3DNode *node); - Q_INVOKABLE bool isLocked(QQuick3DNode *node); - Q_INVOKABLE bool isHidden(QQuick3DNode *node); - Q_INVOKABLE bool isPickable(QQuick3DNode *node); + Q_INVOKABLE bool isLocked(QQuick3DNode *node) const; + Q_INVOKABLE bool isHidden(QQuick3DNode *node) const; + Q_INVOKABLE bool isPickable(QQuick3DNode *node) const; Q_INVOKABLE void storeToolState(const QString &sceneId, const QString &tool, const QVariant &state, int delayEmit = 0); diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp index ef0dd33fba2..4182dcadf1e 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp @@ -898,8 +898,16 @@ bool MouseArea3D::eventFilter(QObject *, QEvent *event) // a problem onCircle = false; if (m_pickNode) { - QQuick3DPickResult pr = m_view3D->pick(float(mousePos.x()), float(mousePos.y())); - pickSuccess = pr.objectHit() == m_pickNode; + // We need to pick all as various other geometries can often be the first + // pick result, such as camera frustum or light geometry + const QList results = m_view3D->pickAll(float(mousePos.x()), + float(mousePos.y())); + for (const auto &pr : results) { + if (pr.objectHit() == m_pickNode) { + pickSuccess = true; + break; + } + } } } } From b6a996a8d5c9246ca41b15aaba7c527df2872513 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 6 Dec 2021 15:42:25 +0100 Subject: [PATCH 31/77] DiffEditor: Assert that we are operating on non-null documents Task-number: QTCREATORBUG-26594 Change-Id: I4331c457a6360682229dbbbfd8ac3d50b44b8ead Reviewed-by: Reviewed-by: Christian Stenger --- src/plugins/diffeditor/diffeditorplugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/diffeditor/diffeditorplugin.cpp b/src/plugins/diffeditor/diffeditorplugin.cpp index 624de7002b2..69863f91202 100644 --- a/src/plugins/diffeditor/diffeditorplugin.cpp +++ b/src/plugins/diffeditor/diffeditorplugin.cpp @@ -254,6 +254,7 @@ QList DiffOpenFilesController::reloadInputList() const const QList openedDocuments = DocumentModel::openedDocuments(); for (IDocument *doc : openedDocuments) { + QTC_ASSERT(doc, continue); auto textDocument = qobject_cast(doc); if (textDocument && textDocument->isModified()) { @@ -518,6 +519,7 @@ void DiffEditorPluginPrivate::updateDiffCurrentFileAction() void DiffEditorPluginPrivate::updateDiffOpenFilesAction() { const bool enabled = Utils::anyOf(DocumentModel::openedDocuments(), [](IDocument *doc) { + QTC_ASSERT(doc, return false); return doc->isModified() && qobject_cast(doc); }); m_diffOpenFilesAction->setEnabled(enabled); From 9c15b5b16db171890039d4d2ca6d40c5d9358cf4 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 2 Dec 2021 15:00:20 +0200 Subject: [PATCH 32/77] QmlDesigner: Update _pickTarget of Repeater3D created objects The objects Repeater3D creates are created after handleInstanceHidden is called for the repeater instance, so the _pickTarget of the created children doesn't get properly updated. Added signal handler to make sure handleInstanceHidden is called again after all objects have been created. Fixes: QDS-5643 Change-Id: I8b63614fca0be3956b6896028e3f3a0f49bfe397 Reviewed-by: Mahmoud Badri Reviewed-by: Reviewed-by: Thomas Hartmann --- .../qt5informationnodeinstanceserver.cpp | 28 +++++++++++++++++++ .../qt5informationnodeinstanceserver.h | 4 +++ .../instances/quick3dnodeinstance.cpp | 10 +++++++ 3 files changed, 42 insertions(+) diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp index 16dc3dbe5fd..70dc4b8cc9c 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp @@ -99,6 +99,7 @@ #include #include #include +#include #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include "../editor3d/qt5compat/qquick3darealight_p.h" #endif @@ -1226,6 +1227,7 @@ Qt5InformationNodeInstanceServer::Qt5InformationNodeInstanceServer(NodeInstanceC m_inputEventTimer.setSingleShot(true); m_renderModelNodeImageViewTimer.setSingleShot(true); m_modelNode3DImageViewAsyncData.timer.setSingleShot(true); + m_repeaterAddObjectTimer.setSingleShot(true); #ifdef FPS_COUNTER if (!_fpsTimer) { @@ -1251,6 +1253,7 @@ Qt5InformationNodeInstanceServer::~Qt5InformationNodeInstanceServer() m_inputEventTimer.stop(); m_renderModelNodeImageViewTimer.stop(); m_modelNode3DImageViewAsyncData.timer.stop(); + m_repeaterAddObjectTimer.stop(); if (m_editView3DData.rootItem) m_editView3DData.rootItem->disconnect(this); @@ -1394,6 +1397,22 @@ void Qt5InformationNodeInstanceServer::handleSelectionChangeTimeout() changeSelection(m_lastSelectionChangeCommand); } +void Qt5InformationNodeInstanceServer::handleRepeaterAddObjectTimeout() +{ +#ifdef QUICK3D_MODULE + for (auto obj : std::as_const(m_addObjectRepeaters)) { + if (auto repObj = qobject_cast(obj)) { + if (hasInstanceForObject(repObj)) { + ServerNodeInstance instance = instanceForObject(repObj); + handleInstanceHidden(instance, instance.internalInstance()->isHiddenInEditor(), + false); + } + } + } +#endif + m_addObjectRepeaters.clear(); +} + void Qt5InformationNodeInstanceServer::createCameraAndLightGizmos( const QList &instanceList) const { @@ -1645,6 +1664,8 @@ void Qt5InformationNodeInstanceServer::setup3DEditView(const QList(m_3dHelper); @@ -1803,6 +1824,7 @@ void Qt5InformationNodeInstanceServer::clearScene(const ClearSceneCommand &comma m_parentChangedSet.clear(); m_completedComponentList.clear(); + m_addObjectRepeaters.clear(); } void Qt5InformationNodeInstanceServer::createScene(const CreateSceneCommand &command) @@ -2293,6 +2315,12 @@ bool Qt5InformationNodeInstanceServer::isInformationServer() const return true; } +void Qt5InformationNodeInstanceServer::handleRepeaterAddObject() +{ + m_addObjectRepeaters.insert(sender()); + m_repeaterAddObjectTimer.start(); +} + // update 3D view size when it changes in creator side void Qt5InformationNodeInstanceServer::update3DViewState(const Update3dViewStateCommand &command) { diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h index 3d96b3bb70d..439b7b17a3a 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h @@ -82,6 +82,7 @@ public: void handleInstanceHidden(const ServerNodeInstance &instance, bool enable, bool checkAncestors) override; bool isInformationServer() const override; + void handleRepeaterAddObject(); private slots: void handleSelectionChanged(const QVariant &objs); @@ -108,6 +109,7 @@ protected: private: void handleObjectPropertyChangeTimeout(); void handleSelectionChangeTimeout(); + void handleRepeaterAddObjectTimeout(); void createEditView3D(); void create3DPreviewView(); void setup3DEditView(const QList &instanceList, @@ -174,6 +176,7 @@ private: QTimer m_render3DEditViewTimer; QTimer m_renderModelNodeImageViewTimer; QTimer m_inputEventTimer; + QTimer m_repeaterAddObjectTimer; #ifdef QUICK3D_PARTICLES_MODULE bool m_particleAnimationPlaying = true; AnimationDriver *m_particleAnimationDriver = nullptr; @@ -186,6 +189,7 @@ private: QList m_pendingInputEventCommands; QObject *m_3dHelper = nullptr; int m_need3DEditViewRender = 0; + QSet m_addObjectRepeaters; struct ModelNode3DImageViewAsyncData { QTimer timer; diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quick3dnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quick3dnodeinstance.cpp index c8bbc46ddb8..783bfba87f4 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quick3dnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quick3dnodeinstance.cpp @@ -25,6 +25,7 @@ #include "quick3dnodeinstance.h" #include "qt5nodeinstanceserver.h" +#include "qt5informationnodeinstanceserver.h" #include @@ -39,6 +40,7 @@ #include #include #include +#include #endif namespace QmlDesigner { @@ -56,6 +58,14 @@ Quick3DNodeInstance::~Quick3DNodeInstance() void Quick3DNodeInstance::initialize(const ObjectNodeInstance::Pointer &objectNodeInstance, InstanceContainer::NodeFlags flags) { +#ifdef QUICK3D_MODULE + if (auto repObj = qobject_cast(object())) { + if (auto infoServer = qobject_cast(nodeInstanceServer())) { + QObject::connect(repObj, &QQuick3DRepeater::objectAdded, + infoServer, &Qt5InformationNodeInstanceServer::handleRepeaterAddObject); + } + } +#endif ObjectNodeInstance::initialize(objectNodeInstance, flags); } From 5052c2e41539d92f14b87a47ed29d67e0dbabe6c Mon Sep 17 00:00:00 2001 From: Vikas Pachdha Date: Fri, 3 Dec 2021 14:35:10 +0100 Subject: [PATCH 33/77] Docs: Add instructions to run Qt-Bridge plugin on Apple silicon Task-number: QDS-5684 Change-Id: I5be5b3c7fd9d1c2490b5b4adf3f6d587860ba8c5 Reviewed-by: Leena Miettinen Reviewed-by: Thomas Hartmann --- .../src/qtbridge/qtbridge-ps-setup.qdoc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/qtdesignstudio/src/qtbridge/qtbridge-ps-setup.qdoc b/doc/qtdesignstudio/src/qtbridge/qtbridge-ps-setup.qdoc index 2a524d26891..ba43f329238 100644 --- a/doc/qtdesignstudio/src/qtbridge/qtbridge-ps-setup.qdoc +++ b/doc/qtdesignstudio/src/qtbridge/qtbridge-ps-setup.qdoc @@ -82,13 +82,16 @@ \endcode \endlist + \note On \macos \QBPS fails to load when Adobe Photoshop runs natively on an ARM + processor (Apple silicon). For more information, see \l {Running \QBPS on Apple Silicon}. + \section1 Enabling Remote Connections To set up \QBPS: \list 1 \li Once the installation is completed, restart Adobe Photoshop to make - \QBPS appear in \uicontrol Window > \uicontrol Extensions. + \QBPS appear in \uicontrol Window > \uicontrol {Extensions (Legacy)}. \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol General > \uicontrol Plug-ins to enable a remote connection. @@ -106,4 +109,16 @@ \endlist Once the connection is successfully created, \QBPS is ready to use. + + \note + + \section1 Running \QBPS on Apple Silicon + + If you are using \macos on an ARM processor (Apple silicon), \QBPS may not be listed + in Adobe Photoshop under \uicontrol Window > \uicontrol {Extensions (Legacy)}. + Run the Adobe Photoshop app in the Rosetta emulation mode. + Right click the Adobe Photoshop.app and select \uicontrol{Get info} > + \uicontrol {Open using Rosetta}. + Once the app is running in the Rosetta emulation mode, make sure + \uicontrol Preferences > \uicontrol Plug-ins > \uicontrol {Legacy Extensions} is selected. */ From e8b471dc8ec165f053e598b4d088a5f9d562c645 Mon Sep 17 00:00:00 2001 From: Aleksei German Date: Thu, 2 Dec 2021 16:11:08 +0100 Subject: [PATCH 34/77] QmlDesigner: Fix for states delegate behavior Task-number: QDS-5649 Change-Id: Id5d936c29fc832f3df8fa163c607562bc0983ed3 Reviewed-by: Thomas Hartmann --- .../qmldesigner/statesEditorQmlSources/StatesDelegate.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml index 2deb46b2123..1e592865cff 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml @@ -239,6 +239,14 @@ Rectangle { Component.onCompleted: { text = myRoot.delegateStateName } + + //QDS-5649: + Keys.priority: Keys.BeforeItem + Keys.onEscapePressed: function (event) { + event.accepted = true + stateNameField.text = myRoot.delegateStateName + stateNameField.focus = false + } } Text { From 49c421e5c43a30a2e84d532ab0752d77bcc8b33b Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 6 Dec 2021 15:37:50 +0100 Subject: [PATCH 35/77] ClangCodeModel: Prevent duplicate "/Tx" options Those trigger code model warnings. Fixes: QTCREATORBUG-26664 Change-Id: I0ed6b9edeeb94c8597b30c0be514d2b34dbedc49 Reviewed-by: Reviewed-by: Christian Stenger --- src/plugins/clangcodemodel/clangutils.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/clangcodemodel/clangutils.cpp b/src/plugins/clangcodemodel/clangutils.cpp index a089248d039..3e82ba85209 100644 --- a/src/plugins/clangcodemodel/clangutils.cpp +++ b/src/plugins/clangcodemodel/clangutils.cpp @@ -581,7 +581,15 @@ QStringList createClangOptions(const ProjectPart &projectPart, const QString &fi LibClangOptionsBuilder optionsBuilder(projectPart, fileOptions.useBuildSystemWarnings()); const QStringList projectPartOptions = optionsBuilder.build(CppEditor::ProjectFile::Unsupported, UsePrecompiledHeaders::No); - return projectPartOptions + fileOptions.options(); + + // FIXME: Sanitize FileOptionsBuilder instead. + QStringList fileArgs = fileOptions.options(); + if (projectPartOptions.contains("-TP")) + fileArgs.removeAll("/TP"); + if (projectPartOptions.contains("-TC")) + fileArgs.removeAll("/TC"); + + return projectPartOptions + fileArgs; } ClangDiagnosticConfig warningsConfigForProject(Project *project) From fd98dbaeababa6072a99b5ed694d28c781f2ab23 Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Tue, 7 Dec 2021 10:10:59 +0100 Subject: [PATCH 36/77] McuSupport: fix cmake var mapping for cypress flash tool Task-number: UL-5094 Change-Id: Ib87eb39d54c1677ed4c130054d0a9f01ca6a8ec4 Reviewed-by: Reviewed-by: Alessandro Portale --- src/plugins/mcusupport/mcusupportcmakemapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/mcusupport/mcusupportcmakemapper.cpp b/src/plugins/mcusupport/mcusupportcmakemapper.cpp index 34cd5782592..2541cd6d25a 100644 --- a/src/plugins/mcusupport/mcusupportcmakemapper.cpp +++ b/src/plugins/mcusupport/mcusupportcmakemapper.cpp @@ -56,7 +56,7 @@ static const QHash &envVarToCMakeVarMapping() {"RenesasFlashProgrammer_PATH", "RENESAS_FLASH_PROGRAMMER_PATH"}, {"MCUXpressoIDE_PATH", "MCUXPRESSO_IDE_PATH"}, {"JLINK_PATH", "JLINK_PATH"}, - {"CYPRESS_AUTO_FLASH_UTILITY_DIR", "CYPRESS_AUTO_FLASH_UTILITY_DIR"}, + {"CYPRESS_AUTO_FLASH_UTILITY_DIR", "INFINEON_AUTO_FLASH_UTILITY_DIR"}, {"EK_RA6M3G_E2_PROJECT_PATH", "EK_RA6M3G_E2_PROJECT_PATH"}, }; return mapping; From c22c22c3d61376cca29e12824679fdcaf9309c1f Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 1 Dec 2021 16:27:29 +0100 Subject: [PATCH 37/77] UnitTests: Disable some ClientServerOutsideProcess tests It seems QtcProcess introduced a really long timeout in the tear down function. This makes the unit test unusable. So long it is not fixed the tests are disabled. Change-Id: Ibdac92f6e5cef7b5866f7e64cc163fd1052c272b Reviewed-by: Cristian Adam --- tests/unit/unittest/clientserveroutsideprocess-test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/unittest/clientserveroutsideprocess-test.cpp b/tests/unit/unittest/clientserveroutsideprocess-test.cpp index 75e838c8a66..20ccce70fcb 100644 --- a/tests/unit/unittest/clientserveroutsideprocess-test.cpp +++ b/tests/unit/unittest/clientserveroutsideprocess-test.cpp @@ -71,7 +71,7 @@ TEST_F(ClientServerOutsideProcessSlowTest, RestartProcessAsynchronously) ASSERT_TRUE(client.isConnected()); } -TEST_F(ClientServerOutsideProcessSlowTest, RestartProcessAfterAliveTimeout) +TEST_F(ClientServerOutsideProcessSlowTest, DISABLED_RestartProcessAfterAliveTimeout) { QSignalSpy clientSpy(&client, &ConnectionClient::connectedToLocalSocket); @@ -81,7 +81,7 @@ TEST_F(ClientServerOutsideProcessSlowTest, RestartProcessAfterAliveTimeout) ASSERT_THAT(clientSpy, SizeIs(1)); } -TEST_F(ClientServerOutsideProcessSlowTest, RestartProcessAfterTermination) +TEST_F(ClientServerOutsideProcessSlowTest, DISABLED_RestartProcessAfterTermination) { QSignalSpy clientSpy(&client, &ConnectionClient::connectedToLocalSocket); From a4c2f2fb8c0020c9ee9c569ef0bbf5588d87304c Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 7 Dec 2021 14:47:31 +0200 Subject: [PATCH 38/77] QmlDesigner: Fix Qt5 compilation QQuick3DViewport::pickAll was introduced in Qt 6.2. Checking against version 6.2.1 because that's when the global picking API was taken into use in QmlDesigner. Change-Id: Id69ff9d958da89ba9e043dfb082a99f640884a4e Reviewed-by: Thomas Hartmann --- .../qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp index 4182dcadf1e..a4e950b238b 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp @@ -898,7 +898,12 @@ bool MouseArea3D::eventFilter(QObject *, QEvent *event) // a problem onCircle = false; if (m_pickNode) { - // We need to pick all as various other geometries can often be the first +#if QT_VERSION < QT_VERSION_CHECK(6, 2, 1) + QQuick3DPickResult pr = m_view3D->pick(float(mousePos.x()), float(mousePos.y())); + pickSuccess = pr.objectHit() == m_pickNode; +#else + // With the introduction of global picking API, + // we need to pick all as various other geometries can often be the first // pick result, such as camera frustum or light geometry const QList results = m_view3D->pickAll(float(mousePos.x()), float(mousePos.y())); @@ -908,6 +913,7 @@ bool MouseArea3D::eventFilter(QObject *, QEvent *event) break; } } +#endif } } } From 2405ccb271f0e3508eaf315ebb1818dd8d523b6b Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 7 Dec 2021 13:26:57 +0100 Subject: [PATCH 39/77] clangd: Assert on generating tooltip for deleted client Text marks for diagnostics should be deleted when the client dies. If they somehow survive assert when creating a tooltip for those text marks. Task-number: QTCREATORBUG-26585 Change-Id: Iaebf0d2aba66d2a6c250f8dad7856ef03b1dcacd Reviewed-by: Christian Kandeler --- src/plugins/clangcodemodel/clangtextmark.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/clangcodemodel/clangtextmark.cpp b/src/plugins/clangcodemodel/clangtextmark.cpp index 9d20b4364da..be1064aa88e 100644 --- a/src/plugins/clangcodemodel/clangtextmark.cpp +++ b/src/plugins/clangcodemodel/clangtextmark.cpp @@ -395,10 +395,14 @@ ClangdTextMark::ClangdTextMark(const FilePath &filePath, bool ClangdTextMark::addToolTipContent(QLayout *target) const { const auto canApplyFixIt = [c = m_client, diag = m_lspDiagnostic, fp = fileName()] { - return c && c->reachable() && c->hasDiagnostic(DocumentUri::fromFilePath(fp), diag); + return QTC_GUARD(c) && c->reachable() + && c->hasDiagnostic(DocumentUri::fromFilePath(fp), diag); }; + const QString clientName = QTC_GUARD(m_client) ? m_client->name() : "clangd [unknown]"; target->addWidget(ClangDiagnosticWidget::createWidget({m_diagnostic}, - ClangDiagnosticWidget::ToolTip, canApplyFixIt, m_client ? m_client->name() : "clangd")); + ClangDiagnosticWidget::ToolTip, + canApplyFixIt, + clientName)); return true; } From 9575c45cf53115ec028feba7d2df7792bd829971 Mon Sep 17 00:00:00 2001 From: Youri Westerman Date: Sat, 4 Dec 2021 10:17:49 +0100 Subject: [PATCH 40/77] Update screenshot in appdata The old screenshot no longer exists and results in a 404. Change-Id: Iabae251b6441b0cf25ee94856c03113b16d6faf6 Reviewed-by: Eike Ziller --- share/metainfo/org.qt-project.qtcreator.appdata.xml.cmakein | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/metainfo/org.qt-project.qtcreator.appdata.xml.cmakein b/share/metainfo/org.qt-project.qtcreator.appdata.xml.cmakein index b721029a0a5..32d10990aaa 100644 --- a/share/metainfo/org.qt-project.qtcreator.appdata.xml.cmakein +++ b/share/metainfo/org.qt-project.qtcreator.appdata.xml.cmakein @@ -32,7 +32,7 @@ https://doc.qt.io/qtcreator/images/qtcreator-breakdown.png - https://doc.qt.io/qtcreator/images/qtcreator-qt-quick-editors.png + https://doc.qt.io/qtcreator/images/qtcreator-gs-build-example-open.png From 0b736c3f7afe6589ea5dea146a171515693b16ae Mon Sep 17 00:00:00 2001 From: Petar Perisin Date: Tue, 7 Dec 2021 22:50:51 +0100 Subject: [PATCH 41/77] GTest: do not change arguments order of testRunner transforming list of args to set can change order of arguments as well as count, which can make application unable to run Change-Id: Ib8164e0b7661511f738bdc3b21e74fbaaa6a5252 Reviewed-by: Christian Stenger --- src/plugins/autotest/gtest/gtestconfiguration.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/autotest/gtest/gtestconfiguration.cpp b/src/plugins/autotest/gtest/gtestconfiguration.cpp index cbdd0c8e8a2..ff60f32171c 100644 --- a/src/plugins/autotest/gtest/gtestconfiguration.cpp +++ b/src/plugins/autotest/gtest/gtestconfiguration.cpp @@ -59,18 +59,18 @@ QStringList filterInterfering(const QStringList &provided, QStringList *omitted) "--gtest_print_time=" }; - QSet allowed = Utils::filtered(Utils::toSet(provided), [] (const QString &arg) { + QStringList allowed = Utils::filtered(provided, [] (const QString &arg) { return Utils::allOf(knownInterferingOptions, [&arg] (const QString &interfering) { return !arg.startsWith(interfering); }); }); - if (omitted) { + if (omitted && allowed.size() < provided.size()) { QSet providedSet = Utils::toSet(provided); - providedSet.subtract(allowed); + providedSet.subtract(Utils::toSet(allowed)); omitted->append(Utils::toList(providedSet)); } - return Utils::toList(allowed); + return allowed; } QStringList GTestConfiguration::argumentsForTestRunner(QStringList *omitted) const From 67cf7c08d016b81b24fcd1fac0726708b744a5fe Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 3 Dec 2021 16:25:16 +0100 Subject: [PATCH 42/77] LanguageClient: More verbose logging when clearing token data Change-Id: I3f9883858fa2f23dff00cda9f556f0f4bbff127a Reviewed-by: David Schulz Reviewed-by: Christian Kandeler --- .../languageclient/semantichighlightsupport.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/plugins/languageclient/semantichighlightsupport.cpp b/src/plugins/languageclient/semantichighlightsupport.cpp index 444cb23439c..905ab0169af 100644 --- a/src/plugins/languageclient/semantichighlightsupport.cpp +++ b/src/plugins/languageclient/semantichighlightsupport.cpp @@ -206,6 +206,10 @@ void SemanticTokenSupport::reloadSemanticTokens(TextDocument *textDocument) const TextDocumentIdentifier docId(DocumentUri::fromFilePath(filePath)); auto responseCallback = [this, filePath, documentVersion = m_client->documentVersion(filePath)]( const SemanticTokensFullRequest::Response &response) { + if (const auto error = response.error()) { + qCDebug(LOGLSPHIGHLIGHT) + << "received error" << error->code() << error->message() << "for" << filePath; + } handleSemanticTokens(filePath, response.result().value_or(nullptr), documentVersion); }; /*if (supportedRequests.testFlag(SemanticRequestType::Range)) { @@ -251,6 +255,10 @@ void SemanticTokenSupport::updateSemanticTokens(TextDocument *textDocument) request.setResponseCallback( [this, filePath, documentVersion]( const SemanticTokensFullDeltaRequest::Response &response) { + if (const auto error = response.error()) { + qCDebug(LOGLSPHIGHLIGHT) << "received error" << error->code() + << error->message() << "for" << filePath; + } handleSemanticTokensDelta(filePath, response.result().value_or(nullptr), documentVersion); @@ -408,6 +416,9 @@ void SemanticTokenSupport::handleSemanticTokens(const Utils::FilePath &filePath, m_tokens[filePath] = {*tokens, documentVersion}; highlight(filePath); } else { + qCDebug(LOGLSPHIGHLIGHT) + << "no data in reply to full semantic tokens request, clearing tokens" + << m_client->name() << filePath; m_tokens.remove(filePath); } } @@ -476,8 +487,10 @@ void SemanticTokenSupport::handleSemanticTokensDelta( tokens.setData(newData); tokens.setResultId(tokensDelta->resultId()); } else { + qCDebug(LOGLSPHIGHLIGHT) + << "no data in reply to semantic tokens delta request, clearing tokens" + << m_client->name() << filePath; m_tokens.remove(filePath); - qCDebug(LOGLSPHIGHLIGHT) << "Data cleared"; return; } highlight(filePath); From e2b40333fe256e887eb57c74855cb58757f6efd6 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 6 Dec 2021 11:38:58 +0100 Subject: [PATCH 43/77] Doc: Mention that SUBDIRS are only used for qmake projects Task-number: QTCREATORBUG-26616 Change-Id: I359846f21bcf234fe1d804bc9e7916092f7dd939 Reviewed-by: Reviewed-by: Eike Ziller --- doc/qtcreator/src/howto/creator-sessions.qdoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/qtcreator/src/howto/creator-sessions.qdoc b/doc/qtcreator/src/howto/creator-sessions.qdoc index f37bb45b8f9..f852a17dea7 100644 --- a/doc/qtcreator/src/howto/creator-sessions.qdoc +++ b/doc/qtcreator/src/howto/creator-sessions.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -53,7 +53,8 @@ \li Projects \if defined(qtcreator) - with their dependencies (including SUBDIRS projects) + with their dependencies (including SUBDIRS projects when using + qmake) \endif \li Editors From d81f48964d15ba8d4e539b4f061939d882298f06 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 3 Dec 2021 16:40:11 +0100 Subject: [PATCH 44/77] Doc: Mention that lupdate and lrelease integration is qmake-only Add a link to information about using the tools with CMake. Task-number: QTCREATORBUG-26616 Change-Id: I44c3701703e8831dcb4a89f3bd1ecb14fb3c4853 Reviewed-by: Lucie Gerard Reviewed-by: Eike Ziller --- doc/qtcreator/src/howto/creator-external-tools.qdoc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/qtcreator/src/howto/creator-external-tools.qdoc b/doc/qtcreator/src/howto/creator-external-tools.qdoc index ff90be8a8de..e3f12702bcb 100644 --- a/doc/qtcreator/src/howto/creator-external-tools.qdoc +++ b/doc/qtcreator/src/howto/creator-external-tools.qdoc @@ -51,14 +51,19 @@ \section1 Using Qt Linguist + When you \l{Creating Projects}{create a new project}, you can automatically + generate a translation source file (TS) for one language. You can add other + languages later by editing the project file. + You can use the Qt Linguist release manager tools, lupdate and lrelease, directly from \QC. The lupdate tool is used to synchronize source code and translations. The lrelease tool is used to create run-time translation files for use by the released application. - When you \l{Creating Projects}{create a new project}, you can automatically - generate a translation source file (TS) for one language. You can add other - languages later by editing the project file. + \note Running the tools from \QC is supported only when using qmake as the + build system. For more information about using the tools with CMake, see + \l{https://doc.qt.io/qt-6/cmake-command-reference.html#qt6-linguisttools} + {Qt6::LinguistTools}. To synchronize TS files from a translator with the application code, select \uicontrol Tools > \uicontrol External > From 187f0f21eb531f8c06652640a90c00cfd907ccf1 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Wed, 8 Dec 2021 13:41:11 +0200 Subject: [PATCH 45/77] Fix get_filename_component usage get_filename_component called with incorrect number of arguments Change-Id: I4f1c8dbc185c2e53bc596bf02a48f72b76ac6955 Reviewed-by: Cristian Adam --- cmake/Findyaml-cpp.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Findyaml-cpp.cmake b/cmake/Findyaml-cpp.cmake index e4630ed7201..277d8069e0a 100644 --- a/cmake/Findyaml-cpp.cmake +++ b/cmake/Findyaml-cpp.cmake @@ -9,7 +9,7 @@ find_package(yaml-cpp 0.5 QUIET NO_MODULE) if (yaml-cpp_FOUND) # target doesn't set include directory for some reason - get_filename_component(yaml_cpp_include_dir ${YAML_CPP_INCLUDE_DIR} ABSOLUTE) + get_filename_component(yaml_cpp_include_dir "${YAML_CPP_INCLUDE_DIR}" ABSOLUTE) if (NOT EXISTS yaml_cpp_include_dir) unset(yaml_cpp_include_dir) unset(yaml_cpp_include_dir CACHE) From e545e8fdbb71179d7d5c99e37f0b4fba71659d15 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 6 Dec 2021 18:13:32 +0100 Subject: [PATCH 46/77] Doc: Add info about integrating wizards into CMake builds Add CMake to the example of creating a selection list for choosing build systems in a custom wizard. Task-number: QTCREATORBUG-26616 Change-Id: I0bb7e59b8a2f6d42d139de7a24c033dabbe6da6a Reviewed-by: Eike Ziller --- ...eator-projects-custom-wizards-json.qdocinc | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-custom-wizards-json.qdocinc b/doc/qtcreator/src/projects/creator-only/creator-projects-custom-wizards-json.qdocinc index 3ef9ff43b9c..62ef588555b 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-custom-wizards-json.qdocinc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-custom-wizards-json.qdocinc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -29,21 +29,21 @@ To integrate the wizard into \QC and to deliver it as part of the \QC build, place the wizard files in the \QC sources. Then select \uicontrol Build > - \uicontrol {Run qmake}, so that the new files you added for your wizard are + \uicontrol {Run CMake} or \uicontrol {Run qmake}, depending on the build + system you use. This ensures that the new files you added for your wizard are actually copied from the \QC source directory into the \QC build directory as part of the next \QC build. - If you do not run qmake, your new wizard will not show up, because it does - not exist in the build directory you run your newly built \QC from. It never - got copied there, because make did not know that the files exist in the - source tree, because qmake did not inform make that the files were added - recently. + If you do not run CMake or qmake, your new wizard will not show up, because + it does not exist in the build directory you run your newly built \QC from. + It never got copied there because CMake or qmake did not inform the + build tool, such as make or ninja, about the new files in the source tree. - Basically, qmake generates a fixed list of files to copy from the source - directory to the sudirectory of the build directory that is checked for - wizards at runtime. Therefore, you need to run qmake or execute the - \uicontrol {Factory.Reset} function each time the names or locations of the - files change. + Basically, CMake and qmake generate a fixed list of files to copy from the + source directory to the subdirectory of the build directory that is checked + for wizards at runtime. Therefore, you need to run CMake or qmake or execute + the \uicontrol {Factory.Reset} function each time the names or locations of + the files change. \section1 Using Variables in Wizards @@ -717,6 +717,7 @@ "data": { "items": [ + { "trKey": "CMake", "value": "cmake", "icon": "cmake_icon.png", "trToolTip": "Building with CMake." }, { "trKey": "Qbs", "value": "qbs", "icon": "qbs_icon.png", "trToolTip": "Building with Qbs." }, { "trKey": "QMake", "value": "qmake", "icon": "qmake_icon.png", "trToolTip": "Building with QMake." } ] From 44ff85cb1b5173adfb611e36854400e3c2174bee Mon Sep 17 00:00:00 2001 From: Sergey Levin Date: Wed, 1 Dec 2021 17:18:03 +0300 Subject: [PATCH 47/77] Change QLabel from StringAspect to ElidingLabel ElidingLabel with elided mode set other than Qt::ElideNone will not show in case QFormLayout has QFormLayout::ExpandingFieldsGrow field growth policy Change-Id: I26db57fbeb2c921e054cf7dc18229ebddcb04530 Reviewed-by: Eike Ziller --- src/libs/utils/aspects.cpp | 16 ++++++++++++++-- src/libs/utils/aspects.h | 1 + src/libs/utils/layoutbuilder.cpp | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/libs/utils/aspects.cpp b/src/libs/utils/aspects.cpp index f4c09ab1327..8118d11ea79 100644 --- a/src/libs/utils/aspects.cpp +++ b/src/libs/utils/aspects.cpp @@ -639,11 +639,12 @@ public: std::function m_displayFilter; std::unique_ptr m_checker; + Qt::TextElideMode m_elideMode = Qt::ElideNone; QString m_placeHolderText; QString m_historyCompleterKey; PathChooser::Kind m_expectedKind = PathChooser::File; EnvironmentChange m_environmentChange; - QPointer m_labelDisplay; + QPointer m_labelDisplay; QPointer m_lineEditDisplay; QPointer m_pathChooserDisplay; QPointer m_textEditDisplay; @@ -935,6 +936,16 @@ void StringAspect::setPlaceHolderText(const QString &placeHolderText) d->m_textEditDisplay->setPlaceholderText(placeHolderText); } +/*! + Sets \a elideMode as label elide mode. +*/ +void StringAspect::setElideMode(Qt::TextElideMode elideMode) +{ + d->m_elideMode = elideMode; + if (d->m_labelDisplay) + d->m_labelDisplay->setElideMode(elideMode); +} + /*! Sets \a historyCompleterKey as key for the history completer settings for line edits and path chooser displays. @@ -1144,7 +1155,8 @@ void StringAspect::addToLayout(LayoutBuilder &builder) } break; case LabelDisplay: - d->m_labelDisplay = createSubWidget(); + d->m_labelDisplay = createSubWidget(); + d->m_labelDisplay->setElideMode(d->m_elideMode); d->m_labelDisplay->setTextInteractionFlags(Qt::TextSelectableByMouse); d->m_labelDisplay->setText(displayedString); d->m_labelDisplay->setToolTip(d->m_showToolTipOnLabel ? displayedString : toolTip()); diff --git a/src/libs/utils/aspects.h b/src/libs/utils/aspects.h index 9124bb2ddf6..0771dc65bf1 100644 --- a/src/libs/utils/aspects.h +++ b/src/libs/utils/aspects.h @@ -308,6 +308,7 @@ public: void setValidationFunction(const Utils::FancyLineEdit::ValidationFunction &validator); void setOpenTerminalHandler(const std::function &openTerminal); void setAutoApplyOnEditingFinished(bool applyOnEditingFinished); + void setElideMode(Qt::TextElideMode elideMode); void validateInput(); diff --git a/src/libs/utils/layoutbuilder.cpp b/src/libs/utils/layoutbuilder.cpp index 6c76808177e..d82617ea463 100644 --- a/src/libs/utils/layoutbuilder.cpp +++ b/src/libs/utils/layoutbuilder.cpp @@ -111,7 +111,7 @@ static QLayout *createLayoutFromType(LayoutBuilder::LayoutType layoutType) switch (layoutType) { case LayoutBuilder::FormLayout: { auto formLayout = new QFormLayout; - formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); + formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); return formLayout; } case LayoutBuilder::GridLayout: { From 8c139603a18ef3efff5ff46de9cac488b3e93bfa Mon Sep 17 00:00:00 2001 From: Samuel Ghinet Date: Wed, 1 Dec 2021 19:30:34 +0200 Subject: [PATCH 48/77] QDS: shrink the right margin of the project view for small sized dialog This also allows a bit smaller minimum width for the dialog. Also, did a bit of cleanup. Task-number: QDS-5500 Change-Id: I3660190ac0a73dd1da1c7d6f8ee76660b1fba6be Reviewed-by: Mahmoud Badri Reviewed-by: Miikka Heikkinen Reviewed-by: Qt CI Bot Reviewed-by: Thomas Hartmann --- .../newprojectdialog/NewProjectDialog.qml | 33 +++++++++++++------ .../imports/NewProjectDialog/DialogValues.qml | 2 +- .../newprojectdialogimageprovider.cpp | 2 +- src/plugins/studiowelcome/qdsnewdialog.cpp | 2 +- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/share/qtcreator/qmldesigner/newprojectdialog/NewProjectDialog.qml b/share/qtcreator/qmldesigner/newprojectdialog/NewProjectDialog.qml index eb0cb21adf1..3e91ab70f11 100644 --- a/share/qtcreator/qmldesigner/newprojectdialog/NewProjectDialog.qml +++ b/share/qtcreator/qmldesigner/newprojectdialog/NewProjectDialog.qml @@ -133,7 +133,7 @@ Item { Rectangle { // TabBar readonly property int animDur: 500 - id: samTabRect + id: tabBar x: 10 // left padding width: parent.width - 64 // right padding height: DialogValues.projectViewHeaderHeight @@ -153,15 +153,15 @@ Item { verticalAlignment: Text.AlignVCenter color: tabBarRow.currIndex === index ? DialogValues.textColorInteraction : DialogValues.textColor - Behavior on color { ColorAnimation { duration: samTabRect.animDur } } + Behavior on color { ColorAnimation { duration: tabBar.animDur } } MouseArea { anchors.fill: parent onClicked: { tabBarRow.currIndex = index projectModel.setPage(index) - projectViewId.currentIndex = 0 - projectViewId.currentIndexChanged() + projectView.currentIndex = 0 + projectView.currentIndexChanged() strip.x = parent.x strip.width = parent.width @@ -180,13 +180,26 @@ Item { color: DialogValues.textColorInteraction anchors.bottom: parent.bottom - Behavior on x { SmoothedAnimation { duration: samTabRect.animDur } } - Behavior on width { SmoothedAnimation { duration: strip.width === 0 ? 0 : samTabRect.animDur } } // do not animate initial width + Behavior on x { SmoothedAnimation { duration: tabBar.animDur } } + Behavior on width { SmoothedAnimation { duration: strip.width === 0 ? 0 : tabBar.animDur } } // do not animate initial width + } + + Connections { + target: rootDialog + function onWidthChanged() { + if (rootDialog.width < 1200) { // 1200 = the width threshold + tabBar.width = tabBar.parent.width - 20 + projectView.width = projectView.parent.width - 20 + } else { + tabBar.width = tabBar.parent.width - 64 + projectView.width = projectView.parent.width - 64 + } + } } } // Rectangle NewProjectView { - id: projectViewId + id: projectView x: 10 // left padding width: parent.width - 64 // right padding height: DialogValues.projectViewHeight @@ -196,9 +209,9 @@ Item { target: rootDialog function onHeightChanged() { if (rootDialog.height < 700) { // 700 = minimum height big dialog - projectViewId.height = DialogValues.projectViewHeight / 2 + projectView.height = DialogValues.projectViewHeight / 2 } else { - projectViewId.height = DialogValues.projectViewHeight + projectView.height = DialogValues.projectViewHeight } } } @@ -213,7 +226,7 @@ Item { lineHeight: DialogValues.defaultLineHeight lineHeightMode: Text.FixedHeight leftPadding: 14 - width: projectViewId.width + width: projectView.width color: DialogValues.textColor wrapMode: Text.WordWrap maximumLineCount: 4 diff --git a/share/qtcreator/qmldesigner/newprojectdialog/imports/NewProjectDialog/DialogValues.qml b/share/qtcreator/qmldesigner/newprojectdialog/imports/NewProjectDialog/DialogValues.qml index 0dafb43e44b..b99b99dc952 100644 --- a/share/qtcreator/qmldesigner/newprojectdialog/imports/NewProjectDialog/DialogValues.qml +++ b/share/qtcreator/qmldesigner/newprojectdialog/imports/NewProjectDialog/DialogValues.qml @@ -35,7 +35,7 @@ QtObject { readonly property int projectViewMinimumHeight: projectViewHeight readonly property int dialogContentHeight: projectViewHeight + 300 // i.e. dialog without header and footer readonly property int loadedPanesWidth: detailsPaneWidth + stylesPaneWidth - readonly property int detailsPaneWidth: 330 + detailsPanePadding * 2// + 10 // 50 + readonly property int detailsPaneWidth: 330 + detailsPanePadding * 2 readonly property int dialogTitleTextHeight: 47 /* detailsScrollableContentHeight - the full height that may need to be scrolled to be fully visible, if the dialog box is too small. */ diff --git a/src/plugins/studiowelcome/newprojectdialogimageprovider.cpp b/src/plugins/studiowelcome/newprojectdialogimageprovider.cpp index 0e502925040..e14678431ac 100644 --- a/src/plugins/studiowelcome/newprojectdialogimageprovider.cpp +++ b/src/plugins/studiowelcome/newprojectdialogimageprovider.cpp @@ -96,7 +96,7 @@ QPixmap NewProjectDialogImageProvider::requestDefaultPixmap(const QString &id, Q } if (pixmap.isNull()) - return QPixmap{}; + return {}; if (requestedSize.isValid()) return pixmap.scaled(requestedSize); diff --git a/src/plugins/studiowelcome/qdsnewdialog.cpp b/src/plugins/studiowelcome/qdsnewdialog.cpp index 1ab2a45ee8b..50e3a085ca0 100644 --- a/src/plugins/studiowelcome/qdsnewdialog.cpp +++ b/src/plugins/studiowelcome/qdsnewdialog.cpp @@ -94,7 +94,7 @@ QdsNewDialog::QdsNewDialog(QWidget *parent) m_dialog->setWindowModality(Qt::ApplicationModal); m_dialog->setWindowFlags(Qt::Dialog); m_dialog->setAttribute(Qt::WA_DeleteOnClose); - m_dialog->setMinimumSize(1110, 554); + m_dialog->setMinimumSize(1066, 554); QSize screenSize = m_dialog->screen()->geometry().size(); if (screenSize.height() < 1080) From c17f633a7ecf9e4651af0b485f9f71afbd2cbb73 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 7 Dec 2021 15:04:04 +0200 Subject: [PATCH 49/77] QmlProjectManager: Add widgetApp qml project property Widget was the default apptype in Qt5, but in Qt6 the default was changed to gui, so projects with qml modules that depend on widgets can no longer be launched. Notable example of this is QtCharts. Added "widgetApp" qml project property to allow users to specify if they want widget or gui based application. Task-number: QDS-5686 Change-Id: If0787421c79d4ba24a0f8513c8538126bcf29b4e Reviewed-by: Thomas Hartmann Reviewed-by: Mahmoud Badri Reviewed-by: Reviewed-by: Qt CI Bot --- .../qmlprojectmanager/fileformat/qmlprojectfileformat.cpp | 4 ++++ src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h | 4 ++++ src/plugins/qmlprojectmanager/qmlproject.cpp | 7 +++++++ src/plugins/qmlprojectmanager/qmlproject.h | 1 + .../qmlprojectmanager/qmlprojectrunconfiguration.cpp | 5 +++++ 5 files changed, 21 insertions(+) diff --git a/src/plugins/qmlprojectmanager/fileformat/qmlprojectfileformat.cpp b/src/plugins/qmlprojectmanager/fileformat/qmlprojectfileformat.cpp index 962b4034925..80b2d08ca7e 100644 --- a/src/plugins/qmlprojectmanager/fileformat/qmlprojectfileformat.cpp +++ b/src/plugins/qmlprojectmanager/fileformat/qmlprojectfileformat.cpp @@ -123,6 +123,10 @@ QmlProjectItem *QmlProjectFileFormat::parseProjectFile(const Utils::FilePath &fi if (qt6ProjectProperty.isValid() && qt6ProjectProperty.value.toBool()) projectItem->setQt6Project(qt6ProjectProperty.value.toBool()); + const auto widgetAppProperty = rootNode->property("widgetApp"); + if (widgetAppProperty.isValid()) + projectItem->setWidgetApp(widgetAppProperty.value.toBool()); + if (debug) qDebug() << "importPath:" << importPathsProperty.value << "mainFile:" << mainFileProperty.value; diff --git a/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h b/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h index 90d17e48591..a104e906464 100644 --- a/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h +++ b/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h @@ -78,6 +78,9 @@ public: QString mainFile() const { return m_mainFile; } void setMainFile(const QString &mainFilePath) { m_mainFile = mainFilePath; } + bool widgetApp() const { return m_widgetApp; } + void setWidgetApp(bool widgetApp) { m_widgetApp = widgetApp; } + void appendContent(QmlProjectContentItem *item) { m_content.append(item); } Utils::EnvironmentItems environment() const; @@ -99,6 +102,7 @@ protected: bool m_forceFreeType = false; bool m_qtForMCUs = false; bool m_qt6Project = false; + bool m_widgetApp = false; }; } // namespace QmlProjectManager diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index c17f7f158bc..35ff194f950 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -585,6 +585,13 @@ bool QmlBuildSystem::forceFreeType() const return false; } +bool QmlBuildSystem::widgetApp() const +{ + if (m_projectItem) + return m_projectItem.data()->widgetApp(); + return false; +} + bool QmlBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FilePaths *) { if (!dynamic_cast(context)) diff --git a/src/plugins/qmlprojectmanager/qmlproject.h b/src/plugins/qmlprojectmanager/qmlproject.h index 4f347d07e1d..9defdbc0edc 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.h +++ b/src/plugins/qmlprojectmanager/qmlproject.h @@ -93,6 +93,7 @@ public: QString primaryLanguage() const; void setPrimaryLanguage(QString language); bool forceFreeType() const; + bool widgetApp() const; bool addFiles(const QStringList &filePaths); diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index f66c3005d0a..e0c7cb30459 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -227,6 +227,11 @@ QString QmlProjectRunConfiguration::commandLineArguments() const ProcessArgs::addArg(&args, "windows:fontengine=freetype", osType); } + if (bs->qt6Project() && bs->widgetApp()) { + ProcessArgs::addArg(&args, "--apptype", osType); + ProcessArgs::addArg(&args, "widget", osType); + } + const QString main = bs->targetFile(FilePath::fromString(mainScript())).toString(); if (!main.isEmpty()) ProcessArgs::addArg(&args, main, osType); From 175ddb79e8fe17583806a7cea5f48c54b85b0304 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 8 Dec 2021 12:52:49 +0200 Subject: [PATCH 50/77] QmlDesigner: If widgetApp is specified for project, force it in puppet Force QApplication use in puppet if widgetApp is set to true in the project. Task-number: QDS-5686 Change-Id: Id1be1f1e6b7239015c4c33f2e3866f78b0f878a7 Reviewed-by: Thomas Hartmann --- .../qmldesigner/designercore/instances/puppetcreator.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp index 23014b7ce92..90796d0017b 100644 --- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp +++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp @@ -539,8 +539,13 @@ QProcessEnvironment PuppetCreator::processEnvironment() const environment.set("QMLDESIGNER_QUICK3D_PARTICLES3D_MODE", "true"); import = QmlDesigner::Import::createLibraryImport("QtCharts", "2.0"); - if (m_model->hasImport(import, true, true)) + if (m_model->hasImport(import, true, true)) { environment.set("QMLDESIGNER_FORCE_QAPPLICATION", "true"); + } else if (m_target) { + auto bs = qobject_cast(m_target->buildSystem()); + if (bs && bs->widgetApp()) + environment.set("QMLDESIGNER_FORCE_QAPPLICATION", "true"); + } bool particlemode = QmlDesigner::DesignerSettings::getValue("particleMode").toBool(); if (!particlemode) From b8a71220978d2c0d488f2d668aebba5697c6cbcb Mon Sep 17 00:00:00 2001 From: Knud Dollereder Date: Wed, 8 Dec 2021 12:11:40 +0100 Subject: [PATCH 51/77] Register image formats supported by QImageReader and hdr The list of supported image file formats of the asset loader was missing an entry for the jpeg extension. This is now fixed by generating this list out from the result of QImageReader::supportedFormats with the addition of the .hdr format. Fixes: QDS-5713 Change-Id: I65ccbe4c02e1b4eb725b6bb14d154bbfddf8fa9c Reviewed-by: Qt CI Bot Reviewed-by: Thomas Hartmann --- .../components/componentcore/designeractionmanager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp index 4ac3692589d..c521b653dd8 100644 --- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp +++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp @@ -57,6 +57,7 @@ #include #include +#include #include #include @@ -1549,9 +1550,13 @@ void DesignerActionManager::createDefaultAddResourceHandler() registerAddResourceHandler(AddResourceHandler(category, ext, op)); }; + auto transformer = [](const QByteArray& format) -> QString { return QString("*.") + format; }; + auto imageFormats = Utils::transform(QImageReader::supportedImageFormats(), transformer); + imageFormats.push_back("*.hdr"); + // The filters will be displayed in reverse order to these lists in file dialog, // so declare most common types last - registerHandlers({"*.webp", "*.hdr", "*.svg", "*.bmp", "*.jpg", "*.png"}, + registerHandlers(imageFormats, ModelNodeOperations::addImageToProject, ComponentCoreConstants::addImagesDisplayString); registerHandlers({"*.otf", "*.ttf"}, From 1f12b3444eb8995b3792dcc946021bfcdf4df586 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 8 Dec 2021 11:32:23 +0100 Subject: [PATCH 52/77] Squish: Adapt to removed wizard templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I56b0bd7000fdc73cce759ca743da543ecc715453 Reviewed-by: Robert Löhning --- tests/system/suite_general/tst_create_proj_wizard/test.py | 2 +- tests/system/suite_qtquick/tst_qtquick_creation/test.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system/suite_general/tst_create_proj_wizard/test.py b/tests/system/suite_general/tst_create_proj_wizard/test.py index dd1397f3c1e..076a2d7ca61 100644 --- a/tests/system/suite_general/tst_create_proj_wizard/test.py +++ b/tests/system/suite_general/tst_create_proj_wizard/test.py @@ -70,7 +70,7 @@ def main(): template = current.values()[0] with TestSection("Testing project template %s -> %s" % (category, template)): displayedPlatforms = __createProject__(category, template) - if template.startswith("Qt Quick Application - "): + if template == "Qt Quick Application": qtVersionsForQuick = ["5.14"] for counter, qtVersion in enumerate(qtVersionsForQuick): def additionalFunc(displayedPlatforms, qtVersion): diff --git a/tests/system/suite_qtquick/tst_qtquick_creation/test.py b/tests/system/suite_qtquick/tst_qtquick_creation/test.py index a7ff1801d22..370d8357095 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation/test.py @@ -30,8 +30,8 @@ def main(): if not startedWithoutPluginError(): return - available = [("5.14", "Qt Quick Application - Empty", Targets.DESKTOP_5_14_1_DEFAULT), - ("5.14", "Qt Quick Application - Swipe", Targets.DESKTOP_5_14_1_DEFAULT)] + available = [("5.14", "Qt Quick Application", Targets.DESKTOP_5_14_1_DEFAULT), + ] for qtVersion, appTemplate, targ in available: # using a temporary directory won't mess up a potentially existing From 2427ffad71a2dc62f132815feb6c57d082ce8937 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 6 Dec 2021 12:56:57 +0100 Subject: [PATCH 53/77] QmlDesigner: Do not offer imports that end with '.impl' Task-number: QDS-5681 Change-Id: I8a836c47b4468684c4fe65c1f1691517a35e98e2 Reviewed-by: Miikka Heikkinen Reviewed-by: Qt CI Bot --- .../qmldesigner/designercore/model/texttomodelmerger.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index 49845ab13fd..d8fbbb1cd7d 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -957,7 +957,8 @@ static QList generatePossibleLibraryImports(const QHash= 0) { int minorVersion = (importKey.minorVersion == LanguageUtils::ComponentVersion::NoVersion) ? 0 : importKey.minorVersion; QString version = QStringLiteral("%1.%2").arg(majorVersion).arg(minorVersion); - possibleImports.append(QmlDesigner::Import::createLibraryImport(libraryName, version)); + if (!libraryName.endsWith(".impl")) + possibleImports.append(QmlDesigner::Import::createLibraryImport(libraryName, version)); // In Qt6, QtQuick.Controls itself doesn't have any version as it has no types, // so it never gets added normally to possible imports. From 61e764bb189987eed769597c819c3a3d635a7e76 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 8 Dec 2021 13:25:25 +0100 Subject: [PATCH 54/77] Find: fix crash on search in current file without file The old document is already deleted after closing the last editor. Checking the document before updating the ui prevents it in that case. Change-Id: I7e65fd1203b6e843ae6dc93d2c304974d5b48a69 Reviewed-by: Eike Ziller --- src/plugins/texteditor/findincurrentfile.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/texteditor/findincurrentfile.cpp b/src/plugins/texteditor/findincurrentfile.cpp index 7c513d96bf1..aa0902493dc 100644 --- a/src/plugins/texteditor/findincurrentfile.cpp +++ b/src/plugins/texteditor/findincurrentfile.cpp @@ -93,10 +93,8 @@ bool FindInCurrentFile::isEnabled() const void FindInCurrentFile::handleFileChange(Core::IEditor *editor) { if (!editor) { - if (m_currentDocument) { - m_currentDocument = nullptr; - emit enabledChanged(isEnabled()); - } + m_currentDocument = nullptr; + emit enabledChanged(isEnabled()); } else { Core::IDocument *document = editor->document(); if (document != m_currentDocument) { From 74295626cb37848101222e637a59c6e4d4986c79 Mon Sep 17 00:00:00 2001 From: Tapani Mattila Date: Fri, 3 Dec 2021 18:22:44 +0200 Subject: [PATCH 55/77] Doc: Add guide for converting project to new structure Task-number: QDS-5626 Change-Id: I3f928b6333531c31e238824f7473864caaba1d48 Reviewed-by: Mats Honkamaa Reviewed-by: Thomas Hartmann --- .../studio-designer-developer-workflow.qdoc | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/doc/qtdesignstudio/src/developers/studio-designer-developer-workflow.qdoc b/doc/qtdesignstudio/src/developers/studio-designer-developer-workflow.qdoc index 45314db2106..e636251eac1 100644 --- a/doc/qtdesignstudio/src/developers/studio-designer-developer-workflow.qdoc +++ b/doc/qtdesignstudio/src/developers/studio-designer-developer-workflow.qdoc @@ -61,4 +61,61 @@ \l Projects and \l {File System} views in \QDS and Qt Creator: \image studio-project-structure.png "\QDS project in \QDS and Qt Creator views" + + \section1 Converting Project Structure for CMake + + \QDS can generate \e CMakeLists.txt and other related files to use with \QC and to compile into + an executable application but only if the project has a certain folder structure. If you have a + \QDS QML project that doesn't have the CMake configuration, follow these steps to convert it's + file structure to correct format. + + \list 1 + \li Create a folder named \e content in the project's folder. This folder contains the + application's main module. + \li Move all QML files of the project's main module to the \e content folder. If your project + has multiple modules, place the other modules in the \e imports or + \e asset_imports folder. + \li If your project's main module has resource folders such as \e fonts or \e {images}, move + them to the \e content folder. + \li Create a folder named \e src in the project's folder. This folder contains C++ code for + compiling the project. + \li If your project doesn't have an \e imports folder for other QML modules, create it + now even if you do not have other modules. The CMake file generator expects it. + \li In the project's \e .qmlproject file: + \list + \li Add \e "." in importPaths. For example: + \code + importPaths: [ "imports", "asset_imports", "." ] + \endcode + \li Change mainFile to \e "content/App.qml": + \code + mainFile: "content/App.qml" + \endcode + \endlist + \li In the \e content folder, create a file named \e App.qml and add the following content: + + \qml + import QtQuick + import QtQuick.Window + import YourImportModuleHere + Window { + width: Constants.width + height: Constants.height + visible: true + title: "YourWindowTitleHere" + { + } + } + \endqml + + \li In \e{App.qml}, modify imported modules, window dimensions, window title, and main QML + class appropriately. + + \note This template assumes that your project has a module named \e YourImportModuleHere in + the \a imports folder containing a singleton class named \a Constants. + This isn't mandatory. + + \li Generate CMake files and C++ source files that are used to compile the application into + an executable file by selecting \uicontrol Build > \uicontrol{Generate CMakeLists.txt files}. + \endlist */ From 5d75f1900b9e1da685cd45ca4cc597994e8f3f8c Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 8 Dec 2021 14:46:01 +0100 Subject: [PATCH 56/77] LanguageClient: fix crash on completion assist cancel The Client might be already deleted when the text editor codeassist calls cancel on the processor. Change-Id: I6b0b484a086456ed9d0543f530aea0fae32c523a Reviewed-by: Christian Stenger --- .../languageclient/languageclientcompletionassist.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/languageclient/languageclientcompletionassist.cpp b/src/plugins/languageclient/languageclientcompletionassist.cpp index 3eec6cbbd9d..bce818f96a9 100644 --- a/src/plugins/languageclient/languageclientcompletionassist.cpp +++ b/src/plugins/languageclient/languageclientcompletionassist.cpp @@ -392,8 +392,10 @@ bool LanguageClientCompletionAssistProcessor::running() void LanguageClientCompletionAssistProcessor::cancel() { if (m_currentRequest.has_value()) { - m_client->cancelRequest(m_currentRequest.value()); - m_client->removeAssistProcessor(this); + if (m_client) { + m_client->cancelRequest(m_currentRequest.value()); + m_client->removeAssistProcessor(this); + } m_currentRequest.reset(); } else if (m_postponedUpdateConnection) { QObject::disconnect(m_postponedUpdateConnection); From 1996c4c8c8f52dcd365d46839404f406baf4f25b Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Tue, 7 Dec 2021 10:40:09 +0100 Subject: [PATCH 57/77] QmlDesigner: Fix connection editor functions Fix the connection editor not picking up all the slots of a model node due to setting a wrong expression in the QmlJS::Document. Change-Id: I2d28e1e779c5293991397ebc2a061c35234d9cae Reviewed-by: Reviewed-by: Thomas Hartmann --- .../qmldesigner/components/bindingeditor/actioneditor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp b/src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp index 1f2a8224d33..c88d072618a 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp @@ -226,9 +226,12 @@ void ActionEditor::prepareConnections() } for (const auto &slotName : modelNode.metaInfo().slotNames()) { + if (slotName.startsWith("q_") || slotName.startsWith("_q_")) + continue; + QmlJS::Document::MutablePtr newDoc = QmlJS::Document::create( QLatin1String(""), QmlJS::Dialect::JavaScript); - newDoc->setSource(QLatin1String(slotName)); + newDoc->setSource(modelNode.id() + "." + QLatin1String(slotName)); newDoc->parseExpression(); QmlJS::AST::ExpressionNode *expression = newDoc->expression(); From 1fdc358eef46bdc195bb935fd95a17a3828c0818 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Wed, 8 Dec 2021 13:15:10 +0100 Subject: [PATCH 58/77] GitHub Actions: Add 10 retries for file download I have noticed that some jobs fail due to missing ninja or ccache executable. With the 10 times retries I hope that these failures will go away. Change-Id: I2d893e0c6cefc69bc4c5f841ae154d4f83f7a922 Reviewed-by: Eike Ziller --- .github/workflows/build_cmake.yml | 43 +++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 2d83c2663d8..91f70ca05ef 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -76,11 +76,24 @@ jobs: endif() set(ninja_url "https://github.com/ninja-build/ninja/releases/download/v${ninja_version}/ninja-${ninja_suffix}") - file(DOWNLOAD "${ninja_url}" ./ninja.zip SHOW_PROGRESS) + foreach(retry RANGE 10) + file(DOWNLOAD "${ninja_url}" ./ninja.zip SHOW_PROGRESS) + file(SIZE ./ninja.zip fileSize) + if (fileSize GREATER 0) + break() + endif() + endforeach() + execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./ninja.zip) set(cmake_url "https://github.com/Kitware/CMake/releases/download/v${cmake_version}/cmake-${cmake_version}-${cmake_suffix}") - file(DOWNLOAD "${cmake_url}" ./cmake.zip SHOW_PROGRESS) + foreach(retry RANGE 10) + file(DOWNLOAD "${cmake_url}" ./cmake.zip SHOW_PROGRESS) + file(SIZE ./cmake.zip fileSize) + if (fileSize GREATER 0) + break() + endif() + endforeach() execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./cmake.zip) # Add to PATH environment variable @@ -357,7 +370,13 @@ jobs: shell: cmake -P {0} run: | set(ccache_url "https://github.com/cristianadam/ccache/releases/download/v$ENV{CCACHE_VERSION}/${{ runner.os }}.tar.xz") - file(DOWNLOAD "${ccache_url}" ./ccache.tar.xz SHOW_PROGRESS) + foreach(retry RANGE 10) + file(DOWNLOAD "${ccache_url}" ./ccache.tar.xz SHOW_PROGRESS) + file(SIZE ./ccache.tar.xz fileSize) + if (fileSize GREATER 0) + break() + endif() + endforeach() execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./ccache.tar.xz) - name: Prepare ccache archive name @@ -393,11 +412,19 @@ jobs: string(JSON name GET "${artifact_js}" "name") if ("${name}" STREQUAL "${{ steps.ccache.outputs.archive_name }}") string(JSON download_url GET "${artifact_js}" "archive_download_url") - file(DOWNLOAD "${download_url}" - "${{ steps.ccache.outputs.archive_name }}.zip" - NETRC_FILE "$ENV{GITHUB_WORKSPACE}/netrc.txt" - NETRC REQUIRED - SHOW_PROGRESS) + + foreach(retry RANGE 10) + file(DOWNLOAD "${download_url}" + "${{ steps.ccache.outputs.archive_name }}.zip" + NETRC_FILE "$ENV{GITHUB_WORKSPACE}/netrc.txt" + NETRC REQUIRED + SHOW_PROGRESS) + file(SIZE "${{ steps.ccache.outputs.archive_name }}.zip" fileSize) + if (fileSize GREATER 0) + break() + endif() + endforeach() + execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf "${{ steps.ccache.outputs.archive_name }}.zip") file(MAKE_DIRECTORY .ccache) execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "../${{ steps.ccache.outputs.archive_name }}.tar" WORKING_DIRECTORY .ccache) From 56af8b905e17254b86bad73a02c023b043039a31 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Thu, 21 Oct 2021 17:23:18 +0200 Subject: [PATCH 59/77] QmlDesigner: Improve project storage update Task-number: QDS-4920 Change-Id: If5a839a6862bab50fe3a3e049cb1214f04eeca1a Reviewed-by: Thomas Hartmann --- .../projectstorage/projectstorage.h | 58 +-- .../projectstorage/projectstorageexceptions.h | 6 + .../projectstorage/projectstoragetypes.h | 41 +- .../projectstorage/projectstorageupdater.cpp | 249 ++++++++++-- .../projectstorage/projectstorageupdater.h | 37 +- .../unit/unittest/gtest-creator-printing.cpp | 53 ++- tests/unit/unittest/gtest-creator-printing.h | 8 + tests/unit/unittest/projectstorage-test.cpp | 26 +- .../unittest/projectstorageupdater-test.cpp | 356 ++++++++++++++++-- tests/unit/unittest/qmltypesparser-test.cpp | 3 +- 10 files changed, 703 insertions(+), 134 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h index 5df23b73854..83131404dee 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h @@ -77,14 +77,15 @@ public: TypeIds typeIdsToBeDeleted; - auto sourceIdValues = Utils::transform(package.sourceIds, [](SourceId sourceId) { - return &sourceId; - }); + auto updatedSourceIdValues = Utils::transform(package.updatedSourceIds, + [](SourceId sourceId) { + return &sourceId; + }); - std::sort(sourceIdValues.begin(), sourceIdValues.end()); + std::sort(updatedSourceIdValues.begin(), updatedSourceIdValues.end()); - synchronizeFileStatuses(package.fileStatuses, sourceIdValues); - synchronizeImports(package.imports, sourceIdValues); + synchronizeFileStatuses(package.fileStatuses, package.updatedFileStatusSourceIds); + synchronizeImports(package.imports, updatedSourceIdValues); synchronizeTypes(package.types, updatedTypeIds, insertedAliasPropertyDeclarations, @@ -92,10 +93,10 @@ public: relinkableAliasPropertyDeclarations, relinkablePropertyDeclarations, relinkablePrototypes, - sourceIdValues); + updatedSourceIdValues); deleteNotUpdatedTypes(updatedTypeIds, - sourceIdValues, + updatedSourceIdValues, typeIdsToBeDeleted, relinkableAliasPropertyDeclarations, relinkablePropertyDeclarations, @@ -503,7 +504,7 @@ private: AliasPropertyDeclarations &relinkableAliasPropertyDeclarations, PropertyDeclarations &relinkablePropertyDeclarations, Prototypes &relinkablePrototypes, - const std::vector &sourceIdValues) + const std::vector &updatedSourceIdValues) { Storage::ExportedTypes exportedTypes; exportedTypes.reserve(types.size() * 3); @@ -517,7 +518,7 @@ private: extractExportedTypes(typeId, type, exportedTypes); } - synchronizeExportedTypes(sourceIdValues, + synchronizeExportedTypes(updatedSourceIdValues, updatedTypeIds, exportedTypes, relinkableAliasPropertyDeclarations, @@ -532,8 +533,13 @@ private: relinkablePropertyDeclarations); } - void synchronizeFileStatuses(FileStatuses &fileStatuses, const std::vector &sourceIdValues) + void synchronizeFileStatuses(FileStatuses &fileStatuses, const SourceIds &updatedSourceIds) { + auto updatedSourceIdValues = Utils::transform(updatedSourceIds, + [](SourceId sourceId) { + return &sourceId; + }); + auto compareKey = [](auto &&first, auto &&second) { return first.sourceId.id - second.sourceId.id; }; @@ -543,7 +549,7 @@ private: }); auto range = selectFileStatusesForSourceIdsStatement.template range( - Utils::span(sourceIdValues)); + Utils::span(updatedSourceIdValues)); auto insert = [&](const FileStatus &fileStatus) { insertFileStatusStatement.write(&fileStatus.sourceId, @@ -567,15 +573,15 @@ private: Sqlite::insertUpdateDelete(range, fileStatuses, compareKey, insert, update, remove); } - void synchronizeImports(Storage::Imports &imports, std::vector &sourceIdValues) + void synchronizeImports(Storage::Imports &imports, std::vector &updatedSourceIdValues) { - deleteDocumentImportsForDeletedDocuments(imports, sourceIdValues); + deleteDocumentImportsForDeletedDocuments(imports, updatedSourceIdValues); - synchronizeDocumentImports(imports, sourceIdValues); + synchronizeDocumentImports(imports, updatedSourceIdValues); } void deleteDocumentImportsForDeletedDocuments(Storage::Imports &imports, - const std::vector &sourceIdValues) + const std::vector &updatedSourceIdValues) { std::vector importSourceIds = Utils::transform>( imports, [](const Storage::Import &import) { return &import.sourceId; }); @@ -584,8 +590,8 @@ private: std::vector documentSourceIdsToBeDeleted; - std::set_difference(sourceIdValues.begin(), - sourceIdValues.end(), + std::set_difference(updatedSourceIdValues.begin(), + updatedSourceIdValues.end(), importSourceIds.begin(), importSourceIds.end(), std::back_inserter(documentSourceIdsToBeDeleted)); @@ -767,7 +773,7 @@ private: } void deleteNotUpdatedTypes(const TypeIds &updatedTypeIds, - const std::vector &sourceIdValues, + const std::vector &updatedSourceIdValues, const TypeIds &typeIdsToBeDeleted, AliasPropertyDeclarations &relinkableAliasPropertyDeclarations, PropertyDeclarations &relinkablePropertyDeclarations, @@ -788,7 +794,7 @@ private: }; selectNotUpdatedTypesInSourcesStatement.readCallback(callback, - Utils::span(sourceIdValues), + Utils::span(updatedSourceIdValues), Utils::span(updatedTypeIdValues)); for (TypeId typeIdToBeDeleted : typeIdsToBeDeleted) callback(&typeIdToBeDeleted); @@ -853,7 +859,7 @@ private: updateAliasPropertyDeclarationValues(updatedAliasPropertyDeclarations); } - void synchronizeExportedTypes(const std::vector &sourceIdValues, + void synchronizeExportedTypes(const std::vector &updatedSourceIdValues, const TypeIds &updatedTypeIds, Storage::ExportedTypes &exportedTypes, AliasPropertyDeclarations &relinkableAliasPropertyDeclarations, @@ -869,9 +875,8 @@ private: &updatedTypeIds.data()->id), updatedTypeIds.size()}; - auto range = selectExportedTypesForSourceIdsStatement - .template range(Utils::span{sourceIdValues}, - typeIdValues); + auto range = selectExportedTypesForSourceIdsStatement.template range( + Utils::span{updatedSourceIdValues}, typeIdValues); auto compareKey = [](const Storage::ExportedTypeView &view, const Storage::ExportedType &type) -> long long { @@ -1151,7 +1156,8 @@ private: PropertyCompare{}); } - void synchronizeDocumentImports(Storage::Imports &imports, const std::vector &sourceIdValues) + void synchronizeDocumentImports(Storage::Imports &imports, + const std::vector &updatedSourceIdValues) { std::sort(imports.begin(), imports.end(), [](auto &&first, auto &&second) { return std::tie(first.sourceId, first.moduleId, first.version) @@ -1159,7 +1165,7 @@ private: }); auto range = selectDocumentImportForSourceIdStatement.template range( - Utils::span{sourceIdValues}); + Utils::span{updatedSourceIdValues}); auto compareKey = [](const Storage::ImportView &view, const Storage::Import &import) -> long long { diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageexceptions.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageexceptions.h index 42790bded68..c95d3e00e28 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageexceptions.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageexceptions.h @@ -107,4 +107,10 @@ public: const char *what() const noexcept override { return "Cannot parse qml types file!"; } }; +class CannotParseQmlDocumentFile : std::exception +{ +public: + const char *what() const noexcept override { return "Cannot parse qml types file!"; } +}; + } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h index 366da00407a..b564372a86b 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h @@ -47,6 +47,8 @@ enum class PropertyDeclarationTraits : unsigned int { enum class TypeNameKind { Native = 0, Exported = 1, QualifiedExported = 2 }; +enum class FileType : char { QmlTypes, QmlDocument }; + constexpr PropertyDeclarationTraits operator|(PropertyDeclarationTraits first, PropertyDeclarationTraits second) { @@ -630,7 +632,7 @@ public: PropertyDeclarationId aliasId; }; -enum class ChangeLevel { Full, Minimal }; +enum class ChangeLevel : char { Full, Minimal, ExcludeExportedTypes }; class Type { @@ -668,6 +670,18 @@ public: , prototypeId{prototypeId} {} + explicit Type(Utils::SmallStringView typeName, + ImportedTypeName prototype, + TypeAccessSemantics accessSemantics, + SourceId sourceId, + ChangeLevel changeLevel) + : typeName{typeName} + , prototype{std::move(prototype)} + , accessSemantics{accessSemantics} + , sourceId{sourceId} + , changeLevel{changeLevel} + {} + explicit Type(Utils::SmallStringView typeName, Utils::SmallStringView prototype, int accessSemantics, @@ -720,9 +734,17 @@ using Types = std::vector; class ProjectData { +public: + ProjectData(ModuleId extraModuleId, SourceId sourceId, FileType fileType) + : extraModuleId{extraModuleId} + , sourceId{sourceId} + , fileType{fileType} + {} + public: ModuleId extraModuleId; SourceId sourceId; + FileType fileType; }; using ProjectDatas = std::vector; @@ -731,30 +753,33 @@ class SynchronizationPackage { public: SynchronizationPackage() = default; - SynchronizationPackage(Imports imports, Types types, SourceIds sourceIds) + SynchronizationPackage(Imports imports, Types types, SourceIds updatedSourceIds) : imports{std::move(imports)} , types{std::move(types)} - , sourceIds(std::move(sourceIds)) + , updatedSourceIds(std::move(updatedSourceIds)) {} SynchronizationPackage(Types types) : types{std::move(types)} {} - SynchronizationPackage(SourceIds sourceIds) - : sourceIds(std::move(sourceIds)) + SynchronizationPackage(SourceIds updatedSourceIds) + : updatedSourceIds(std::move(updatedSourceIds)) {} - SynchronizationPackage(SourceIds sourceIds, FileStatuses fileStatuses) - : sourceIds(std::move(sourceIds)) + SynchronizationPackage(SourceIds updatedSourceIds, FileStatuses fileStatuses) + : updatedSourceIds(std::move(updatedSourceIds)) , fileStatuses(std::move(fileStatuses)) {} public: Imports imports; Types types; - SourceIds sourceIds; + SourceIds updatedSourceIds; FileStatuses fileStatuses; + ProjectDatas projectDatas; + ModuleIds updatedProjectDataModuleIds; + SourceIds updatedFileStatusSourceIds; }; } // namespace QmlDesigner::Storage diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.cpp b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.cpp index cc91a06faee..3f3ac321664 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.cpp +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.cpp @@ -38,6 +38,7 @@ #include namespace QmlDesigner { +namespace { ComponentReferences createComponentReferences(const QMultiHash &components) { @@ -50,45 +51,103 @@ ComponentReferences createComponentReferences(const QMultiHash &idPaths) {} void ProjectUpdater::parseTypeInfos(const QStringList &typeInfos, SourceContextId directoryId, - Storage::SynchronizationPackage &package) + ModuleId moduleId, + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds, + SourceIds ¬UpdatedSourceIds) { QString directory{m_pathCache.sourceContextPath(directoryId)}; @@ -104,37 +166,137 @@ void ProjectUpdater::parseTypeInfos(const QStringList &typeInfos, SourceId sourceId = m_pathCache.sourceId(directoryId, Utils::SmallString{typeInfo}); QString qmltypesPath = directory + "/" + typeInfo; - Storage::ProjectData projectData{ModuleId{}, sourceId}; + auto projectData = package.projectDatas.emplace_back(moduleId, + sourceId, + Storage::FileType::QmlTypes); - parseTypeInfo(projectData, qmltypesPath, package); + parseTypeInfo(projectData, + qmltypesPath, + package, + notUpdatedFileStatusSourceIds, + notUpdatedSourceIds); } } void ProjectUpdater::parseTypeInfos(const Storage::ProjectDatas &projectDatas, - Storage::SynchronizationPackage &package) + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds, + SourceIds ¬UpdatedSourceIds) { for (const Storage::ProjectData &projectData : projectDatas) { + if (projectData.fileType != Storage::FileType::QmlTypes) + continue; + QString qmltypesPath = m_pathCache.sourcePath(projectData.sourceId).toQString(); - parseTypeInfo(projectData, qmltypesPath, package); + parseTypeInfo(projectData, + qmltypesPath, + package, + notUpdatedFileStatusSourceIds, + notUpdatedSourceIds); } } void ProjectUpdater::parseTypeInfo(const Storage::ProjectData &projectData, const QString &qmltypesPath, - Storage::SynchronizationPackage &package) + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds, + SourceIds ¬UpdatedSourceIds) { - if (fileState(projectData.sourceId, package.fileStatuses) == FileState::Changed) { - package.sourceIds.push_back(projectData.sourceId); + auto state = fileState(projectData.sourceId, + package.fileStatuses, + package.updatedFileStatusSourceIds, + notUpdatedFileStatusSourceIds); + switch (state) { + case FileState::Changed: { + package.updatedSourceIds.push_back(projectData.sourceId); + const auto content = m_fileSystem.contentAsQString(qmltypesPath); m_qmlTypesParser.parse(content, package.imports, package.types, projectData); + break; } + case FileState::NotChanged: { + notUpdatedSourceIds.push_back(projectData.sourceId); + break; + } + case FileState::NotExists: + break; + } +} + +void ProjectUpdater::parseQmlComponent(Utils::SmallStringView fileName, + Utils::SmallStringView directory, + Utils::SmallStringView typeName, + Storage::Version version, + ModuleId moduleId, + SourceContextId directoryId, + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds) +{ + SourceId sourceId = m_pathCache.sourceId(directoryId, fileName); + + Storage::Type type; + + auto state = fileState(sourceId, + package.fileStatuses, + package.updatedFileStatusSourceIds, + notUpdatedFileStatusSourceIds); + switch (state) { + case FileState::NotChanged: + type.changeLevel = Storage::ChangeLevel::Minimal; + break; + case FileState::NotExists: + throw CannotParseQmlDocumentFile{}; + case FileState::Changed: + const auto content = m_fileSystem.contentAsQString( + QString{Utils::PathString{directory} + "/" + fileName}); + type = m_qmlDocumentParser.parse(content, package.imports); + break; + } + + package.projectDatas.emplace_back(moduleId, sourceId, Storage::FileType::QmlDocument); + + package.updatedSourceIds.push_back(sourceId); + + type.typeName = fileName; + type.accessSemantics = Storage::TypeAccessSemantics::Reference; + type.sourceId = sourceId; + type.exportedTypes.push_back(Storage::ExportedType{moduleId, typeName, version}); + + package.types.push_back(std::move(type)); +} + +void ProjectUpdater::parseQmlComponent(Utils::SmallStringView fileName, + Utils::SmallStringView filePath, + SourceId sourceId, + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds) +{ + auto state = fileState(sourceId, + package.fileStatuses, + package.updatedFileStatusSourceIds, + notUpdatedFileStatusSourceIds); + if (state != FileState::Changed) + return; + + package.updatedSourceIds.push_back(sourceId); + + const auto content = m_fileSystem.contentAsQString(QString{filePath}); + auto type = m_qmlDocumentParser.parse(content, package.imports); + + type.typeName = fileName; + type.accessSemantics = Storage::TypeAccessSemantics::Reference; + type.sourceId = sourceId; + type.changeLevel = Storage::ChangeLevel::ExcludeExportedTypes; + + package.types.push_back(std::move(type)); } void ProjectUpdater::parseQmlComponents(ComponentReferences components, SourceContextId directoryId, ModuleId moduleId, - Storage::SynchronizationPackage &package) + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds) { std::sort(components.begin(), components.end(), [](auto &&first, auto &&second) { return std::tie(first.get().typeName, first.get().majorVersion, first.get().minorVersion) @@ -148,33 +310,42 @@ void ProjectUpdater::parseQmlComponents(ComponentReferences components, components.erase(newEnd, components.end()); - QString directory{m_pathCache.sourceContextPath(directoryId)}; + auto directory = m_pathCache.sourceContextPath(directoryId); for (const QmlDirParser::Component &component : components) { - Utils::SmallString fileName{component.fileName}; - SourceId sourceId = m_pathCache.sourceId(directoryId, fileName); - - if (fileState(sourceId, package.fileStatuses) != FileState::Changed) - continue; - - package.sourceIds.push_back(sourceId); - - const auto content = m_fileSystem.contentAsQString(directory + "/" + component.fileName); - auto type = m_qmlDocumentParser.parse(content, package.imports); - - type.typeName = fileName; - type.accessSemantics = Storage::TypeAccessSemantics::Reference; - type.sourceId = sourceId; - type.exportedTypes.push_back( - Storage::ExportedType{moduleId, - Utils::SmallString{component.typeName}, - Storage::Version{component.majorVersion, component.minorVersion}}); - - package.types.push_back(std::move(type)); + parseQmlComponent(Utils::SmallString{component.fileName}, + directory, + Utils::SmallString{component.typeName}, + Storage::Version{component.majorVersion, component.minorVersion}, + moduleId, + directoryId, + package, + notUpdatedFileStatusSourceIds); } } -ProjectUpdater::FileState ProjectUpdater::fileState(SourceId sourceId, FileStatuses &fileStatuses) const +void ProjectUpdater::parseQmlComponents(const Storage::ProjectDatas &projectDatas, + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds) +{ + for (const Storage::ProjectData &projectData : projectDatas) { + if (projectData.fileType != Storage::FileType::QmlDocument) + continue; + + SourcePath qmlDocumentPath = m_pathCache.sourcePath(projectData.sourceId); + + parseQmlComponent(qmlDocumentPath.name(), + qmlDocumentPath, + projectData.sourceId, + package, + notUpdatedFileStatusSourceIds); + } +} + +ProjectUpdater::FileState ProjectUpdater::fileState(SourceId sourceId, + FileStatuses &fileStatuses, + SourceIds &updatedSourceIds, + SourceIds ¬UpdatedSourceIds) const { auto currentFileStatus = m_fileStatusCache.find(sourceId); @@ -185,9 +356,11 @@ ProjectUpdater::FileState ProjectUpdater::fileState(SourceId sourceId, FileStatu if (!projectStorageFileStatus.isValid() || projectStorageFileStatus != currentFileStatus) { fileStatuses.push_back(currentFileStatus); + updatedSourceIds.push_back(currentFileStatus.sourceId); return FileState::Changed; } + notUpdatedSourceIds.push_back(currentFileStatus.sourceId); return FileState::NotChanged; } diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.h index e3323d76099..237c75e5dab 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.h @@ -88,18 +88,45 @@ private: void parseTypeInfos(const QStringList &typeInfos, SourceContextId directoryId, - Storage::SynchronizationPackage &package); + ModuleId moduleId, + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds, + SourceIds ¬UpdatedSourceIds); void parseTypeInfos(const Storage::ProjectDatas &projectDatas, - Storage::SynchronizationPackage &package); + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds, + SourceIds ¬UpdatedSourceIds); void parseTypeInfo(const Storage::ProjectData &projectData, const QString &qmltypesPath, - Storage::SynchronizationPackage &package); + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds, + SourceIds ¬UpdatedSourceIds); void parseQmlComponents(ComponentReferences components, SourceContextId directoryId, ModuleId moduleId, - Storage::SynchronizationPackage &package); + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds); + void parseQmlComponents(const Storage::ProjectDatas &projectDatas, + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds); + void parseQmlComponent(Utils::SmallStringView fileName, + Utils::SmallStringView directory, + Utils::SmallStringView typeName, + Storage::Version version, + ModuleId moduleId, + SourceContextId directoryId, + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds); + void parseQmlComponent(Utils::SmallStringView fileName, + Utils::SmallStringView filePath, + SourceId sourceId, + Storage::SynchronizationPackage &package, + SourceIds ¬UpdatedFileStatusSourceIds); - FileState fileState(SourceId sourceId, FileStatuses &fileStatuses) const; + FileState fileState(SourceId sourceId, + FileStatuses &fileStatuses, + SourceIds &updatedSourceIds, + SourceIds ¬UpdatedSourceIds) const; private: ProjectManagerInterface &m_projectManager; diff --git a/tests/unit/unittest/gtest-creator-printing.cpp b/tests/unit/unittest/gtest-creator-printing.cpp index 3123ffcf1d7..49831bab17e 100644 --- a/tests/unit/unittest/gtest-creator-printing.cpp +++ b/tests/unit/unittest/gtest-creator-printing.cpp @@ -1070,8 +1070,56 @@ const char *importKindToText(ImportKind kind) return ""; } +const char *fileTypeToText(FileType fileType) +{ + switch (fileType) { + case FileType::QmlDocument: + return "QmlDocument"; + case FileType::QmlTypes: + return "QmlTypes"; + } + + return ""; +} + +const char *changeLevelToText(ChangeLevel changeLevel) +{ + switch (changeLevel) { + case ChangeLevel::Full: + return "Full"; + case ChangeLevel::Minimal: + return "Minimal"; + case ChangeLevel::ExcludeExportedTypes: + return "ExcludeExportedTypes"; + } + + return ""; +} + } // namespace +std::ostream &operator<<(std::ostream &out, FileType fileType) +{ + return out << fileTypeToText(fileType); +} + +std::ostream &operator<<(std::ostream &out, ChangeLevel changeLevel) +{ + return out << changeLevelToText(changeLevel); +} + +std::ostream &operator<<(std::ostream &out, const SynchronizationPackage &package) +{ + return out << "(" << package.imports << ", " << package.types << ", " + << package.updatedSourceIds << ", " << package.fileStatuses << ", " + << package.updatedFileStatusSourceIds << ", " << package.projectDatas << ")"; +} + +std::ostream &operator<<(std::ostream &out, const ProjectData &data) +{ + return out << "(" << data.extraModuleId << ", " << data.sourceId << ", " << data.fileType << ")"; +} + std::ostream &operator<<(std::ostream &out, TypeAccessSemantics accessSemantics) { return out << typeAccessSemanticsToString(accessSemantics) @@ -1106,7 +1154,7 @@ std::ostream &operator<<(std::ostream &out, const NativeType &nativeType) std::ostream &operator<<(std::ostream &out, const ImportedType &importedType) { - return out << "(\"" << importedType.name << ")"; + return out << "(\"" << importedType.name << "\")"; } std::ostream &operator<<(std::ostream &out, const QualifiedImportedType &importedType) { @@ -1120,7 +1168,8 @@ std::ostream &operator<<(std::ostream &out, const Type &type) << type.prototypeId << ", " << type.accessSemantics << ", source: " << type.sourceId << ", exports: " << type.exportedTypes << ", properties: " << type.propertyDeclarations << ", functions: " << type.functionDeclarations - << ", signals: " << type.signalDeclarations << ")"; + << ", signals: " << type.signalDeclarations << ", changeLevel: " << type.changeLevel + << ")"; } std::ostream &operator<<(std::ostream &out, const PropertyDeclaration &propertyDeclaration) diff --git a/tests/unit/unittest/gtest-creator-printing.h b/tests/unit/unittest/gtest-creator-printing.h index 074fada6d91..d84534b9b0f 100644 --- a/tests/unit/unittest/gtest-creator-printing.h +++ b/tests/unit/unittest/gtest-creator-printing.h @@ -263,6 +263,10 @@ class EnumeratorDeclaration; enum class ImportKind : char; class Import; enum class IsQualified : int; +class ProjectData; +class SynchronizationPackage; +enum class FileType : char; +enum class ChangeLevel : char; std::ostream &operator<<(std::ostream &out, TypeAccessSemantics accessSemantics); std::ostream &operator<<(std::ostream &out, VersionNumber versionNumber); @@ -282,6 +286,10 @@ std::ostream &operator<<(std::ostream &out, const EnumeratorDeclaration &enumera std::ostream &operator<<(std::ostream &out, const ImportKind &importKind); std::ostream &operator<<(std::ostream &out, const Import &import); std::ostream &operator<<(std::ostream &out, IsQualified isQualified); +std::ostream &operator<<(std::ostream &out, const ProjectData &data); +std::ostream &operator<<(std::ostream &out, const SynchronizationPackage &package); +std::ostream &operator<<(std::ostream &out, FileType fileType); +std::ostream &operator<<(std::ostream &out, ChangeLevel changeLevel); } // namespace Storage diff --git a/tests/unit/unittest/projectstorage-test.cpp b/tests/unit/unittest/projectstorage-test.cpp index 43ac728fd99..dd46b0ae59f 100644 --- a/tests/unit/unittest/projectstorage-test.cpp +++ b/tests/unit/unittest/projectstorage-test.cpp @@ -266,7 +266,7 @@ protected: Storage::ExportedType{qmlModuleId, "Obj", Storage::Version{2}}, Storage::ExportedType{qmlNativeModuleId, "QObject"}}}); - package.sourceIds = {sourceId1, sourceId2}; + package.updatedSourceIds = {sourceId1, sourceId2}; return package; } @@ -324,8 +324,8 @@ protected: Storage::ImportedType{"QObject"}, Storage::PropertyDeclarationTraits::IsList}); - package.sourceIds.push_back(sourceId3); - package.sourceIds.push_back(sourceId4); + package.updatedSourceIds.push_back(sourceId3); + package.updatedSourceIds.push_back(sourceId4); return package; } @@ -359,7 +359,7 @@ protected: package.types.back().propertyDeclarations.push_back( Storage::PropertyDeclaration{"objects", Storage::ImportedType{"AliasItem"}, "objects"}); - package.sourceIds.push_back(sourceId5); + package.updatedSourceIds.push_back(sourceId5); return package; } @@ -403,7 +403,7 @@ protected: Storage::ExportedType{qmlModuleId, "BuiltInObj", Storage::Version{3, 4}}, Storage::ExportedType{qmlNativeModuleId, "QObject4"}}}); - package.sourceIds.push_back(sourceId1); + package.updatedSourceIds.push_back(sourceId1); return package; } @@ -2400,7 +2400,7 @@ TEST_F(ProjectStorage, sourceId5, {Storage::ExportedType{qtQuickModuleId, "Object2"}, Storage::ExportedType{qtQuickModuleId, "Obj2"}}}); - package.sourceIds.push_back(sourceId5); + package.updatedSourceIds.push_back(sourceId5); storage.synchronize(package); @@ -2849,7 +2849,7 @@ TEST_F(ProjectStorage, QualifiedPrototype) sourceId3, {Storage::ExportedType{qtQuickModuleId, "Object"}}}); package.imports.emplace_back(qtQuickModuleId, Storage::Version{}, sourceId3); - package.sourceIds.push_back(sourceId3); + package.updatedSourceIds.push_back(sourceId3); storage.synchronize(package); @@ -2884,7 +2884,7 @@ TEST_F(ProjectStorage, QualifiedPrototypeUpperInTheModuleChain) sourceId3, {Storage::ExportedType{qtQuickModuleId, "Object"}}}); package.imports.emplace_back(qtQuickModuleId, Storage::Version{}, sourceId3); - package.sourceIds.push_back(sourceId3); + package.updatedSourceIds.push_back(sourceId3); storage.synchronize(package); @@ -2908,7 +2908,7 @@ TEST_F(ProjectStorage, QualifiedPrototypeWithWrongVersionThrows) sourceId3, {Storage::ExportedType{qtQuickModuleId, "Object"}}}); package.imports.emplace_back(qtQuickModuleId, Storage::Version{}, sourceId3); - package.sourceIds.push_back(sourceId3); + package.updatedSourceIds.push_back(sourceId3); ASSERT_THROW(storage.synchronize(package), QmlDesigner::TypeNameDoesNotExists); } @@ -2924,7 +2924,7 @@ TEST_F(ProjectStorage, QualifiedPrototypeWithVersion) sourceId3, {Storage::ExportedType{qtQuickModuleId, "Object"}}}); package.imports.emplace_back(qtQuickModuleId, Storage::Version{}, sourceId3); - package.sourceIds.push_back(sourceId3); + package.updatedSourceIds.push_back(sourceId3); storage.synchronize(package); @@ -2948,7 +2948,7 @@ TEST_F(ProjectStorage, QualifiedPrototypeWithVersionInTheProtoTypeChain) sourceId3, {Storage::ExportedType{qtQuickModuleId, "Object", Storage::Version{2}}}}); package.imports.emplace_back(qtQuickModuleId, Storage::Version{}, sourceId3); - package.sourceIds.push_back(sourceId3); + package.updatedSourceIds.push_back(sourceId3); storage.synchronize(package); @@ -2981,7 +2981,7 @@ TEST_F(ProjectStorage, QualifiedPropertyDeclarationTypeName) sourceId3, {Storage::ExportedType{qtQuickModuleId, "Object"}}}); package.imports.emplace_back(qtQuickModuleId, Storage::Version{}, sourceId3); - package.sourceIds.push_back(sourceId3); + package.updatedSourceIds.push_back(sourceId3); storage.synchronize(package); @@ -3013,7 +3013,7 @@ TEST_F(ProjectStorage, QualifiedPropertyDeclarationTypeNameInTheModuleChain) sourceId3, {Storage::ExportedType{qtQuickModuleId, "Object"}}}); package.imports.emplace_back(qtQuickModuleId, Storage::Version{}, sourceId3); - package.sourceIds.push_back(sourceId3); + package.updatedSourceIds.push_back(sourceId3); storage.synchronize(package); diff --git a/tests/unit/unittest/projectstorageupdater-test.cpp b/tests/unit/unittest/projectstorageupdater-test.cpp index c26aaa7b70a..ef3109be2a5 100644 --- a/tests/unit/unittest/projectstorageupdater-test.cpp +++ b/tests/unit/unittest/projectstorageupdater-test.cpp @@ -47,21 +47,24 @@ using QmlDesigner::SourceId; using QmlDesigner::Storage::TypeAccessSemantics; namespace Storage = QmlDesigner::Storage; using QmlDesigner::IdPaths; +using QmlDesigner::Storage::FileType; using QmlDesigner::Storage::SynchronizationPackage; using QmlDesigner::Storage::Version; -MATCHER_P4(IsStorageType, +MATCHER_P5(IsStorageType, typeName, prototype, accessSemantics, sourceId, + changeLevel, std::string(negation ? "isn't " : "is ") - + PrintToString(Storage::Type{typeName, prototype, accessSemantics, sourceId})) + + PrintToString(Storage::Type(typeName, prototype, accessSemantics, sourceId, changeLevel))) { const Storage::Type &type = arg; return type.typeName == typeName && type.accessSemantics == accessSemantics - && type.sourceId == sourceId && Storage::ImportedTypeName{prototype} == type.prototype; + && type.sourceId == sourceId && Storage::ImportedTypeName{prototype} == type.prototype + && type.changeLevel == changeLevel; } MATCHER_P3(IsPropertyDeclaration, @@ -107,12 +110,27 @@ MATCHER_P3(IsFileStatus, && fileStatus.lastModified == lastModified; } +MATCHER_P3(IsProjectData, + moduleId, + sourceId, + fileType, + std::string(negation ? "isn't " : "is ") + + PrintToString(Storage::ProjectData{moduleId, sourceId, fileType})) +{ + const Storage::ProjectData &projectData = arg; + + return projectData.sourceId == sourceId && projectData.extraModuleId == moduleId + && projectData.fileType == fileType; +} + MATCHER(PackageIsEmpty, std::string(negation ? "isn't empty" : "is empty")) { const Storage::SynchronizationPackage &package = arg; return package.imports.empty() && package.types.empty() && package.fileStatuses.empty() - && package.sourceIds.empty(); + && package.updatedSourceIds.empty() && package.projectDatas.empty() + && package.updatedFileStatusSourceIds.empty() + && package.updatedProjectDataModuleIds.empty(); } class ProjectStorageUpdater : public testing::Test @@ -135,15 +153,9 @@ public: ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmlDirPathSourceId))) .WillByDefault(Return(FileStatus{qmlDirPathSourceId, 2, 421})); - ON_CALL(projectStorageMock, fetchProjectDatas(Eq(qmlDirPathSourceId))) - .WillByDefault( - Return(QmlDesigner::Storage::ProjectDatas{{ModuleId{}, qmltypesPathSourceId}, - {ModuleId{}, qmltypes2PathSourceId}})); - - QString qmldir{"module Example\ntypeinfo example.qmltypes\n"}; ON_CALL(projectManagerMock, qtQmlDirs()).WillByDefault(Return(QStringList{"/path/qmldir"})); ON_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/qmldir")))) - .WillByDefault(Return(qmldir)); + .WillByDefault(Return(qmldirContent)); ON_CALL(fileSystemMock, fileStatus(Eq(qmlDocumentSourceId1))) .WillByDefault(Return(FileStatus{qmlDocumentSourceId1, 22, 12})); @@ -170,6 +182,10 @@ public: .WillByDefault(Return(qmlDocument2)); ON_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/Second.qml")))) .WillByDefault(Return(qmlDocument3)); + ON_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/example.qmltypes")))) + .WillByDefault(Return(qmltypes1)); + ON_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/example2.qmltypes")))) + .WillByDefault(Return(qmltypes2)); ON_CALL(qmlDocumentParserMock, parse(qmlDocument1, _)).WillByDefault([&](auto, auto &imports) { imports.push_back(import1); @@ -183,6 +199,16 @@ public: imports.push_back(import3); return thirdType; }); + ON_CALL(qmlTypesParserMock, parse(Eq(qmltypes1), _, _, _)) + .WillByDefault([&](auto, auto &imports, auto &types, auto) { + types.push_back(objectType); + imports.push_back(import4); + }); + ON_CALL(qmlTypesParserMock, parse(Eq(qmltypes2), _, _, _)) + .WillByDefault([&](auto, auto &imports, auto &types, auto) { + types.push_back(itemType); + imports.push_back(import5); + }); } protected: @@ -203,8 +229,6 @@ protected: sourcePathCache, qmlDocumentParserMock, qmlTypesParserMock}; - SourceId objectTypeSourceId{sourcePathCache.sourceId("/path/Object")}; - SourceId qmltypesPathSourceId = sourcePathCache.sourceId("/path/example.qmltypes"); SourceId qmltypes2PathSourceId = sourcePathCache.sourceId("/path/example2.qmltypes"); SourceId qmlDirPathSourceId = sourcePathCache.sourceId("/path/qmldir"); @@ -216,9 +240,14 @@ protected: Storage::Type objectType{"QObject", Storage::NativeType{}, Storage::TypeAccessSemantics::Reference, - objectTypeSourceId, + qmltypesPathSourceId, {Storage::ExportedType{exampleModuleId, "Object"}, Storage::ExportedType{exampleModuleId, "Obj"}}}; + Storage::Type itemType{"QItem", + Storage::NativeType{}, + Storage::TypeAccessSemantics::Reference, + qmltypes2PathSourceId, + {Storage::ExportedType{exampleModuleId, "Item"}}}; QString qmlDocument1{"First{}"}; QString qmlDocument2{"Second{}"}; QString qmlDocument3{"Third{}"}; @@ -228,6 +257,11 @@ protected: Storage::Import import1{qmlModuleId, Storage::Version{2, 3}, qmlDocumentSourceId1}; Storage::Import import2{qmlModuleId, Storage::Version{}, qmlDocumentSourceId2}; Storage::Import import3{qmlModuleId, Storage::Version{2}, qmlDocumentSourceId3}; + Storage::Import import4{qmlModuleId, Storage::Version{2, 3}, qmltypesPathSourceId}; + Storage::Import import5{qmlModuleId, Storage::Version{2, 3}, qmltypes2PathSourceId}; + QString qmldirContent{"module Example\ntypeinfo example.qmltypes\n"}; + QString qmltypes1{"Module {\ndependencies: [module1]}"}; + QString qmltypes2{"Module {\ndependencies: [module2]}"}; }; TEST_F(ProjectStorageUpdater, GetContentForQmlDirPathsIfFileStatusIsDifferent) @@ -266,7 +300,8 @@ TEST_F(ProjectStorageUpdater, RequestFileStatusFromFileSystem) TEST_F(ProjectStorageUpdater, GetContentForQmlTypes) { - QString qmldir{"module Example\ntypeinfo example.qmltypes\n"}; + QString qmldir{R"(module Example + typeinfo example.qmltypes)"}; EXPECT_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/qmldir")))) .WillRepeatedly(Return(qmldir)); @@ -277,7 +312,8 @@ TEST_F(ProjectStorageUpdater, GetContentForQmlTypes) TEST_F(ProjectStorageUpdater, GetContentForQmlTypesIfProjectStorageFileStatusIsInvalid) { - QString qmldir{"module Example\ntypeinfo example.qmltypes\n"}; + QString qmldir{R"(module Example + typeinfo example.qmltypes)"}; EXPECT_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/qmldir")))) .WillRepeatedly(Return(qmldir)); ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmltypesPathSourceId))) @@ -290,7 +326,8 @@ TEST_F(ProjectStorageUpdater, GetContentForQmlTypesIfProjectStorageFileStatusIsI TEST_F(ProjectStorageUpdater, DontGetContentForQmlTypesIfFileSystemFileStatusIsInvalid) { - QString qmldir{"module Example\ntypeinfo example.qmltypes\n"}; + QString qmldir{R"(module Example + typeinfo example.qmltypes)"}; EXPECT_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/qmldir")))) .WillRepeatedly(Return(qmldir)); ON_CALL(fileSystemMock, fileStatus(Eq(qmltypesPathSourceId))).WillByDefault(Return(FileStatus{})); @@ -302,7 +339,9 @@ TEST_F(ProjectStorageUpdater, DontGetContentForQmlTypesIfFileSystemFileStatusIsI TEST_F(ProjectStorageUpdater, ParseQmlTypes) { - QString qmldir{"module Example\ntypeinfo example.qmltypes\ntypeinfo example2.qmltypes\n"}; + QString qmldir{R"(module Example + typeinfo example.qmltypes + typeinfo example2.qmltypes)"}; ON_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/qmldir")))).WillByDefault(Return(qmldir)); QString qmltypes{"Module {\ndependencies: []}"}; QString qmltypes2{"Module {\ndependencies: [foo]}"}; @@ -333,8 +372,6 @@ TEST_F(ProjectStorageUpdater, SynchronizeIsEmptyForNoChange) TEST_F(ProjectStorageUpdater, SynchronizeQmlTypes) { - auto qmlDirPathSourceId = sourcePathCache.sourceId("/path/qmldir"); - auto qmltypesPathSourceId = sourcePathCache.sourceId("/path/example.qmltypes"); Storage::Import import{qmlModuleId, Storage::Version{2, 3}, qmltypesPathSourceId}; QString qmltypes{"Module {\ndependencies: []}"}; ON_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/example.qmltypes")))) @@ -350,11 +387,17 @@ TEST_F(ProjectStorageUpdater, SynchronizeQmlTypes) synchronize( AllOf(Field(&SynchronizationPackage::imports, ElementsAre(import)), Field(&SynchronizationPackage::types, ElementsAre(Eq(objectType))), - Field(&SynchronizationPackage::sourceIds, + Field(&SynchronizationPackage::updatedSourceIds, UnorderedElementsAre(qmlDirPathSourceId, qmltypesPathSourceId)), Field(&SynchronizationPackage::fileStatuses, UnorderedElementsAre(IsFileStatus(qmlDirPathSourceId, 21, 421), - IsFileStatus(qmltypesPathSourceId, 21, 421)))))); + IsFileStatus(qmltypesPathSourceId, 21, 421))), + Field(&SynchronizationPackage::projectDatas, + UnorderedElementsAre(IsProjectData(exampleModuleId, + qmltypesPathSourceId, + FileType::QmlTypes))), + Field(&SynchronizationPackage::updatedProjectDataModuleIds, + UnorderedElementsAre(exampleModuleId))))); updater.update(); } @@ -394,8 +437,10 @@ TEST_F(ProjectStorageUpdater, GetContentForQmlDocuments) TEST_F(ProjectStorageUpdater, ParseQmlDocuments) { - QString qmldir{"module Example\nFirstType 1.0 First.qml\nFirstTypeV2 2.2 " - "First.2.qml\nSecondType 2.1 OldSecond.qml\nSecondType 2.2 Second.qml\n"}; + QString qmldir{R"(module Example + FirstType 1.0 First.qml + FirstTypeV2 2.2 First.2.qml + SecondType 2.2 Second.qml)"}; QString qmlDocument1{"First{}"}; QString qmlDocument2{"Second{}"}; QString qmlDocument3{"Third{}"}; @@ -414,10 +459,21 @@ TEST_F(ProjectStorageUpdater, ParseQmlDocuments) updater.update(); } +TEST_F(ProjectStorageUpdater, ParseQmlDocumentsWithNonExistingQmlDocumentThrows) +{ + QString qmldir{R"(module Example + NonexitingType 1.0 NonexitingType.qml)"}; + ON_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/qmldir")))).WillByDefault(Return(qmldir)); + + ASSERT_THROW(updater.update(), QmlDesigner::CannotParseQmlDocumentFile); +} + TEST_F(ProjectStorageUpdater, SynchronizeQmlDocuments) { - QString qmldir{"module Example\nFirstType 1.0 First.qml\nFirstType 2.2 " - "First.2.qml\nSecondType 2.1 OldSecond.qml\nSecondType 2.2 Second.qml\n"}; + QString qmldir{R"(module Example + FirstType 1.0 First.qml + FirstType 2.2 First.2.qml + SecondType 2.2 Second.qml)"}; ON_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/qmldir")))).WillByDefault(Return(qmldir)); EXPECT_CALL( @@ -429,22 +485,30 @@ TEST_F(ProjectStorageUpdater, SynchronizeQmlDocuments) AllOf(IsStorageType("First.qml", Storage::ImportedType{"Object"}, TypeAccessSemantics::Reference, - qmlDocumentSourceId1), + qmlDocumentSourceId1, + Storage::ChangeLevel::Full), Field(&Storage::Type::exportedTypes, ElementsAre(IsExportedType(exampleModuleId, "FirstType", 1, 0)))), AllOf(IsStorageType("First.2.qml", Storage::ImportedType{"Object2"}, TypeAccessSemantics::Reference, - qmlDocumentSourceId2), + qmlDocumentSourceId2, + Storage::ChangeLevel::Full), Field(&Storage::Type::exportedTypes, ElementsAre(IsExportedType(exampleModuleId, "FirstType", 2, 2)))), AllOf(IsStorageType("Second.qml", Storage::ImportedType{"Object3"}, TypeAccessSemantics::Reference, - qmlDocumentSourceId3), + qmlDocumentSourceId3, + Storage::ChangeLevel::Full), Field(&Storage::Type::exportedTypes, ElementsAre(IsExportedType(exampleModuleId, "SecondType", 2, 2)))))), - Field(&SynchronizationPackage::sourceIds, + Field(&SynchronizationPackage::updatedSourceIds, + UnorderedElementsAre(qmlDirPathSourceId, + qmlDocumentSourceId1, + qmlDocumentSourceId2, + qmlDocumentSourceId3)), + Field(&SynchronizationPackage::updatedFileStatusSourceIds, UnorderedElementsAre(qmlDirPathSourceId, qmlDocumentSourceId1, qmlDocumentSourceId2, @@ -453,15 +517,93 @@ TEST_F(ProjectStorageUpdater, SynchronizeQmlDocuments) UnorderedElementsAre(IsFileStatus(qmlDirPathSourceId, 21, 421), IsFileStatus(qmlDocumentSourceId1, 22, 12), IsFileStatus(qmlDocumentSourceId2, 22, 13), - IsFileStatus(qmlDocumentSourceId3, 22, 14)))))); + IsFileStatus(qmlDocumentSourceId3, 22, 14))), + Field(&SynchronizationPackage::updatedProjectDataModuleIds, + UnorderedElementsAre(exampleModuleId)), + Field(&SynchronizationPackage::projectDatas, + UnorderedElementsAre( + IsProjectData(exampleModuleId, qmlDocumentSourceId1, FileType::QmlDocument), + IsProjectData(exampleModuleId, qmlDocumentSourceId2, FileType::QmlDocument), + IsProjectData(exampleModuleId, qmlDocumentSourceId3, FileType::QmlDocument)))))); + + updater.update(); +} + +TEST_F(ProjectStorageUpdater, SynchronizeRemoved) +{ + QString qmldir{R"(module Example + FirstType 1.0 First.qml + FirstType 2.2 First.2.qml + typeinfo example.qmltypes + typeinfo example2.qmltypes + )"}; + ON_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/qmldir")))).WillByDefault(Return(qmldir)); + ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmlDocumentSourceId2))) + .WillByDefault(Return(FileStatus{qmlDocumentSourceId2, 22, 13})); + ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmltypes2PathSourceId))) + .WillByDefault(Return(FileStatus{qmltypes2PathSourceId, 21, 421})); + ON_CALL(projectStorageMock, fetchProjectDatas(Eq(qmlDirPathSourceId))) + .WillByDefault(Return(QmlDesigner::Storage::ProjectDatas{ + {exampleModuleId, qmltypesPathSourceId, FileType::QmlTypes}, + {exampleModuleId, qmltypes2PathSourceId, FileType::QmlTypes}, + {exampleModuleId, qmlDocumentSourceId1, FileType::QmlDocument}, + {exampleModuleId, qmlDocumentSourceId2, FileType::QmlDocument}, + {exampleModuleId, qmlDocumentSourceId3, FileType::QmlDocument}})); + + EXPECT_CALL( + projectStorageMock, + synchronize(AllOf( + Field(&SynchronizationPackage::imports, UnorderedElementsAre(import1, import4)), + Field(&SynchronizationPackage::types, + UnorderedElementsAre( + Eq(objectType), + AllOf(IsStorageType("First.qml", + Storage::ImportedType{"Object"}, + TypeAccessSemantics::Reference, + qmlDocumentSourceId1, + Storage::ChangeLevel::Full), + Field(&Storage::Type::exportedTypes, + ElementsAre(IsExportedType(exampleModuleId, "FirstType", 1, 0)))), + AllOf(IsStorageType("First.2.qml", + Storage::NativeType{}, + TypeAccessSemantics::Reference, + qmlDocumentSourceId2, + Storage::ChangeLevel::Minimal), + Field(&Storage::Type::exportedTypes, + ElementsAre(IsExportedType(exampleModuleId, "FirstType", 2, 2)))))), + Field(&SynchronizationPackage::updatedSourceIds, + UnorderedElementsAre(qmlDirPathSourceId, + qmltypesPathSourceId, + qmlDocumentSourceId1, + qmlDocumentSourceId2, + qmlDocumentSourceId3)), + Field(&SynchronizationPackage::updatedFileStatusSourceIds, + UnorderedElementsAre(qmlDirPathSourceId, + qmlDocumentSourceId1, + qmltypesPathSourceId, + qmlDocumentSourceId3)), + Field(&SynchronizationPackage::fileStatuses, + UnorderedElementsAre(IsFileStatus(qmlDirPathSourceId, 21, 421), + IsFileStatus(qmlDocumentSourceId1, 22, 12), + IsFileStatus(qmltypesPathSourceId, 21, 421))), + Field(&SynchronizationPackage::updatedProjectDataModuleIds, + UnorderedElementsAre(exampleModuleId)), + Field(&SynchronizationPackage::projectDatas, + UnorderedElementsAre( + IsProjectData(exampleModuleId, qmlDocumentSourceId1, FileType::QmlDocument), + IsProjectData(exampleModuleId, qmlDocumentSourceId2, FileType::QmlDocument), + IsProjectData(exampleModuleId, qmltypesPathSourceId, FileType::QmlTypes), + IsProjectData(exampleModuleId, qmltypes2PathSourceId, FileType::QmlTypes)))))); updater.update(); } TEST_F(ProjectStorageUpdater, SynchronizeQmlDocumentsDontUpdateIfUpToDate) { - QString qmldir{"module Example\nFirstType 1.0 First.qml\nFirstType 2.2 " - "First.2.qml\nSecondType 2.1 OldSecond.qml\nSecondType 2.2 Second.qml\n"}; + QString qmldir{R"(module Example + FirstType 1.0 First.qml + FirstType 2.2 First.2.qml + SecondType 2.2 Second.qml)"}; ON_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/qmldir")))).WillByDefault(Return(qmldir)); ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmlDocumentSourceId3))) .WillByDefault(Return(FileStatus{qmlDocumentSourceId3, 22, 14})); @@ -475,29 +617,50 @@ TEST_F(ProjectStorageUpdater, SynchronizeQmlDocumentsDontUpdateIfUpToDate) AllOf(IsStorageType("First.qml", Storage::ImportedType{"Object"}, TypeAccessSemantics::Reference, - qmlDocumentSourceId1), + qmlDocumentSourceId1, + Storage::ChangeLevel::Full), Field(&Storage::Type::exportedTypes, ElementsAre(IsExportedType(exampleModuleId, "FirstType", 1, 0)))), AllOf(IsStorageType("First.2.qml", Storage::ImportedType{"Object2"}, TypeAccessSemantics::Reference, - qmlDocumentSourceId2), + qmlDocumentSourceId2, + Storage::ChangeLevel::Full), Field(&Storage::Type::exportedTypes, - ElementsAre(IsExportedType(exampleModuleId, "FirstType", 2, 2)))))), - Field(&SynchronizationPackage::sourceIds, - UnorderedElementsAre(qmlDirPathSourceId, qmlDocumentSourceId1, qmlDocumentSourceId2)), + ElementsAre(IsExportedType(exampleModuleId, "FirstType", 2, 2)))), + AllOf(IsStorageType("Second.qml", + Storage::NativeType{}, + TypeAccessSemantics::Reference, + qmlDocumentSourceId3, + Storage::ChangeLevel::Minimal), + Field(&Storage::Type::exportedTypes, + ElementsAre(IsExportedType(exampleModuleId, "SecondType", 2, 2)))))), + Field(&SynchronizationPackage::updatedSourceIds, + UnorderedElementsAre(qmlDirPathSourceId, + qmlDocumentSourceId1, + qmlDocumentSourceId2, + qmlDocumentSourceId3)), Field(&SynchronizationPackage::fileStatuses, UnorderedElementsAre(IsFileStatus(qmlDirPathSourceId, 21, 421), IsFileStatus(qmlDocumentSourceId1, 22, 12), - IsFileStatus(qmlDocumentSourceId2, 22, 13)))))); + IsFileStatus(qmlDocumentSourceId2, 22, 13))), + Field(&SynchronizationPackage::updatedFileStatusSourceIds, + UnorderedElementsAre(qmlDirPathSourceId, qmlDocumentSourceId1, qmlDocumentSourceId2)), + Field(&SynchronizationPackage::projectDatas, + UnorderedElementsAre( + IsProjectData(exampleModuleId, qmlDocumentSourceId1, FileType::QmlDocument), + IsProjectData(exampleModuleId, qmlDocumentSourceId2, FileType::QmlDocument), + IsProjectData(exampleModuleId, qmlDocumentSourceId3, FileType::QmlDocument)))))); updater.update(); } TEST_F(ProjectStorageUpdater, UpdateQmldirDocuments) { - QString qmldir{"module Example\nFirstType 1.1 First.qml\nFirstType 2.2 " - "First.2.qml\nSecondType 2.1 OldSecond.qml\nSecondType 2.2 Second.qml\n"}; + QString qmldir{R"(module Example + FirstType 1.1 First.qml + FirstType 2.2 First.2.qml + SecondType 2.2 Second.qml)"}; ON_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/qmldir")))).WillByDefault(Return(qmldir)); ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmlDocumentSourceId3))) .WillByDefault(Return(FileStatus{qmlDocumentSourceId3, 22, 14})); @@ -505,4 +668,115 @@ TEST_F(ProjectStorageUpdater, UpdateQmldirDocuments) updater.pathsWithIdsChanged({}); } +TEST_F(ProjectStorageUpdater, AddSourceIdForForInvalidQmldirFileStatus) +{ + ON_CALL(projectStorageMock, fetchProjectDatas(Eq(qmlDirPathSourceId))) + .WillByDefault(Return(QmlDesigner::Storage::ProjectDatas{ + {exampleModuleId, qmltypesPathSourceId, FileType::QmlTypes}, + {exampleModuleId, qmltypes2PathSourceId, FileType::QmlTypes}})); + ON_CALL(fileSystemMock, fileStatus(Eq(qmlDirPathSourceId))).WillByDefault(Return(FileStatus{})); + + EXPECT_CALL(projectStorageMock, + synchronize(AllOf(Field(&SynchronizationPackage::imports, IsEmpty()), + Field(&SynchronizationPackage::types, IsEmpty()), + Field(&SynchronizationPackage::updatedSourceIds, + UnorderedElementsAre(qmlDirPathSourceId, + qmltypesPathSourceId, + qmltypes2PathSourceId)), + Field(&SynchronizationPackage::fileStatuses, IsEmpty()), + Field(&SynchronizationPackage::updatedFileStatusSourceIds, IsEmpty()), + Field(&SynchronizationPackage::projectDatas, IsEmpty())))); + updater.update(); +} + +TEST_F(ProjectStorageUpdater, SynchronizIfQmldirFileHasNotChanged) +{ + ON_CALL(projectStorageMock, fetchProjectDatas(Eq(qmlDirPathSourceId))) + .WillByDefault(Return(QmlDesigner::Storage::ProjectDatas{ + {exampleModuleId, qmltypesPathSourceId, FileType::QmlTypes}, + {exampleModuleId, qmltypes2PathSourceId, FileType::QmlTypes}, + {exampleModuleId, qmlDocumentSourceId1, FileType::QmlDocument}, + {exampleModuleId, qmlDocumentSourceId2, FileType::QmlDocument}})); + ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmlDirPathSourceId))) + .WillByDefault(Return(FileStatus{qmlDirPathSourceId, 21, 421})); + + EXPECT_CALL(projectStorageMock, + synchronize( + AllOf(Field(&SynchronizationPackage::imports, + UnorderedElementsAre(import1, import2, import4, import5)), + Field(&SynchronizationPackage::types, + UnorderedElementsAre( + Eq(objectType), + Eq(itemType), + AllOf(IsStorageType("First.qml", + Storage::ImportedType{"Object"}, + TypeAccessSemantics::Reference, + qmlDocumentSourceId1, + Storage::ChangeLevel::ExcludeExportedTypes), + Field(&Storage::Type::exportedTypes, IsEmpty())), + AllOf(IsStorageType("First.2.qml", + Storage::ImportedType{"Object2"}, + TypeAccessSemantics::Reference, + qmlDocumentSourceId2, + Storage::ChangeLevel::ExcludeExportedTypes), + Field(&Storage::Type::exportedTypes, IsEmpty())))), + Field(&SynchronizationPackage::updatedSourceIds, + UnorderedElementsAre(qmltypesPathSourceId, + qmltypes2PathSourceId, + qmlDocumentSourceId1, + qmlDocumentSourceId2)), + Field(&SynchronizationPackage::fileStatuses, + UnorderedElementsAre(IsFileStatus(qmltypesPathSourceId, 21, 421), + IsFileStatus(qmltypes2PathSourceId, 21, 421), + IsFileStatus(qmlDocumentSourceId1, 22, 12), + IsFileStatus(qmlDocumentSourceId2, 22, 13))), + Field(&SynchronizationPackage::updatedFileStatusSourceIds, + UnorderedElementsAre(qmltypesPathSourceId, + qmltypes2PathSourceId, + qmlDocumentSourceId1, + qmlDocumentSourceId2)), + Field(&SynchronizationPackage::projectDatas, IsEmpty())))); + + updater.update(); +} + +TEST_F(ProjectStorageUpdater, SynchronizIfQmldirFileHasNotChangedAndSomeUpdatedFiles) +{ + ON_CALL(projectStorageMock, fetchProjectDatas(Eq(qmlDirPathSourceId))) + .WillByDefault(Return(QmlDesigner::Storage::ProjectDatas{ + {exampleModuleId, qmltypesPathSourceId, FileType::QmlTypes}, + {exampleModuleId, qmltypes2PathSourceId, FileType::QmlTypes}, + {exampleModuleId, qmlDocumentSourceId1, FileType::QmlDocument}, + {exampleModuleId, qmlDocumentSourceId2, FileType::QmlDocument}})); + ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmlDirPathSourceId))) + .WillByDefault(Return(FileStatus{qmlDirPathSourceId, 21, 421})); + ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmltypes2PathSourceId))) + .WillByDefault(Return(FileStatus{qmltypes2PathSourceId, 21, 421})); + ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmlDocumentSourceId2))) + .WillByDefault(Return(FileStatus{qmlDocumentSourceId2, 22, 13})); + + EXPECT_CALL( + projectStorageMock, + synchronize( + AllOf(Field(&SynchronizationPackage::imports, UnorderedElementsAre(import1, import4)), + Field(&SynchronizationPackage::types, + UnorderedElementsAre(Eq(objectType), + AllOf(IsStorageType("First.qml", + Storage::ImportedType{"Object"}, + TypeAccessSemantics::Reference, + qmlDocumentSourceId1, + Storage::ChangeLevel::ExcludeExportedTypes), + Field(&Storage::Type::exportedTypes, IsEmpty())))), + Field(&SynchronizationPackage::updatedSourceIds, + UnorderedElementsAre(qmltypesPathSourceId, qmlDocumentSourceId1)), + Field(&SynchronizationPackage::fileStatuses, + UnorderedElementsAre(IsFileStatus(qmltypesPathSourceId, 21, 421), + IsFileStatus(qmlDocumentSourceId1, 22, 12))), + Field(&SynchronizationPackage::updatedFileStatusSourceIds, + UnorderedElementsAre(qmltypesPathSourceId, qmlDocumentSourceId1)), + Field(&SynchronizationPackage::projectDatas, IsEmpty())))); + + updater.update(); +} + } // namespace diff --git a/tests/unit/unittest/qmltypesparser-test.cpp b/tests/unit/unittest/qmltypesparser-test.cpp index 9de60a1807f..0c2c3c26bb2 100644 --- a/tests/unit/unittest/qmltypesparser-test.cpp +++ b/tests/unit/unittest/qmltypesparser-test.cpp @@ -174,7 +174,8 @@ protected: Storage::Types types; SourceId qmltypesFileSourceId{sourcePathCache.sourceId("path/to/types.qmltypes")}; QmlDesigner::Storage::ProjectData projectData{storage.moduleId("QtQml-cppnative"), - qmltypesFileSourceId}; + qmltypesFileSourceId, + Storage::FileType::QmlTypes}; SourceContextId qmltypesFileSourceContextId{sourcePathCache.sourceContextId(qmltypesFileSourceId)}; ModuleId directoryModuleId{storage.moduleId("path/to/")}; }; From 08275566214f6dc29a13785c2c80fc026f21c2ff Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Mon, 29 Nov 2021 17:52:46 +0100 Subject: [PATCH 60/77] QmlDesigner: Synchronize ProjectData to the Storage Task-number: QDS-5644 Change-Id: Icede506974e88dd64fc866b65f4fa9d64a05aea0 Reviewed-by: Thomas Hartmann Reviewed-by: Qt CI Bot Reviewed-by: --- .../projectstorage/projectstorage.h | 109 +++++++++- .../projectstorage/projectstorageexceptions.h | 18 ++ .../projectstorage/projectstoragetypes.h | 32 ++- .../projectstorage/projectstorageupdater.cpp | 13 +- .../projectstorage/projectstorageupdater.h | 3 + .../projectstorage/qmltypesparser.cpp | 2 +- .../unit/unittest/gtest-creator-printing.cpp | 3 +- tests/unit/unittest/projectstorage-test.cpp | 191 +++++++++++++++++- .../unittest/projectstorageupdater-test.cpp | 114 +++++++---- tests/unit/unittest/qmltypesparser-test.cpp | 3 +- 10 files changed, 431 insertions(+), 57 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h index 83131404dee..c1bfb244ff7 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h @@ -110,6 +110,8 @@ public: linkAliases(insertedAliasPropertyDeclarations, updatedAliasPropertyDeclarations); + synchronizeProjectDatas(package.projectDatas, package.updatedProjectSourceIds); + transaction.commit(); } @@ -306,9 +308,20 @@ public: &sourceId); } - Storage::ProjectDatas fetchProjectDatas(SourceId sourceId) const override + Storage::ProjectDatas fetchProjectDatas(SourceId projectSourceId) const override { - return Storage::ProjectDatas{}; + return selectProjectDatasForModuleIdStatement + .template valuesWithTransaction(64, &projectSourceId); + } + + Storage::ProjectDatas fetchProjectDatas(const SourceIds &projectSourceIds) const + { + auto projectSourceIdValues = Utils::transform(projectSourceIds, + [](SourceId id) { return &id; }); + + return selectProjectDatasForModuleIdsStatement + .template valuesWithTransaction(64, + Utils::span(projectSourceIdValues)); } private: @@ -533,6 +546,65 @@ private: relinkablePropertyDeclarations); } + void synchronizeProjectDatas(Storage::ProjectDatas &projectDatas, + const SourceIds &updatedProjectSourceIds) + { + auto updatedProjectSourceIdValues = Utils::transform(updatedProjectSourceIds, + [](SourceId id) { + return &id; + }); + + auto compareKey = [](auto &&first, auto &&second) { + auto projectSourceIdDifference = first.projectSourceId.id - second.projectSourceId.id; + if (projectSourceIdDifference != 0) + return projectSourceIdDifference; + + return first.sourceId.id - second.sourceId.id; + }; + + std::sort(projectDatas.begin(), projectDatas.end(), [&](auto &&first, auto &&second) { + return std::tie(first.projectSourceId, first.sourceId) + < std::tie(second.projectSourceId, second.sourceId); + }); + + auto range = selectProjectDatasForModuleIdsStatement.template range( + Utils::span(updatedProjectSourceIdValues)); + + auto insert = [&](const Storage::ProjectData &projectData) { + if (!projectData.projectSourceId) + throw ProjectDataHasInvalidProjectSourceId{}; + if (!projectData.sourceId) + throw ProjectDataHasInvalidSourceId{}; + if (!projectData.moduleId) + throw ProjectDataHasInvalidModuleId{}; + + insertProjectDataStatement.write(&projectData.projectSourceId, + &projectData.sourceId, + &projectData.moduleId, + static_cast(projectData.fileType)); + }; + + auto update = [&](const Storage::ProjectData &projectDataFromDatabase, + const Storage::ProjectData &projectData) { + if (!projectData.moduleId) + throw ProjectDataHasInvalidModuleId{}; + + if (projectDataFromDatabase.fileType != projectData.fileType + || projectDataFromDatabase.moduleId != projectData.moduleId) { + updateProjectDataStatement.write(&projectData.projectSourceId, + &projectData.sourceId, + &projectData.moduleId, + static_cast(projectData.fileType)); + } + }; + + auto remove = [&](const Storage::ProjectData &projectData) { + deleteProjectDataStatement.write(&projectData.projectSourceId, &projectData.sourceId); + }; + + Sqlite::insertUpdateDelete(range, projectDatas, compareKey, insert, update, remove); + } + void synchronizeFileStatuses(FileStatuses &fileStatuses, const SourceIds &updatedSourceIds) { auto updatedSourceIdValues = Utils::transform(updatedSourceIds, @@ -1766,6 +1838,7 @@ private: createSignalsTable(database); createDocumentImportsTable(database, moduleIdColumn); createFileStatusesTable(database); + createProjectDatasTable(database); transaction.commit(); @@ -2008,6 +2081,22 @@ private: table.initialize(database); } + + void createProjectDatasTable(Database &database) + { + Sqlite::Table table; + table.setUseIfNotExists(true); + table.setUseWithoutRowId(true); + table.setName("projectDatas"); + auto &projectSourceIdColumn = table.addColumn("projectSourceId"); + auto &sourceIdColumn = table.addColumn("sourceId"); + table.addColumn("moduleId"); + table.addColumn("fileType"); + + table.addPrimaryKeyContraint({projectSourceIdColumn, sourceIdColumn}); + + table.initialize(database); + } }; public: @@ -2448,6 +2537,22 @@ public: "DELETE FROM exportedTypeNames WHERE exportedTypeNameId=?", database}; WriteStatement updateExportedTypeNameTypeIdStatement{ "UPDATE exportedTypeNames SET typeId=?2 WHERE exportedTypeNameId=?1", database}; + mutable ReadStatement<4> selectProjectDatasForModuleIdsStatement{ + "SELECT projectSourceId, sourceId, moduleId, fileType FROM projectDatas WHERE " + "projectSourceId IN carray(?1) ORDER BY projectSourceId, sourceId", + database}; + WriteStatement insertProjectDataStatement{"INSERT INTO projectDatas(projectSourceId, sourceId, " + "moduleId, fileType) VALUES(?1, ?2, ?3, ?4)", + database}; + WriteStatement deleteProjectDataStatement{ + "DELETE FROM projectDatas WHERE projectSourceId=?1 AND sourceId=?2", database}; + WriteStatement updateProjectDataStatement{ + "UPDATE projectDatas SET moduleId=?3, fileType=?4 WHERE projectSourceId=?1 AND sourceId=?2", + database}; + mutable ReadStatement<4> selectProjectDatasForModuleIdStatement{ + "SELECT projectSourceId, sourceId, moduleId, fileType FROM projectDatas WHERE " + "projectSourceId=?1", + database}; }; } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageexceptions.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageexceptions.h index c95d3e00e28..9b22a6d1973 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageexceptions.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageexceptions.h @@ -113,4 +113,22 @@ public: const char *what() const noexcept override { return "Cannot parse qml types file!"; } }; +class ProjectDataHasInvalidProjectSourceId : std::exception +{ +public: + const char *what() const noexcept override { return "The project source id is invalid!"; } +}; + +class ProjectDataHasInvalidSourceId : std::exception +{ +public: + const char *what() const noexcept override { return "The source id is invalid!"; } +}; + +class ProjectDataHasInvalidModuleId : std::exception +{ +public: + const char *what() const noexcept override { return "The module id is invalid!"; } +}; + } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h index b564372a86b..927d4294661 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h @@ -735,15 +735,30 @@ using Types = std::vector; class ProjectData { public: - ProjectData(ModuleId extraModuleId, SourceId sourceId, FileType fileType) - : extraModuleId{extraModuleId} + ProjectData(SourceId projectSourceId, SourceId sourceId, ModuleId moduleId, FileType fileType) + : projectSourceId{projectSourceId} , sourceId{sourceId} + , moduleId{moduleId} , fileType{fileType} {} + ProjectData(int projectSourceId, int sourceId, int moduleId, int fileType) + : projectSourceId{projectSourceId} + , sourceId{sourceId} + , moduleId{moduleId} + , fileType{static_cast(fileType)} + {} + + friend bool operator==(const ProjectData &first, const ProjectData &second) + { + return first.projectSourceId == second.projectSourceId && first.sourceId == second.sourceId + && first.moduleId == second.moduleId && first.fileType == second.fileType; + } + public: - ModuleId extraModuleId; + SourceId projectSourceId; SourceId sourceId; + ModuleId moduleId; FileType fileType; }; @@ -767,18 +782,23 @@ public: : updatedSourceIds(std::move(updatedSourceIds)) {} - SynchronizationPackage(SourceIds updatedSourceIds, FileStatuses fileStatuses) - : updatedSourceIds(std::move(updatedSourceIds)) + SynchronizationPackage(SourceIds updatedFileStatusSourceIds, FileStatuses fileStatuses) + : updatedFileStatusSourceIds(std::move(updatedFileStatusSourceIds)) , fileStatuses(std::move(fileStatuses)) {} + SynchronizationPackage(SourceIds updatedProjectSourceIds, ProjectDatas projectDatas) + : projectDatas(std::move(projectDatas)) + , updatedProjectSourceIds(std::move(updatedProjectSourceIds)) + {} + public: Imports imports; Types types; SourceIds updatedSourceIds; FileStatuses fileStatuses; ProjectDatas projectDatas; - ModuleIds updatedProjectDataModuleIds; + SourceIds updatedProjectSourceIds; SourceIds updatedFileStatusSourceIds; }; diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.cpp b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.cpp index 3f3ac321664..62c5cfee8cc 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.cpp +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.cpp @@ -112,17 +112,19 @@ void ProjectUpdater::update() addSourceIds(package.updatedFileStatusSourceIds, qmlProjectDatas); parseTypeInfos(parser.typeInfos(), + qmlDirSourceId, directoryId, moduleId, package, notUpdatedFileStatusSourceIds, notUpdatedSourceIds); parseQmlComponents(createComponentReferences(parser.components()), + qmlDirSourceId, directoryId, moduleId, package, notUpdatedFileStatusSourceIds); - package.updatedProjectDataModuleIds.push_back(moduleId); + package.updatedProjectSourceIds.push_back(qmlDirSourceId); break; } case FileState::NotChanged: { @@ -154,6 +156,7 @@ void ProjectUpdater::update() void ProjectUpdater::pathsWithIdsChanged(const std::vector &idPaths) {} void ProjectUpdater::parseTypeInfos(const QStringList &typeInfos, + SourceId qmldirSourceId, SourceContextId directoryId, ModuleId moduleId, Storage::SynchronizationPackage &package, @@ -166,8 +169,9 @@ void ProjectUpdater::parseTypeInfos(const QStringList &typeInfos, SourceId sourceId = m_pathCache.sourceId(directoryId, Utils::SmallString{typeInfo}); QString qmltypesPath = directory + "/" + typeInfo; - auto projectData = package.projectDatas.emplace_back(moduleId, + auto projectData = package.projectDatas.emplace_back(qmldirSourceId, sourceId, + moduleId, Storage::FileType::QmlTypes); parseTypeInfo(projectData, @@ -229,6 +233,7 @@ void ProjectUpdater::parseQmlComponent(Utils::SmallStringView fileName, Utils::SmallStringView typeName, Storage::Version version, ModuleId moduleId, + SourceId qmldirSourceId, SourceContextId directoryId, Storage::SynchronizationPackage &package, SourceIds ¬UpdatedFileStatusSourceIds) @@ -254,7 +259,7 @@ void ProjectUpdater::parseQmlComponent(Utils::SmallStringView fileName, break; } - package.projectDatas.emplace_back(moduleId, sourceId, Storage::FileType::QmlDocument); + package.projectDatas.emplace_back(qmldirSourceId, sourceId, moduleId, Storage::FileType::QmlDocument); package.updatedSourceIds.push_back(sourceId); @@ -293,6 +298,7 @@ void ProjectUpdater::parseQmlComponent(Utils::SmallStringView fileName, } void ProjectUpdater::parseQmlComponents(ComponentReferences components, + SourceId qmldirSourceId, SourceContextId directoryId, ModuleId moduleId, Storage::SynchronizationPackage &package, @@ -318,6 +324,7 @@ void ProjectUpdater::parseQmlComponents(ComponentReferences components, Utils::SmallString{component.typeName}, Storage::Version{component.majorVersion, component.minorVersion}, moduleId, + qmldirSourceId, directoryId, package, notUpdatedFileStatusSourceIds); diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.h index 237c75e5dab..4ab75a52548 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.h @@ -87,6 +87,7 @@ private: }; void parseTypeInfos(const QStringList &typeInfos, + SourceId qmldirSourceId, SourceContextId directoryId, ModuleId moduleId, Storage::SynchronizationPackage &package, @@ -102,6 +103,7 @@ private: SourceIds ¬UpdatedFileStatusSourceIds, SourceIds ¬UpdatedSourceIds); void parseQmlComponents(ComponentReferences components, + SourceId qmldirSourceId, SourceContextId directoryId, ModuleId moduleId, Storage::SynchronizationPackage &package, @@ -114,6 +116,7 @@ private: Utils::SmallStringView typeName, Storage::Version version, ModuleId moduleId, + SourceId qmldirSourceId, SourceContextId directoryId, Storage::SynchronizationPackage &package, SourceIds ¬UpdatedFileStatusSourceIds); diff --git a/src/plugins/qmldesigner/designercore/projectstorage/qmltypesparser.cpp b/src/plugins/qmldesigner/designercore/projectstorage/qmltypesparser.cpp index f5d09409aa3..e1b66378e62 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/qmltypesparser.cpp +++ b/src/plugins/qmldesigner/designercore/projectstorage/qmltypesparser.cpp @@ -283,7 +283,7 @@ void addTypes(Storage::Types &types, types.reserve(Utils::usize(objects) + types.size()); for (const auto &object : objects) - addType(types, projectData.sourceId, projectData.extraModuleId, *object.get(), storage); + addType(types, projectData.sourceId, projectData.moduleId, *object.get(), storage); } } // namespace diff --git a/tests/unit/unittest/gtest-creator-printing.cpp b/tests/unit/unittest/gtest-creator-printing.cpp index 49831bab17e..772bb71e7fb 100644 --- a/tests/unit/unittest/gtest-creator-printing.cpp +++ b/tests/unit/unittest/gtest-creator-printing.cpp @@ -1117,7 +1117,8 @@ std::ostream &operator<<(std::ostream &out, const SynchronizationPackage &packag std::ostream &operator<<(std::ostream &out, const ProjectData &data) { - return out << "(" << data.extraModuleId << ", " << data.sourceId << ", " << data.fileType << ")"; + return out << "(" << data.projectSourceId << ", " << data.sourceId << ", " << data.moduleId + << ", " << data.fileType << ")"; } std::ostream &operator<<(std::ostream &out, TypeAccessSemantics accessSemantics) diff --git a/tests/unit/unittest/projectstorage-test.cpp b/tests/unit/unittest/projectstorage-test.cpp index dd46b0ae59f..69d7e90b979 100644 --- a/tests/unit/unittest/projectstorage-test.cpp +++ b/tests/unit/unittest/projectstorage-test.cpp @@ -435,6 +435,8 @@ protected: SourceId sourceId3{sourcePathCache.sourceId(path3)}; SourceId sourceId4{sourcePathCache.sourceId(path4)}; SourceId sourceId5{sourcePathCache.sourceId(path5)}; + SourceId qmlProjectSourceId{sourcePathCache.sourceId("/path1/qmldir")}; + SourceId qtQuickProjectSourceId{sourcePathCache.sourceId("/path2/qmldir")}; ModuleId qmlModuleId{storage.moduleId("Qml")}; ModuleId qmlNativeModuleId{storage.moduleId("Qml-cppnative")}; ModuleId qtQuickModuleId{storage.moduleId("QtQuick")}; @@ -3115,7 +3117,7 @@ TEST_F(ProjectStorage, UpdateFileStatus) UnorderedElementsAre(fileStatus1, fileStatus2b)); } -TEST_F(ProjectStorage, ThrowForInvalidSourceId) +TEST_F(ProjectStorage, ThrowForInvalidSourceIdInFileStatus) { FileStatus fileStatus1{SourceId{}, 100, 100}; @@ -3654,4 +3656,191 @@ TEST_F(ProjectStorage, PopulateModuleCache) ASSERT_THAT(newStorage.moduleName(id), Eq("Qml")); } +TEST_F(ProjectStorage, AddProjectDataes) +{ + Storage::ProjectData projectData1{qmlProjectSourceId, + sourceId1, + qmlModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData2{qmlProjectSourceId, + sourceId2, + qmlModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData3{qtQuickProjectSourceId, + sourceId3, + qtQuickModuleId, + Storage::FileType::QmlTypes}; + + storage.synchronize(SynchronizationPackage{{qmlProjectSourceId, qtQuickProjectSourceId}, + {projectData1, projectData2, projectData3}}); + + ASSERT_THAT(storage.fetchProjectDatas({qmlProjectSourceId, qtQuickProjectSourceId}), + UnorderedElementsAre(projectData1, projectData2, projectData3)); +} + +TEST_F(ProjectStorage, RemoveProjectData) +{ + Storage::ProjectData projectData1{qmlProjectSourceId, + sourceId1, + qmlModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData2{qmlProjectSourceId, + sourceId2, + qmlModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData3{qtQuickProjectSourceId, + sourceId3, + qtQuickModuleId, + Storage::FileType::QmlTypes}; + storage.synchronize(SynchronizationPackage{{qmlProjectSourceId, qtQuickProjectSourceId}, + {projectData1, projectData2, projectData3}}); + + storage.synchronize( + SynchronizationPackage{{qmlProjectSourceId, qtQuickProjectSourceId}, {projectData1}}); + + ASSERT_THAT(storage.fetchProjectDatas({qmlProjectSourceId, qtQuickProjectSourceId}), + UnorderedElementsAre(projectData1)); +} + +TEST_F(ProjectStorage, UpdateProjectDataFileType) +{ + Storage::ProjectData projectData1{qmlProjectSourceId, + sourceId1, + qmlModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData2{qmlProjectSourceId, + sourceId2, + qmlModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData2b{qmlProjectSourceId, + sourceId2, + qmlModuleId, + Storage::FileType::QmlTypes}; + Storage::ProjectData projectData3{qtQuickProjectSourceId, + sourceId3, + qtQuickModuleId, + Storage::FileType::QmlTypes}; + storage.synchronize(SynchronizationPackage{{qmlProjectSourceId, qtQuickProjectSourceId}, + {projectData1, projectData2, projectData3}}); + + storage.synchronize(SynchronizationPackage{{qmlProjectSourceId}, {projectData1, projectData2b}}); + + ASSERT_THAT(storage.fetchProjectDatas({qmlProjectSourceId, qtQuickProjectSourceId}), + UnorderedElementsAre(projectData1, projectData2b, projectData3)); +} + +TEST_F(ProjectStorage, UpdateProjectDataModuleId) +{ + Storage::ProjectData projectData1{qmlProjectSourceId, + sourceId1, + qmlModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData2{qmlProjectSourceId, + sourceId2, + qmlModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData2b{qmlProjectSourceId, + sourceId2, + qtQuickModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData3{qtQuickProjectSourceId, + sourceId3, + qtQuickModuleId, + Storage::FileType::QmlTypes}; + storage.synchronize(SynchronizationPackage{{qmlProjectSourceId, qtQuickProjectSourceId}, + {projectData1, projectData2, projectData3}}); + + storage.synchronize(SynchronizationPackage{{qmlProjectSourceId}, {projectData1, projectData2b}}); + + ASSERT_THAT(storage.fetchProjectDatas({qmlProjectSourceId, qtQuickProjectSourceId}), + UnorderedElementsAre(projectData1, projectData2b, projectData3)); +} + +TEST_F(ProjectStorage, ThrowForInvalidSourceIdInProjectData) +{ + Storage::ProjectData projectData1{qmlProjectSourceId, + SourceId{}, + qmlModuleId, + Storage::FileType::QmlDocument}; + + ASSERT_THROW(storage.synchronize(SynchronizationPackage{{qmlProjectSourceId}, {projectData1}}), + QmlDesigner::ProjectDataHasInvalidSourceId); +} + +TEST_F(ProjectStorage, ThrowForInvalidModuleIdInProjectData) +{ + Storage::ProjectData projectData1{qmlProjectSourceId, + sourceId1, + ModuleId{}, + Storage::FileType::QmlDocument}; + + ASSERT_THROW(storage.synchronize(SynchronizationPackage{{qmlProjectSourceId}, {projectData1}}), + QmlDesigner::ProjectDataHasInvalidModuleId); +} + +TEST_F(ProjectStorage, ThrowForUpdatingWithInvalidModuleIdInProjectData) +{ + Storage::ProjectData projectData1{qmlProjectSourceId, + sourceId1, + qmlModuleId, + Storage::FileType::QmlDocument}; + storage.synchronize(SynchronizationPackage{{qmlProjectSourceId}, {projectData1}}); + projectData1.moduleId = ModuleId{}; + + ASSERT_THROW(storage.synchronize(SynchronizationPackage{{qmlProjectSourceId}, {projectData1}}), + QmlDesigner::ProjectDataHasInvalidModuleId); +} + +TEST_F(ProjectStorage, ThrowForUpdatingWithInvalidProjectSourceIdInProjectData) +{ + Storage::ProjectData projectData1{SourceId{}, sourceId1, qmlModuleId, Storage::FileType::QmlDocument}; + + ASSERT_THROW(storage.synchronize(SynchronizationPackage{{qmlProjectSourceId}, {projectData1}}), + QmlDesigner::ProjectDataHasInvalidProjectSourceId); +} + +TEST_F(ProjectStorage, FetchProjectDatasByModuleIds) +{ + Storage::ProjectData projectData1{qmlProjectSourceId, + sourceId1, + qmlModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData2{qmlProjectSourceId, + sourceId2, + qmlModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData3{qtQuickProjectSourceId, + sourceId3, + qtQuickModuleId, + Storage::FileType::QmlTypes}; + storage.synchronize(SynchronizationPackage{{qmlProjectSourceId, qtQuickProjectSourceId}, + {projectData1, projectData2, projectData3}}); + + auto projectDatas = storage.fetchProjectDatas({qmlProjectSourceId, qtQuickProjectSourceId}); + + ASSERT_THAT(projectDatas, UnorderedElementsAre(projectData1, projectData2, projectData3)); +} + +TEST_F(ProjectStorage, FetchProjectDatasByModuleId) +{ + Storage::ProjectData projectData1{qmlProjectSourceId, + sourceId1, + qmlModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData2{qmlProjectSourceId, + sourceId2, + qmlModuleId, + Storage::FileType::QmlDocument}; + Storage::ProjectData projectData3{qtQuickProjectSourceId, + sourceId3, + qtQuickModuleId, + Storage::FileType::QmlTypes}; + storage.synchronize(SynchronizationPackage{{qmlProjectSourceId, qtQuickProjectSourceId}, + {projectData1, projectData2, projectData3}}); + + auto projectData = storage.fetchProjectDatas(qmlProjectSourceId); + + ASSERT_THAT(projectData, UnorderedElementsAre(projectData1, projectData2)); +} + } // namespace diff --git a/tests/unit/unittest/projectstorageupdater-test.cpp b/tests/unit/unittest/projectstorageupdater-test.cpp index ef3109be2a5..63da5a66287 100644 --- a/tests/unit/unittest/projectstorageupdater-test.cpp +++ b/tests/unit/unittest/projectstorageupdater-test.cpp @@ -110,17 +110,18 @@ MATCHER_P3(IsFileStatus, && fileStatus.lastModified == lastModified; } -MATCHER_P3(IsProjectData, - moduleId, +MATCHER_P4(IsProjectData, + projectSourceId, sourceId, + moduleId, fileType, std::string(negation ? "isn't " : "is ") - + PrintToString(Storage::ProjectData{moduleId, sourceId, fileType})) + + PrintToString(Storage::ProjectData{projectSourceId, sourceId, moduleId, fileType})) { const Storage::ProjectData &projectData = arg; - return projectData.sourceId == sourceId && projectData.extraModuleId == moduleId - && projectData.fileType == fileType; + return projectData.projectSourceId == projectSourceId && projectData.sourceId == sourceId + && projectData.moduleId == moduleId && projectData.fileType == fileType; } MATCHER(PackageIsEmpty, std::string(negation ? "isn't empty" : "is empty")) @@ -129,8 +130,7 @@ MATCHER(PackageIsEmpty, std::string(negation ? "isn't empty" : "is empty")) return package.imports.empty() && package.types.empty() && package.fileStatuses.empty() && package.updatedSourceIds.empty() && package.projectDatas.empty() - && package.updatedFileStatusSourceIds.empty() - && package.updatedProjectDataModuleIds.empty(); + && package.updatedFileStatusSourceIds.empty() && package.updatedProjectSourceIds.empty(); } class ProjectStorageUpdater : public testing::Test @@ -393,11 +393,12 @@ TEST_F(ProjectStorageUpdater, SynchronizeQmlTypes) UnorderedElementsAre(IsFileStatus(qmlDirPathSourceId, 21, 421), IsFileStatus(qmltypesPathSourceId, 21, 421))), Field(&SynchronizationPackage::projectDatas, - UnorderedElementsAre(IsProjectData(exampleModuleId, + UnorderedElementsAre(IsProjectData(qmlDirPathSourceId, qmltypesPathSourceId, + exampleModuleId, FileType::QmlTypes))), - Field(&SynchronizationPackage::updatedProjectDataModuleIds, - UnorderedElementsAre(exampleModuleId))))); + Field(&SynchronizationPackage::updatedProjectSourceIds, + UnorderedElementsAre(qmlDirPathSourceId))))); updater.update(); } @@ -518,13 +519,21 @@ TEST_F(ProjectStorageUpdater, SynchronizeQmlDocuments) IsFileStatus(qmlDocumentSourceId1, 22, 12), IsFileStatus(qmlDocumentSourceId2, 22, 13), IsFileStatus(qmlDocumentSourceId3, 22, 14))), - Field(&SynchronizationPackage::updatedProjectDataModuleIds, - UnorderedElementsAre(exampleModuleId)), + Field(&SynchronizationPackage::updatedProjectSourceIds, + UnorderedElementsAre(qmlDirPathSourceId)), Field(&SynchronizationPackage::projectDatas, - UnorderedElementsAre( - IsProjectData(exampleModuleId, qmlDocumentSourceId1, FileType::QmlDocument), - IsProjectData(exampleModuleId, qmlDocumentSourceId2, FileType::QmlDocument), - IsProjectData(exampleModuleId, qmlDocumentSourceId3, FileType::QmlDocument)))))); + UnorderedElementsAre(IsProjectData(qmlDirPathSourceId, + qmlDocumentSourceId1, + exampleModuleId, + FileType::QmlDocument), + IsProjectData(qmlDirPathSourceId, + qmlDocumentSourceId2, + exampleModuleId, + FileType::QmlDocument), + IsProjectData(qmlDirPathSourceId, + qmlDocumentSourceId3, + exampleModuleId, + FileType::QmlDocument)))))); updater.update(); } @@ -544,11 +553,11 @@ TEST_F(ProjectStorageUpdater, SynchronizeRemoved) .WillByDefault(Return(FileStatus{qmltypes2PathSourceId, 21, 421})); ON_CALL(projectStorageMock, fetchProjectDatas(Eq(qmlDirPathSourceId))) .WillByDefault(Return(QmlDesigner::Storage::ProjectDatas{ - {exampleModuleId, qmltypesPathSourceId, FileType::QmlTypes}, - {exampleModuleId, qmltypes2PathSourceId, FileType::QmlTypes}, - {exampleModuleId, qmlDocumentSourceId1, FileType::QmlDocument}, - {exampleModuleId, qmlDocumentSourceId2, FileType::QmlDocument}, - {exampleModuleId, qmlDocumentSourceId3, FileType::QmlDocument}})); + {qmlDirPathSourceId, qmltypesPathSourceId, exampleModuleId, FileType::QmlTypes}, + {qmlDirPathSourceId, qmltypes2PathSourceId, exampleModuleId, FileType::QmlTypes}, + {qmlDirPathSourceId, qmlDocumentSourceId1, exampleModuleId, FileType::QmlDocument}, + {qmlDirPathSourceId, qmlDocumentSourceId2, exampleModuleId, FileType::QmlDocument}, + {qmlDirPathSourceId, qmlDocumentSourceId3, exampleModuleId, FileType::QmlDocument}})); EXPECT_CALL( projectStorageMock, @@ -586,14 +595,25 @@ TEST_F(ProjectStorageUpdater, SynchronizeRemoved) UnorderedElementsAre(IsFileStatus(qmlDirPathSourceId, 21, 421), IsFileStatus(qmlDocumentSourceId1, 22, 12), IsFileStatus(qmltypesPathSourceId, 21, 421))), - Field(&SynchronizationPackage::updatedProjectDataModuleIds, - UnorderedElementsAre(exampleModuleId)), + Field(&SynchronizationPackage::updatedProjectSourceIds, + UnorderedElementsAre(qmlDirPathSourceId)), Field(&SynchronizationPackage::projectDatas, - UnorderedElementsAre( - IsProjectData(exampleModuleId, qmlDocumentSourceId1, FileType::QmlDocument), - IsProjectData(exampleModuleId, qmlDocumentSourceId2, FileType::QmlDocument), - IsProjectData(exampleModuleId, qmltypesPathSourceId, FileType::QmlTypes), - IsProjectData(exampleModuleId, qmltypes2PathSourceId, FileType::QmlTypes)))))); + UnorderedElementsAre(IsProjectData(qmlDirPathSourceId, + qmlDocumentSourceId1, + exampleModuleId, + FileType::QmlDocument), + IsProjectData(qmlDirPathSourceId, + qmlDocumentSourceId2, + exampleModuleId, + FileType::QmlDocument), + IsProjectData(qmlDirPathSourceId, + qmltypesPathSourceId, + exampleModuleId, + FileType::QmlTypes), + IsProjectData(qmlDirPathSourceId, + qmltypes2PathSourceId, + exampleModuleId, + FileType::QmlTypes)))))); updater.update(); } @@ -646,11 +666,21 @@ TEST_F(ProjectStorageUpdater, SynchronizeQmlDocumentsDontUpdateIfUpToDate) IsFileStatus(qmlDocumentSourceId2, 22, 13))), Field(&SynchronizationPackage::updatedFileStatusSourceIds, UnorderedElementsAre(qmlDirPathSourceId, qmlDocumentSourceId1, qmlDocumentSourceId2)), + Field(&SynchronizationPackage::updatedProjectSourceIds, + UnorderedElementsAre(qmlDirPathSourceId)), Field(&SynchronizationPackage::projectDatas, - UnorderedElementsAre( - IsProjectData(exampleModuleId, qmlDocumentSourceId1, FileType::QmlDocument), - IsProjectData(exampleModuleId, qmlDocumentSourceId2, FileType::QmlDocument), - IsProjectData(exampleModuleId, qmlDocumentSourceId3, FileType::QmlDocument)))))); + UnorderedElementsAre(IsProjectData(qmlDirPathSourceId, + qmlDocumentSourceId1, + exampleModuleId, + FileType::QmlDocument), + IsProjectData(qmlDirPathSourceId, + qmlDocumentSourceId2, + exampleModuleId, + FileType::QmlDocument), + IsProjectData(qmlDirPathSourceId, + qmlDocumentSourceId3, + exampleModuleId, + FileType::QmlDocument)))))); updater.update(); } @@ -672,8 +702,8 @@ TEST_F(ProjectStorageUpdater, AddSourceIdForForInvalidQmldirFileStatus) { ON_CALL(projectStorageMock, fetchProjectDatas(Eq(qmlDirPathSourceId))) .WillByDefault(Return(QmlDesigner::Storage::ProjectDatas{ - {exampleModuleId, qmltypesPathSourceId, FileType::QmlTypes}, - {exampleModuleId, qmltypes2PathSourceId, FileType::QmlTypes}})); + {qmlDirPathSourceId, qmltypesPathSourceId, exampleModuleId, FileType::QmlTypes}, + {qmlDirPathSourceId, qmltypes2PathSourceId, exampleModuleId, FileType::QmlTypes}})); ON_CALL(fileSystemMock, fileStatus(Eq(qmlDirPathSourceId))).WillByDefault(Return(FileStatus{})); EXPECT_CALL(projectStorageMock, @@ -693,10 +723,10 @@ TEST_F(ProjectStorageUpdater, SynchronizIfQmldirFileHasNotChanged) { ON_CALL(projectStorageMock, fetchProjectDatas(Eq(qmlDirPathSourceId))) .WillByDefault(Return(QmlDesigner::Storage::ProjectDatas{ - {exampleModuleId, qmltypesPathSourceId, FileType::QmlTypes}, - {exampleModuleId, qmltypes2PathSourceId, FileType::QmlTypes}, - {exampleModuleId, qmlDocumentSourceId1, FileType::QmlDocument}, - {exampleModuleId, qmlDocumentSourceId2, FileType::QmlDocument}})); + {qmlDirPathSourceId, qmltypesPathSourceId, exampleModuleId, FileType::QmlTypes}, + {qmlDirPathSourceId, qmltypes2PathSourceId, exampleModuleId, FileType::QmlTypes}, + {qmlDirPathSourceId, qmlDocumentSourceId1, exampleModuleId, FileType::QmlDocument}, + {qmlDirPathSourceId, qmlDocumentSourceId2, exampleModuleId, FileType::QmlDocument}})); ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmlDirPathSourceId))) .WillByDefault(Return(FileStatus{qmlDirPathSourceId, 21, 421})); @@ -744,10 +774,10 @@ TEST_F(ProjectStorageUpdater, SynchronizIfQmldirFileHasNotChangedAndSomeUpdatedF { ON_CALL(projectStorageMock, fetchProjectDatas(Eq(qmlDirPathSourceId))) .WillByDefault(Return(QmlDesigner::Storage::ProjectDatas{ - {exampleModuleId, qmltypesPathSourceId, FileType::QmlTypes}, - {exampleModuleId, qmltypes2PathSourceId, FileType::QmlTypes}, - {exampleModuleId, qmlDocumentSourceId1, FileType::QmlDocument}, - {exampleModuleId, qmlDocumentSourceId2, FileType::QmlDocument}})); + {qmlDirPathSourceId, qmltypesPathSourceId, exampleModuleId, FileType::QmlTypes}, + {qmlDirPathSourceId, qmltypes2PathSourceId, exampleModuleId, FileType::QmlTypes}, + {qmlDirPathSourceId, qmlDocumentSourceId1, exampleModuleId, FileType::QmlDocument}, + {qmlDirPathSourceId, qmlDocumentSourceId2, exampleModuleId, FileType::QmlDocument}})); ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmlDirPathSourceId))) .WillByDefault(Return(FileStatus{qmlDirPathSourceId, 21, 421})); ON_CALL(projectStorageMock, fetchFileStatus(Eq(qmltypes2PathSourceId))) diff --git a/tests/unit/unittest/qmltypesparser-test.cpp b/tests/unit/unittest/qmltypesparser-test.cpp index 0c2c3c26bb2..46c484accce 100644 --- a/tests/unit/unittest/qmltypesparser-test.cpp +++ b/tests/unit/unittest/qmltypesparser-test.cpp @@ -173,8 +173,9 @@ protected: Storage::Imports imports; Storage::Types types; SourceId qmltypesFileSourceId{sourcePathCache.sourceId("path/to/types.qmltypes")}; - QmlDesigner::Storage::ProjectData projectData{storage.moduleId("QtQml-cppnative"), + QmlDesigner::Storage::ProjectData projectData{qmltypesFileSourceId, qmltypesFileSourceId, + storage.moduleId("QtQml-cppnative"), Storage::FileType::QmlTypes}; SourceContextId qmltypesFileSourceContextId{sourcePathCache.sourceContextId(qmltypesFileSourceId)}; ModuleId directoryModuleId{storage.moduleId("path/to/")}; From 3e52e8b64395b736a434b6bbb0e1531eb9f936f8 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 30 Nov 2021 14:39:39 +0100 Subject: [PATCH 61/77] QmlDesigner: Cleanup the id casting The ids were sometimes casted, sometimes copied to integer values. Now the cast is moved to an extra function. Change-Id: I3dcdbde05461f2fca700cc9020758738266d5fd2 Reviewed-by: Qt CI Bot Reviewed-by: Thomas Hartmann --- .../designercore/include/projectstorageids.h | 10 +++ .../projectstorage/projectstorage.h | 80 +++++++------------ 2 files changed, 40 insertions(+), 50 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/include/projectstorageids.h b/src/plugins/qmldesigner/designercore/include/projectstorageids.h index 765f2c9c659..241a0526582 100644 --- a/src/plugins/qmldesigner/designercore/include/projectstorageids.h +++ b/src/plugins/qmldesigner/designercore/include/projectstorageids.h @@ -25,6 +25,8 @@ #pragma once +#include + #include namespace QmlDesigner { @@ -73,6 +75,14 @@ public: InternalIntergerType id = -1; }; +template +auto toIntegers(const Container &container) +{ + using DataType = typename Container::value_type::DatabaseType; + const DataType *data = reinterpret_cast(container.data()); + return Utils::span{data, container.size()}; +} + enum class BasicIdType { Type, PropertyType, diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h index c1bfb244ff7..c437fa78093 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h @@ -77,15 +77,10 @@ public: TypeIds typeIdsToBeDeleted; - auto updatedSourceIdValues = Utils::transform(package.updatedSourceIds, - [](SourceId sourceId) { - return &sourceId; - }); - - std::sort(updatedSourceIdValues.begin(), updatedSourceIdValues.end()); + std::sort(package.updatedSourceIds.begin(), package.updatedSourceIds.end()); synchronizeFileStatuses(package.fileStatuses, package.updatedFileStatusSourceIds); - synchronizeImports(package.imports, updatedSourceIdValues); + synchronizeImports(package.imports, package.updatedSourceIds); synchronizeTypes(package.types, updatedTypeIds, insertedAliasPropertyDeclarations, @@ -93,10 +88,10 @@ public: relinkableAliasPropertyDeclarations, relinkablePropertyDeclarations, relinkablePrototypes, - updatedSourceIdValues); + package.updatedSourceIds); deleteNotUpdatedTypes(updatedTypeIds, - updatedSourceIdValues, + package.updatedSourceIds, typeIdsToBeDeleted, relinkableAliasPropertyDeclarations, relinkablePropertyDeclarations, @@ -316,12 +311,8 @@ public: Storage::ProjectDatas fetchProjectDatas(const SourceIds &projectSourceIds) const { - auto projectSourceIdValues = Utils::transform(projectSourceIds, - [](SourceId id) { return &id; }); - return selectProjectDatasForModuleIdsStatement - .template valuesWithTransaction(64, - Utils::span(projectSourceIdValues)); + .template valuesWithTransaction(64, toIntegers(projectSourceIds)); } private: @@ -517,7 +508,7 @@ private: AliasPropertyDeclarations &relinkableAliasPropertyDeclarations, PropertyDeclarations &relinkablePropertyDeclarations, Prototypes &relinkablePrototypes, - const std::vector &updatedSourceIdValues) + const SourceIds &updatedSourceIds) { Storage::ExportedTypes exportedTypes; exportedTypes.reserve(types.size() * 3); @@ -531,7 +522,7 @@ private: extractExportedTypes(typeId, type, exportedTypes); } - synchronizeExportedTypes(updatedSourceIdValues, + synchronizeExportedTypes(updatedSourceIds, updatedTypeIds, exportedTypes, relinkableAliasPropertyDeclarations, @@ -549,11 +540,6 @@ private: void synchronizeProjectDatas(Storage::ProjectDatas &projectDatas, const SourceIds &updatedProjectSourceIds) { - auto updatedProjectSourceIdValues = Utils::transform(updatedProjectSourceIds, - [](SourceId id) { - return &id; - }); - auto compareKey = [](auto &&first, auto &&second) { auto projectSourceIdDifference = first.projectSourceId.id - second.projectSourceId.id; if (projectSourceIdDifference != 0) @@ -568,7 +554,7 @@ private: }); auto range = selectProjectDatasForModuleIdsStatement.template range( - Utils::span(updatedProjectSourceIdValues)); + toIntegers(updatedProjectSourceIds)); auto insert = [&](const Storage::ProjectData &projectData) { if (!projectData.projectSourceId) @@ -621,7 +607,7 @@ private: }); auto range = selectFileStatusesForSourceIdsStatement.template range( - Utils::span(updatedSourceIdValues)); + toIntegers(updatedSourceIds)); auto insert = [&](const FileStatus &fileStatus) { insertFileStatusStatement.write(&fileStatus.sourceId, @@ -645,30 +631,32 @@ private: Sqlite::insertUpdateDelete(range, fileStatuses, compareKey, insert, update, remove); } - void synchronizeImports(Storage::Imports &imports, std::vector &updatedSourceIdValues) + void synchronizeImports(Storage::Imports &imports, const SourceIds &updatedSourceIds) { - deleteDocumentImportsForDeletedDocuments(imports, updatedSourceIdValues); + deleteDocumentImportsForDeletedDocuments(imports, updatedSourceIds); - synchronizeDocumentImports(imports, updatedSourceIdValues); + synchronizeDocumentImports(imports, updatedSourceIds); } void deleteDocumentImportsForDeletedDocuments(Storage::Imports &imports, - const std::vector &updatedSourceIdValues) + const SourceIds &updatedSourceIds) { - std::vector importSourceIds = Utils::transform>( - imports, [](const Storage::Import &import) { return &import.sourceId; }); + SourceIds importSourceIds = Utils::transform(imports, + [](const Storage::Import &import) { + return import.sourceId; + }); std::sort(importSourceIds.begin(), importSourceIds.end()); - std::vector documentSourceIdsToBeDeleted; + SourceIds documentSourceIdsToBeDeleted; - std::set_difference(updatedSourceIdValues.begin(), - updatedSourceIdValues.end(), + std::set_difference(updatedSourceIds.begin(), + updatedSourceIds.end(), importSourceIds.begin(), importSourceIds.end(), std::back_inserter(documentSourceIdsToBeDeleted)); - deleteDocumentImportsWithSourceIdsStatement.write(Utils::span{documentSourceIdsToBeDeleted}); + deleteDocumentImportsWithSourceIdsStatement.write(toIntegers(documentSourceIdsToBeDeleted)); } ModuleId fetchModuleIdUnguarded(Utils::SmallStringView name) const @@ -845,17 +833,13 @@ private: } void deleteNotUpdatedTypes(const TypeIds &updatedTypeIds, - const std::vector &updatedSourceIdValues, + const SourceIds &updatedSourceIds, const TypeIds &typeIdsToBeDeleted, AliasPropertyDeclarations &relinkableAliasPropertyDeclarations, PropertyDeclarations &relinkablePropertyDeclarations, Prototypes &relinkablePrototypes, TypeIds &deletedTypeIds) { - auto updatedTypeIdValues = Utils::transform(updatedTypeIds, [](TypeId typeId) { - return &typeId; - }); - auto callback = [&](long long typeId) { deletedTypeIds.push_back(TypeId{typeId}); deleteType(TypeId{typeId}, @@ -866,8 +850,8 @@ private: }; selectNotUpdatedTypesInSourcesStatement.readCallback(callback, - Utils::span(updatedSourceIdValues), - Utils::span(updatedTypeIdValues)); + toIntegers(updatedSourceIds), + toIntegers(updatedTypeIds)); for (TypeId typeIdToBeDeleted : typeIdsToBeDeleted) callback(&typeIdToBeDeleted); } @@ -931,7 +915,7 @@ private: updateAliasPropertyDeclarationValues(updatedAliasPropertyDeclarations); } - void synchronizeExportedTypes(const std::vector &updatedSourceIdValues, + void synchronizeExportedTypes(const SourceIds &exportedSourceIds, const TypeIds &updatedTypeIds, Storage::ExportedTypes &exportedTypes, AliasPropertyDeclarations &relinkableAliasPropertyDeclarations, @@ -943,12 +927,9 @@ private: < std::tie(second.moduleId, second.name, second.version); }); - Utils::span typeIdValues{static_cast( - &updatedTypeIds.data()->id), - updatedTypeIds.size()}; - - auto range = selectExportedTypesForSourceIdsStatement.template range( - Utils::span{updatedSourceIdValues}, typeIdValues); + auto range = selectExportedTypesForSourceIdsStatement + .template range(toIntegers(exportedSourceIds), + toIntegers(updatedTypeIds)); auto compareKey = [](const Storage::ExportedTypeView &view, const Storage::ExportedType &type) -> long long { @@ -1228,8 +1209,7 @@ private: PropertyCompare{}); } - void synchronizeDocumentImports(Storage::Imports &imports, - const std::vector &updatedSourceIdValues) + void synchronizeDocumentImports(Storage::Imports &imports, const SourceIds &updatedSourceIds) { std::sort(imports.begin(), imports.end(), [](auto &&first, auto &&second) { return std::tie(first.sourceId, first.moduleId, first.version) @@ -1237,7 +1217,7 @@ private: }); auto range = selectDocumentImportForSourceIdStatement.template range( - Utils::span{updatedSourceIdValues}); + toIntegers(updatedSourceIds)); auto compareKey = [](const Storage::ImportView &view, const Storage::Import &import) -> long long { From 6009f65b9b557fd4c820ef102773b1e9c83f36be Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 30 Nov 2021 14:42:17 +0100 Subject: [PATCH 62/77] QmlDesigner: Fix broken algorithm for table without rowid It seem not to work for tables without rowids. We have to research if it a Sqlite bug or more propable a misuse of our side. Change-Id: Ie1e2fdba5f71595f24cad79125c37db0ec9715c3 Reviewed-by: Thomas Hartmann Reviewed-by: Qt CI Bot Reviewed-by: --- .../designercore/projectstorage/projectstorage.h | 1 - tests/unit/unittest/projectstorage-test.cpp | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h index c437fa78093..2c56dfdc29d 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h @@ -2066,7 +2066,6 @@ private: { Sqlite::Table table; table.setUseIfNotExists(true); - table.setUseWithoutRowId(true); table.setName("projectDatas"); auto &projectSourceIdColumn = table.addColumn("projectSourceId"); auto &sourceIdColumn = table.addColumn("sourceId"); diff --git a/tests/unit/unittest/projectstorage-test.cpp b/tests/unit/unittest/projectstorage-test.cpp index 69d7e90b979..2bc88619aa8 100644 --- a/tests/unit/unittest/projectstorage-test.cpp +++ b/tests/unit/unittest/projectstorage-test.cpp @@ -3736,15 +3736,15 @@ TEST_F(ProjectStorage, UpdateProjectDataModuleId) qmlModuleId, Storage::FileType::QmlDocument}; Storage::ProjectData projectData2{qmlProjectSourceId, - sourceId2, + sourceId3, qmlModuleId, Storage::FileType::QmlDocument}; Storage::ProjectData projectData2b{qmlProjectSourceId, - sourceId2, + sourceId3, qtQuickModuleId, Storage::FileType::QmlDocument}; Storage::ProjectData projectData3{qtQuickProjectSourceId, - sourceId3, + sourceId2, qtQuickModuleId, Storage::FileType::QmlTypes}; storage.synchronize(SynchronizationPackage{{qmlProjectSourceId, qtQuickProjectSourceId}, From 4e99b1380497d3182dfb3559b2a2dd6cff73d828 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 30 Nov 2021 15:24:28 +0100 Subject: [PATCH 63/77] QmlDesigner: Make the member of BasicId private This prevents that it is changed by accident. It should be anyway not accessed outside of tests and the storage. The reinterpret cast is defined behavior. It would be nice to make the constructor private too but it is used widely in the tests. Change-Id: Ib0e8393cc950a651138c1e87c1b6a7b3e5a836f2 Reviewed-by: Thomas Hartmann Reviewed-by: Qt CI Bot Reviewed-by: --- .../designercore/include/projectstorageids.h | 1 + .../designercore/projectstorage/projectstorage.h | 16 ++++++++-------- tests/unit/unittest/projectstorage-test.cpp | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/include/projectstorageids.h b/src/plugins/qmldesigner/designercore/include/projectstorageids.h index 241a0526582..082855fd912 100644 --- a/src/plugins/qmldesigner/designercore/include/projectstorageids.h +++ b/src/plugins/qmldesigner/designercore/include/projectstorageids.h @@ -80,6 +80,7 @@ auto toIntegers(const Container &container) { using DataType = typename Container::value_type::DatabaseType; const DataType *data = reinterpret_cast(container.data()); + return Utils::span{data, container.size()}; } diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h index 2c56dfdc29d..0a0058d1b96 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h @@ -269,7 +269,7 @@ public: SourceContextId fetchSourceContextId(SourceId sourceId) const { auto sourceContextId = selectSourceContextIdFromSourcesBySourceIdStatement - .template valueWithTransaction(sourceId.id); + .template valueWithTransaction(&sourceId); if (!sourceContextId) throw SourceIdDoesNotExists(); @@ -337,7 +337,7 @@ private: friend bool operator==(const Module &first, const Module &second) { - return first.id == second.id && first.value == second.value; + return &first == &second && first.value == second.value; } }; @@ -541,11 +541,11 @@ private: const SourceIds &updatedProjectSourceIds) { auto compareKey = [](auto &&first, auto &&second) { - auto projectSourceIdDifference = first.projectSourceId.id - second.projectSourceId.id; + auto projectSourceIdDifference = &first.projectSourceId - &second.projectSourceId; if (projectSourceIdDifference != 0) return projectSourceIdDifference; - return first.sourceId.id - second.sourceId.id; + return &first.sourceId - &second.sourceId; }; std::sort(projectDatas.begin(), projectDatas.end(), [&](auto &&first, auto &&second) { @@ -599,7 +599,7 @@ private: }); auto compareKey = [](auto &&first, auto &&second) { - return first.sourceId.id - second.sourceId.id; + return &first.sourceId - &second.sourceId; }; std::sort(fileStatuses.begin(), fileStatuses.end(), [&](auto &&first, auto &&second) { @@ -933,7 +933,7 @@ private: auto compareKey = [](const Storage::ExportedTypeView &view, const Storage::ExportedType &type) -> long long { - auto moduleIdDifference = view.moduleId.id - type.moduleId.id; + auto moduleIdDifference = &view.moduleId - &type.moduleId; if (moduleIdDifference != 0) return moduleIdDifference; @@ -1221,11 +1221,11 @@ private: auto compareKey = [](const Storage::ImportView &view, const Storage::Import &import) -> long long { - auto sourceIdDifference = view.sourceId.id - import.sourceId.id; + auto sourceIdDifference = &view.sourceId - &import.sourceId; if (sourceIdDifference != 0) return sourceIdDifference; - auto moduleIdDifference = view.moduleId.id - import.moduleId.id; + auto moduleIdDifference = &view.moduleId - &import.moduleId; if (moduleIdDifference != 0) return moduleIdDifference; diff --git a/tests/unit/unittest/projectstorage-test.cpp b/tests/unit/unittest/projectstorage-test.cpp index 2bc88619aa8..1e2cc0bd068 100644 --- a/tests/unit/unittest/projectstorage-test.cpp +++ b/tests/unit/unittest/projectstorage-test.cpp @@ -95,7 +95,7 @@ MATCHER_P4(IsStorageType, const Storage::Type &type = arg; return type.sourceId == sourceId && type.typeName == typeName - && type.accessSemantics == accessSemantics && prototypeId.id == type.prototypeId.id; + && type.accessSemantics == accessSemantics && &prototypeId == &type.prototypeId; } MATCHER_P(IsExportedType, From 815383bf0a1998fddc1d987eea01bb03aaa6c277 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 1 Dec 2021 16:28:02 +0100 Subject: [PATCH 64/77] Sqlite: Disable auto moc and uic because there are no QObjects Change-Id: Ia96f99a38ceaffd233f5248db2e2b0911b1a4342 Reviewed-by: Reviewed-by: Qt CI Bot Reviewed-by: Cristian Adam --- src/libs/sqlite/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/sqlite/CMakeLists.txt b/src/libs/sqlite/CMakeLists.txt index 09b294325f8..c2009339259 100644 --- a/src/libs/sqlite/CMakeLists.txt +++ b/src/libs/sqlite/CMakeLists.txt @@ -1,4 +1,5 @@ add_qtc_library(Sqlite + PROPERTIES AUTOMOC OFF AUTOUIC OFF PUBLIC_DEFINES BUILD_SQLITE_LIBRARY SQLITE_CORE From c1ca2a71034a84885fe461c64b107179dfba1ae5 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 1 Dec 2021 16:28:15 +0100 Subject: [PATCH 65/77] Sqlite: Fix insertUpdateDelete Like you can read in https://www.sqlite.org/isolation.html after an update they same value can be show up for an iterator advancement. This would be lead to an delete. So the last value for update is saved and then compared in the delete method. If they are equal the delete is skipped. Change-Id: Ic0aa6619f6a4a520eac77be4e5a83cbe533d102d Reviewed-by: Qt CI Bot Reviewed-by: Thomas Hartmann --- src/libs/sqlite/sqlitealgorithms.h | 34 +++++++++++++-- .../projectstorage/projectstorage.h | 42 ++++++++++++++----- tests/unit/unittest/sqlitealgorithms-test.cpp | 23 +++++----- 3 files changed, 74 insertions(+), 25 deletions(-) diff --git a/src/libs/sqlite/sqlitealgorithms.h b/src/libs/sqlite/sqlitealgorithms.h index a2fb76ad87f..df1ea44d483 100644 --- a/src/libs/sqlite/sqlitealgorithms.h +++ b/src/libs/sqlite/sqlitealgorithms.h @@ -27,6 +27,8 @@ #include +#include + namespace Sqlite { constexpr int compare(Utils::SmallStringView first, Utils::SmallStringView second) noexcept @@ -41,6 +43,8 @@ constexpr int compare(Utils::SmallStringView first, Utils::SmallStringView secon return difference; } +enum class UpdateChange { No, Update }; + template> lastValue; while (true) { bool hasMoreValues = currentValueIterator != endValueIterator; @@ -67,21 +72,42 @@ void insertUpdateDelete(SqliteRange &&sqliteRange, auto &&value = *currentValueIterator; auto compare = compareKey(sqliteValue, value); if (compare == 0) { - updateCallback(sqliteValue, value); - ++currentValueIterator; + UpdateChange updateChange = updateCallback(sqliteValue, value); + switch (updateChange) { + case UpdateChange::Update: + lastValue = value; + break; + case UpdateChange::No: + lastValue.reset(); + break; + } ++currentSqliteIterator; + ++currentValueIterator; } else if (compare > 0) { insertCallback(value); ++currentValueIterator; } else if (compare < 0) { - deleteCallback(sqliteValue); + if (lastValue) { + if (compareKey(sqliteValue, *lastValue) != 0) + deleteCallback(sqliteValue); + lastValue.reset(); + } else { + deleteCallback(sqliteValue); + } ++currentSqliteIterator; } } else if (hasMoreValues) { insertCallback(*currentValueIterator); ++currentValueIterator; } else if (hasMoreSqliteValues) { - deleteCallback(*currentSqliteIterator); + auto &&sqliteValue = *currentSqliteIterator; + if (lastValue) { + if (compareKey(sqliteValue, *lastValue) != 0) + deleteCallback(sqliteValue); + lastValue.reset(); + } else { + deleteCallback(sqliteValue); + } ++currentSqliteIterator; } else { break; diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h index 0a0058d1b96..1d9fe437d26 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h @@ -581,7 +581,10 @@ private: &projectData.sourceId, &projectData.moduleId, static_cast(projectData.fileType)); + return Sqlite::UpdateChange::Update; } + + return Sqlite::UpdateChange::No; }; auto remove = [&](const Storage::ProjectData &projectData) { @@ -621,7 +624,10 @@ private: updateFileStatusStatement.write(&fileStatus.sourceId, fileStatus.size, fileStatus.lastModified); + return Sqlite::UpdateChange::Update; } + + return Sqlite::UpdateChange::No; }; auto remove = [&](const FileStatus &fileStatus) { @@ -982,7 +988,9 @@ private: relinkableAliasPropertyDeclarations); handlePrototypes(view.typeId, relinkablePrototypes); updateExportedTypeNameTypeIdStatement.write(&view.exportedTypeNameId, &type.typeId); + return Sqlite::UpdateChange::Update; } + return Sqlite::UpdateChange::No; }; auto remove = [&](const Storage::ExportedTypeView &view) { @@ -1056,7 +1064,7 @@ private: view.aliasId); } - void synchronizePropertyDeclarationsUpdateProperty(const Storage::PropertyDeclarationView &view, + auto synchronizePropertyDeclarationsUpdateProperty(const Storage::PropertyDeclarationView &view, const Storage::PropertyDeclaration &value, SourceId sourceId, PropertyDeclarationIds &propertyDeclarationIds) @@ -1070,7 +1078,7 @@ private: if (view.traits == value.traits && propertyTypeId == view.typeId && propertyImportedTypeNameId == view.typeNameId) - return; + return Sqlite::UpdateChange::No; updatePropertyDeclarationStatement.write(&view.id, &propertyTypeId, @@ -1079,6 +1087,7 @@ private: updatePropertyAliasDeclarationRecursivelyWithTypeAndTraitsStatement .write(&view.id, &propertyTypeId, static_cast(value.traits)); propertyDeclarationIds.push_back(view.id); + return Sqlite::UpdateChange::Update; } void synchronizePropertyDeclarations(TypeId typeId, @@ -1122,11 +1131,13 @@ private: sourceId); propertyDeclarationIds.push_back(view.id); } else { - synchronizePropertyDeclarationsUpdateProperty(view, - value, - sourceId, - propertyDeclarationIds); + return synchronizePropertyDeclarationsUpdateProperty(view, + value, + sourceId, + propertyDeclarationIds); } + + return Sqlite::UpdateChange::No; }; auto remove = [&](const Storage::PropertyDeclarationView &view) { @@ -1185,7 +1196,7 @@ private: auto insert = [&](const Storage::PropertyDeclaration &) {}; auto update = [&](const AliasPropertyDeclarationView &, - const Storage::PropertyDeclaration &) {}; + const Storage::PropertyDeclaration &) { return Sqlite::UpdateChange::No; }; auto remove = [&](const AliasPropertyDeclarationView &view) { updatePropertyDeclarationAliasIdToNullStatement.write(&view.id); @@ -1251,7 +1262,9 @@ private: } }; - auto update = [](const Storage::ImportView &, const Storage::Import &) {}; + auto update = [](const Storage::ImportView &, const Storage::Import &) { + return Sqlite::UpdateChange::No; + }; auto remove = [&](const Storage::ImportView &view) { deleteDocumentImportStatement.write(&view.importId); @@ -1316,9 +1329,11 @@ private: Utils::PathString signature{createJson(value.parameters)}; if (value.returnTypeName == view.returnTypeName && signature == view.signature) - return; + return Sqlite::UpdateChange::No; updateFunctionDeclarationStatement.write(&view.id, value.returnTypeName, signature); + + return Sqlite::UpdateChange::Update; }; auto remove = [&](const Storage::FunctionDeclarationView &view) { @@ -1353,9 +1368,11 @@ private: Utils::PathString signature{createJson(value.parameters)}; if (signature == view.signature) - return; + return Sqlite::UpdateChange::No; updateSignalDeclarationStatement.write(&view.id, signature); + + return Sqlite::UpdateChange::Update; }; auto remove = [&](const Storage::SignalDeclarationView &view) { @@ -1418,9 +1435,11 @@ private: Utils::PathString enumeratorDeclarations{createJson(value.enumeratorDeclarations)}; if (enumeratorDeclarations == view.enumeratorDeclarations) - return; + return Sqlite::UpdateChange::No; updateEnumerationDeclarationStatement.write(&view.id, enumeratorDeclarations); + + return Sqlite::UpdateChange::Update; }; auto remove = [&](const Storage::EnumerationDeclarationView &view) { @@ -2066,6 +2085,7 @@ private: { Sqlite::Table table; table.setUseIfNotExists(true); + table.setUseWithoutRowId(true); table.setName("projectDatas"); auto &projectSourceIdColumn = table.addColumn("projectSourceId"); auto &sourceIdColumn = table.addColumn("sourceId"); diff --git a/tests/unit/unittest/sqlitealgorithms-test.cpp b/tests/unit/unittest/sqlitealgorithms-test.cpp index 6c376a2ad8b..462814a67df 100644 --- a/tests/unit/unittest/sqlitealgorithms-test.cpp +++ b/tests/unit/unittest/sqlitealgorithms-test.cpp @@ -36,16 +36,14 @@ namespace { class KeyValueView { public: - KeyValueView(Utils::SmallStringView key, long long value, long long rowid) + KeyValueView(Utils::SmallStringView key, long long value) : key{key} , value{value} - , rowid{rowid} {} public: Utils::SmallStringView key; long long value = 0; - long long rowid = -1; }; std::ostream &operator<<(std::ostream &out, KeyValueView keyValueView) @@ -103,6 +101,7 @@ public: { Sqlite::Table table; table.setName("data"); + table.setUseWithoutRowId(true); table.addColumn("key", Sqlite::ColumnType::None, {Sqlite::PrimaryKey{}}); table.addColumn("value"); @@ -118,22 +117,26 @@ protected: Sqlite::Database database{":memory:", Sqlite::JournalMode::Memory}; Sqlite::ImmediateTransaction transaction{database}; Initializer initializer{database}; - Sqlite::ReadStatement<3> selectViewsStatement{"SELECT key, value, rowid FROM data ORDER BY key", + Sqlite::ReadStatement<2> selectViewsStatement{"SELECT key, value FROM data ORDER BY key", database}; Sqlite::ReadStatement<2> selectValuesStatement{"SELECT key, value FROM data ORDER BY key", database}; Sqlite::WriteStatement insertStatement{"INSERT INTO data(key, value) VALUES (?1, ?2)", database}; - Sqlite::WriteStatement updateStatement{"UPDATE data SET value = ?2 WHERE rowid = ?1", database}; - Sqlite::WriteStatement deleteStatement{"DELETE FROM data WHERE rowid = ?", database}; + Sqlite::WriteStatement updateStatement{"UPDATE data SET value = ?2 WHERE key=?1", database}; + Sqlite::WriteStatement deleteStatement{"DELETE FROM data WHERE key=?", database}; std::function insert{ [&](const KeyValue &keyValue) { insertStatement.write(keyValue.key, keyValue.value); }}; - std::function update{ + std::function update{ [&](KeyValueView keyValueView, const KeyValue &keyValue) { - if (!(keyValueView == keyValue)) - updateStatement.write(keyValueView.rowid, keyValue.value); + if (!(keyValueView == keyValue)) { + updateStatement.write(keyValueView.key, keyValue.value); + return Sqlite::UpdateChange::Update; + } + + return Sqlite::UpdateChange::No; }}; std::function remove{ - [&](KeyValueView keyValueView) { deleteStatement.write(keyValueView.rowid); }}; + [&](KeyValueView keyValueView) { deleteStatement.write(keyValueView.key); }}; }; auto compareKey = [](KeyValueView keyValueView, const KeyValue &keyValue) { From c12b09e5437ffac70d7083904dda676f0d156d27 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 3 Dec 2021 16:18:31 +0100 Subject: [PATCH 66/77] Doc: Describe showing additional files in Projects view ...when using CMake. Add link targets for CMake command and property docs, because at least the "install" command is needed in several places in the manual. Task-number: QTCREATORBUG-26616 Change-Id: I204325741925080532e8944578464cf4e1cb648f Reviewed-by: Eike Ziller --- .../external-resources.qdoc | 18 ++++++- .../creator-projects-creating.qdoc | 47 +++++++++++++++---- 2 files changed, 54 insertions(+), 11 deletions(-) diff --git a/doc/qtcreator/src/external-resources/external-resources.qdoc b/doc/qtcreator/src/external-resources/external-resources.qdoc index f3d2f69d92e..b905a23632b 100644 --- a/doc/qtcreator/src/external-resources/external-resources.qdoc +++ b/doc/qtcreator/src/external-resources/external-resources.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -113,3 +113,19 @@ \externalpage https://doc.qt.io/QtApplicationManager/ \title Qt Application Manager */ +/*! + \externalpage https://cmake.org/cmake/help/latest/command/install.html + \title CMake: install command +*/ +/*! + \externalpage https://cmake.org/cmake/help/latest/command/set_property.html + \title CMake: set_property command +*/ +/*! + \externalpage https://cmake.org/cmake/help/latest/command/target_sources.html + \title CMake: target_sources command +*/ +/*! + \externalpage https://cmake.org/cmake/help/latest/prop_sf/HEADER_FILE_ONLY.html + \title CMake: HEADER_FILE_ONLY +*/ diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc index 43d5ab1c944..fb2124935e7 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc @@ -440,23 +440,50 @@ \section2 Displaying Additional File Types in Projects View - \QC determines whether to display files from the project folder - in the \uicontrol Projects view depending on the file type (.pro, .pri, .cpp, - .h, .qrc, and so on). To display other types of files, edit the - project file. Add filenames as values of the \c {DISTFILES} variable. - You can also use wildcards. + \QC displays all files that are declared to be part of the project by the + project files in the \l Projects view. The files are sorted into categories + by file type (.cpp, .h, .qrc, and so on). To display additional files, edit + the project file. - For example, the following code specifies that text files are displayed - in the \uicontrol Projects view: + Alternatively, you can see all the files in a project in the + \l {File System} view. - \code + \section3 CMake Projects + + When using CMake, you can specify additional files to display in the + \uicontrol Projects view by either adding them as sources or installing + them. + + In the CMakeLists.txt file, define the files as values of the + \l{CMake: target_sources command}{target_sources} command using + the \c PRIVATE property, for example. + + You can prevent CMake from handling some files, such as a .cpp + file that should not be compiled. Use the \l{CMake: set_property command} + {set_property} command and the \l{CMake: HEADER_FILE_ONLY} + {HEADER_FILE_ONLY} property to specify such files. For example: + + \badcode + set_property(SOURCE "${files}" PROPERTY HEADER_FILE_ONLY ON) + \endcode + + Alternatively, to install the files, use the \l {CMake: install command} + {install} command with the \c FILES or \c DIRECTORY property. + + \section3 qmake Projects + + When using qmake, add filenames as values of the \c {DISTFILES} variable + in the .pro file. You can also use wildcards. + + For example, the following value specifies that text files are part of the + project: + + \badcode DISTFILES += *.txt \endcode - This also makes the files available in the \uicontrol Locator. - \section1 Adding Subprojects to Projects In addition to Qt libraries, you can link your application to other From 7bb558fa6441bee56d1a5f25e21b998ed6b57848 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 6 Dec 2021 14:21:14 +0100 Subject: [PATCH 67/77] Doc: Describe specifying default config file for Beautifier ...when using CMake as the build system. Task-number: QTCREATORBUG-26616 Change-Id: I03cadcc1eea6a50b52b59f6ab76931d988f09058 Reviewed-by: Eike Ziller --- .../src/editors/creator-only/creator-beautifier.qdoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc b/doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc index 3debec6131b..011ada3307c 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc @@ -121,8 +121,10 @@ \li Select \uicontrol {Use file *.astylerc defined in project files} or \uicontrol {Use file uncrustify.cfg defined in project files}, - to use the configuration file defined in the qmake DISTFILES - variable as the configuration file for the selected tool. + to use the configuration file + \l{Displaying Additional File Types in Projects View} + {defined in the project file} as the configuration file + for the selected tool. \li Select \uicontrol {Use specific config file} or \uicontrol {Use file specific uncrustify.cfg} to From f6757fd87f3ddfc815af29342fd1b060165c1b7c Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 6 Dec 2021 16:40:20 +0100 Subject: [PATCH 68/77] Doc: Add CMake equivalent for LSMinimumSystemVersion ...in an Info.plist file. Also remove "Qt 5", because this also applies to Qt 6 apps. Task-number: QTCREATORBUG-26616 Change-Id: I2041506dccf719559d53f066dfe5acc864a51569 Reviewed-by: Joerg Bornemann --- .../src/external-resources/external-resources.qdoc | 4 ++++ doc/qtcreator/src/ios/creator-ios-dev.qdoc | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/qtcreator/src/external-resources/external-resources.qdoc b/doc/qtcreator/src/external-resources/external-resources.qdoc index b905a23632b..76cabbde5c3 100644 --- a/doc/qtcreator/src/external-resources/external-resources.qdoc +++ b/doc/qtcreator/src/external-resources/external-resources.qdoc @@ -125,6 +125,10 @@ \externalpage https://cmake.org/cmake/help/latest/command/target_sources.html \title CMake: target_sources command */ +/*! + \externalpage https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html + \title CMake: CMAKE_OSX_DEPLOYMENT_TARGET +*/ /*! \externalpage https://cmake.org/cmake/help/latest/prop_sf/HEADER_FILE_ONLY.html \title CMake: HEADER_FILE_ONLY diff --git a/doc/qtcreator/src/ios/creator-ios-dev.qdoc b/doc/qtcreator/src/ios/creator-ios-dev.qdoc index c2eb07f9aef..3ebd8c93a01 100644 --- a/doc/qtcreator/src/ios/creator-ios-dev.qdoc +++ b/doc/qtcreator/src/ios/creator-ios-dev.qdoc @@ -133,15 +133,17 @@ \section1 Specifying Supported iOS Versions - Qt 5 applications can be built for the latest iOS version and deployed to + You can build applications for the latest iOS version and deploy them to previous versions. For the most part, this works automatically. However, you must take care when you manually set your own target version. If you set it to a value higher than what Qt requires and supply your own \c Info.plist file, you must add an \c LSMinimumSystemVersion entry to the \c Info.plist - that matches the value of \c QMAKE_IOS_DEPLOYMENT_TARGET (when using qmake) - or \c cpp.minimumIosVersion (when using Qbs), because iOS (and the - App Store) will use the \c LSMinimumSystemVersion value as the authoritative - one. + that matches the value of \l{CMake: CMAKE_OSX_DEPLOYMENT_TARGET} + {CMAKE_OSX_DEPLOYMENT_TARGET} (when using CMake), + \l QMAKE_IOS_DEPLOYMENT_TARGET (when using qmake), or + \l{https://doc.qt.io/qbs/qml-qbsmodules-cpp.html#minimumIosVersion-prop} + {cpp.minimumIosVersion} (when using Qbs) because iOS (and the App Store) + will use the \c LSMinimumSystemVersion value as the authoritative one. If you specify a deployment target value lower than what Qt requires, your application will almost certainly crash somewhere in the Qt libraries when From e71e6b95833b2a93b56ea0edac6ca93771838cb2 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 6 Dec 2021 10:22:51 +0100 Subject: [PATCH 69/77] Doc: Move QDS icons to doc\qtdesignstudio\images\icons These icons are only used in the QDS docs. Change-Id: I4404b52e07bcfa06ead8ef5c784af8033dd65f8e Reviewed-by: Alessandro Portale --- .../images/icons/align-center-horizontal.png | Bin 231 -> 0 bytes doc/qtcreator/images/icons/align-left.png | Bin 210 -> 0 bytes doc/qtcreator/images/icons/align-right.png | Bin 211 -> 0 bytes doc/qtcreator/images/icons/align-top.png | Bin 198 -> 0 bytes doc/qtcreator/images/icons/anchor-bottom.png | Bin 168 -> 0 bytes .../images/icons/anchor-center-vertical.png | Bin 208 -> 0 bytes doc/qtcreator/images/icons/anchor-fill.png | Bin 157 -> 0 bytes doc/qtcreator/images/icons/anchor-left.png | Bin 175 -> 0 bytes doc/qtcreator/images/icons/anchor-right.png | Bin 174 -> 0 bytes doc/qtcreator/images/icons/anchor-top.png | Bin 166 -> 0 bytes doc/qtcreator/images/icons/annotation.png | Bin 448 -> 0 bytes .../images/icons/detach-group-icon.png | Bin 592 -> 0 bytes .../images/icons/distribute-bottom.png | Bin 150 -> 0 bytes .../icons/distribute-center-horizontal.png | Bin 135 -> 0 bytes .../images/icons/distribute-center-vertical.png | Bin 128 -> 0 bytes doc/qtcreator/images/icons/distribute-left.png | Bin 124 -> 0 bytes .../icons/distribute-origin-bottom-right.png | Bin 256 -> 0 bytes .../images/icons/distribute-origin-none.png | Bin 179 -> 0 bytes .../images/icons/distribute-origin-top-left.png | Bin 260 -> 0 bytes doc/qtcreator/images/icons/distribute-right.png | Bin 127 -> 0 bytes .../icons/distribute-spacing-horizontal.png | Bin 194 -> 0 bytes .../icons/distribute-spacing-vertical.png | Bin 175 -> 0 bytes .../images/icons/easing-curve-linear-icon.png | Bin 320 -> 0 bytes .../images/icons/easing-curve-spline-icon.png | Bin 551 -> 0 bytes .../images/icons/easing-curve-step-icon.png | Bin 243 -> 0 bytes doc/qtcreator/images/icons/lockon.png | Bin 516 -> 0 bytes doc/qtcreator/images/icons/rotation-cursor.png | Bin 525 -> 0 bytes doc/qtcreator/images/icons/transparent.png | Bin 382 -> 0 bytes doc/qtcreator/images/icons/visibilityon.png | Bin 609 -> 0 bytes .../images/icons/action-icon-binding.png | Bin .../images/icons/action-icon.png | Bin .../images/icons/alias.png | Bin .../images/icons/align-bottom.png | Bin 200 -> 179 bytes .../images/icons/align-center-horizontal.png | Bin 0 -> 210 bytes .../images/icons/align-center-vertical.png | Bin 204 -> 183 bytes doc/qtdesignstudio/images/icons/align-left.png | Bin 0 -> 189 bytes doc/qtdesignstudio/images/icons/align-right.png | Bin 0 -> 190 bytes doc/qtdesignstudio/images/icons/align-top.png | Bin 0 -> 177 bytes .../images/icons/anchor-bottom.png | Bin 0 -> 147 bytes .../images/icons/anchor-center-horizontal.png | Bin 218 -> 197 bytes .../images/icons/anchor-center-vertical.png | Bin 0 -> 187 bytes doc/qtdesignstudio/images/icons/anchor-fill.png | Bin 0 -> 130 bytes doc/qtdesignstudio/images/icons/anchor-left.png | Bin 0 -> 154 bytes .../images/icons/anchor-right.png | Bin 0 -> 153 bytes doc/qtdesignstudio/images/icons/anchor-top.png | Bin 0 -> 145 bytes doc/qtdesignstudio/images/icons/annotation.png | Bin 0 -> 129 bytes .../images/icons/busyindicator-icon16.png | Bin .../images/icons/button-icon16.png | Bin .../images/icons/canvas-color.png | Bin .../images/icons/checkbox-icon16.png | Bin .../images/icons/combobox-icon16.png | Bin .../images/icons/copy-formatting.png | Bin .../images/icons/delaybutton-icon16.png | Bin .../images/icons/detach-group-icon.png | Bin 0 -> 241 bytes .../images/icons/dial-icon16.png | Bin .../images/icons/distribute-bottom.png | Bin 0 -> 129 bytes .../icons/distribute-center-horizontal.png | Bin 0 -> 114 bytes .../images/icons/distribute-center-vertical.png | Bin 0 -> 107 bytes .../images/icons/distribute-left.png | Bin 0 -> 103 bytes .../icons/distribute-origin-bottom-right.png | Bin 0 -> 235 bytes .../images/icons/distribute-origin-center.png | Bin 286 -> 265 bytes .../images/icons/distribute-origin-none.png | Bin 0 -> 158 bytes .../images/icons/distribute-origin-top-left.png | Bin 0 -> 239 bytes .../images/icons/distribute-right.png | Bin 0 -> 106 bytes .../icons/distribute-spacing-horizontal.png | Bin 0 -> 173 bytes .../icons/distribute-spacing-vertical.png | Bin 0 -> 154 bytes .../images/icons/distribute-top.png | Bin 149 -> 128 bytes .../images/icons/easing-curve-linear-icon.png | Bin 0 -> 201 bytes .../images/icons/easing-curve-spline-icon.png | Bin 0 -> 391 bytes .../images/icons/easing-curve-step-icon.png | Bin 0 -> 147 bytes .../images/icons/frame-icon16.png | Bin .../images/icons/groupbox-icon16.png | Bin .../images/icons/itemdelegate-icon16.png | Bin .../images/icons/label-icon16.png | Bin .../images/icons/lockoff.png | Bin doc/qtdesignstudio/images/icons/lockon.png | Bin 0 -> 183 bytes .../images/icons/navigator-arrowdown.png | Bin .../images/icons/navigator-arrowup.png | Bin .../images/icons/page-icon16.png | Bin .../images/icons/pageindicator-icon16.png | Bin .../images/icons/pane-icon16.png | Bin .../images/icons/paste-formatting.png | Bin .../images/icons/progressbar-icon16.png | Bin .../images/icons/radiobutton-icon16.png | Bin .../images/icons/rangeslider-icon16.png | Bin .../images/icons/rotation-cursor.png | Bin 0 -> 233 bytes .../images/icons/roundbutton-icon16.png | Bin .../images/icons/scrollview-icon16.png | Bin .../images/icons/slider-icon16.png | Bin .../images/icons/spinbox-icon16.png | Bin .../images/icons/stackview-icon16.png | Bin .../images/icons/swipeview-icon16.png | Bin .../images/icons/switch-icon16.png | Bin .../images/icons/textarea-icon16.png | Bin .../images/icons/textfield-icon16.png | Bin .../images/icons/toolbar-icon16.png | Bin .../images/icons/toolbutton-icon16.png | Bin .../images/icons/toolseparator-icon16.png | Bin .../images/icons/transparent-icon.png | Bin doc/qtdesignstudio/images/icons/transparent.png | Bin 0 -> 286 bytes .../images/icons/tumbler-icon16.png | Bin .../images/icons/visibilityon.png | Bin 0 -> 278 bytes .../images/icons/zoomAll.png | Bin .../images/icons/zoomIn.png | Bin .../images/icons/zoomOut.png | Bin .../images/icons/zoomSelection.png | Bin 106 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 doc/qtcreator/images/icons/align-center-horizontal.png delete mode 100644 doc/qtcreator/images/icons/align-left.png delete mode 100644 doc/qtcreator/images/icons/align-right.png delete mode 100644 doc/qtcreator/images/icons/align-top.png delete mode 100644 doc/qtcreator/images/icons/anchor-bottom.png delete mode 100644 doc/qtcreator/images/icons/anchor-center-vertical.png delete mode 100644 doc/qtcreator/images/icons/anchor-fill.png delete mode 100644 doc/qtcreator/images/icons/anchor-left.png delete mode 100644 doc/qtcreator/images/icons/anchor-right.png delete mode 100644 doc/qtcreator/images/icons/anchor-top.png delete mode 100644 doc/qtcreator/images/icons/annotation.png delete mode 100644 doc/qtcreator/images/icons/detach-group-icon.png delete mode 100644 doc/qtcreator/images/icons/distribute-bottom.png delete mode 100644 doc/qtcreator/images/icons/distribute-center-horizontal.png delete mode 100644 doc/qtcreator/images/icons/distribute-center-vertical.png delete mode 100644 doc/qtcreator/images/icons/distribute-left.png delete mode 100644 doc/qtcreator/images/icons/distribute-origin-bottom-right.png delete mode 100644 doc/qtcreator/images/icons/distribute-origin-none.png delete mode 100644 doc/qtcreator/images/icons/distribute-origin-top-left.png delete mode 100644 doc/qtcreator/images/icons/distribute-right.png delete mode 100644 doc/qtcreator/images/icons/distribute-spacing-horizontal.png delete mode 100644 doc/qtcreator/images/icons/distribute-spacing-vertical.png delete mode 100644 doc/qtcreator/images/icons/easing-curve-linear-icon.png delete mode 100644 doc/qtcreator/images/icons/easing-curve-spline-icon.png delete mode 100644 doc/qtcreator/images/icons/easing-curve-step-icon.png delete mode 100644 doc/qtcreator/images/icons/lockon.png delete mode 100644 doc/qtcreator/images/icons/rotation-cursor.png delete mode 100644 doc/qtcreator/images/icons/transparent.png delete mode 100644 doc/qtcreator/images/icons/visibilityon.png rename doc/{qtcreator => qtdesignstudio}/images/icons/action-icon-binding.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/action-icon.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/alias.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/align-bottom.png (70%) create mode 100644 doc/qtdesignstudio/images/icons/align-center-horizontal.png rename doc/{qtcreator => qtdesignstudio}/images/icons/align-center-vertical.png (57%) create mode 100644 doc/qtdesignstudio/images/icons/align-left.png create mode 100644 doc/qtdesignstudio/images/icons/align-right.png create mode 100644 doc/qtdesignstudio/images/icons/align-top.png create mode 100644 doc/qtdesignstudio/images/icons/anchor-bottom.png rename doc/{qtcreator => qtdesignstudio}/images/icons/anchor-center-horizontal.png (60%) create mode 100644 doc/qtdesignstudio/images/icons/anchor-center-vertical.png create mode 100644 doc/qtdesignstudio/images/icons/anchor-fill.png create mode 100644 doc/qtdesignstudio/images/icons/anchor-left.png create mode 100644 doc/qtdesignstudio/images/icons/anchor-right.png create mode 100644 doc/qtdesignstudio/images/icons/anchor-top.png create mode 100644 doc/qtdesignstudio/images/icons/annotation.png rename doc/{qtcreator => qtdesignstudio}/images/icons/busyindicator-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/button-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/canvas-color.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/checkbox-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/combobox-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/copy-formatting.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/delaybutton-icon16.png (100%) create mode 100644 doc/qtdesignstudio/images/icons/detach-group-icon.png rename doc/{qtcreator => qtdesignstudio}/images/icons/dial-icon16.png (100%) create mode 100644 doc/qtdesignstudio/images/icons/distribute-bottom.png create mode 100644 doc/qtdesignstudio/images/icons/distribute-center-horizontal.png create mode 100644 doc/qtdesignstudio/images/icons/distribute-center-vertical.png create mode 100644 doc/qtdesignstudio/images/icons/distribute-left.png create mode 100644 doc/qtdesignstudio/images/icons/distribute-origin-bottom-right.png rename doc/{qtcreator => qtdesignstudio}/images/icons/distribute-origin-center.png (51%) create mode 100644 doc/qtdesignstudio/images/icons/distribute-origin-none.png create mode 100644 doc/qtdesignstudio/images/icons/distribute-origin-top-left.png create mode 100644 doc/qtdesignstudio/images/icons/distribute-right.png create mode 100644 doc/qtdesignstudio/images/icons/distribute-spacing-horizontal.png create mode 100644 doc/qtdesignstudio/images/icons/distribute-spacing-vertical.png rename doc/{qtcreator => qtdesignstudio}/images/icons/distribute-top.png (59%) create mode 100644 doc/qtdesignstudio/images/icons/easing-curve-linear-icon.png create mode 100644 doc/qtdesignstudio/images/icons/easing-curve-spline-icon.png create mode 100644 doc/qtdesignstudio/images/icons/easing-curve-step-icon.png rename doc/{qtcreator => qtdesignstudio}/images/icons/frame-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/groupbox-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/itemdelegate-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/label-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/lockoff.png (100%) create mode 100644 doc/qtdesignstudio/images/icons/lockon.png rename doc/{qtcreator => qtdesignstudio}/images/icons/navigator-arrowdown.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/navigator-arrowup.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/page-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/pageindicator-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/pane-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/paste-formatting.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/progressbar-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/radiobutton-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/rangeslider-icon16.png (100%) create mode 100644 doc/qtdesignstudio/images/icons/rotation-cursor.png rename doc/{qtcreator => qtdesignstudio}/images/icons/roundbutton-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/scrollview-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/slider-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/spinbox-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/stackview-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/swipeview-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/switch-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/textarea-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/textfield-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/toolbar-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/toolbutton-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/toolseparator-icon16.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/transparent-icon.png (100%) create mode 100644 doc/qtdesignstudio/images/icons/transparent.png rename doc/{qtcreator => qtdesignstudio}/images/icons/tumbler-icon16.png (100%) create mode 100644 doc/qtdesignstudio/images/icons/visibilityon.png rename doc/{qtcreator => qtdesignstudio}/images/icons/zoomAll.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/zoomIn.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/zoomOut.png (100%) rename doc/{qtcreator => qtdesignstudio}/images/icons/zoomSelection.png (100%) diff --git a/doc/qtcreator/images/icons/align-center-horizontal.png b/doc/qtcreator/images/icons/align-center-horizontal.png deleted file mode 100644 index d0af695e8df08fa8b1dcedfbdb99cfd6fc6cb970..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 231 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_p+io-U3d7QM*{2l%BHNT??`CKWIEC@CQ!abtlA|EwSKY;0}vFWTNFBqaRsSGmV{ z`AEz8$|DS2ybj+!GqbU^tkmyVIWxX*a$KX8Q zwusa})pzXMWv@;CFS-8AZ>{oqvTq7b{Kyw{h~MPc%05qZ;mUglSjFUTt~hy)fq{X+ M)78&qol`;+03i=ha{vGU diff --git a/doc/qtcreator/images/icons/align-right.png b/doc/qtcreator/images/icons/align-right.png deleted file mode 100644 index 68d8ac7d3b160bcbad147fa0aa76f925f92bbc02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 211 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_p*!PZ!4!i{9h}1$h=j1A{e*iw-cbfqJ25>7=H}@$@JMj@EH3v!dNyPHf*Bzn`WqV`nlmiQ7o0CHvek@%fq}u()z4*} HQ$iB}Ni;sS diff --git a/doc/qtcreator/images/icons/align-top.png b/doc/qtcreator/images/icons/align-top.png deleted file mode 100644 index 00568f5680944da49d0e58ed2ff7f1b37c5a19b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 198 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_p)-PZ!4!i{9jvgoKF04t77zo;Ywoz@?G#zs3b`)dL($EhQx+wkdYrPfkeiaC@}e zz`(#o`QvO!35jot(nk&-IPgK9Gu~A+>`p+itt_9$;umYV2-obd=!Sd{8B# xW6J|+k>rL(e&!kC{|pQa*0>7QyR2bkSolRe=}949IRgU&gQu&X%Q~loCID&@K=uFt diff --git a/doc/qtcreator/images/icons/anchor-bottom.png b/doc/qtcreator/images/icons/anchor-bottom.png deleted file mode 100644 index e6ab30a9ecb12970a858191b5db58a42056ef4fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 168 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_p*GPZ!4!i{7`FH;Otq2)JI{oujfurgo+OB2L{6PMt0dOmEWq=KFrQ=VM@>;HIq~ zz2~9aOVvAxUEe2ccs3{Csl)yU#ZAvAvc1v2$@Z%0Df=;|e_jPs7kO-$!r>?LkW1X+ TW#Kdi1_lOCS3j3^P69shxg0cA^L(a>F8%J2oA4mwz4^VPqKhB}8$T(r@T*lN?dBa;mc1jEk3=E#GelF{r G5}E*ZVJ?dR diff --git a/doc/qtcreator/images/icons/anchor-left.png b/doc/qtcreator/images/icons/anchor-left.png deleted file mode 100644 index f3ebeab50008c001c3827dbd0787fa69a97a55ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 175 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_p*iPZ!4!i{7`F7Ya5Q@U%XhUmm(OmE)PyVrv%X4ZN2brcT}YE6!DA(Zrp5-p@O! z^wMxM?+=w!g~#)ScDb_X8C%OfRC)Q1v4LyPJ+4o3ehEzf+1&OEG+v$PtGs}zeaYR( b1tuxt0(Z@_ZqzU^Ffe$!`njxgN@xNAu6jGq diff --git a/doc/qtcreator/images/icons/anchor-right.png b/doc/qtcreator/images/icons/anchor-right.png deleted file mode 100644 index 43609aa397cc2dff5a5f0e7216250a1780ad5e0c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 174 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_p)%PZ!4!i{9jvgoGVO4;)Z9;$ZWlDJhYStxZ}d;OsRX9-jQp3o*wI95~RbbAV~- zeIo;dJ&K1K@?S9dxMUpScH@;WO(>9HIL&>?W!3W}htvEzJUl$_B_t&JCM9Hw8?iGi YW#@WR_3OO@0|Nttr>mdKI;Vst0AAZRIRF3v diff --git a/doc/qtcreator/images/icons/anchor-top.png b/doc/qtcreator/images/icons/anchor-top.png deleted file mode 100644 index 896930eb64034e77b45ae89773e2bc315eccf7ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 166 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_p)*PZ!4!i{7`F7Ya5Q2)JAnXA|WN@erKioVdk-O|qAv`N<=ReU@A6&*vOk*VwYr z^@7i#CYdwWTbe|_rdlMIaW8ZD-ExVwiNEfkI?LZ$FVdQ&MBb@0LHF0g#Z8m diff --git a/doc/qtcreator/images/icons/annotation.png b/doc/qtcreator/images/icons/annotation.png deleted file mode 100644 index 59333eeef035012940be583d6997b3ac9b04142b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 448 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd5W$eeQS*<1fq^C6(btiIVPik{pF~y$1_p&> zk04(LhAK4%hK3dfhF=T}3=J&czBHc|Lgz$FTc9! z|9}45@%3Ni*%MSmt}twvSCHuS&~G{e1A}UbYeY#(Vo9o1a#3nxNh*Vpfsui(p`osk zL5QJ&m7#%^fswX>ft7*5LhGb0C>nC}Q!>*kacj7cc8i07fgu@WLvdNURdRlAZfaf$ zgMxc%UTRTdNq&))f@4a4QmTSyPEKiY30O$M$VAUT&sawxILuwawW1)us6-(kr!-yH yGfzPeEEtwrRGgWgXQg1KXJDY zk04(LhAK4%hK3dfhF=T}3=J^DhM6sh@rNrXtMDc%aEQ;9A+vlhfXVl$URqz2SB5<~{Eu zHPfGd)#T;b{NLE%&%b_NhdEvscw0m_oHjK0qkU9q^Ss8!y>l8HAF2s6AATf0L+^(E zu>%{vpZov6=l_54-`{dCiUmfuulf6RnsTfiUO_QmvAUQWHy38H@~!40H_*b&U){3=OOd z4Xg}|v<(cb3=9@pCv8E|kei>9nO2Eg!-ce491IK$$sikw%hIiq^K)}k^GX;L+*9*X zixNxni>wqJQ}UBi6+CltN{dUtLJCGEdWL!iItsyI?h39I1^GoK3IRE#>AIeI3VL9{ su+*aB%=|nn1v5PZ0|lqj%$yVj15E{m#Ohup1_lNOPgg&ebxsLQ08P-(Z2$lO diff --git a/doc/qtcreator/images/icons/distribute-bottom.png b/doc/qtcreator/images/icons/distribute-bottom.png deleted file mode 100644 index dccb5b535ae7910be76b41a5cd6efed2524a45c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_lNXPZ!4!i{7_=)_e>C0<7&F-rB0?)_lwqJbG-^k&yK>Z?dYU-E@2qqVSeUOryzx z@s7sIAC2lvc{g}Fn3iYu`$-(gX8w6jzrAGF8}=Csc@Fe5FfcH9y85}Sb4q9e0B>OV diff --git a/doc/qtcreator/images/icons/distribute-center-horizontal.png b/doc/qtcreator/images/icons/distribute-center-horizontal.png deleted file mode 100644 index 5ad6d0dff915cc443f3c8913edf624dac9392234..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 135 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_lO8PZ!4!i{9jf1I!T-5jGN%lI0JA54ZSFl5p6_sL?QU=1&%3;mh?-Ga4HYHf8Ba jm?m6dXiCUPQDcZx;mI#mDi&j4U|{fc^>bP0l+XkKK@ubr diff --git a/doc/qtcreator/images/icons/distribute-center-vertical.png b/doc/qtcreator/images/icons/distribute-center-vertical.png deleted file mode 100644 index 1b6cc09588bf4b5b2cd416a22912d727cbf2b726..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 128 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_lNrPZ!4!i{9h}iBAoJGY=m*@@2k+@Be>)n_nj{y28qw&%iA#9L#)jo6^gLH&_>M dG|*vSNSe>77;WVDnt_3V!PC{xWt~$(695YICB^^% diff --git a/doc/qtcreator/images/icons/distribute-left.png b/doc/qtcreator/images/icons/distribute-left.png deleted file mode 100644 index 92ce603cacee7b9d38438d08156fe0ae0e0c3c22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 124 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_lN_PZ!4!i{9jfh6Z^a9-bVY6b7{-lZ$s6s@T}t{<}P=nzb|GO2fo-1|FV=XIL1# YJbCz}K3LTu5YA(SP{(x=G{;97UxFVNLncc94vFYz>8%Cc@mA(rBydc*zc)I$ztaD0e F0syweT#x_& diff --git a/doc/qtcreator/images/icons/distribute-origin-none.png b/doc/qtcreator/images/icons/distribute-origin-none.png deleted file mode 100644 index c49665596128e15e679f07c6e970737417326cb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 179 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_p*yPZ!4!i{9jf1wtL_&i#VB4%7>o*rz8XBpg+9>`^=~DIuZqLGwU5hvV5FJc?1q zX3iehdU7~!&Pp_!EMzSKqH;LQ(uH$5?Cgb2T4pdD&g9Ts*qi7f$~h~ML6!N_gcXu} a3^i9Jeau???=dhiFnGH9xvXb={pv_+nN53HRt;@;|DvvnXm5rwLGseaW>nke8G=V*S|{q2&wNo z(aW~#{mh@-JYA_v^BR^%JH)R&RnX|u_|Wvh$5)B1C5$UVUDjAJs(;_g8rANtV66U% zuOd^%F8e~Tz0xD@iWf`_OLp~iygzore*c75N=nya85>yKd_S=Zm#B*G`djgyfq{X+ M)78&qol`;+0D{+Qp#T5? diff --git a/doc/qtcreator/images/icons/distribute-right.png b/doc/qtcreator/images/icons/distribute-right.png deleted file mode 100644 index 54527947409d7ab59257a152d6571994d6c1377f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 127 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_lO0PZ!4!i{9h}1^x|&1_pl;KtSm-gT;bbj8l1dc>Z@DSZh*za0R3CZHA(Q3a5M+ ZqF8zOB$nS$XJBAp@O1TaS?83{1OO6EA$I@( diff --git a/doc/qtcreator/images/icons/distribute-spacing-horizontal.png b/doc/qtcreator/images/icons/distribute-spacing-horizontal.png deleted file mode 100644 index a416a9f8d21a64ecb2d24dc2cf623210dbccbca6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 194 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_p)_PZ!4!i{9jf1xy}k2?+^G&ho+``iJ@1*x1aBcoLEm5`H-Los~Ez5y2dB;l~~x z9-gliSMH}KB+Tg3>yYV~#KXh$|Ko$d9=}!ycf5%Eap=H-3*GL2V{@96ZDkFN4Ge5j q5)yWtVCYl}I#AEX*2X@?s)3QgpH=O_NUCu0s^c*k8NONU|_iK>Eak-(YtiAV^*_+NZbC2T?^t4cz1Yb-m_h_ z(Olq8mE=L+!zoW0ZJH*`Iof+^$A-IGra7(Rn|Zal^1k_d`3fzLCjWUB`f6tbMJCSm z(^z^Ts(A0+4L&THlO9yct$RIbnP$Vx1KZv%o%j5vkAl)3Ilh`Z@4wWZ|NWEa%^zmL zh3m3UZCa8!%f5WJ@S20On{*|@lsY&+=~ zWb?>^uTbWFoA|-#X%BzfF~nYf+cuqJ+Sl1BvzFccpmZV1xKH`8!2*48<;JSAx%(N; Y?+kXy@6<41U|?YIboFyt=akR{0Dtv^ng9R* diff --git a/doc/qtcreator/images/icons/easing-curve-spline-icon.png b/doc/qtcreator/images/icons/easing-curve-spline-icon.png deleted file mode 100644 index 3a4bc695fc9d86fc04dceaaaacac2fee667aa4d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 551 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_lQ95>H=O_NUCu0>XkP49)j5FfbnTba4!^=v_K#f7dGqkz@N=6z>@ZzA3w)tGlju z*LTi0Z&fvObZc1Uo!+?Y$X+G89y?d)vl=J(&9 zW1Mbs&hnx3w4Wt)d-ojJmaF2)biMTB_rHJrV%A@MV8K@s+b+OVfA8LcdNJAKjLAI9 zG7oKg+rItgHr~r72PJ}~SWl#F_BtU^&EYZ0<)=#tbH=Q;`B$|bS-45Gt+@VrMcC?c zhH#EK=hHK0wcX75rhn3Mx!YpLeeZ);hA5r08DunK#`@#t};HT+N(4_{J@{?MbJ(NPd^WGm`Q6c(8zWo3DT4bTt?Sr@c2VfWot5s&8t?+tU_e*5Ull0)yWhgZy7&a(I-N1@E)8mq>RfV#S4 zSz8a4SnVx+V8PeH(Uy4N=lZ90`}^f@>gb$yvYYR&p(@txTE!B3J-<`mj^Rz2wTEV? z3=88S10UuVfsRESL0%k+K@3VwuXn9lSNGt$`2q7c%xA8i&H=O_NUCu0)moX?%d^PU|^W!>Eak-(ffAtMqXw`9@qVgLvkEm3+iotq7t_2 z&BJK*?G5D)?|f&e_%=8%I{R8D=kq=mkz}124{llQ(B%&DDk$&Zn0Gwz?c!OCf)6+5 zawsw|oZ+`eV=D=NS u$|bxZrFjQA{&T!Pe zk04(LhAK4%hK3dfhF=T}3=J)-$X|NsBY39)BpbR3livFqJ9cZ+Xd z=H$C0zccpWUZ*Jq3K9X$F^scW%RKw^*w`4hif1HpKg~SNz`&qd;u=wsl30>zm0XmX zSdz+MWME{VYiOuzWDsI#U}b1vWniRjU|?lnu+Tbb3yOx^{FKbJO57SQq}}3RU|>iF z*-%`TZk3#$o12bP0l+XkKx!kRp diff --git a/doc/qtcreator/images/icons/rotation-cursor.png b/doc/qtcreator/images/icons/rotation-cursor.png deleted file mode 100644 index 33ff9a73f1d6dbbf6c63afdb690f6036a92ac6cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 525 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7uXwsRhFJ8r2Je0UF+jxb z$z1`%h@2#YPv>XUoSDIM#KSjDCrTw~vg472FX9qXo&6n4*jSh|#iO3?*{S~Xt8e|) zJ^q)z&8eRM`^(Pfcer0LL{2lDfBtdS)}loMF>hGoH{5^k7${;f*Uw=7dBxdhoeU(l z2=8B+XC}QSZ1s+~^_u29%+_=H%%pg0Y~;k&xjrbcNLU$i=wwRM`RA9_)@X1&E3%By z5i4W-X5RPs!{55#eRuOdmhGN-$oFR#4IxH(iuEb~E)UGlLai+wbY1g{oNq);4pI5pwItp|o7yd5((AWke6im$26_hvN(CVKp6uA1B0ilpUXO@geCx1^6KsY diff --git a/doc/qtcreator/images/icons/transparent.png b/doc/qtcreator/images/icons/transparent.png deleted file mode 100644 index 3f9bffcac5a7d34a8baf9bc29ce5002b542cc0e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 382 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_nk0PZ!4!i{9SL`?XsGW!OIS$GhI0; z&a#f`)=S|RTf9oP2}@73JhX+IvrvAXq3G?~$JC+zoT^ zd~AjKKGMe)9WL~F%*U&_wn=y4eVc0=g&%iS9CVmALts+no=1Z1H+p^YFU((ba^WPO zaA~y*&HjpW)qnUIN*sy{v$6i5y2nLq+Jzae>mHuDpRhR~yjSC)!nW&8f{GC{<+VFw ja%y#+B)h(`tY-*pG+Uo@MaPkWfq}u()z4*}Q$iB}_(7e| diff --git a/doc/qtcreator/images/icons/visibilityon.png b/doc/qtcreator/images/icons/visibilityon.png deleted file mode 100644 index a7e0aed963e6603e039b5bbc2bd66fcf9e296721..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 609 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd5W$eeQS*<1fq^C6(btiIVPik{pF~y$1_p&> zk04(LhAK4%hK3dfhF=T}3=Jpkhqi)HH>WU~KWo5|*pE~n(_bm>;1;DXA3 zLH=O}{YrP8EpJ#{m@46ut8?g{>;1`-LOGZ>Xa)T*`7g;;9^>zjTPeYksL<*tQ}dIJ zXWF(;8+PBcp0MUrzw`Nfo(H}uPRdeW&(PcIcioTI`pSHUb1`>&&P2H`=Sf&sHUAk` z!{>{;`onuJ%=`Ryj^)i0H~;zE?v8x?{`@bdyZ73!F3PyNkb!|gwZt`|BqgyV)hf9t zHL)a>!N|bKK-bVv*T^8m(7?*jz{w4xX=z#^pQj3Z+^Yg3}%=8Ql6r4&kb5axxG!+zTz0I9L4)k>O Kb6Mw<&;$UdXV{tm diff --git a/doc/qtcreator/images/icons/action-icon-binding.png b/doc/qtdesignstudio/images/icons/action-icon-binding.png similarity index 100% rename from doc/qtcreator/images/icons/action-icon-binding.png rename to doc/qtdesignstudio/images/icons/action-icon-binding.png diff --git a/doc/qtcreator/images/icons/action-icon.png b/doc/qtdesignstudio/images/icons/action-icon.png similarity index 100% rename from doc/qtcreator/images/icons/action-icon.png rename to doc/qtdesignstudio/images/icons/action-icon.png diff --git a/doc/qtcreator/images/icons/alias.png b/doc/qtdesignstudio/images/icons/alias.png similarity index 100% rename from doc/qtcreator/images/icons/alias.png rename to doc/qtdesignstudio/images/icons/alias.png diff --git a/doc/qtcreator/images/icons/align-bottom.png b/doc/qtdesignstudio/images/icons/align-bottom.png similarity index 70% rename from doc/qtcreator/images/icons/align-bottom.png rename to doc/qtdesignstudio/images/icons/align-bottom.png index 07277d74a9e8985fac91338f9aac91a7b227079f..0e06ebee11243fb175f6bab0b16e0fdbc8000e87 100644 GIT binary patch delta 9 QcmX@XxS4T+%0$b401_AjivR!s delta 28 hcmdnYc!F_)iV$akM`SSr1K$x4W}K?cCp}Sd5&&_u2crN0 diff --git a/doc/qtdesignstudio/images/icons/align-center-horizontal.png b/doc/qtdesignstudio/images/icons/align-center-horizontal.png new file mode 100644 index 0000000000000000000000000000000000000000..e60f85557352b8dff43c2aa0f376c327724780aa GIT binary patch literal 210 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7W_r3fhFJ6_Cmi6HS|FjG z;Fwgr;G?93gv5;nCj7I0$g{Dv$-iiOn~;$3!(Zhd){g){@$}G>; z6LBO&QbM9<;Tr*sy=-3dQxg()^sbSJR=DRDw1jbK_=6(Gqj3xjeL;#RtJZLNGB7YO Nc)I$ztaD0e0sx2rOBDbB literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/align-center-vertical.png b/doc/qtdesignstudio/images/icons/align-center-vertical.png similarity index 57% rename from doc/qtcreator/images/icons/align-center-vertical.png rename to doc/qtdesignstudio/images/icons/align-center-vertical.png index 8d4237335114a9bcbd9170d475498e5329e3c48e..92ffefe22fcaabf30c7d61add16c64be89ed2d56 100644 GIT binary patch delta 9 QcmX@ZxSer=%0$b_01{jSmjD0& delta 28 hcmdnac!qI;iV$akM`SSr1K$x4W}K?cCp}Sd8US*T2d@AC diff --git a/doc/qtdesignstudio/images/icons/align-left.png b/doc/qtdesignstudio/images/icons/align-left.png new file mode 100644 index 0000000000000000000000000000000000000000..e1f4b11b3eaf24b867a60d7083e2dc9004f7d227 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7T0C7GLo9mFUf9Tc$U(s6 zqWW!4L(vPJ*$Y@-uv}y@oiXLYl!rYHViP1)GrzUU t=gGb)IPoK2&>?=4V=MbS)rBkX9bgrczq#V%IR*v>22WQ%mvv4FO#lSAOjrN_ literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/align-right.png b/doc/qtdesignstudio/images/icons/align-right.png new file mode 100644 index 0000000000000000000000000000000000000000..64602bc95e01381537413464445b182c9284b04c GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7T0LDHLo9le6BOiG3=Is{ zBrZC@zy<k4}q(zb&8u^)Li2pM%Fj(U% eRPVBekzwH%@uVk(eB}%b3=E#GelF{r5}E*h|2*3O literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/anchor-bottom.png b/doc/qtdesignstudio/images/icons/anchor-bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..df078b0a036de01a609ae3a60d39c02927658d07 GIT binary patch literal 147 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7qC8z3Lo9mVUfw9`;2_|7 zad(c&5}DeS{);$uH#l{=G%&qM>znWU;hv9yeS({|e)OJ)axYcyBzAqDu;JO9fTs@o z9~3t|pUCz`|0dh3rl;)3nErVcOkL!$VG4(z%tJ15i^AH2iX7s diff --git a/doc/qtdesignstudio/images/icons/anchor-center-vertical.png b/doc/qtdesignstudio/images/icons/anchor-center-vertical.png new file mode 100644 index 0000000000000000000000000000000000000000..bce2ee77a6bda507163677e02319aeae7d560a12 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7nmk<`Lo9mlUO32k$U&g> z;rR_^4?Jy_u-o2f)I8#JY1#y)q6@p-xi>Vke0;#>OX1o@}#N{Of7c^&OUr&Ni&KFlbl* qXRqM%M{T;aPrK0fo~N>V7-j7F8Gbuoox;Gtz~JfX=d#Wzp$Py|V@OQ^ literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/anchor-fill.png b/doc/qtdesignstudio/images/icons/anchor-fill.png new file mode 100644 index 0000000000000000000000000000000000000000..a0b673f37e18721111596c0d309054e0ed7f6466 GIT binary patch literal 130 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCT0c(hNQXTpBNYzI0Jk_Tp3`XIr-%Q1_lPE zk|4iehNE-m{$^)jU{LdPaSY*zPELs4n#IH{VPRlkU}Um3>gtgTM-Dj1Fb45lV`EcT Z%&@jrQ2pJR$HE}9JYD@<);T3K0RY%mAk6>( literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/anchor-left.png b/doc/qtdesignstudio/images/icons/anchor-left.png new file mode 100644 index 0000000000000000000000000000000000000000..34930b467880c9777eb089b7bc6ed96a8761e8c6 GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s75MvXPK&KsoHy`ZW|%s4=dUVG?s-4&q|!^n&AdNUQWYN07uw~@qGxO^ z`%vZOJH`gCJ@>di$@wKP{bzIAFVJ{(qObA-ruHRwBNv#Yhzr~`%eqm+z`(%Z>FVdQ I&MBb@03qWyv;Y7A literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/anchor-right.png b/doc/qtdesignstudio/images/icons/anchor-right.png new file mode 100644 index 0000000000000000000000000000000000000000..e0b7fe4deaa455182d7918bf47eb0f0fa588630d GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s759PRHnuitoq)5~czAg7J1@i>J8+taKyqA!W=$n*~DQ?8hu#}zaP1UdW4h#$o44$rjF6*2U FngG^NG9CZ` literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/anchor-top.png b/doc/qtdesignstudio/images/icons/anchor-top.png new file mode 100644 index 0000000000000000000000000000000000000000..460f181bb557b86ee9ef741fadc028c3df98d2e8 GIT binary patch literal 145 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7B0OCjLo9mVUS25JU?AXf zQJhVbGsHu1igV%?2R6xGhUO=aB=%Wutv{c0XkBB=M%N2Ihni&0TyJR-{hDf#T*kf3 x;djd=)+YYCgX%1QYn7X&c5d5{$YED7M>wCes*(SyDgy%pgQu&X%Q~loCIDXwF=_w+ literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/annotation.png b/doc/qtdesignstudio/images/icons/annotation.png new file mode 100644 index 0000000000000000000000000000000000000000..5f67208749f96103249365c2f13c03a5448fafff GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd5W$eeQS*<1fx*Mm#W6(VeDV)}1_ObRf_rU@ z_BZ~|Z)p1eU(+DrA`t^DCNE zOL9pl=t#4*-E?^O{{NLQg>3D(6`y!nBsXa9SSM+!_+i4_rN1vtVOzsBL3dG8lj|lP z9((T%CzuZ}-y^f)ftoP$;YZ>#KK(u_A@S`V<8jxC{LIbUJRT^fWCR~O@Id&3J*UuY te>2^p8QdSud1kTcB>mdWlOn`W{V!wEzG;{DGcYhPc)I$ztaD0e0suPNTY&%o literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/dial-icon16.png b/doc/qtdesignstudio/images/icons/dial-icon16.png similarity index 100% rename from doc/qtcreator/images/icons/dial-icon16.png rename to doc/qtdesignstudio/images/icons/dial-icon16.png diff --git a/doc/qtdesignstudio/images/icons/distribute-bottom.png b/doc/qtdesignstudio/images/icons/distribute-bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..a8af35b0a4f59a34a82cb3303348dff1bb9a9088 GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7JUm?-Lo9mV_F3~W2nevY zcX(^7o?G)VQ}F1qRYyYB&%DX1ns(FiL5RXzCNYgB2gW-ZD}OYqGv(dj?O?lbD+B-l literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/distribute-center-horizontal.png b/doc/qtdesignstudio/images/icons/distribute-center-horizontal.png new file mode 100644 index 0000000000000000000000000000000000000000..5ec97a23578e82c4eb2d41f5d37e9d53886a25c3 GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7EInNuLo9le6Amy(L`2v~ zNJ^GJ2tM56KS{!2Bcn#c%$Yw~goQ8HJI!cpJlK?_Ct;d!g`p`SBSnoNPK77GRH;~u Qfq{X+)78&qol`;+09dmh_y7O^ literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/distribute-center-vertical.png b/doc/qtdesignstudio/images/icons/distribute-center-vertical.png new file mode 100644 index 0000000000000000000000000000000000000000..136dfaed494d96febe6a89244af577cd0f331895 GIT binary patch literal 107 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7j67W&Lo9le6C^%02+llw z{{496ta6 literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/distribute-origin-bottom-right.png b/doc/qtdesignstudio/images/icons/distribute-origin-bottom-right.png new file mode 100644 index 0000000000000000000000000000000000000000..647181e671cc16fd3d5c460ab661c65ac2f5fbf4 GIT binary patch literal 235 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7HhH=@hFJ72y!`T|Q}_e6HT$Q& oZs3YsHf46h8pfu-t8Ey4GFAF61n^2TFfcH9y85}Sb4q9e0NsRGbpQYW literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/distribute-origin-center.png b/doc/qtdesignstudio/images/icons/distribute-origin-center.png similarity index 51% rename from doc/qtcreator/images/icons/distribute-origin-center.png rename to doc/qtdesignstudio/images/icons/distribute-origin-center.png index 391d3d640f8a387d059c86e532a95e9e630fd12c..727a7dfd2eb42ac2a7e5f63cfd7665fd0cbaad3c 100644 GIT binary patch delta 9 QcmbQo)X6kKWuoO%01w;)j{pDw delta 28 hcmeBVn#VLjMToP&BeIx*f$s6CHffo`a5$4gb760yhbZT)LgTe~ HDWM4fUY;)= literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/distribute-origin-top-left.png b/doc/qtdesignstudio/images/icons/distribute-origin-top-left.png new file mode 100644 index 0000000000000000000000000000000000000000..993c4c7d39c76266785bfa87e28ea8f166b26468 GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7wt2cZhFJ72y=a)_6e!U8 zu>RjgwT=BRnCldtMUauMqU3Z@gtTF)Z2D t)A9b;3H$vMUMVSEi)CzJar6DeE?lB2zUyzrdjOLo9le6BPJ27#bM- zNdN(*%M2C^W-(6X;o8pI?#H162QGBG|BcOQQnr;fFg7r-Nl8f9ae|>!E$Bc!8(SOu6srbC X28Vj_>56lN7(l?&)z4*}Q$iB}qM|vQ literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/distribute-spacing-vertical.png b/doc/qtdesignstudio/images/icons/distribute-spacing-vertical.png new file mode 100644 index 0000000000000000000000000000000000000000..5489cb4024f16ee9dc8646eb8137cddcce9a088f GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s75QUrNZeSN;*|MK%+4$s{-`x{ft7juPRjbP0 Hl+XkKHm6f@ literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/easing-curve-spline-icon.png b/doc/qtdesignstudio/images/icons/easing-curve-spline-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f6420d9174b10f01678530402e3e58ebb9b66f4e GIT binary patch literal 391 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4rT@h1`S>QUAmsELpa6>5Apc zSFT*SX7%bdYu2n=yLSD$bsN^N-?(w(ri~jnZQ8VV@7{Cg&Rw~3<@)vOcW&RlbLY;J zCr@6yc=7V(%U7>ny?y)k!-o&wzke@E4}QqNz%bF%#W6%elJ#J>5>ucE!+}nr&b7Pm zZQ8zf_HoZo8WaEjH!x;k2$(*{;ndPLy+w?^E{)SW)D5~bF8+RVYdxor`0195{|?+W z-tnVhv+m*h!7I!R{vG=xcg))2X7VRvhpml=_cLDGzN3o$c5%$Rz8#gVTVi}Ze!F3_ zX1${OnSwoC5nmU&n7k+z)Lr527chMe1H%J(^-a8e(~kRzGcYhPc)I$ztaD0e0st_m BvU~sl literal 0 HcmV?d00001 diff --git a/doc/qtdesignstudio/images/icons/easing-curve-step-icon.png b/doc/qtdesignstudio/images/icons/easing-curve-step-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..5d6523f1c7032765abc185f2e55f63c20a9c40d1 GIT binary patch literal 147 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdmu-d_r6$B_*Y#q}<%xJUu*o zyuBC9pTB6~!o`agEnTu?{knDEzklalQf0%yz@Y2t;uyjaot)snBzII`*2dynt3tUQ y)|^@ypt)H=qnX=FS)#z9P2~Ej(A5Df3~QL!R~2>2-eX{3VDNPHb6Mw<&;$T3FfRlE literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/frame-icon16.png b/doc/qtdesignstudio/images/icons/frame-icon16.png similarity index 100% rename from doc/qtcreator/images/icons/frame-icon16.png rename to doc/qtdesignstudio/images/icons/frame-icon16.png diff --git a/doc/qtcreator/images/icons/groupbox-icon16.png b/doc/qtdesignstudio/images/icons/groupbox-icon16.png similarity index 100% rename from doc/qtcreator/images/icons/groupbox-icon16.png rename to doc/qtdesignstudio/images/icons/groupbox-icon16.png diff --git a/doc/qtcreator/images/icons/itemdelegate-icon16.png b/doc/qtdesignstudio/images/icons/itemdelegate-icon16.png similarity index 100% rename from doc/qtcreator/images/icons/itemdelegate-icon16.png rename to doc/qtdesignstudio/images/icons/itemdelegate-icon16.png diff --git a/doc/qtcreator/images/icons/label-icon16.png b/doc/qtdesignstudio/images/icons/label-icon16.png similarity index 100% rename from doc/qtcreator/images/icons/label-icon16.png rename to doc/qtdesignstudio/images/icons/label-icon16.png diff --git a/doc/qtcreator/images/icons/lockoff.png b/doc/qtdesignstudio/images/icons/lockoff.png similarity index 100% rename from doc/qtcreator/images/icons/lockoff.png rename to doc/qtdesignstudio/images/icons/lockoff.png diff --git a/doc/qtdesignstudio/images/icons/lockon.png b/doc/qtdesignstudio/images/icons/lockon.png new file mode 100644 index 0000000000000000000000000000000000000000..d44a275cda26fbb77dc72c3829816a7793ed5011 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd5W$eeQS*<1fuYXR#W6%9IQfS^gMq?~_p6#d zNgOz^_*

+)H&eK`-;Rehe%-@>0=G^^?HjYWLN{1R?QS}Gy=`h! k@8pfzGvgZ1OcB zmWU-g_a~P39(eumFI!kIdsAgx^{pS`X#-DclcBx40k*@`In*;HklPZSxQxVrPJTB^y*Jfp}J*AGuNGQLwZ z<%9YUJB2G>-dsO%z=(mtSnlguud60CFE|(!J}u#F=sKjw@J5<}VO5ivRG*K$y+;ZLvg=u%@dcVkS@L0)rVy*JU$s1n8vd)y*@G_K# z;W<~RuK0p?r-0*~#Vc8Of23vQAf;Wz=3<69J qE1q-pL>6i=Ff_2-(UR?WDF2Yt3@*J0P2D60CfSV#=2~4+m^SItPj3U(eX=(d7H*xKr!O}1>;VP6 z!sl0SO;?y$cJBWvp8r1{`$$R@sn>7+_g`Mcc5`c^$`R}{r&v-ROFU|9m{SitkXZW*(H9D h Date: Wed, 8 Dec 2021 15:22:08 +0100 Subject: [PATCH 70/77] QmlDesigner: ConnectionEditor hide readonly Hide readonly properties in the ConnectionEditors target item property ComboBox. Task-number: QDS-5718 Change-Id: Idee217714d460a0a59954faf3c51641648e0657b Reviewed-by: Thomas Hartmann Reviewed-by: Qt CI Bot --- .../components/bindingeditor/actioneditor.cpp | 25 ++++++++++--------- .../bindingeditor/actioneditordialog.cpp | 8 +++--- .../bindingeditor/actioneditordialog.h | 16 +++++++++--- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp b/src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp index c88d072618a..ce4f124d340 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp @@ -202,26 +202,26 @@ void ActionEditor::prepareConnections() continue; const QString name = QString::fromUtf8(propertyName); + const bool writeable = modelNode.metaInfo().propertyIsWritable(propertyName); TypeName type = modelNode.metaInfo().propertyTypeName(propertyName); if (type.contains(".")) type.remove(0, 6); - connection.properties.append(ActionEditorDialog::PropertyOption(name, type)); + connection.properties.append(ActionEditorDialog::PropertyOption(name, type, writeable)); } for (const VariantProperty &variantProperty : modelNode.variantProperties()) { - if (variantProperty.isValid()) { - if (variantProperty.isDynamic()) { - if (!typeWhiteList.contains(variantProperty.dynamicTypeName())) - continue; + if (variantProperty.isValid() && variantProperty.isDynamic()) { + if (!typeWhiteList.contains(variantProperty.dynamicTypeName())) + continue; - const QString name = QString::fromUtf8(variantProperty.name()); - TypeName type = variantProperty.dynamicTypeName(); - if (type.contains(".")) - type.remove(0, 6); + const QString name = QString::fromUtf8(variantProperty.name()); + const bool writeable = modelNode.metaInfo().propertyIsWritable(variantProperty.name()); + TypeName type = variantProperty.dynamicTypeName(); + if (type.contains(".")) + type.remove(0, 6); - connection.properties.append(ActionEditorDialog::PropertyOption(name, type)); - } + connection.properties.append(ActionEditorDialog::PropertyOption(name, type, writeable)); } } @@ -266,10 +266,11 @@ void ActionEditor::prepareConnections() continue; const QString name = QString::fromUtf8(propertyName); + const bool writeable = metaInfo.propertyIsWritable(propertyName); if (type.contains(".")) type.remove(0, 6); - singelton.properties.append(ActionEditorDialog::PropertyOption(name, type)); + singelton.properties.append(ActionEditorDialog::PropertyOption(name, type, writeable)); } if (!singelton.properties.isEmpty()) { diff --git a/src/plugins/qmldesigner/components/bindingeditor/actioneditordialog.cpp b/src/plugins/qmldesigner/components/bindingeditor/actioneditordialog.cpp index 7e4fb86451b..12b3389b463 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/actioneditordialog.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/actioneditordialog.cpp @@ -472,7 +472,7 @@ void ActionEditorDialog::fillAndSetTargetItem(const QString &value, bool useDefa } else { // ConnectionType::Assignment m_assignmentTargetItem->clear(); for (const auto &connection : qAsConst(m_connections)) { - if (!connection.properties.isEmpty()) + if (!connection.properties.isEmpty() && connection.hasWriteableProperties()) m_assignmentTargetItem->addItem(connection.item); } @@ -516,8 +516,10 @@ void ActionEditorDialog::fillAndSetTargetProperty(const QString &value, bool use if (idx == -1) { insertAndSetUndefined(m_assignmentTargetProperty); } else { - for (const auto &property : qAsConst(m_connections[idx].properties)) - m_assignmentTargetProperty->addItem(property.name, property.type); + for (const auto &property : qAsConst(m_connections[idx].properties)) { + if (property.isWriteable) + m_assignmentTargetProperty->addItem(property.name, property.type); + } if (m_assignmentTargetProperty->findText(value) != -1) { m_assignmentTargetProperty->setCurrentText(value); diff --git a/src/plugins/qmldesigner/components/bindingeditor/actioneditordialog.h b/src/plugins/qmldesigner/components/bindingeditor/actioneditordialog.h index e19c7fe657b..02d1cb94829 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/actioneditordialog.h +++ b/src/plugins/qmldesigner/components/bindingeditor/actioneditordialog.h @@ -51,10 +51,10 @@ public: class PropertyOption { public: - PropertyOption() {} - PropertyOption(const QString &n, const TypeName &t) + PropertyOption(const QString &n, const TypeName &t, bool writeable = true) : name(n) , type(t) + , isWriteable(writeable) {} bool operator==(const QString &value) const { return value == name; } @@ -62,6 +62,7 @@ public: QString name; TypeName type; + bool isWriteable; }; class SingletonOption @@ -80,6 +81,16 @@ public: return false; } + bool hasWriteableProperties() const + { + for (const auto &p : properties) { + if (p.isWriteable) + return true; + } + + return false; + } + bool operator==(const QString &value) const { return value == item; } bool operator==(const SingletonOption &value) const { return value.item == item; } @@ -90,7 +101,6 @@ public: class ConnectionOption : public SingletonOption { public: - ConnectionOption() {} ConnectionOption(const QString &value) : SingletonOption(value) {} QStringList methods; From e1ecc23dacebea493957a3b85cf7fb6b0b7a4708 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Wed, 8 Dec 2021 17:42:09 +0100 Subject: [PATCH 71/77] QmlDesigner: Remove duplicate family names Remove duplicate family names in the font ComboBox. Task-number: QDS-5695 Change-Id: I9f5bcf7f58dbcae012288689c0ec48a80451c328 Reviewed-by: Thomas Hartmann --- .../imports/HelperWidgets/FontComboBox.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml index 8294068ccfd..61ffd0ce407 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml @@ -60,6 +60,8 @@ StudioControls.ComboBox { familyNames.push(fontLoader.name) } + // Remove duplicate family names + familyNames = [...new Set(familyNames)] familyNames.sort() comboBox.model = familyNames } From d22a6a66fd0a82a6fc96b75e7232f7428cbc5abe Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Wed, 8 Dec 2021 13:44:02 +0200 Subject: [PATCH 72/77] QmlDesigner: Enable smooth resizing of views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable a docking widgets param that updates views sizes while dragging the splitters between views. Change-Id: If4fa0f8a3d4601758a2a3be0f81e306104379ecc Reviewed-by: Miikka Heikkinen Reviewed-by: Thomas Hartmann Reviewed-by: Samuel Ghinet Reviewed-by: Henning Gründl Reviewed-by: Qt CI Bot --- src/plugins/qmldesigner/designmodewidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp index 19baf68f8ed..20fee2e3e18 100644 --- a/src/plugins/qmldesigner/designmodewidget.cpp +++ b/src/plugins/qmldesigner/designmodewidget.cpp @@ -231,6 +231,7 @@ void DesignModeWidget::setup() ADS::DockManager::setConfigFlags(ADS::DockManager::DefaultNonOpaqueConfig); ADS::DockManager::setConfigFlag(ADS::DockManager::FocusHighlighting, true); + ADS::DockManager::setConfigFlag(ADS::DockManager::OpaqueSplitterResize, true); ADS::DockManager::setConfigFlag(ADS::DockManager::AllTabsHaveCloseButton, true); m_dockManager = new ADS::DockManager(this); m_dockManager->setSettings(settings); From 5453c539b50cfbea817a0b3979b86731bd6c394f Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Wed, 8 Dec 2021 14:29:51 +0200 Subject: [PATCH 73/77] QmlDesigner: Remove flexible width from Component Library items ...so that resizing the view doesn't cause sluggish animation to the items. Also removed an unnecessary top padding from the horizontal lib to avoid a slight vertical jump when switching between the 2 layouts. Change-Id: I0af75db885398dc93fc234d760156a55042f59d0 Reviewed-by: Miikka Heikkinen Reviewed-by: Samuel Ghinet Reviewed-by: Thomas Hartmann Reviewed-by: --- .../qmldesigner/itemLibraryQmlSources/ItemsView.qml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml index 034d460d8fd..f37a0e05d01 100644 --- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml +++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml @@ -266,8 +266,7 @@ Item { Grid { id: itemGrid - property real actualWidth: parent.width - itemGrid.leftPadding -itemGrid.rightPadding - property int flexibleWidth: (itemGrid.actualWidth / columns) - styleConstants.cellWidth + property real actualWidth: parent.width - itemGrid.leftPadding - itemGrid.rightPadding leftPadding: 6 rightPadding: 6 @@ -280,7 +279,7 @@ Item { visible: itemVisible textColor: importUnimported ? StudioTheme.Values.themeUnimportedModuleColor : StudioTheme.Values.themeTextColor - width: styleConstants.cellWidth + itemGrid.flexibleWidth + width: styleConstants.cellWidth height: styleConstants.cellHeight onShowContextMenu: { if (!itemUsable) { @@ -304,7 +303,7 @@ Item { id: horizontalView Row { - padding: 5 + leftPadding: 5 ScrollView { id: horizontalScrollView @@ -421,7 +420,6 @@ Item { Grid { id: hItemGrid property real actualWidth: itemsView.width - 294 - property int flexibleWidth: (hItemGrid.actualWidth / hItemGrid.columns) - styleConstants.cellWidth leftPadding: 9 rightPadding: 9 @@ -435,7 +433,7 @@ Item { visible: itemVisible textColor: itemLibraryModel.importUnimportedSelected ? StudioTheme.Values.themeUnimportedModuleColor : StudioTheme.Values.themeTextColor - width: styleConstants.cellWidth + hItemGrid.flexibleWidth + width: styleConstants.cellWidth height: styleConstants.cellHeight onShowContextMenu: { if (!itemUsable) { From 48fafae034bb571fb9445061fa62b1b7050eedd3 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 8 Dec 2021 19:01:53 +0100 Subject: [PATCH 74/77] Doc: Move all icon images to images/icons and fix references to them As a first step to making the images visible in both dark and light online doc modes. Task-number: QTCREATORBUG-26644 Change-Id: If7da7fec69d1114201d2832b4228b4dba0f090f0 Reviewed-by: Alessandro Portale --- .../icons/qtcreator-analyze-start-button.png | Bin 0 -> 144 bytes .../images/icons/qtcreator-anchors-reset-icon.png | Bin 0 -> 230 bytes .../images/icons/qtcreator-debug-button-stop.png | Bin 0 -> 178 bytes .../images/{ => icons}/qtcreator-debug-button.png | Bin .../images/icons/qtcreator-debugging-continue.png | Bin 0 -> 130 bytes .../icons/qtcreator-desktopdevice-button.png | Bin 0 -> 211 bytes .../images/{ => icons}/qtcreator-expand.png | Bin .../images/icons/qtcreator-new-search-icon.png | Bin 0 -> 191 bytes .../{ => icons}/qtcreator-run-failed-tests.png | Bin .../{ => icons}/qtcreator-run-selected-tests.png | Bin .../qtcreator-run-tests-in-current-file.png | Bin .../{ => icons}/qtcreator-show-subprojects.png | Bin .../qtcreator-unclaimed-breakpoint-icon.png | Bin doc/qtcreator/images/icons/refactormarker.png | Bin 0 -> 136 bytes doc/qtcreator/images/icons/replace.png | Bin 0 -> 211 bytes doc/qtcreator/images/{ => icons}/statistics.png | Bin doc/qtcreator/images/qml-toolbar-pin.png | Bin 494 -> 0 bytes .../images/qtcreator-analyze-start-button.png | Bin 505 -> 0 bytes .../images/qtcreator-anchors-reset-icon.png | Bin 482 -> 0 bytes .../images/qtcreator-debug-button-stop.png | Bin 485 -> 0 bytes .../images/qtcreator-debugging-continue.png | Bin 488 -> 0 bytes .../images/qtcreator-desktopdevice-button.png | Bin 463 -> 0 bytes .../images/qtcreator-new-search-icon.png | Bin 668 -> 0 bytes doc/qtcreator/images/refactormarker.png | Bin 492 -> 0 bytes doc/qtcreator/images/replace.png | Bin 715 -> 0 bytes doc/qtcreator/src/analyze/cpu-usage-analyzer.qdoc | 2 +- .../analyze/creator-clang-static-analyzer.qdoc | 4 ++-- doc/qtcreator/src/analyze/creator-valgrind.qdoc | 4 ++-- .../src/debugger/creator-debugger-common.qdocinc | 2 +- .../creator-only/creator-debugger-example.qdoc | 2 +- .../debugger/creator-only/creator-debugger.qdoc | 4 ++-- .../src/debugger/qtquick-debugger-example.qdoc | 2 +- .../src/editors/creator-code-refactoring.qdoc | 4 ++-- .../src/editors/creator-code-syntax.qdoc | 2 +- .../creator-only/creator-language-server.qdoc | 4 ++-- .../src/editors/creator-quick-fixes.qdoc | 2 +- doc/qtcreator/src/editors/creator-search.qdoc | 2 +- .../src/howto/creator-external-tools.qdoc | 2 +- .../src/howto/creator-only/creator-autotest.qdoc | 6 +++--- .../creator-only/creator-projects-targets.qdoc | 2 +- .../projects/creator-qtcreator-variables.qdocinc | 2 +- .../creator-only/qtquick-app-tutorial.qdoc | 2 +- doc/qtcreator/src/qtquick/qtquick-profiler.qdoc | 2 +- doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc | 4 ++-- .../src/user-interface/creator-views.qdoc | 2 +- 45 files changed, 28 insertions(+), 28 deletions(-) create mode 100644 doc/qtcreator/images/icons/qtcreator-analyze-start-button.png create mode 100644 doc/qtcreator/images/icons/qtcreator-anchors-reset-icon.png create mode 100644 doc/qtcreator/images/icons/qtcreator-debug-button-stop.png rename doc/qtcreator/images/{ => icons}/qtcreator-debug-button.png (100%) create mode 100644 doc/qtcreator/images/icons/qtcreator-debugging-continue.png create mode 100644 doc/qtcreator/images/icons/qtcreator-desktopdevice-button.png rename doc/qtcreator/images/{ => icons}/qtcreator-expand.png (100%) create mode 100644 doc/qtcreator/images/icons/qtcreator-new-search-icon.png rename doc/qtcreator/images/{ => icons}/qtcreator-run-failed-tests.png (100%) rename doc/qtcreator/images/{ => icons}/qtcreator-run-selected-tests.png (100%) rename doc/qtcreator/images/{ => icons}/qtcreator-run-tests-in-current-file.png (100%) rename doc/qtcreator/images/{ => icons}/qtcreator-show-subprojects.png (100%) rename doc/qtcreator/images/{ => icons}/qtcreator-unclaimed-breakpoint-icon.png (100%) create mode 100644 doc/qtcreator/images/icons/refactormarker.png create mode 100644 doc/qtcreator/images/icons/replace.png rename doc/qtcreator/images/{ => icons}/statistics.png (100%) delete mode 100644 doc/qtcreator/images/qml-toolbar-pin.png delete mode 100644 doc/qtcreator/images/qtcreator-analyze-start-button.png delete mode 100644 doc/qtcreator/images/qtcreator-anchors-reset-icon.png delete mode 100644 doc/qtcreator/images/qtcreator-debug-button-stop.png delete mode 100644 doc/qtcreator/images/qtcreator-debugging-continue.png delete mode 100644 doc/qtcreator/images/qtcreator-desktopdevice-button.png delete mode 100644 doc/qtcreator/images/qtcreator-new-search-icon.png delete mode 100644 doc/qtcreator/images/refactormarker.png delete mode 100644 doc/qtcreator/images/replace.png diff --git a/doc/qtcreator/images/icons/qtcreator-analyze-start-button.png b/doc/qtcreator/images/icons/qtcreator-analyze-start-button.png new file mode 100644 index 0000000000000000000000000000000000000000..e957775c95569569cdf4b682e44c00701fbacaa5 GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0y~yU=Uo2-UNUT}6sM}z}wEqsmi3tHW+w~3|koYa;+tTQmB-(Yt-k?*7iRHiH xl?6A>ec->_8X!EO=3v8{X9t#Zs2@lbU|?vTxxHZS+F*8&Ri3VXF6*2UngDSeGOPdq literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/qtcreator-anchors-reset-icon.png b/doc/qtcreator/images/icons/qtcreator-anchors-reset-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8107e3c4987ac3de66f6f67cd3f11c45dc0846d3 GIT binary patch literal 230 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdmW!d_r6q7#Iu<4J|D#gMxyR zlasTvv#YDCdwP17E?v5I?b@wdx9;7$_ujpG&!0bk|Ni~||NogQnw1$C7z#aI978x} zCja1P<@qn^&>(-}NA43=E#GelF{r5}E+8>R^Td literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/qtcreator-debug-button-stop.png b/doc/qtcreator/images/icons/qtcreator-debug-button-stop.png new file mode 100644 index 0000000000000000000000000000000000000000..66251c53de970685edb763f4b9d00ed81825e68b GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdmW!d_r6q7#O6aqznuU3=Iu^ ze0;*f!lI+2l+#x`uqF$?b~<%{{4Ud{{8>|zgWVemVtr6*3-o?gd;ln z2R|zh2OG15!1)K&-}z4MsO3NNpjupjJyGL}$&F^o^A{r&Yv@Ndh dTfuEc!&K`tnpeIWFfcGMc)I$ztaD0e0ssjsKEeP1 literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/qtcreator-debug-button.png b/doc/qtcreator/images/icons/qtcreator-debug-button.png similarity index 100% rename from doc/qtcreator/images/qtcreator-debug-button.png rename to doc/qtcreator/images/icons/qtcreator-debug-button.png diff --git a/doc/qtcreator/images/icons/qtcreator-debugging-continue.png b/doc/qtcreator/images/icons/qtcreator-debugging-continue.png new file mode 100644 index 0000000000000000000000000000000000000000..27b5feb2d8b140c73ce69d6687f219de3dd22ab1 GIT binary patch literal 130 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)RqczU`xhDd}b|LA9v*uY`X zz%XUWE`~PU@4w$GbN~4-e@viFC*i<^UHVfG3V6DjINLh&tkV6OAhk|OPGdsD6H8~! g`E2r<&OY~<7>XUbnc6O#*$y(?)78&qol`;+04x(I!T@ N22WQ%mvv4FO#p4HQKbL? literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/qtcreator-expand.png b/doc/qtcreator/images/icons/qtcreator-expand.png similarity index 100% rename from doc/qtcreator/images/qtcreator-expand.png rename to doc/qtcreator/images/icons/qtcreator-expand.png diff --git a/doc/qtcreator/images/icons/qtcreator-new-search-icon.png b/doc/qtcreator/images/icons/qtcreator-new-search-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..4c5cc8782bc9333b8918fa321ad8d00af557e5a0 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)Rqw0XKXhDc0J{?X4Sap1}A zl_y)-C$RWsWVBgwr~Gf@+!NIG^TYrDj0ekRI4r;BFHqcf$$N!E1y{uP*qg!ujV%Tn z4ydl=4rt6Ry6(UvDRw`BiRY8_{MfV4Z?T$|Y}aUBJZssUmu4%h%eW0q{?u>y{la|3 tVLlGSD~l}VPG87%Ro~Y1hE2Oa1H-~M*JOex`xb#*=IQF^vd$@?2>@t=N+SRO literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/qtcreator-run-failed-tests.png b/doc/qtcreator/images/icons/qtcreator-run-failed-tests.png similarity index 100% rename from doc/qtcreator/images/qtcreator-run-failed-tests.png rename to doc/qtcreator/images/icons/qtcreator-run-failed-tests.png diff --git a/doc/qtcreator/images/qtcreator-run-selected-tests.png b/doc/qtcreator/images/icons/qtcreator-run-selected-tests.png similarity index 100% rename from doc/qtcreator/images/qtcreator-run-selected-tests.png rename to doc/qtcreator/images/icons/qtcreator-run-selected-tests.png diff --git a/doc/qtcreator/images/qtcreator-run-tests-in-current-file.png b/doc/qtcreator/images/icons/qtcreator-run-tests-in-current-file.png similarity index 100% rename from doc/qtcreator/images/qtcreator-run-tests-in-current-file.png rename to doc/qtcreator/images/icons/qtcreator-run-tests-in-current-file.png diff --git a/doc/qtcreator/images/qtcreator-show-subprojects.png b/doc/qtcreator/images/icons/qtcreator-show-subprojects.png similarity index 100% rename from doc/qtcreator/images/qtcreator-show-subprojects.png rename to doc/qtcreator/images/icons/qtcreator-show-subprojects.png diff --git a/doc/qtcreator/images/qtcreator-unclaimed-breakpoint-icon.png b/doc/qtcreator/images/icons/qtcreator-unclaimed-breakpoint-icon.png similarity index 100% rename from doc/qtcreator/images/qtcreator-unclaimed-breakpoint-icon.png rename to doc/qtcreator/images/icons/qtcreator-unclaimed-breakpoint-icon.png diff --git a/doc/qtcreator/images/icons/refactormarker.png b/doc/qtcreator/images/icons/refactormarker.png new file mode 100644 index 0000000000000000000000000000000000000000..b51a33ab0aa06b757f790a458440ba6557f46aef GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0y~yU;weXIT#oi7?N3?k1#MW_1Tm$TEGF}28EGaC*1w5(#XVh`+m*uW8q)F**nL^&M^$G-M8cTi-U* zxLc-y$zJc>?cLKIOLTp>kFa&Vwf|=tgZ literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/statistics.png b/doc/qtcreator/images/icons/statistics.png similarity index 100% rename from doc/qtcreator/images/statistics.png rename to doc/qtcreator/images/icons/statistics.png diff --git a/doc/qtcreator/images/qml-toolbar-pin.png b/doc/qtcreator/images/qml-toolbar-pin.png deleted file mode 100644 index 8fce27b98675aebd62819db45413f92418af5e93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 494 zcmeAS@N?(olHy`uVBq!ia0y~yVBle3VBq3lV_;xt(Aocsfq{Xuz$3Dlfr0M`2s2LA z=96Y%U|=ut^mS#w!@|uerCIizj~6WD8d2g{T9T1p#ISPR84r+IC9V-AE~&-IMVSR9 znfZAP!kmiAAoD@u&iMtEMVaXtB@Ao$&sZ@qFz|szi&7IoN)<{nb5j{izw>i4Ffed} zWPyjg+Z^hKWyXOth0EP)??Y@iagFW_qQ`Yue@Z^`|f6sX9T`05p{qB#i zcLj;Crbgbf&R8pX{9?uV&m2t;I=`&c=*qZ#ZQCaIUrV{qmdK II;Vst0C;D&(EtDd diff --git a/doc/qtcreator/images/qtcreator-analyze-start-button.png b/doc/qtcreator/images/qtcreator-analyze-start-button.png deleted file mode 100644 index 6bf2dba9052d2552042605de0b75232ee874406c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 505 zcmeAS@N?(olHy`uVBq!ia0y~yU=U1SYI-~b7SCl=*p=A|rmD&&`>> z4ZkgJ2v0iVy|O^@w9%K^`u;->3^PvSaBWsl5>tL@47Uo*p(kUXeqw; zjabUvlfM{$|6|HrYuzEN@vRS2*vvOxwevHy1nRzu>+S XvzdWmp6p8o1_lOCS3j3^P6ql94%{~0R=1_nN`Xi;h+NU1_eW^O8j z>34ok1_lOBkW6rXT1k0gQ7S`h!GDl)Zjhi$W^r;(VrFh?5ySQaTlyIo7&t(};fY0g znR)392c)01!<-hJUs{x$%JB7n^J|zg=ltB<)VvagZ)c|MXJBAp18EJ(EXhe_Sn=+X zIs*ekp{I*u2*=FiAN;I5|0Nw7H=O_6MxYTpB`)x1H_)3%N#=IF^=V zGe3_(m{U=ifq{VwB<`GFP+63jo>9WEhX0He0|NseShOfL5u{Y1Br`Xa!Sp*nCj$cm zCrBnZKdq!Zu_%=xw%|WVIX6hqC9^m=CowZOwTNN+fi3+E3=A9~;qb(wyv)3Gh6B>i z+F?!$&Mz%WPG$J|zxg#xnR9+_Zfaf$!?!cj_A@Xruz|FOWR~QlGOT!aNu7a#VS}fO zV~9oX-O0Ook0=PZ$e*xW_&Z{!m=Kd!A#dIZ(TFb&FVxEPE!S+;JD|QvI#Z?2xXRJLkUz39sZCLuJ)hY~7SAz4hAfw!N%1k)is>C3rVTEMA$_ z9XZ{><-5 z`tM$)LzVM7I8JXWkYQgc@~m>%luPH=O_6MxYTm}YT&I*}=g;oF&M`xzJ**g#rCGD~t&8CJZzq|U&=u-Vha zF~p+x?qo-l~DqxO3Wl-Vc+vr#Xwx`CN86_w&h`>&aGE1r6O8 zyA1bzJjzlUo1E4nFyr}50j9LJ-SPexwykC8eXQXSd;M+H#Rog?^Ym41WcB<~`~Mj4 z;SK&rz4l+c8+l!{e0iqSv{c2VE}@}Irkr9^wP6r!U$EsXOG+670|SGntDnm{r-UW| D@8z^f diff --git a/doc/qtcreator/images/qtcreator-desktopdevice-button.png b/doc/qtcreator/images/qtcreator-desktopdevice-button.png deleted file mode 100644 index a7ad611f7c3029befe70ea9da39527052d7643a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 463 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdmW!d_r6q7#K7)H4P07y}Z1F zf`YQMvs+qPdU|@MOqnug&YY!7mu}sGcYi4fP}*n zi}Et_(isj&KWm3MEjYilC^?nk>;LB0FlEm9xw)x%B@ExrOxw@Ez`zF58j@L(lghB- z-6eGf28K9K7sn8enaMx+S$Q~)iHa+HU^VJ-YII;dQLwlA*_pd30*}AFyIbAl*mK#z zjbp~f?C((mhrgVgX`JrJGx^)8Z(PX=$rC3rES@BG;|YsdhvH=O_D8Ie+!|bmOY|kdLaq@dj-@3T`9%yX*PZcTU|`@Wag8W(Ni9w;$}A|! z%+F&G=2TQ>U|`?^i96>PR2F5XXOu9k;Xh-=z`(!<7A;Cm1SwT0$;?e(#w($Ht(NW_c`lL zPd1ua!#~4sd5D&%T)(@9#r*SzzLPJ%6!~EPFaCIG?8@t}h5C;>ufDZSci;Qdb^G~$ zFgh5`obvkXuWhSuzg0W`JXomHrKHnKljm^4_S>ytFUodb$ufQSy}E?mOVgz#Y2%5a zolh!kHr>s8`Th5jAkDDVp(UMB*<7tmN=>=9r+BIAoIYg0v+Amr*UAeYxEE|yn}1$e zsmD#3fv=r8D*M{&(ib-w8y;J%fB3LKLb8Wt$>mI!mV*f&UMDu($T2(o*+#Pe`1}07 m>_;Eu@BjGt`HAnp*z;{z4JU>3KV@KGVDNPHb6Mw<&;$UkQWV?( diff --git a/doc/qtcreator/images/refactormarker.png b/doc/qtcreator/images/refactormarker.png deleted file mode 100644 index 4a6a61219a0541c235a0c974e3ea3caae08fe77b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmeAS@N?(olHy`uVBq!ia0y~yU;weXIoKE&7~Jw?Bp4VNI14-?iy0XBj({-ZRBb+K z1_lQ95>H=O_6Jx>&|#EFfj0xxJHz?q!uR^WfqiV z=I1d8b1Eu>>;Q>7=ND8KWu|A8Fs$J}W5vM0zy}sBN=*bQRVc~KO=U3s&dR|DNig)Wr!{K4^qwz5_HKdPR>cp%uOv~*nVJ3KLY~;2S_+Pu_!MyFP-6l^s{!D z(}MF$i;`0rzW#514O8ZvpPQSSSHke^%(VRs3=C`_ts$8uIjIaQ-d$2>U|`tp>Eak7 zF}1YsAZN3Kfb0LZh8M4L4{qh@>w~4_-c!sWGcLmQWzW;wtar%*`U-rG1YIB@)<@?@ADnG^cF@(LJ{XX`;{vrkj1_n=8KbLh* G2~7a(o3{7> diff --git a/doc/qtcreator/images/replace.png b/doc/qtcreator/images/replace.png deleted file mode 100644 index d963646da9228e0ad4c0860e2cf953c01bceb778..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 715 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0XBj({-ZRBb+K z1_lQ95>H=O_6O`DJlt~2wKkZ6g;oF&M`xzJ**g#rCGD~t&8CJZzq|U&=IL*_= zF~p*G>EykuUO9-g?*HR)L`{Q3j^*?fA)PObIwCc#dsU!%#1Y8Ao-{m{KDNbxMmsq!}jsNn?Q@m7tF4yckRAG~5 zHrr6D_mOX)$i$N=aVMhIiZQe$2CNKuQDRlF|NhZUIy28dpL8U_V8Z2>BFFuw`?EMI z$ji$sDJ^2YlV{#{T)F+Q;=Zl7-)_49K6Cr+Cq|9B7r#D__bywu i?)8jiorw}PO!Bwcx88E?W@lhvVDNPHb6Mw<&;$TVC>w \uicontrol {Start Debugging} menu. @@ -104,7 +104,7 @@ \title Launching the Debugger To start an application from an open project under the control of a - debugger, select the \inlineimage qtcreator-debug-button.png + debugger, select the \inlineimage icons/qtcreator-debug-button.png (\uicontrol {Start Debugging of Startup Project}) button or press \key F5. \QC checks whether the compiled program is up-to-date, and rebuilds and diff --git a/doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc b/doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc index 24ab6934eb9..6a938999c5b 100644 --- a/doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc +++ b/doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc @@ -91,7 +91,7 @@ the view. \li Add a breakpoint at the end of the \c {startNewGame()} function, and - click \inlineimage qtcreator-debugging-continue.png + click \inlineimage icons/qtcreator-debugging-continue.png (\uicontrol Continue) to hit the breakpoint. \image qtquick-example-setting-breakpoint3.png diff --git a/doc/qtcreator/src/editors/creator-code-refactoring.qdoc b/doc/qtcreator/src/editors/creator-code-refactoring.qdoc index 00114ade7bc..137bae8690f 100644 --- a/doc/qtcreator/src/editors/creator-code-refactoring.qdoc +++ b/doc/qtcreator/src/editors/creator-code-refactoring.qdoc @@ -108,7 +108,7 @@ (\uicontrol {Previous Item}) button in the \uicontrol {Search Results} pane. \li To expand and collapse the list of all instances, click the - \inlineimage qtcreator-expand.png + \inlineimage icons/qtcreator-expand.png (\uicontrol {Expand All}) button. \li To filter the search results for the usage of symbols according to access type, such as read, write, or declaration, click the @@ -118,7 +118,7 @@ \inlineimage clean_pane_small.png (\uicontrol Clear) button. \li To start a new search, click the - \inlineimage qtcreator-new-search-icon.png + \inlineimage icons/qtcreator-new-search-icon.png (\uicontrol {New Search}) button. \endlist diff --git a/doc/qtcreator/src/editors/creator-code-syntax.qdoc b/doc/qtcreator/src/editors/creator-code-syntax.qdoc index 7ba22031edc..65e41022e37 100644 --- a/doc/qtcreator/src/editors/creator-code-syntax.qdoc +++ b/doc/qtcreator/src/editors/creator-code-syntax.qdoc @@ -57,7 +57,7 @@ When using the Clang code model, errors and warnings are additionally marked with icons and annotated. If a \l{http://clang.llvm.org/diagnostics.html} {Clang fix-it} is available, you can execute it by clicking the - \inlineimage refactormarker.png + \inlineimage icons/refactormarker.png icon and pressing \key Enter. In the following screenshot, a Qt class name contains a typo: diff --git a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc index 1d668a3e07a..02e0a78f316 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc @@ -106,7 +106,7 @@ \uicontrol {New Generic StdIO Language Server} to add a generic language server. \li In the \uicontrol Name field, enter a name for the language server. - Select the \inlineimage replace.png + Select the \inlineimage icons/replace.png (\uicontrol {Variables}) button to use a variable for the server name. For more information, see \l{Using Qt Creator Variables}. \li In the \uicontrol {Language} field, select @@ -137,7 +137,7 @@ \uicontrol {New Java Language Server} to add a Java language server. \image qtcreator-language-client-options-java.png "Java language server options" \li In the \uicontrol Name field, enter a name for the language server. - Select the \inlineimage replace.png + Select the \inlineimage icons/replace.png (\uicontrol {Variables}) button to use a variable for the server name. For more information, see \l{Using Qt Creator Variables}. \li In the \uicontrol Java field, enter the path to the Java executable. diff --git a/doc/qtcreator/src/editors/creator-quick-fixes.qdoc b/doc/qtcreator/src/editors/creator-quick-fixes.qdoc index 0a063ee3ba7..e3fd168cb06 100644 --- a/doc/qtcreator/src/editors/creator-quick-fixes.qdoc +++ b/doc/qtcreator/src/editors/creator-quick-fixes.qdoc @@ -592,7 +592,7 @@ edit a function signature and by applying the changes to the matching code. \li Function signature. When this action is available, a light bulb - icon appears: \inlineimage refactormarker.png + icon appears: \inlineimage icons/refactormarker.png \row \li Add #include for undeclared or forward declared identifier \li Adds an \c {#include} directive to the current file to make the diff --git a/doc/qtcreator/src/editors/creator-search.qdoc b/doc/qtcreator/src/editors/creator-search.qdoc index 887ae4cf3b1..4017dd1bcdb 100644 --- a/doc/qtcreator/src/editors/creator-search.qdoc +++ b/doc/qtcreator/src/editors/creator-search.qdoc @@ -213,7 +213,7 @@ To expand and collapse the search results, select the \uicontrol {Expand All} button. - To start a new search, select the \inlineimage qtcreator-new-search-icon.png + To start a new search, select the \inlineimage icons/qtcreator-new-search-icon.png (\uicontrol {New Search}) button. \note You can use \uicontrol {Advanced Find} also to search for symbols. For diff --git a/doc/qtcreator/src/howto/creator-external-tools.qdoc b/doc/qtcreator/src/howto/creator-external-tools.qdoc index e3f12702bcb..35aae547c7e 100644 --- a/doc/qtcreator/src/howto/creator-external-tools.qdoc +++ b/doc/qtcreator/src/howto/creator-external-tools.qdoc @@ -108,7 +108,7 @@ \image qtcreator-external-tools.png - Select the \inlineimage replace.png + Select the \inlineimage icons/replace.png (\uicontrol {Variables}) button in a field to select from a list of \l{Using Qt Creator Variables}{variables} that are available in a particular context. diff --git a/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc b/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc index 85a7a2256c0..f0cdaa40726 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc @@ -327,14 +327,14 @@ \list \li \inlineimage run_small.png (\uicontrol {Run All Tests}) to run all tests. - \li \inlineimage qtcreator-run-selected-tests.png + \li \inlineimage icons/qtcreator-run-selected-tests.png (\uicontrol {Run Selected Tests}) to run the selected tests. - \li \inlineimage qtcreator-run-failed-tests.png + \li \inlineimage icons/qtcreator-run-failed-tests.png (\uicontrol {Run Failed Tests}) to re-run the tests which failed in the last run. Depending on the framework this may select additional tests if it is impossible to distinguish or to fully address the test. - \li \inlineimage qtcreator-run-tests-in-current-file.png + \li \inlineimage icons/qtcreator-run-tests-in-current-file.png (\uicontrol {Run Tests for Current File}) to run the tests in the file currently open in the code editor. \endlist diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-targets.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-targets.qdoc index e05b586aca5..60914e258d4 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-targets.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-targets.qdoc @@ -93,7 +93,7 @@ \li In the \uicontrol Name column, enter a name for the kit. - \li Select the \inlineimage qtcreator-desktopdevice-button.png + \li Select the \inlineimage icons/qtcreator-desktopdevice-button.png button to select an image to use as an icon for the kit. \li In the \uicontrol {File system name} field, enter a name for the kit diff --git a/doc/qtcreator/src/projects/creator-qtcreator-variables.qdocinc b/doc/qtcreator/src/projects/creator-qtcreator-variables.qdocinc index 65c0fe10bfd..cf1bbe726a0 100644 --- a/doc/qtcreator/src/projects/creator-qtcreator-variables.qdocinc +++ b/doc/qtcreator/src/projects/creator-qtcreator-variables.qdocinc @@ -31,7 +31,7 @@ directories. The variables take care of quoting their expansions, so you do not need to put them in quotes. - Select the \inlineimage replace.png + Select the \inlineimage icons/replace.png (\uicontrol {Variables}) button in a field to select from a list of variables that are available in a particular context. For more information about each variable, move the cursor over it in the diff --git a/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc b/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc index 75495477244..d64a11c9c2f 100644 --- a/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc +++ b/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc @@ -103,7 +103,7 @@ When you start typing the QML type name, \QC suggests available types and properties to \l{Completing Code}{complete the code}. - Select the light bulb icon \inlineimage refactormarker.png + Select the light bulb icon \inlineimage icons/refactormarker.png next to the type name to open the \l{Editing Rectangles} {Qt Quick Toolbar for rectangles}. You can use it to specify rectangle properties, such as color, transparency, and gradients. diff --git a/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc b/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc index 693a0c2a4cc..f148a59cb6c 100644 --- a/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc @@ -102,7 +102,7 @@ current application. \li Select the - \inlineimage qtcreator-analyze-start-button.png + \inlineimage icons/qtcreator-analyze-start-button.png (\uicontrol Start) button to start the application from the QML Profiler. diff --git a/doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc b/doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc index 33c88a9ae36..cbc1af136a3 100644 --- a/doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc @@ -41,7 +41,7 @@ \title Using Qt Quick Toolbars When you select a QML type in the code and a toolbar is available, - a light bulb icon appears: \inlineimage refactormarker.png + a light bulb icon appears: \inlineimage icons/refactormarker.png . Select the icon to open the toolbar. To open toolbars immediately when you select a QML type, select @@ -49,7 +49,7 @@ \uicontrol {QML/JS Editing} > \uicontrol {Always show Qt Quick Toolbar}. Drag the toolbar to pin it to another location. Select - \inlineimage qml-toolbar-pin.png + \inlineimage icons/pin.png to unpin the toolbar and move it to its default location. To pin toolbars by default, select \uicontrol {Pin Quick Toolbar}. diff --git a/doc/qtcreator/src/user-interface/creator-views.qdoc b/doc/qtcreator/src/user-interface/creator-views.qdoc index ec9466d7c4b..5cd014829fc 100644 --- a/doc/qtcreator/src/user-interface/creator-views.qdoc +++ b/doc/qtcreator/src/user-interface/creator-views.qdoc @@ -115,7 +115,7 @@ \image qtcreator-class-view.png "Class View" To organize the view by subprojects, click - \inlineimage qtcreator-show-subprojects.png + \inlineimage icons/qtcreator-show-subprojects.png (\uicontrol {Show Subprojects}). To visit all parts of a namespace, double-click on the namespace item From 25df6b7c073f4ed3e69e6036f192c96d0dde44a7 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 8 Dec 2021 15:16:52 +0100 Subject: [PATCH 75/77] macOS: Fix requesting missing permissions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Bluetooth key changed. Keep the old one for compatibility. Keys for requesting access to various folders on disk were added in macOS 10.15. Fixes: QTCREATORBUG-26666 Change-Id: Ieb5686fe129f795319132a36269bc34bc07a13a4 Reviewed-by: Tor Arne Vestbø Reviewed-by: Timur Pocheptsov Reviewed-by: --- src/app/app-Info.plist | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/app/app-Info.plist b/src/app/app-Info.plist index 95863741ac6..eba0ea7a61d 100644 --- a/src/app/app-Info.plist +++ b/src/app/app-Info.plist @@ -256,8 +256,22 @@ ${MACOSX_DEPLOYMENT_TARGET} NSAppleEventsUsageDescription This application wants to run AppleScript. + NSDesktopFolderUsageDescription + This application wants to access the Desktop folder. + NSDocumentsFolderUsageDescription + This application wants to access the Documents folder. + NSDownloadsFolderUsageDescription + This application wants to access the Downloads folder. + NSNetworkVolumesUsageDescription + This application wants to access network volumes. + NSRemovableVolumesUsageDescription + This application wants to access removable volumes. + NSFileProviderDomainUsageDescription + This application wants to access files from a provider. NSBluetoothPeripheralUsageDescription A user application wants to access bluetooth. + NSBluetoothAlwaysUsageDescription + A user application wants to access bluetooth. NSCalendarsUsageDescription A user application wants to access calendars. NSCameraUsageDescription From eae031df4ac901329c24309ec04dac3aa89674f4 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 9 Dec 2021 11:21:39 +0100 Subject: [PATCH 76/77] Doc: Copy icons from sources to \doc\qtcreator\images\icons - Fix the paths to them in .qdoc files - Remove paths to source folders from .qdocconf files This is the second step towards making the icons visible in both dark and light online doc modes. Task-number: QTCREATORBUG-26644 Change-Id: I6995ea716df78cf0f285175515d1466ee20e317b Reviewed-by: Alessandro Portale --- .../config/qtcreator-project.qdocconf | 16 +--------- doc/qtcreator/images/icons/arrowdown.png | Bin 0 -> 151 bytes doc/qtcreator/images/icons/arrowup.png | Bin 0 -> 150 bytes doc/qtcreator/images/icons/bookmark.png | Bin 0 -> 134 bytes .../images/icons/buildstepdisable.png | Bin 0 -> 196 bytes .../images/icons/clean_pane_small.png | Bin 0 -> 143 bytes .../icons/debugger_singleinstructionmode.png | Bin 0 -> 110 bytes .../images/icons/debugger_stepinto_small.png | Bin 0 -> 144 bytes .../images/icons/debugger_stepout_small.png | Bin 0 -> 132 bytes .../images/icons/debugger_stepover_small.png | Bin 0 -> 153 bytes .../images/icons/desktopdevicesmall.png | Bin 0 -> 153 bytes doc/qtcreator/images/icons/filtericon.png | Bin 0 -> 164 bytes doc/qtcreator/images/icons/fittoview.png | Bin 0 -> 114 bytes .../images/icons/icon-export-canvas.png | Bin 0 -> 161 bytes doc/qtcreator/images/icons/kcachegrind.png | Bin 0 -> 247 bytes doc/qtcreator/images/icons/leafsort.png | Bin 0 -> 178 bytes .../images/icons/leftsidebaricon.png | Bin 0 -> 99 bytes doc/qtcreator/images/icons/linkicon.png | Bin 0 -> 170 bytes doc/qtcreator/images/icons/magnifier.png | Bin 0 -> 201 bytes doc/qtcreator/images/icons/minus.png | Bin 0 -> 94 bytes doc/qtcreator/images/icons/namespace.png | Bin 0 -> 130 bytes doc/qtcreator/images/icons/navigator.png | Bin 0 -> 966 bytes doc/qtcreator/images/icons/next.png | Bin 0 -> 135 bytes doc/qtcreator/images/icons/online.png | Bin 0 -> 214 bytes doc/qtcreator/images/icons/open.png | Bin 0 -> 127 bytes doc/qtcreator/images/icons/pan.png | Bin 0 -> 199 bytes doc/qtcreator/images/icons/pin.png | Bin 563 -> 168 bytes doc/qtcreator/images/icons/plus.png | Bin 0 -> 100 bytes doc/qtcreator/images/icons/prev.png | Bin 0 -> 135 bytes doc/qtcreator/images/icons/recordfill.png | Bin 0 -> 147 bytes doc/qtcreator/images/icons/redo.png | Bin 0 -> 135 bytes doc/qtcreator/images/icons/reload_gray.png | Bin 0 -> 184 bytes doc/qtcreator/images/icons/reset.png | Bin 0 -> 159 bytes .../images/icons/rightsidebaricon.png | Bin 0 -> 99 bytes doc/qtcreator/images/icons/run_small.png | Bin 0 -> 130 bytes doc/qtcreator/images/icons/settings.png | Bin 0 -> 177 bytes doc/qtcreator/images/icons/sidebysidediff.png | Bin 0 -> 164 bytes doc/qtcreator/images/icons/snapshot.png | Bin 0 -> 148 bytes .../images/icons/sort_alphabetically.png | Bin 0 -> 139 bytes .../images/icons/splitbutton_closetop.png | Bin 0 -> 128 bytes .../images/icons/splitbutton_horizontal.png | Bin 0 -> 107 bytes doc/qtcreator/images/icons/stop_small.png | Bin 0 -> 94 bytes doc/qtcreator/images/icons/text.png | Bin 0 -> 152 bytes doc/qtcreator/images/icons/unifieddiff.png | Bin 0 -> 157 bytes doc/qtcreator/images/icons/visual.png | Bin 0 -> 123 bytes doc/qtcreator/images/icons/zoom.png | Bin 0 -> 183 bytes .../src/analyze/cpu-usage-analyzer.qdoc | 2 +- .../creator-clang-static-analyzer.qdoc | 6 ++-- .../src/analyze/creator-ctf-visualizer.qdoc | 2 +- .../src/analyze/creator-valgrind.qdoc | 29 +++++++++--------- doc/qtcreator/src/android/androiddev.qdoc | 4 +-- .../creator-projects-cmake-building.qdoc | 9 +++--- .../creator-debugger-example.qdoc | 6 ++-- .../creator-only/creator-debugger.qdoc | 3 +- .../debugger/qtquick-debugger-example.qdoc | 2 +- .../src/editors/creator-code-refactoring.qdoc | 8 ++--- .../src/editors/creator-coding-edit-mode.qdoc | 8 ++--- .../src/editors/creator-diff-editor.qdoc | 8 ++--- .../src/editors/creator-locator.qdoc | 2 +- .../creator-only/creator-modeling.qdoc | 2 +- .../editors/creator-only/creator-scxml.qdoc | 16 +++++----- doc/qtcreator/src/editors/creator-search.qdoc | 6 ++-- doc/qtcreator/src/howto/creator-help.qdoc | 10 +++--- .../howto/creator-only/creator-autotest.qdoc | 10 +++--- .../howto/creator-only/creator-how-tos.qdoc | 4 +-- .../creator-projects-build-run-tutorial.qdoc | 2 +- .../creator-projects-settings-build.qdoc | 6 ++-- .../qtquick/qtquick-live-preview-desktop.qdoc | 2 +- .../src/qtquick/qtquick-profiler.qdoc | 2 +- .../creator-file-system-view.qdoc | 6 ++-- .../user-interface/creator-projects-view.qdoc | 4 +-- .../src/user-interface/creator-sidebars.qdoc | 8 ++--- .../src/user-interface/creator-ui.qdoc | 14 ++++----- .../src/user-interface/creator-views.qdoc | 8 ++--- doc/qtcreator/src/vcs/creator-vcs-git.qdoc | 8 ++--- .../src/widgets/qtdesigner-app-tutorial.qdoc | 2 +- .../config/qtdesignstudio.qdocconf | 6 ---- 77 files changed, 102 insertions(+), 119 deletions(-) create mode 100644 doc/qtcreator/images/icons/arrowdown.png create mode 100644 doc/qtcreator/images/icons/arrowup.png create mode 100644 doc/qtcreator/images/icons/bookmark.png create mode 100644 doc/qtcreator/images/icons/buildstepdisable.png create mode 100644 doc/qtcreator/images/icons/clean_pane_small.png create mode 100644 doc/qtcreator/images/icons/debugger_singleinstructionmode.png create mode 100644 doc/qtcreator/images/icons/debugger_stepinto_small.png create mode 100644 doc/qtcreator/images/icons/debugger_stepout_small.png create mode 100644 doc/qtcreator/images/icons/debugger_stepover_small.png create mode 100644 doc/qtcreator/images/icons/desktopdevicesmall.png create mode 100644 doc/qtcreator/images/icons/filtericon.png create mode 100644 doc/qtcreator/images/icons/fittoview.png create mode 100644 doc/qtcreator/images/icons/icon-export-canvas.png create mode 100644 doc/qtcreator/images/icons/kcachegrind.png create mode 100644 doc/qtcreator/images/icons/leafsort.png create mode 100644 doc/qtcreator/images/icons/leftsidebaricon.png create mode 100644 doc/qtcreator/images/icons/linkicon.png create mode 100644 doc/qtcreator/images/icons/magnifier.png create mode 100644 doc/qtcreator/images/icons/minus.png create mode 100644 doc/qtcreator/images/icons/namespace.png create mode 100644 doc/qtcreator/images/icons/navigator.png create mode 100644 doc/qtcreator/images/icons/next.png create mode 100644 doc/qtcreator/images/icons/online.png create mode 100644 doc/qtcreator/images/icons/open.png create mode 100644 doc/qtcreator/images/icons/pan.png create mode 100644 doc/qtcreator/images/icons/plus.png create mode 100644 doc/qtcreator/images/icons/prev.png create mode 100644 doc/qtcreator/images/icons/recordfill.png create mode 100644 doc/qtcreator/images/icons/redo.png create mode 100644 doc/qtcreator/images/icons/reload_gray.png create mode 100644 doc/qtcreator/images/icons/reset.png create mode 100644 doc/qtcreator/images/icons/rightsidebaricon.png create mode 100644 doc/qtcreator/images/icons/run_small.png create mode 100644 doc/qtcreator/images/icons/settings.png create mode 100644 doc/qtcreator/images/icons/sidebysidediff.png create mode 100644 doc/qtcreator/images/icons/snapshot.png create mode 100644 doc/qtcreator/images/icons/sort_alphabetically.png create mode 100644 doc/qtcreator/images/icons/splitbutton_closetop.png create mode 100644 doc/qtcreator/images/icons/splitbutton_horizontal.png create mode 100644 doc/qtcreator/images/icons/stop_small.png create mode 100644 doc/qtcreator/images/icons/text.png create mode 100644 doc/qtcreator/images/icons/unifieddiff.png create mode 100644 doc/qtcreator/images/icons/visual.png create mode 100644 doc/qtcreator/images/icons/zoom.png diff --git a/doc/qtcreator/config/qtcreator-project.qdocconf b/doc/qtcreator/config/qtcreator-project.qdocconf index b190e87ea12..468e4e6f988 100644 --- a/doc/qtcreator/config/qtcreator-project.qdocconf +++ b/doc/qtcreator/config/qtcreator-project.qdocconf @@ -15,21 +15,7 @@ ignorewords += \ headerdirs = sourcedirs = ../src -imagedirs = ../images \ - ../../../src/libs/qmleditorwidgets/images \ - ../../../src/libs/utils/images \ - ../../../src/plugins/android/images \ - ../../../src/plugins/autotest/images \ - ../../../src/plugins/classview/images \ - ../../../src/plugins/coreplugin/images \ - ../../../src/plugins/debugger/images \ - ../../../src/plugins/diffeditor/images \ - ../../../src/plugins/help/images \ - ../../../src/plugins/projectexplorer/images \ - ../../../src/plugins/scxmleditor/common/images \ - ../../../src/plugins/texteditor/images \ - ../../../src/plugins/valgrind/images \ - ../../../src/plugins/welcome/images +imagedirs = ../images exampledirs = ../examples examples.fileextensions += *.qml *.svg diff --git a/doc/qtcreator/images/icons/arrowdown.png b/doc/qtcreator/images/icons/arrowdown.png new file mode 100644 index 0000000000000000000000000000000000000000..fff77a48e658ac9e76e0342024cee768231c8eec GIT binary patch literal 151 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdu3Nd_r7VSy|cG*iutd7cN}5 zc=6&DD^^^%aN**`iw_<=`2YX^1MY%S1_lNbPZ!4!j+x0bI9YjI43{yVe5v5p^!&_B zzL^fkLJ|d-R&s9P*}`JH%wVHKsbz(eq;bbqCI)dCcO7enRBZ+Z1_n=8KbLh*2~7YF CWihw_ literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/arrowup.png b/doc/qtcreator/images/icons/arrowup.png new file mode 100644 index 0000000000000000000000000000000000000000..c1058ce1eed268aadeab059b9b2da24632f17e19 GIT binary patch literal 150 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdu3Nd_r7VSy|cG*iutd7cN}5 zc=6&DD^^^%aN**`iw_<=`2YX^1MY%S1_lOWPZ!4!j+x0bI9YjIjM5HB@XZrACZZi8w93 jv?)`j?_M0m#mJD-soQ`3o1i-b0|SGntDnm{r-UW|I3OnW literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/buildstepdisable.png b/doc/qtcreator/images/icons/buildstepdisable.png new file mode 100644 index 0000000000000000000000000000000000000000..2c715aa254dff41f9974a45a8169cbb30837bdac GIT binary patch literal 196 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)RqbbGouhDc0J{?X4Sv4N{* ze!{V%sb(M9eI88ID|Sds%4*qOx&J44u}$|p3|r5Wt+Q=C^R6mh_W;gJ6S z_vw6M58gF=`oH~i18arVf|?l(GwrARzc0Qhm8n>(rG8STQN)9GBWJFTdaqL-)Q=?g zhtBwO>vru-p7{sn{41WsYQFvGllePr+j$t4&NwXe=CRTVkn=oU{an^LB{Ts57q(Cv literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/clean_pane_small.png b/doc/qtcreator/images/icons/clean_pane_small.png new file mode 100644 index 0000000000000000000000000000000000000000..c75262d64a1c503e1cc8d888af0730a8d9054cb4 GIT binary patch literal 143 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)Rqgn7C+hDcma{?X4SabU?* z-dPOH%$-c{lO!aP?kjUv7&0`9cZr2$pKlN`@c7Fftk7s;a9UjN!%Y4&Sq)hUKkS*$ tq~Bl?H)!LqY35#VlTo~3Me>0Xb_O}Io%vEvJS0FidAjAoAdMi<-hmCg1K$bN~N;ugqPs_V@qzcX~d;0SP9OV&k*vL9PUO?}tDg!e^g!G|K*OK=~KvsFW`njxgN@xNA39m2^ literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/debugger_stepout_small.png b/doc/qtcreator/images/icons/debugger_stepout_small.png new file mode 100644 index 0000000000000000000000000000000000000000..615c022419dbdb75e519f4a45e58652723b7dfdc GIT binary patch literal 132 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)Rqcze1yhDc0J{?X4SQNU&3 zz#zxSlqU0iV#3eS%;{$sKo9AJ*hlAks8yS7#X;q*>RqckZoXKU|{fc^>bP0l+XkK Df`%

o>g($}Iyz>~oVjq}!b_JfUB7<)%aSr<<4EH5(7hzc9mLa%6ZNgLr P1_lOCS3j3^P6zopr0Oc_raR2}S literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/icon-export-canvas.png b/doc/qtcreator/images/icons/icon-export-canvas.png new file mode 100644 index 0000000000000000000000000000000000000000..cd6f0cea56a8ec41fe2c1bef4f02afcfbc3b8e93 GIT binary patch literal 161 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)RqWO%wbhDc0J{?X4SVZie5 z)!>TsfA370FY%in+hJ(wK6{(k=7J^15)`&E(}Oa%>Rw=*ytI`}jD-Tr!z N-JY&~F6*2UngC3lJP7~* literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/kcachegrind.png b/doc/qtcreator/images/icons/kcachegrind.png new file mode 100644 index 0000000000000000000000000000000000000000..67792f2224eafc7f1e12cb23a5c7cead3ad310cb GIT binary patch literal 247 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)Rq?DKSS43P*={?X4S(NK~1 zDPE*;rw`9O%}qI*GQTfi(&XVeV_IH+H&^I3qu>wq<6DZmHMhTfwm9kgL8k3Hwaiby z|Fy?Euh`kjqoJ|!;k=W13m(NTD}S7*vaKJ{5Ez)m+r_3h#$uSCbo#qXWWV_BNhDc0J{?X4SG2uq| zzXe=6PyY4le9#JO7K}U^)cHui=l=ty`lPSt|NTGTVX)=q&)@(5*UuDSO8Wlq|Ih#P zt`?W`+uY=se;OXk;vd$@?2>^MBP67Y` literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/leftsidebaricon.png b/doc/qtcreator/images/icons/leftsidebaricon.png new file mode 100644 index 0000000000000000000000000000000000000000..413bed7c49f443fea5aec4f2073c0cd9534eaa6f GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdMrH;E236Z!B?bltwg8_HR|W=#|Ns9ly*d9b z0|SGEr;B3SDel(m9k%&@W3wjZh(%V%wuVtmZke^X3n=~n%@y`V7=0M!PQMt{xi-xR5LvC zyQssXXZL+!+Ju&vn2idh&3hLfm}M~K;mV5R25F6E=l|w@P1}{0J@uQz^i^p;fB&*( Ycf55m;a1M#uOLTwy85}Sb4q9e0Npi1U;qFB literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/magnifier.png b/doc/qtcreator/images/icons/magnifier.png new file mode 100644 index 0000000000000000000000000000000000000000..692a32d9a3687793e63d349ea9fa9c49ad31baca GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)RqOz?DZ43UszJ$NwlPyz$n zh4&)c118z`DO71SZ7ykd(*LG(&~S}aJM$6AEz&A+%6s;SGc+{3yb!WyT9NYG&!uE3P(S_;h$sF!{nJY~%o7!HDz5hK_)aKmdr&G-*JQveHe$VB9 z^Ua^#Q=j)JbX>42{jyGZcK>${jV6YF6CTgWy18fPzvFXzx8^^7dGoWn+H(Kc=!iP$ zP{ku10d*m*3z#euEd^Z!W$S|{rpfKEG?m%3|M&G^$k$uW|?@caO2di43?^AxH2xv-kF=y*LLDb z!hwV=sqdQ>swGsrnQ5Cbiz{d;b#*GVny|2LPcCpRR^L7OtbqfA;K99(94Gir%AEG& z5OBGg}{Wxa6p z^}7-R=0VICUoaU;AH8s9fs@hl__sx=g{?WPO@16Tn?D*~4Rn3qVrX1GG5h*{XJ?nA zfq~z4FE=pXBz}YYr0*>C>=|r9W>$CQCO0!$KL6IHSR&;r$-RF4qVTZUDcO_w6la@E zs`GGtrpk4vApDEqk1h_siN$8ib=~|XGpEkIYw+3dB*z7flRQ^=OP_yuU}s%_@9-xM zrKcGdGLt!27Kb=%+r`Ml^mi)s-Dsb5k?qNpmGi6Sz29E$?dv2k=fjgqld`UJOaJnQ zbMYuG@XK3u*qObj-8#hGS#R%u!3378VvjW*?95YW3QXk?d9JrWgyXi)zx8Q_CN%+z z!c|u!IB911PA({9;^K;kT|0t5;@6*QI)G zKJLt}GKINr_g=sBMdvU6-8=0zopr05nUpt^fc4 literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/next.png b/doc/qtcreator/images/icons/next.png new file mode 100644 index 0000000000000000000000000000000000000000..5ab267510e6925dd43df3f07920dc18fff166c45 GIT binary patch literal 135 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)Rq_<6cGhDd}b|LA9vIPfIU zq%oE!_+p5N!CD8=AL7S%$+|xHukXKZu?Exs{ZZWU&VoPwy9Iv}jB8vUwj!#oa)Hz@ lbD6VICGCk;vUiJ5FfhcPdZE8J{@x9c4W6!kF6*2UngEMiF8lxh literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/online.png b/doc/qtcreator/images/icons/online.png new file mode 100644 index 0000000000000000000000000000000000000000..2e053b8792d05f64333d03850a37aabde9806d2f GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)Rq%=L6}43P*={?X4Sap1|q z1V6TO4-OkN-k;eeCb<5vj)-x+GmFvP{LY%c|6QLfi&l$xAi&Hd!^YWi{*U}-jui!t zcm7LGRA5|r{QunV46J3l|J7^o3MDvSI>aY5q2|l|RP%tNe%Jr=AJB40(_!H{)Bo3A zHs@HPimtoDyMo<{pIG1Y<;?IFJ##p&ElMNBIhN~+DAO137lJe50~p#E815ZgBm48k RTv3pNJzf1=);T3K0RVg+QJnw) literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/open.png b/doc/qtcreator/images/icons/open.png new file mode 100644 index 0000000000000000000000000000000000000000..938f1a3332103d5e281288fbad28a4de8e26a659 GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)RqxOuubhDd}b|LA9vP*@-n z%b<9uflK8A>m3IsiMAvz8TU)cj6xkwLJ?d?&fgHIIXRza#RA5&QQMwpFd4qkv*i@| d(a&bU!oasbuVnhXcWxk)Jzf1=);T3K0RY?DB@zGt literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/pan.png b/doc/qtcreator/images/icons/pan.png new file mode 100644 index 0000000000000000000000000000000000000000..753b3bf02ba1d4338fa20e07a2ef799bb581343e GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdmW!d_r6q7#KuFMa9I#_U_%g zZ{NQC`}ZF_c<|7nLx&F^zI*rXy?giW-@pIh!Gq7AKY#i1<^TWx*}D&}VPIeg@^oc8{q literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/pin.png b/doc/qtcreator/images/icons/pin.png index ac65f66815e690a433b2a66c2028d7e70269e32f..dc96231ca4b3628a70025bd28632cd9aa5368a67 100644 GIT binary patch delta 152 zcmdnYvVw7fL_G%s0|SHAj0Jlc7#Q+BT^vIsrY8UBXOk%4+ViEhQR_pG`)Afo2ef0^ z*uF03U=)y7ViMW0JLP zk04(LhAK4%hK3dfhF=T}3=J#Kd@mSnw(dkZq%W~PHyxl)0EPej;e{Aog6WP}GNA#w(c%Bz*?l>g+MYlO( zhl}K*2eXyCntC@2=tZqMd*Hx<5BB_?2Q5`QzU-Cjc#yd6^(KSKlK=kKCmlX;;J^X- zUqz4Vbs8T2uirPDho|bd-O_*m`<)$ktebzt|J#2H1_nh|sWQR$l|L957*tDKBT7;d zOH!?pi&7IyQW=a4j0|)Q4RwtSLJSS83=OOdjI<35tPBhmS|@Em(U6;;l9^VCTf>F4 zTO14w49OrHip$cilJj$OQ}ap~6x>tuQi~Ex@{6n#98>a>QWZRNa!QL!z(NW}CVIwt z209ACVeSg96$SZ4B?`R!D+Mz>0|N!8(#)I`1p`e5g(QP} Rehdr@44$rjF6*2UngHDb&K>{& diff --git a/doc/qtcreator/images/icons/plus.png b/doc/qtcreator/images/icons/plus.png new file mode 100644 index 0000000000000000000000000000000000000000..795229ec6c5ad30505274c6fe557fc63b2d9aec3 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdMrH;E236Z!B?bltwg8_HR|W=#|Ns9ly*d9b z0|SGkr;B3&@GH%_;Gq`&EarrdM+6K(f|jQ{rJoK}uJYySTuS3(A(jT5&H m*ssuwJwM0sz{?r)nwc2V*Syfv3An-ovcc2U&t;ucLK6VNW-oOB literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/recordfill.png b/doc/qtcreator/images/icons/recordfill.png new file mode 100644 index 0000000000000000000000000000000000000000..57dc3054c831ba0c3a74d5caebe2a071b2858549 GIT binary patch literal 147 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)RqM0vV6hDb~;J%5(BL4k+u z!oAEGSHGrYr|^`HZ!F7{GMewN)qg1;A{@cA{6Wl#KMpq?AD`yE^V&N?@gRq$jPN2R zKL_sHyHsy4d~-bNW&6+fiCei`k4%2@e`mSW&pG|fU+%=-0oms1>gTe~DWM4famqLv literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/redo.png b/doc/qtcreator/images/icons/redo.png new file mode 100644 index 0000000000000000000000000000000000000000..082e8d1f74605d70a235eb6e82452f81f942dcb1 GIT binary patch literal 135 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)Rq_<6cGhDcma{?X4SA#mpR z3#Ov-i!2fcloT50|8+gRx?i-(ebYF9=iIJhI^x}j0cT!qGPV#j1b6Mw<&;$Tk1Wefg literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/reset.png b/doc/qtcreator/images/icons/reset.png new file mode 100644 index 0000000000000000000000000000000000000000..fc20531780e30867384d897bbb4948b63e4cb03f GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)Rqq_dydU<*3s;eB+^U9t)E4<~@6d%CA5E^%XL$P>3GstF7 LS3j3^P6e~ksyoPVPgg&ebxsLQ037Tne*gdg literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/settings.png b/doc/qtcreator/images/icons/settings.png new file mode 100644 index 0000000000000000000000000000000000000000..2621923499c1076f8bc50ada0e91af73f5443d4a GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)RqRCu~LhDd~$ojlYswPdEw0ZO96DLkQc<|u=|NlDa&f6In80FPS@ed6m0Tw#%-NA}kV{{oIh#?aS&{2RLc#$x)@!WB?0H6QOBpJEn=&omeBl!V P0|SGntDnm{r-UW|*!48F literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/snapshot.png b/doc/qtcreator/images/icons/snapshot.png new file mode 100644 index 0000000000000000000000000000000000000000..c8a731d41e10d6e23d69b2682962900884e7f247 GIT binary patch literal 148 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)RqM0>h8hDc0J{?X4SQNXEU zV4!k<<<;xg|Mf5b`{i5D=+eN*+Q1Uv+raf#W9k&0-<>J}uf9Inm~J_#;mPFx|K&Xu zxozBpH9psTIkA}O<^?0om0UX(zPPr?x@ST@Bm2BIrf%Q~loCIIHbD literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/splitbutton_closetop.png b/doc/qtcreator/images/icons/splitbutton_closetop.png new file mode 100644 index 0000000000000000000000000000000000000000..4f58e4eae913be540066af22e9032cb34aa71b7f GIT binary patch literal 128 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdu#id_r6q7#PaS%j@gw4;(n~ z|Nnm>5%*^d3=BG+E{-7_(a8mkOl*rJ_;?f;k{W*S3AAxed3b~)Rl}geV!_HrqX)MV dc}lby+QMb-2y(pdVPIfj@O1TaS?83{1OR*BCL90& literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/splitbutton_horizontal.png b/doc/qtcreator/images/icons/splitbutton_horizontal.png new file mode 100644 index 0000000000000000000000000000000000000000..2a8f953b8bd314db782a904d518f021ca7a31e74 GIT binary patch literal 107 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdMrH;E236Z!B?bltwg8_HR|W=#|Ns9ly*d9b z0|SGCr;B31uY@s#fq{X+)78&qol`;+0G@sqXaE2J literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/text.png b/doc/qtcreator/images/icons/text.png new file mode 100644 index 0000000000000000000000000000000000000000..7d4c35c70e6b569b116a0246670af55854f6c315 GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdr%jd_r6q7#KuFMa9I#y1Kgd z?%lh8|NcXV4jn#x`2YX^Yvx`*&%nT7;pyTS!f`$MMFSHX%VCjY8lM`BZiOafDL6T> zxo|AeHel+#$Tr!lNh_~8)Blr0#K8jx4jgPqv}V}w$u?c{^Rp@j1_lOCS3j3^P6^Lbgjfo+2zJiM3$ybvY7#J8lUHx3v IIVCg!0L1e#3IG5A literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/icons/visual.png b/doc/qtcreator/images/icons/visual.png new file mode 100644 index 0000000000000000000000000000000000000000..62fd49061f5615b561ed9a0e313658c4f762db25 GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCT0c(hNQXTpBNYzI0Jk_Tp1V`($doY|NkHA z&$*m|fkD^P#W927eT>^=^ak~5+fF$pJFb1yr$;c%!9YjAgH zB2#aXeB%@Lqk1b2um_v%R81GtwEEx3QDcxEur4ey{N*p^!sG7TY(IZ{=(#>+X4R4q jkze%VY49uNJ^NT06wY0J8Ps<^9^@iVS3j3^P6 \uicontrol {C++} > \uicontrol {Analyze Current File}. @@ -116,7 +116,7 @@ particular project by selecting \uicontrol {Disable This Check} or \uicontrol {Disable These Checks} in the context menu. - Select the \inlineimage settings.png + Select the \inlineimage icons/settings.png button to customize Clang diagnostics for the current project. \image qtcreator-clang-tools-options-customized.png "Clang Tools customized settings" diff --git a/doc/qtcreator/src/analyze/creator-ctf-visualizer.qdoc b/doc/qtcreator/src/analyze/creator-ctf-visualizer.qdoc index 87f63f95e44..68e1296e425 100644 --- a/doc/qtcreator/src/analyze/creator-ctf-visualizer.qdoc +++ b/doc/qtcreator/src/analyze/creator-ctf-visualizer.qdoc @@ -96,7 +96,7 @@ To reset the default zoom level, right-click the timeline to open the context menu, and select \uicontrol {Reset Zoom}. - Select the \inlineimage filtericon.png + Select the \inlineimage icons/filtericon.png (\uicontrol {Restrict to Threads}) button (10) to select the threads to show. diff --git a/doc/qtcreator/src/analyze/creator-valgrind.qdoc b/doc/qtcreator/src/analyze/creator-valgrind.qdoc index b33f3912052..6baf3d5d799 100644 --- a/doc/qtcreator/src/analyze/creator-valgrind.qdoc +++ b/doc/qtcreator/src/analyze/creator-valgrind.qdoc @@ -64,7 +64,7 @@ \li Use the application to analyze it. - \li Select the \inlineimage stop_small.png "Stop button" + \li Select the \inlineimage icons/stop_small.png "Stop button" button to view the results of the analysis in the \uicontrol {Analysis} view. @@ -76,7 +76,7 @@ Click a line to view where a memory leak occurred and a stack trace that shows what caused it. - As an alternative to collecting data, you can select \inlineimage open.png + As an alternative to collecting data, you can select \inlineimage icons/open.png to load an external log file in XML format into the \uicontrol Memcheck view. @@ -84,11 +84,11 @@ Move the mouse on a row to view more information about the function. - To move between rows, select \inlineimage prev.png - or \inlineimage next.png + To move between rows, select \inlineimage icons/prev.png + or \inlineimage icons/next.png . - To filter the results, select \inlineimage filtericon.png + To filter the results, select \inlineimage icons/filtericon.png , and then select the types of issues to display in the view. You can view and hide definite and possible memory leaks, uninitialized values, invalid calls to \c free(), and external errors. @@ -223,7 +223,7 @@ \li Use the application to analyze it. - \li Select the \inlineimage stop_small.png "Stop button" + \li Select the \inlineimage icons/stop_small.png "Stop button" button to view the results of the analysis in the \uicontrol Functions view. @@ -233,13 +233,13 @@ to speed up program execution during profiling by pausing event logging. No events are counted while logging is paused. - Select \inlineimage reload_gray.png + Select \inlineimage icons/reload_gray.png to reset all event counters. - Select \inlineimage clean_pane_small.png + Select \inlineimage icons/clean_pane_small.png to discard all collected data. - Select \inlineimage kcachegrind.png + Select \inlineimage icons/kcachegrind.png to view the data in KCachegrind. \QC launches KCachegrind and loads the data into it for visualization. @@ -251,10 +251,11 @@ Select \uicontrol Views to show and hide views and view titles. The \uicontrol Visualization view is hidden by - default. Select \inlineimage redo.png + default. Select \inlineimage icons/redo.png to refresh the data displayed in it when it is shown. - As an alternative to collecting data, you can select \inlineimage open.png + As an alternative to collecting data, you can select + \inlineimage icons/open.png to load an external log file into the \uicontrol Callgrind views. \image qtcreator-valgrind-callgrind.png "Callgrind views" @@ -268,13 +269,13 @@ the \uicontrol Callers view and about the called functions in the \uicontrol Callees view. - Select \inlineimage prev.png - or \inlineimage next.png + Select \inlineimage icons/prev.png + or \inlineimage icons/next.png To move between functions in the \uicontrol Callee view. To set the cost format, select \uicontrol $. You can view absolute or relative costs, as well as relative costs to parent. Select - \inlineimage filtericon.png + \inlineimage icons/filtericon.png to view only profiling info that originated from the project. To properly handle recursive or circular function calls, enable cycle diff --git a/doc/qtcreator/src/android/androiddev.qdoc b/doc/qtcreator/src/android/androiddev.qdoc index d66a1468b5b..cda10b5a287 100644 --- a/doc/qtcreator/src/android/androiddev.qdoc +++ b/doc/qtcreator/src/android/androiddev.qdoc @@ -91,7 +91,7 @@ By default, \QC tries to find a supported \l{AdoptOpenJDK} or \l{OpenJDK} installation. If none is found, you must set the path manually. If you don't have a supported JDK installed, select - \inlineimage online.png + \inlineimage icons/online.png to open the JDK download web page in the default browser. \note We recommended using a 64-bit JDK, because the 32-bit one @@ -182,7 +182,7 @@ be modified from the SDK Manager tab. For more information, see \l{Managing Android SDK Packages}. - To manually download NDKs, select \inlineimage online.png + To manually download NDKs, select \inlineimage icons/online.png . To add custom NDK paths manually to the global list of NDKs, select diff --git a/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc b/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc index 16dd3cee47f..31e4780e608 100644 --- a/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc +++ b/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc @@ -126,11 +126,12 @@ \image qtcreator-build-cmake-output.png "CMake output in Projects mode" - To clear the search results, select the \inlineimage clean_pane_small.png + To clear the search results, select the \inlineimage icons/clean_pane_small.png (\uicontrol Clear) button. You can enter a string in the \uicontrol Filter field to filter output. - To specify filtering options, select the \inlineimage magnifier.png "Filtering options menu" + To specify filtering options, select the + \inlineimage icons/magnifier.png "Filtering options menu" button. You can filter output by using regular expressions or case-sensitivity. Select \uicontrol {Show Non-matching Lines} to hide the lines that match the filter. @@ -138,8 +139,8 @@ Press \key {Ctrl+F} to \l{Finding and Replacing}{search} for a string from the output. - To increase or decrease the output text size, select \inlineimage plus.png - (\uicontrol {Zoom In}) or \inlineimage minus.png + To increase or decrease the output text size, select \inlineimage icons/plus.png + (\uicontrol {Zoom In}) or \inlineimage icons/minus.png (\uicontrol {Zoom Out}), or press \key Ctrl++ or \key Ctrl+-. \section1 CMake Build Steps diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger-example.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger-example.qdoc index 3eaa76533d8..1ef64237a43 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger-example.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger-example.qdoc @@ -108,9 +108,9 @@ work correctly due to a logic error. To locate this logic error, step through the code using the following buttons: \inlineimage icons/qtcreator-debug-button-stop.png - (\uicontrol {Stop Debugger}), \inlineimage debugger_stepover_small.png - (\uicontrol {Step Over}), \inlineimage debugger_stepinto_small.png - (\uicontrol {Step Into}), and \inlineimage debugger_stepout_small.png + (\uicontrol {Stop Debugger}), \inlineimage icons/debugger_stepover_small.png + (\uicontrol {Step Over}), \inlineimage icons/debugger_stepinto_small.png + (\uicontrol {Step Into}), and \inlineimage icons/debugger_stepout_small.png (\uicontrol {Step Out}). */ diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc index ce52c8697d8..28265fb9319 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc @@ -786,7 +786,8 @@ To access the \uicontrol Disassembler view, check \uicontrol Debug > \uicontrol {Operate by Instruction} while the debugger is - running. Alternatively, click the \inlineimage debugger_singleinstructionmode.png + running. Alternatively, click the + \inlineimage icons/debugger_singleinstructionmode.png (\uicontrol {Operate by Instruction}) tool button on the debugger tool bar. By default, GDB shows AT&T style disassembly. To switch to the Intel style, diff --git a/doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc b/doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc index 6a938999c5b..dd63e607b10 100644 --- a/doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc +++ b/doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc @@ -79,7 +79,7 @@ \image qtquick-example-setting-breakpoint2.png - \li Click the \inlineimage debugger_stepinto_small.png + \li Click the \inlineimage icons/debugger_stepinto_small.png (\uicontrol {Step Into}) button on the toolbar or press \key F11 to step into the code in the stack. The samegame.js file opens in the code editor at the function that starts a new game. diff --git a/doc/qtcreator/src/editors/creator-code-refactoring.qdoc b/doc/qtcreator/src/editors/creator-code-refactoring.qdoc index 137bae8690f..371aaeee16c 100644 --- a/doc/qtcreator/src/editors/creator-code-refactoring.qdoc +++ b/doc/qtcreator/src/editors/creator-code-refactoring.qdoc @@ -103,8 +103,8 @@ \list \li To go directly to an instance, double-click the instance in the \uicontrol {Search Results} pane. - \li To move between instances, click the \inlineimage next.png - (\uicontrol {Next Item}) button and \inlineimage prev.png + \li To move between instances, click the \inlineimage icons/next.png + (\uicontrol {Next Item}) button and \inlineimage icons/prev.png (\uicontrol {Previous Item}) button in the \uicontrol {Search Results} pane. \li To expand and collapse the list of all instances, click the @@ -112,10 +112,10 @@ (\uicontrol {Expand All}) button. \li To filter the search results for the usage of symbols according to access type, such as read, write, or declaration, click the - \inlineimage filtericon.png + \inlineimage icons/filtericon.png (\uicontrol {Filter Tree}) button and select the access type. \li To clear the search results, click the - \inlineimage clean_pane_small.png + \inlineimage icons/clean_pane_small.png (\uicontrol Clear) button. \li To start a new search, click the \inlineimage icons/qtcreator-new-search-icon.png diff --git a/doc/qtcreator/src/editors/creator-coding-edit-mode.qdoc b/doc/qtcreator/src/editors/creator-coding-edit-mode.qdoc index c2c6c1f2eaf..1d1ef00d613 100644 --- a/doc/qtcreator/src/editors/creator-coding-edit-mode.qdoc +++ b/doc/qtcreator/src/editors/creator-coding-edit-mode.qdoc @@ -62,8 +62,8 @@ to navigate between open files and symbols in use. To browse backward or forward through your - location history, click \inlineimage prev.png - (\uicontrol {Go Back}) and \inlineimage next.png + location history, click \inlineimage icons/prev.png + (\uicontrol {Go Back}) and \inlineimage icons/next.png (\uicontrol {Go Forward}). To return to the last location where you made a change, select @@ -151,7 +151,7 @@ \li To split the editor view into a top and bottom view, select \uicontrol Window > \uicontrol Split, press \key {Ctrl+E, 2}, or - select the \inlineimage splitbutton_horizontal.png + select the \inlineimage icons/splitbutton_horizontal.png (\uicontrol Split) button and then select \uicontrol Split. Split command creates views below the currently active editor view. @@ -179,7 +179,7 @@ To remove a split view, place the cursor within the view you want to remove and select \uicontrol Window > \uicontrol {Remove Current Split}, - press \key {Ctrl+E, 0}, or select the \inlineimage splitbutton_closetop.png + press \key {Ctrl+E, 0}, or select the \inlineimage icons/splitbutton_closetop.png (\uicontrol {Remove Split}) button. To remove all but the currently selected split view, select \uicontrol Window > \uicontrol {Remove All Splits} or press \key {Ctrl+E, 1}. diff --git a/doc/qtcreator/src/editors/creator-diff-editor.qdoc b/doc/qtcreator/src/editors/creator-diff-editor.qdoc index 6614729293e..a0a65b50ebc 100644 --- a/doc/qtcreator/src/editors/creator-diff-editor.qdoc +++ b/doc/qtcreator/src/editors/creator-diff-editor.qdoc @@ -94,11 +94,11 @@ removed text and then select \uicontrol {Apply Chunk}. To view the differences in a unified view where changed rows are placed - below each other, select \inlineimage unifieddiff.png + below each other, select \inlineimage icons/unifieddiff.png (\uicontrol {Switch to Unified Diff Editor}). To switch back to the side-by-side view, select - \inlineimage sidebysidediff.png + \inlineimage icons/sidebysidediff.png (\uicontrol {Switch to Side by Side Diff Editor}). To only show text changes, select \uicontrol {Ignore Whitespace}. @@ -108,10 +108,10 @@ By default, the horizontal scroll bars in the left and right pane are synchronized. To use them independently of each other, select the - \inlineimage linkicon.png + \inlineimage icons/linkicon.png (\uicontrol {Synchronize Horizontal Scroll Bars}) button. - If the files change outside \QC, select \inlineimage reload_gray.png + If the files change outside \QC, select \inlineimage icons/reload_gray.png (\uicontrol {Reload Editor}) to compare them again and to show the results. \if defined(qtcreator) diff --git a/doc/qtcreator/src/editors/creator-locator.qdoc b/doc/qtcreator/src/editors/creator-locator.qdoc index cae350b2d58..d649442309e 100644 --- a/doc/qtcreator/src/editors/creator-locator.qdoc +++ b/doc/qtcreator/src/editors/creator-locator.qdoc @@ -244,7 +244,7 @@ \list 1 - \li In the locator, click \inlineimage magnifier.png + \li In the locator, click \inlineimage icons/magnifier.png (\uicontrol Options) and select \uicontrol Configure to open the \uicontrol Locator options. diff --git a/doc/qtcreator/src/editors/creator-only/creator-modeling.qdoc b/doc/qtcreator/src/editors/creator-only/creator-modeling.qdoc index 10e40c2849c..9736e101bec 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-modeling.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-modeling.qdoc @@ -125,7 +125,7 @@ By default, when you select an element in a diagram, it is highlighted also in the \uicontrol Structure view. To change this behavior so that selecting an element in the \uicontrol Structure makes it highlighted also in the - diagram, click and hold the \inlineimage linkicon.png + diagram, click and hold the \inlineimage icons/linkicon.png button, and then select \uicontrol {Synchronize Diagram with Structure}. To keep the selections in the diagram and the \uicontrol Structure view synchronized, select \uicontrol {Keep Synchronized}. diff --git a/doc/qtcreator/src/editors/creator-only/creator-scxml.qdoc b/doc/qtcreator/src/editors/creator-only/creator-scxml.qdoc index a8eee8965c5..2f6b67fd2ab 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-scxml.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-scxml.qdoc @@ -69,34 +69,34 @@ \uicontrol {Zoom In} or \uicontrol {Zoom Out} or press \key Ctrl and use the mouse wheel. To make the whole state chart visible in the state editor at a time, select - \inlineimage fittoview.png + \inlineimage icons/fittoview.png (\uicontrol {Fit to View}). To view a particular part of a large state chart in the state editor, select - \inlineimage navigator.png + \inlineimage icons/navigator.png (\uicontrol {Navigator}) and move the navigator frame on the part you want to view. To use the magnifier to zoom into a part of the state chart, select - \inlineimage zoom.png + \inlineimage icons/zoom.png (\uicontrol {Magnifier Tool}). To move the magnifier tool faster, press down the \key Alt key. - To pan the state chart, select \inlineimage pan.png + To pan the state chart, select \inlineimage icons/pan.png (\uicontrol Panning). To increase the pace of panning, press down the \key Shift key. To view statistics about the numbers of states and transitions in the state - chart, select \inlineimage statistics.png + chart, select \inlineimage icons/statistics.png (\uicontrol {View Statistics}). To search from the state chart, use the \uicontrol Search pane. The search checks the whole SCXML tree for attributes that match the search criteria. To save the currently visible part of the state chart as an image, select - \inlineimage snapshot.png + \inlineimage icons/snapshot.png (\uicontrol {Save Screenshot}). To save the whole state chart as an image, - select \inlineimage icon-export-canvas.png + select \inlineimage icons/icon-export-canvas.png (\uicontrol {Export Canvas to Image}). \section1 Creating State Charts @@ -208,7 +208,7 @@ select \uicontrol {Zoom to State}. To ensure that the state ids are unique within a compound state machine, - select \inlineimage namespace.png + select \inlineimage icons/namespace.png (\uicontrol {Toggle Full Namespace}). The name of the parent state is added to the names of the child states, separated by two colons (::). For example: diff --git a/doc/qtcreator/src/editors/creator-search.qdoc b/doc/qtcreator/src/editors/creator-search.qdoc index 4017dd1bcdb..4f9cf514656 100644 --- a/doc/qtcreator/src/editors/creator-search.qdoc +++ b/doc/qtcreator/src/editors/creator-search.qdoc @@ -41,9 +41,9 @@ If the text is found, all occurrences are highlighted as you type. - \li To go to the next occurrence, click \inlineimage next.png + \li To go to the next occurrence, click \inlineimage icons/next.png (\uicontrol {Find Next}), or press \key F3. To go to the previous - occurrence click \inlineimage prev.png + occurrence click \inlineimage icons/prev.png (\uicontrol {Find Previous}), or press \key {Shift+F3}. \endlist @@ -207,7 +207,7 @@ The search results are stored in the search history from which you can select earlier searches. - To clear the search results, select the \inlineimage clean_pane_small.png + To clear the search results, select the \inlineimage icons/clean_pane_small.png (\uicontrol Clear) button. To expand and collapse the search results, select the diff --git a/doc/qtcreator/src/howto/creator-help.qdoc b/doc/qtcreator/src/howto/creator-help.qdoc index de866a32071..712f9abed3c 100644 --- a/doc/qtcreator/src/howto/creator-help.qdoc +++ b/doc/qtcreator/src/howto/creator-help.qdoc @@ -140,7 +140,7 @@ \list 1 - \li Click the \inlineimage bookmark.png + \li Click the \inlineimage icons/bookmark.png (\uicontrol {Add Bookmark}) button on the toolbar. \li In the \uicontrol {Add Bookmark} dialog, click \uicontrol OK to save the @@ -188,7 +188,7 @@ If you cannot find words that you know are there, indexing might not have been completed for some reason. To regenerate the index, click - \inlineimage reload_gray.png + \inlineimage icons/reload_gray.png (\uicontrol {Regenerate Index}). Punctuation is not included in indexed terms. To find terms that contain @@ -225,7 +225,7 @@ in the \uicontrol {On context help} field. To detach the help window, select \uicontrol {Always Show in External Window}. - To change this setting in a help view, select the \inlineimage linkicon.png + To change this setting in a help view, select the \inlineimage icons/linkicon.png toolbar button. \section1 Selecting the Start Page @@ -266,7 +266,7 @@ \image qtcreator-help-filter-attributes.png "Filters tab in Help options" - \li Select \inlineimage plus.png + \li Select \inlineimage icons/plus.png to add a new filter in the \uicontrol {Add Filter} dialog. \li In the \uicontrol {Filter name} field, enter a name for the filter, @@ -291,6 +291,6 @@ To rename the selected filter, select \uicontrol Rename. - To remove the selected filter select \inlineimage minus.png + To remove the selected filter select \inlineimage icons/minus.png . */ diff --git a/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc b/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc index f0cdaa40726..2d5cc29ce51 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc @@ -325,7 +325,7 @@ \li In the \uicontrol {Test Results} output pane, select: \list - \li \inlineimage run_small.png + \li \inlineimage icons/run_small.png (\uicontrol {Run All Tests}) to run all tests. \li \inlineimage icons/qtcreator-run-selected-tests.png (\uicontrol {Run Selected Tests}) to run the selected tests. @@ -376,14 +376,14 @@ To refresh the view, select \uicontrol {Rescan Tests} in the context menu. To show or hide init and cleanup or data functions in the \uicontrol Tests - view, select \inlineimage filtericon.png + view, select \inlineimage icons/filtericon.png (\uicontrol {Filter Test Tree}), and then select \uicontrol {Show Init and Cleanup Functions} or \uicontrol {Show Data Functions}. Double-click a function in the list to open its source code in the code editor. The test cases are listed in alphabetic, case insensitive order. To list them in the order in which they are defined in the source code, - select \inlineimage leafsort.png + select \inlineimage icons/leafsort.png (\uicontrol {Sort Naturally}). \section2 Running and Debugging Tests from Code Editor @@ -592,7 +592,7 @@ To view the results of Qt tests as plain text, select \uicontrol Tools > \uicontrol Options > \uicontrol {Testing} > \uicontrol {Qt Test}, and then deselect the \uicontrol {Use XML output} check box. Then select the - \inlineimage text.png + \inlineimage icons/text.png (\uicontrol {Switch Between Visual and Text Display}) button in the \uicontrol {Test Results} output pane to switch to the text display. @@ -668,7 +668,7 @@ \endtable To view only messages of a particular type, select - \inlineimage filtericon.png + \inlineimage icons/filtericon.png (\uicontrol {Filter Test Results}), and then select the types of messages to show. To show all messages, select \uicontrol {Check All Filters}. To deselect all message types, select \uicontrol {Uncheck All Filters}. diff --git a/doc/qtcreator/src/howto/creator-only/creator-how-tos.qdoc b/doc/qtcreator/src/howto/creator-only/creator-how-tos.qdoc index 229abbddb5e..438299a367d 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-how-tos.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-how-tos.qdoc @@ -160,11 +160,11 @@ You can toggle the left and right sidebar in some \QC modes. - To toggle the left sidebar, click \inlineimage leftsidebaricon.png + To toggle the left sidebar, click \inlineimage icons/leftsidebaricon.png (\uicontrol {Hide Left Sidebar/Show Left Sidebar}) or press \key Alt+0 (\key Cmd+0 on \macos). - To toggle the right sidebar, click \inlineimage rightsidebaricon.png + To toggle the right sidebar, click \inlineimage icons/rightsidebaricon.png (\uicontrol {Hide Right Sidebar/Show Right Sidebar}) or press \key Alt+Shift+0 (\key Cmd+Shift+0 on \macos). diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-build-run-tutorial.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-build-run-tutorial.qdoc index 4b58e67f9db..7d44a428848 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-build-run-tutorial.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-build-run-tutorial.qdoc @@ -82,7 +82,7 @@ automatically detected the installed kit. If no kits are available, see \l{Adding Kits}. - \li Click \inlineimage run_small.png + \li Click \inlineimage icons/run_small.png (\uicontrol Run) to build and run the application. \li To see the compilation progress, press \key{Alt+4} to open the diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build.qdoc index eb4faea02c1..81f3ebce5bf 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build.qdoc @@ -145,7 +145,7 @@ \uicontrol {Add Build Step} > \uicontrol {Custom Process Step}. By default, custom steps are enabled. To disable a custom step, select - the \inlineimage buildstepdisable.png + the \inlineimage icons/buildstepdisable.png (\uicontrol Disable) button. \image qtcreator-build-steps-custom.png "Custom Process Step" @@ -184,8 +184,8 @@ \li To remove a clean step, click \uicontrol{Remove Item}. - \li To change the order of steps, click \inlineimage arrowup.png - (\uicontrol {Move Up}) and \inlineimage arrowdown.png + \li To change the order of steps, click \inlineimage icons/arrowup.png + (\uicontrol {Move Up}) and \inlineimage icons/arrowdown.png (\uicontrol {Move Down}). \endlist */ diff --git a/doc/qtcreator/src/qtquick/qtquick-live-preview-desktop.qdoc b/doc/qtcreator/src/qtquick/qtquick-live-preview-desktop.qdoc index 5031c569387..cf00106444c 100644 --- a/doc/qtcreator/src/qtquick/qtquick-live-preview-desktop.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-live-preview-desktop.qdoc @@ -40,7 +40,7 @@ \list \li Select \uicontrol Build > \uicontrol {QML Preview}. - \li Select the \inlineimage live_preview.png + \li Select the \inlineimage icons/live_preview.png (\uicontrol {Show Live Preview}) button. \li Press \key {Alt+P}. \endlist diff --git a/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc b/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc index f148a59cb6c..86c3197cc03 100644 --- a/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc @@ -107,7 +107,7 @@ QML Profiler. \note If data collection does not start automatically, select the - \inlineimage recordfill.png + \inlineimage icons/recordfill.png (\uicontrol {Enable Profiling}) button. \endlist diff --git a/doc/qtcreator/src/user-interface/creator-file-system-view.qdoc b/doc/qtcreator/src/user-interface/creator-file-system-view.qdoc index 87a62b46171..60db096f2c8 100644 --- a/doc/qtcreator/src/user-interface/creator-file-system-view.qdoc +++ b/doc/qtcreator/src/user-interface/creator-file-system-view.qdoc @@ -60,7 +60,7 @@ \endlist To stop the synchronization between the editor and the - \uicontrol {File System} view, delesect the \inlineimage linkicon.png + \uicontrol {File System} view, delesect the \inlineimage icons/linkicon.png (\uicontrol {Synchronize Root Directory with Editor}) button. The path to the active file is displayed as bread crumbs. You can move to @@ -106,7 +106,7 @@ \endif - To manage view contents, select \inlineimage filtericon.png + To manage view contents, select \inlineimage icons/filtericon.png (\uicontrol Options): \list @@ -119,6 +119,6 @@ \endlist To stop the synchronization with the file currently opened in the - editor, deselect \inlineimage linkicon.png + editor, deselect \inlineimage icons/linkicon.png (\uicontrol {Synchronize with Editor}). */ diff --git a/doc/qtcreator/src/user-interface/creator-projects-view.qdoc b/doc/qtcreator/src/user-interface/creator-projects-view.qdoc index 558296a0bb8..87021c3aa8c 100644 --- a/doc/qtcreator/src/user-interface/creator-projects-view.qdoc +++ b/doc/qtcreator/src/user-interface/creator-projects-view.qdoc @@ -124,7 +124,7 @@ \endif - To filter view contents, select \inlineimage filtericon.png + To filter view contents, select \inlineimage icons/filtericon.png (\uicontrol {Filter Tree}): \list @@ -142,7 +142,7 @@ \endlist To stop synchronizing the position in the project tree with the file - currently opened in the editor, deselect \inlineimage linkicon.png + currently opened in the editor, deselect \inlineimage icons/linkicon.png (\uicontrol {Synchronize with Editor}). \if defined(qtcreator) diff --git a/doc/qtcreator/src/user-interface/creator-sidebars.qdoc b/doc/qtcreator/src/user-interface/creator-sidebars.qdoc index 8c8162035e4..0a83cdedd7b 100644 --- a/doc/qtcreator/src/user-interface/creator-sidebars.qdoc +++ b/doc/qtcreator/src/user-interface/creator-sidebars.qdoc @@ -47,15 +47,15 @@ You can change the view of the sidebars in the following ways: \list - \li To toggle the left sidebar, click \inlineimage leftsidebaricon.png + \li To toggle the left sidebar, click \inlineimage icons/leftsidebaricon.png (\uicontrol {Hide Left Sidebar/Show Left Sidebar}) or press \key Alt+0 (\key Cmd+0 on \macos). To toggle the right - sidebar, click \inlineimage rightsidebaricon.png + sidebar, click \inlineimage icons/rightsidebaricon.png (\uicontrol {Hide Right Sidebar/Show Right Sidebar}) or press \key Alt+Shift+0 (\key Cmd+Shift+0 on \macos). - \li To split a sidebar, click \inlineimage splitbutton_horizontal.png + \li To split a sidebar, click \inlineimage icons/splitbutton_horizontal.png (\uicontrol {Split}). Select new content to view in the split view. - \li To close a sidebar view, click \inlineimage splitbutton_closetop.png + \li To close a sidebar view, click \inlineimage icons/splitbutton_closetop.png (\uicontrol {Close}). \endlist */ diff --git a/doc/qtcreator/src/user-interface/creator-ui.qdoc b/doc/qtcreator/src/user-interface/creator-ui.qdoc index 2d154021cf6..8c013c13d38 100644 --- a/doc/qtcreator/src/user-interface/creator-ui.qdoc +++ b/doc/qtcreator/src/user-interface/creator-ui.qdoc @@ -400,12 +400,12 @@ The menu items also display the keyboard shortcuts that you can use. \endlist - To maximize an open output pane, select the \inlineimage arrowup.png + To maximize an open output pane, select the \inlineimage icons/arrowup.png (\uicontrol {Maximize Output Pane}) button or press \key {Alt+Shift+9}. - To increase or decrease the output text size, select \inlineimage plus.png - (\uicontrol {Zoom In}) or \inlineimage minus.png + To increase or decrease the output text size, select \inlineimage icons/plus.png + (\uicontrol {Zoom In}) or \inlineimage icons/minus.png (\uicontrol {Zoom Out}), or press \key Ctrl++ or \key Ctrl+-. Zooming is not supported in all output panes. @@ -440,7 +440,7 @@ Besides searching from the output, you can enter a string in the \uicontrol Filter field to filter it. To specify filtering options, - select the \inlineimage magnifier.png "Filtering options menu" + select the \inlineimage icons/magnifier.png "Filtering options menu" button. You can filter output by using regular expressions or case-sensitivity. Select \uicontrol {Show Non-matching Lines} to hide the lines that match the filter. @@ -503,7 +503,7 @@ The pane filters out irrelevant output from the build tools and presents the issues in an organized way. To further filter the output by type, select - \inlineimage filtericon.png + \inlineimage icons/filtericon.png (\uicontrol {Filter Tree}) and then select a filter. \image qtcreator-issues.png "Issues output pane" @@ -566,7 +566,7 @@ To specify settings for displaying application output, select \uicontrol Tools > \uicontrol Options > \uicontrol {Build & Run} > - \uicontrol {Application Output}, or click the \inlineimage settings.png + \uicontrol {Application Output}, or click the \inlineimage icons/settings.png (\uicontrol {Open Settings Page}) button. You can select whether to open the \uicontrol{Application Output} pane on output when running or debugging applications, to clear old output on a new run, @@ -592,7 +592,7 @@ In the \uicontrol {Limit output to} field, you can specify the maximum amount of build output lines to display in the pane. - You can also reach the options page by clicking \inlineimage settings.png + You can also reach the options page by clicking \inlineimage icons/settings.png (\uicontrol {Open Settings Page}). To copy the output from the pane to the clipboard, select diff --git a/doc/qtcreator/src/user-interface/creator-views.qdoc b/doc/qtcreator/src/user-interface/creator-views.qdoc index 5cd014829fc..955b77f8452 100644 --- a/doc/qtcreator/src/user-interface/creator-views.qdoc +++ b/doc/qtcreator/src/user-interface/creator-views.qdoc @@ -97,13 +97,13 @@ \list \li To see a complete list of all bindings, select - \inlineimage filtericon.png + \inlineimage icons/filtericon.png (\uicontrol {Filter Tree}) > \uicontrol {Show All Bindings}. \li To sort types or symbols alphabetically, select - \inlineimage sort_alphabetically.png + \inlineimage icons/sort_alphabetically.png (\uicontrol {Sort Alphabetically}). \li To stop the synchronization with the type or symbol selected in the - editor, deselect \inlineimage linkicon.png + editor, deselect \inlineimage icons/linkicon.png (\uicontrol {Synchronize with Editor}). \endlist @@ -146,6 +146,6 @@ \image qtcreator-include-hierarchy-view.png "Include Hierarchy view" To keep the view synchronized with the file currently opened in the editor, - select \inlineimage linkicon.png + select \inlineimage icons/linkicon.png (\uicontrol {Synchronize with Editor}). */ diff --git a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc index 18b9bcc6891..c27ca66fa2b 100644 --- a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc +++ b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc @@ -118,7 +118,7 @@ To show log also for previous names of the file, select \uicontrol Follow. - Select \inlineimage reload_gray.png + Select \inlineimage icons/reload_gray.png (\uicontrol Reload) to rescan the files. To display a description of the change including the diff in the @@ -141,7 +141,7 @@ The other actions in the context-menu enable you to apply actions to the commit, such as cherry-pick, checkout, or revert it. - To rescan the files, click \inlineimage reload_gray.png + To rescan the files, click \inlineimage icons/reload_gray.png (\uicontrol Reload). \section2 Staging Changes @@ -288,7 +288,7 @@ \image qtcreator-vcs-gitbranch.png "Git Branches sidebar view" Old entries and tags are filtered out of the list of branches - by default. To include them, select \inlineimage filtericon.png + by default. To include them, select \inlineimage icons/filtericon.png (\uicontrol {Filter Tree}), and then select \uicontrol {Include Old Entries} and \uicontrol {Include Tags}. @@ -302,7 +302,7 @@ For local and remote branches, the changes log can be shown by double clicking on the branch name. - To refresh the list of branches, click \inlineimage reload_gray.png + To refresh the list of branches, click \inlineimage icons/reload_gray.png (\uicontrol Refresh). The following operations are supported in the context-menu for a branch: diff --git a/doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc b/doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc index 2dab21729ec..1ad81db806e 100644 --- a/doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc +++ b/doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc @@ -339,7 +339,7 @@ \section1 Compiling and Running Your Program Now that you have all the necessary files, select the - \inlineimage run_small.png + \inlineimage icons/run_small.png button to compile and run your program. */ diff --git a/doc/qtdesignstudio/config/qtdesignstudio.qdocconf b/doc/qtdesignstudio/config/qtdesignstudio.qdocconf index 3e333d3b640..2b3cf9879c8 100644 --- a/doc/qtdesignstudio/config/qtdesignstudio.qdocconf +++ b/doc/qtdesignstudio/config/qtdesignstudio.qdocconf @@ -23,11 +23,6 @@ imagedirs = ../images \ ../../../share/qtcreator/qml/qmlpuppet/mockfiles/images \ ../../../share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/images \ ../../../src/libs/qmleditorwidgets/images \ - ../../../src/libs/utils/images \ - ../../../src/plugins/debugger/images \ - ../../../src/plugins/diffeditor/images \ - ../../../src/plugins/help/images \ - ../../../src/plugins/projectexplorer/images \ ../../../src/plugins/qmldesigner/components/componentcore/images \ ../../../src/plugins/qmldesigner/components/edit3d/images \ ../../../src/plugins/qmldesigner/components/formeditor \ @@ -36,7 +31,6 @@ imagedirs = ../images \ ../../../src/plugins/qmldesigner/componentsplugin/images \ ../../../src/plugins/qmldesigner/qmlpreviewplugin/images \ ../../../src/plugins/qmldesigner/qtquickplugin/images \ - ../../../src/plugins/texteditor/images include(../../qtcreator/images/extraimages/qtdesignstudio-extraimages.qdocconf) From f349de45f4ec1920bd4a4efc34f693561b270d8a Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 9 Dec 2021 11:44:09 +0100 Subject: [PATCH 77/77] TextEditor: correctly initialize automatic proposal timeout Change-Id: I53db54b51361ce3389bb25c420880a117ede7c2d Reviewed-by: Eike Ziller --- src/plugins/texteditor/codeassist/codeassistant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/texteditor/codeassist/codeassistant.cpp b/src/plugins/texteditor/codeassist/codeassistant.cpp index 7224ef6906c..8e5f1471bde 100644 --- a/src/plugins/texteditor/codeassist/codeassistant.cpp +++ b/src/plugins/texteditor/codeassist/codeassistant.cpp @@ -126,7 +126,7 @@ CodeAssistantPrivate::CodeAssistantPrivate(CodeAssistant *assistant) connect(&m_automaticProposalTimer, &QTimer::timeout, this, &CodeAssistantPrivate::automaticProposalTimeout); - m_settings = TextEditorSettings::completionSettings(); + updateFromCompletionSettings(TextEditorSettings::completionSettings()); connect(TextEditorSettings::instance(), &TextEditorSettings::completionSettingsChanged, this, &CodeAssistantPrivate::updateFromCompletionSettings);