diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-11-19 17:01:08 +0100 |
---|---|---|
committer | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2019-11-21 22:18:35 +0200 |
commit | 4e6142c93226862458252da84a5ce0539e6008ae (patch) | |
tree | a75c38085df5769e21e11c3b6c5b0b774434c9f2 | |
parent | fd8afd564f847f24ad119fd519929de6dcb94139 (diff) | |
parent | e53e0a808b5d0075c95fd7635ce53cc4de277f3a (diff) |
Merge remote-tracking branch 'origin/4.11'
Conflicts:
src/plugins/autotest/testresultspane.cpp
src/plugins/cmakeprojectmanager/cmaketool.cpp
Change-Id: Iade695ac9cab8bf3e3a1abd6e2c71f4a19132ac0
125 files changed, 5422 insertions, 2006 deletions
diff --git a/README.md b/README.md index 04063db9755..9af659edb0b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ The standalone binary packages support the following platforms: * Windows 7 or later * (K)Ubuntu Linux 16.04 (64-bit) or later -* macOS 10.12 or later +* macOS 10.13 or later ## Contributing @@ -31,6 +31,7 @@ Prerequisites: * ActiveState Active Perl * MinGW with g++ 5.3 or Visual Studio 2017 or later * jom + * Ninja (optional, needed for CMake) * Python 3.5 or later (optional, needed for the python enabled debug helper) * On Mac OS X: latest Xcode * On Linux: g++ 5.3 or later @@ -38,7 +39,7 @@ Prerequisites: Clang PCH Manager and Clang Refactoring plugins, see the section "Get LLVM/Clang for the Clang Code Model". The LLVM C++ API provides no compatibility garantee, so if later versions don't compile we don't support that version.) -* CMake (only for manual builds of LLVM/Clang) +* CMake (for manual builds of LLVM/Clang, and Qt Creator itself) * Qbs 1.7.x (optional, sources also contain Qbs itself) The installed toolchains have to match the one Qt was compiled with. @@ -264,13 +265,24 @@ http://llvm.org/docs/GettingStarted.html#git-mirror: For Linux/macOS: - cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_INSTALL_PREFIX=<installation location> ../llvm-project/llvm - make install + cmake \ + -D CMAKE_BUILD_TYPE=Release \ + -D LLVM_ENABLE_RTTI=ON \ + -D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \ + -D CMAKE_INSTALL_PREFIX=<installation location> \ + ../llvm-project/llvm + cmake --build . --target install For Windows: - cmake -G "NMake Makefiles JOM" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_INSTALL_PREFIX=<installation location> ..\llvm-project\llvm - jom install + cmake ^ + -G "NMake Makefiles JOM" ^ + -D CMAKE_BUILD_TYPE=Release ^ + -D LLVM_ENABLE_RTTI=ON ^ + -D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra" ^ + -D CMAKE_INSTALL_PREFIX=<installation location> ^ + ..\llvm-project\llvm + cmake --build . --target install ### Clang-Format @@ -282,6 +294,34 @@ While the plugin builds without it, it will be disabled on start with an error m Note that the plugin is disabled by default. +### Building Qt Creator with CMake + +Qt Creator can also be built with CMake. The main Qt Creator dependencies, Qt and LLVM/Clang, both +offer CMake find packages, which reduce the steps of configuring Qt Creator to a minimum. + + Configure and build Qt Creator: + + mkdir build + cd build + + For Linux/macOS: + + cmake \ + -G Ninja \ + -D CMAKE_BUILD_TYPE=Release \ + -D CMAKE_PREFIX_PATH=~/Qt/5.12.5/gcc_64;~/llvm \ + ../qt-creator + cmake --build . + + For Windows: + + cmake ^ + -G Ninja ^ + -D CMAKE_BUILD_TYPE=Release ^ + -D CMAKE_PREFIX_PATH=c:\Qt\5.12.5\msvc2017_64;c:\llvm ^ + ..\qt-creator + cmake --build . + ## Third-party Components Qt Creator includes the following third-party components, diff --git a/doc/src/howto/creator-only/creator-external-tools.qdoc b/doc/src/howto/creator-external-tools.qdoc index 546efaf72a3..def82871b49 100644 --- a/doc/src/howto/creator-only/creator-external-tools.qdoc +++ b/doc/src/howto/creator-external-tools.qdoc @@ -31,9 +31,14 @@ /*! \contentspage index.html - \previouspage creator-keyboard-shortcuts.html \page creator-editor-external.html + \if defined(qtdesignstudio) + \previouspage creator-qml-performance-monitor.html + \nextpage studio-help.html + \else + \previouspage creator-keyboard-shortcuts.html \nextpage creator-task-lists.html + \endif \title Using External Tools @@ -69,8 +74,8 @@ External > Configure}. To open TS files in Qt Linguist, right-click a TS file in the - \uicontrol Projects view and select \uicontrol {Open With} > - \uicontrol {Qt Linguist} in the context menu. + \uicontrol Projects or \uicontrol {File System} view and select + \uicontrol {Open With} > \uicontrol {Qt Linguist} in the context menu. For more information about Qt Linguist, see \l{Qt Linguist Manual}. \section1 Previewing QML Files @@ -130,17 +135,24 @@ \li In the \uicontrol {Error output} field, select how to handle error messages from the tool. + \if defined(qtcreator) \li In the \uicontrol {Base environment} field, select whether to run the tool in the system environment or the \l{Build Environment} {build environment} or \l {Selecting the Run Environment} {run environment} of the active project. Select the build or run environment if the system environment does not contain the necessary PATH settings to find the tool chain, for example. + \else + \li In the \uicontrol {Base environment} field, use the default settings. + \endif \li In the \uicontrol Environment field, select \uicontrol Change to modify environment variable values for build and run environments in - the \uicontrol {Edit Environment Changes} dialog. For more information - about how to add and remove variable values, see \l{Batch Editing}. + the \uicontrol {Edit Environment Changes} dialog. + \if defined(qtcreator) + For more information about how to add and remove variable values, + see \l{Batch Editing}. + \endif \li Select the \uicontrol {Modifies current document} check box to make sure that if the current document is modified by the tool, it is saved diff --git a/doc/src/overview/creator-only/creator-supported-platforms.qdoc b/doc/src/overview/creator-only/creator-supported-platforms.qdoc index 55262c469e7..f98d17a503a 100644 --- a/doc/src/overview/creator-only/creator-supported-platforms.qdoc +++ b/doc/src/overview/creator-only/creator-supported-platforms.qdoc @@ -102,7 +102,7 @@ \endlist - \li \macos 10.12 or later with the following: + \li \macos 10.13 or later with the following: \list diff --git a/doc/src/qtquick/qtquick-profiler.qdoc b/doc/src/qtquick/qtquick-profiler.qdoc index f94f4f0b259..0b772d8e062 100644 --- a/doc/src/qtquick/qtquick-profiler.qdoc +++ b/doc/src/qtquick/qtquick-profiler.qdoc @@ -34,7 +34,7 @@ \page creator-qml-performance-monitor.html \if defined(qtdesignstudio) \previouspage creator-qml-debugging-example.html - \nextpage studio-help.html + \nextpage creator-editor-external.html \else \previouspage creator-analyze-mode.html \nextpage creator-valgrind-overview.html diff --git a/share/qtcreator/qml/qmlpuppet/commands/commands.pri b/share/qtcreator/qml/qmlpuppet/commands/commands.pri index 78dfcd8eb14..8bca5ce88a9 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/commands.pri +++ b/share/qtcreator/qml/qmlpuppet/commands/commands.pri @@ -27,6 +27,7 @@ HEADERS += $$PWD/changeauxiliarycommand.h HEADERS += $$PWD/removesharedmemorycommand.h HEADERS += $$PWD/puppetalivecommand.h HEADERS += $$PWD/changeselectioncommand.h +HEADERS += $$PWD/drop3dlibraryitemcommand.h SOURCES += $$PWD/synchronizecommand.cpp SOURCES += $$PWD/debugoutputcommand.cpp @@ -55,3 +56,4 @@ SOURCES += $$PWD/changeauxiliarycommand.cpp SOURCES += $$PWD/removesharedmemorycommand.cpp SOURCES += $$PWD/puppetalivecommand.cpp SOURCES += $$PWD/changeselectioncommand.cpp +SOURCES += $$PWD/drop3dlibraryitemcommand.cpp diff --git a/share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.cpp new file mode 100644 index 00000000000..aa7c8260655 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2019 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. +** +****************************************************************************/ + +#include "drop3dlibraryitemcommand.h" + +#include <QDataStream> + +namespace QmlDesigner { + +Drop3DLibraryItemCommand::Drop3DLibraryItemCommand(const QByteArray &itemData) + : m_itemData(itemData) +{ +} + +QDataStream &operator<<(QDataStream &out, const Drop3DLibraryItemCommand &command) +{ + out << command.itemData(); + + return out; +} + +QDataStream &operator>>(QDataStream &in, Drop3DLibraryItemCommand &command) +{ + in >> command.m_itemData; + + return in; +} + +bool operator==(const Drop3DLibraryItemCommand &first, const Drop3DLibraryItemCommand &second) +{ + return first.m_itemData == second.m_itemData; +} + +} // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.h b/share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.h new file mode 100644 index 00000000000..1aa11a85f92 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/commands/drop3dlibraryitemcommand.h @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2019 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. +** +****************************************************************************/ + +#pragma once + +#include <QVector> +#include <QDataStream> +#include <QMimeData> + +#include "instancecontainer.h" + +namespace QmlDesigner { + +class Drop3DLibraryItemCommand +{ + friend QDataStream &operator>>(QDataStream &in, Drop3DLibraryItemCommand &command); + friend QDebug operator<<(QDebug debug, const Drop3DLibraryItemCommand &command); + friend bool operator==(const Drop3DLibraryItemCommand &first, + const Drop3DLibraryItemCommand &second); + +public: + explicit Drop3DLibraryItemCommand(const QByteArray &itemData); + Drop3DLibraryItemCommand() = default; + + QByteArray itemData() const { return m_itemData; } + +private: + QByteArray m_itemData; +}; + +QDataStream &operator<<(QDataStream &out, const Drop3DLibraryItemCommand &command); +QDataStream &operator>>(QDataStream &in, Drop3DLibraryItemCommand &command); +bool operator==(const Drop3DLibraryItemCommand &first, const Drop3DLibraryItemCommand &second); + +} // namespace QmlDesigner + +Q_DECLARE_METATYPE(QmlDesigner::Drop3DLibraryItemCommand) diff --git a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp index 3e57baffd0d..7d46fcbfc19 100644 --- a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp +++ b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp @@ -68,6 +68,7 @@ #include "debugoutputcommand.h" #include "puppetalivecommand.h" #include "changeselectioncommand.h" +#include "drop3dlibraryitemcommand.h" namespace QmlDesigner { @@ -139,6 +140,7 @@ bool compareCommands(const QVariant &command, const QVariant &controlCommand) static const int tokenCommandType = QMetaType::type("TokenCommand"); static const int debugOutputCommandType = QMetaType::type("DebugOutputCommand"); static const int changeSelectionCommandType = QMetaType::type("ChangeSelectionCommand"); + static const int drop3DLibraryItemCommandType = QMetaType::type("Drop3DLibraryItemCommand"); if (command.userType() == controlCommand.userType()) { if (command.userType() == informationChangedCommandType) @@ -163,6 +165,8 @@ bool compareCommands(const QVariant &command, const QVariant &controlCommand) return command.value<DebugOutputCommand>() == controlCommand.value<DebugOutputCommand>(); else if (command.userType() == changeSelectionCommandType) return command.value<ChangeSelectionCommand>() == controlCommand.value<ChangeSelectionCommand>(); + else if (command.userType() == drop3DLibraryItemCommandType) + return command.value<Drop3DLibraryItemCommand>() == controlCommand.value<Drop3DLibraryItemCommand>(); } return false; @@ -250,6 +254,11 @@ void NodeInstanceClientProxy::selectionChanged(const ChangeSelectionCommand &com writeCommand(QVariant::fromValue(command)); } +void NodeInstanceClientProxy::library3DItemDropped(const Drop3DLibraryItemCommand &command) +{ + writeCommand(QVariant::fromValue(command)); +} + void NodeInstanceClientProxy::flush() { } diff --git a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h index edf290f38a0..2b41bf83cba 100644 --- a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h +++ b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h @@ -57,6 +57,7 @@ class ChangeStateCommand; class ChangeNodeSourceCommand; class EndPuppetCommand; class ChangeSelectionCommand; +class Drop3DLibraryItemCommand; class NodeInstanceClientProxy : public QObject, public NodeInstanceClientInterface { @@ -76,6 +77,7 @@ public: void debugOutput(const DebugOutputCommand &command) override; void puppetAlive(const PuppetAliveCommand &command); void selectionChanged(const ChangeSelectionCommand &command) override; + void library3DItemDropped(const Drop3DLibraryItemCommand &command) override; void flush() override; void synchronizeWithClientProcess() override; diff --git a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h index 0b5a5ca334b..10688cdd89f 100644 --- a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h +++ b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h @@ -41,6 +41,7 @@ class RemoveSharedMemoryCommand; class DebugOutputCommand; class PuppetAliveCommand; class ChangeSelectionCommand; +class Drop3DLibraryItemCommand; class NodeInstanceClientInterface { @@ -55,6 +56,7 @@ public: virtual void token(const TokenCommand &command) = 0; virtual void debugOutput(const DebugOutputCommand &command) = 0; virtual void selectionChanged(const ChangeSelectionCommand &command) = 0; + virtual void library3DItemDropped(const Drop3DLibraryItemCommand &command) = 0; virtual void flush() {} virtual void synchronizeWithClientProcess() {} diff --git a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp index d2b7cb26207..e58ef1011e3 100644 --- a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp +++ b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp @@ -46,6 +46,7 @@ #include "addimportcontainer.h" #include "changenodesourcecommand.h" #include "changeselectioncommand.h" +#include "drop3dlibraryitemcommand.h" #include "informationchangedcommand.h" #include "pixmapchangedcommand.h" @@ -107,6 +108,9 @@ void NodeInstanceServerInterface::registerCommands() qRegisterMetaType<ChangeSelectionCommand>("ChangeSelectionCommand"); qRegisterMetaTypeStreamOperators<ChangeSelectionCommand>("ChangeSelectionCommand"); + qRegisterMetaType<Drop3DLibraryItemCommand>("Drop3DLibraryItemCommand"); + qRegisterMetaTypeStreamOperators<Drop3DLibraryItemCommand>("Drop3DLibraryItemCommand"); + qRegisterMetaType<RemovePropertiesCommand>("RemovePropertiesCommand"); qRegisterMetaTypeStreamOperators<RemovePropertiesCommand>("RemovePropertiesCommand"); diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/CameraGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/CameraGizmo.qml index 6a2a7b3a763..e158128a5fd 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/CameraGizmo.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/CameraGizmo.qml @@ -30,7 +30,7 @@ import CameraGeometry 1.0 IconGizmo { id: cameraGizmo - iconSource: "qrc:///qtquickplugin/mockfiles/images/camera-pick-icon.png" + iconSource: "qrc:///qtquickplugin/mockfiles/images/editor_camera.png" gizmoModel.geometry: cameraGeometry property alias geometryName: cameraGeometry.name // Name must be unique for each geometry property alias viewPortRect: cameraGeometry.viewPortRect @@ -43,7 +43,7 @@ IconGizmo { gizmoModel.materials: [ DefaultMaterial { id: defaultMaterial - emissiveColor: "blue" + emissiveColor: cameraGizmo.targetNode === cameraGizmo.selectedNode ? "#FF0000" : "#555555" lighting: DefaultMaterial.NoLighting cullingMode: Material.DisableCulling } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml index e82391f8bce..9db9d0c8a83 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml @@ -66,9 +66,11 @@ Window { var component = Qt.createComponent("LightGizmo.qml"); if (component.status === Component.Ready) { var gizmo = component.createObject(overlayScene, - {"view3D": overlayView, "targetNode": obj}); + {"view3D": overlayView, "targetNode": obj, + "selectedNode": selectedNode}); lightGizmos[lightGizmos.length] = gizmo; - gizmo.selected.connect(emitObjectClicked); + gizmo.clicked.connect(emitObjectClicked); + gizmo.selectedNode = Qt.binding(function() {return selectedNode;}); } } @@ -80,10 +82,11 @@ Window { var gizmo = component.createObject( overlayScene, {"view3D": overlayView, "targetNode": obj, "geometryName": geometryName, - "viewPortRect": viewPortRect}); + "viewPortRect": viewPortRect, "selectedNode": selectedNode}); cameraGizmos[cameraGizmos.length] = gizmo; - gizmo.selected.connect(emitObjectClicked); + gizmo.clicked.connect(emitObjectClicked); gizmo.viewPortRect = Qt.binding(function() {return viewPortRect;}); + gizmo.selectedNode = Qt.binding(function() {return selectedNode;}); } } @@ -100,12 +103,15 @@ Window { PerspectiveCamera { id: overlayPerspectiveCamera clipFar: editPerspectiveCamera.clipFar + clipNear: editPerspectiveCamera.clipNear position: editPerspectiveCamera.position rotation: editPerspectiveCamera.rotation } OrthographicCamera { id: overlayOrthoCamera + clipFar: editOrthoCamera.clipFar + clipNear: editOrthoCamera.clipNear position: editOrthoCamera.position rotation: editOrthoCamera.rotation } @@ -118,7 +124,7 @@ Window { position: viewWindow.selectedNode ? viewWindow.selectedNode.scenePosition : Qt.vector3d(0, 0, 0) globalOrientation: globalControl.checked - visible: selectedNode && moveToolControl.checked + visible: selectedNode && btnMove.selected view3D: overlayView onPositionCommit: viewWindow.commitObjectProperty(selectedNode, "position") @@ -133,13 +139,28 @@ Window { position: viewWindow.selectedNode ? viewWindow.selectedNode.scenePosition : Qt.vector3d(0, 0, 0) globalOrientation: globalControl.checked - visible: selectedNode && scaleToolControl.checked + visible: selectedNode && btnScale.selected view3D: overlayView onScaleCommit: viewWindow.commitObjectProperty(selectedNode, "scale") onScaleChange: viewWindow.changeObjectProperty(selectedNode, "scale") } + RotateGizmo { + id: rotateGizmo + scale: autoScale.getScale(Qt.vector3d(7, 7, 7)) + highlightOnHover: true + targetNode: viewWindow.selectedNode + position: viewWindow.selectedNode ? viewWindow.selectedNode.scenePosition + : Qt.vector3d(0, 0, 0) + globalOrientation: globalControl.checked + visible: selectedNode && btnRotate.selected + view3D: overlayView + + onRotateCommit: viewWindow.commitObjectProperty(selectedNode, "rotation") + onRotateChange: viewWindow.changeObjectProperty(selectedNode, "rotation") + } + AutoScaleHelper { id: autoScale view3D: overlayView @@ -161,6 +182,10 @@ Window { } } + DropArea { + anchors.fill: parent + } + View3D { id: editView anchors.fill: parent @@ -169,10 +194,10 @@ Window { Node { id: mainSceneHelpers - AxisHelper { - id: axisGrid - enableXZGrid: true - enableAxisLines: false + HelperGrid { + id: helperGrid + lines: 50 + step: 50 } PointLight { @@ -186,15 +211,20 @@ Window { PerspectiveCamera { id: editPerspectiveCamera + z: -600 y: 200 - z: -300 + rotation.x: 30 clipFar: 100000 + clipNear: 1 } OrthographicCamera { id: editOrthoCamera + z: -600 y: 200 - z: -300 + rotation.x: 30 + clipFar: 100000 + clipNear: 1 } } } @@ -259,8 +289,78 @@ Window { } } + Rectangle { // toolbar + id: toolbar + color: "#9F000000" + width: 35 + height: col.height + + Column { + id: col + anchors.horizontalCenter: parent.horizontalCenter + spacing: 5 + padding: 5 + + property var group: [btnSelectItem, btnSelectGroup, btnMove, btnRotate, btnScale] + + ToolBarButton { + id: btnSelectItem + selected: true + tooltip: qsTr("Select Item") + shortcut: "Q" + currentShortcut: selected ? "" : shortcut + tool: "item_selection" + buttonsGroup: col.group + } + + ToolBarButton { + id: btnSelectGroup + tooltip: qsTr("Select Group") + shortcut: "Q" + currentShortcut: btnSelectItem.currentShortcut === shortcut ? "" : shortcut + tool: "group_selection" + buttonsGroup: col.group + } + + Rectangle { // separator + width: 25 + height: 1 + color: "#f1f1f1" + anchors.horizontalCenter: parent.horizontalCenter + } + + ToolBarButton { + id: btnMove + tooltip: qsTr("Move current selection") + shortcut: "M" + currentShortcut: shortcut + tool: "move" + buttonsGroup: col.group + } + + ToolBarButton { + id: btnRotate + tooltip: qsTr("Rotate current selection") + shortcut: "E" + currentShortcut: shortcut + tool: "rotate" + buttonsGroup: col.group + } + + ToolBarButton { + id: btnScale + tooltip: qsTr("Scale current selection") + shortcut: "T" + currentShortcut: shortcut + tool: "scale" + buttonsGroup: col.group + } + } + } + Column { y: 8 + anchors.right: parent.right CheckBox { id: editLightCheckbox checked: false @@ -272,7 +372,19 @@ Window { id: usePerspectiveCheckbox checked: true text: qsTr("Use Perspective Projection") - onCheckedChanged: cameraControl.forceActiveFocus() + onCheckedChanged: { + // Since WasdController always acts on active camera, we need to update pos/rot + // to the other camera when we change + if (checked) { + editPerspectiveCamera.position = editOrthoCamera.position; + editPerspectiveCamera.rotation = editOrthoCamera.rotation; + } else { + editOrthoCamera.position = editPerspectiveCamera.position; + editOrthoCamera.rotation = editPerspectiveCamera.rotation; + } + designStudioNativeCameraControlHelper.requestOverlayUpdate(); + cameraControl.forceActiveFocus(); + } } CheckBox { @@ -281,19 +393,6 @@ Window { text: qsTr("Use Global Orientation") onCheckedChanged: cameraControl.forceActiveFocus() } - Column { - x: 8 - RadioButton { - id: moveToolControl - checked: true - text: qsTr("Move Tool") - } - RadioButton { - id: scaleToolControl - checked: false - text: qsTr("Scale Tool") - } - } } Text { diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml new file mode 100644 index 00000000000..54af572a7ba --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2019 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 QtQuick3D 1.0 +import GridGeometry 1.0 + +Node { + id: grid + + property alias lines: gridGeometry.lines + property alias step: gridGeometry.step + + rotation.x: 90 + + // Note: Only one instance of HelperGrid is supported, as the geometry names are fixed + Model { + geometry: GridGeometry { + id: gridGeometry + name: "3D Edit View Helper Grid" + } + + materials: [ + DefaultMaterial { + id: mainGridMaterial + emissiveColor: "#e6e6e6" + lighting: DefaultMaterial.NoLighting + cullingMode: Material.DisableCulling + } + ] + } + Model { + geometry: GridGeometry { + lines: gridGeometry.lines + step: gridGeometry.step + isCenterLine: true + name: "3D Edit View Helper Grid Z Axis" + } + materials: [ + DefaultMaterial { + id: vCenterLineMaterial + emissiveColor: "#00a1d2" + lighting: DefaultMaterial.NoLighting + cullingMode: Material.DisableCulling + } + ] + } + Model { + rotation.z: 90 + geometry: GridGeometry { + lines: gridGeometry.lines + step: gridGeometry.step + isCenterLine: true + name: "3D Edit View Helper Grid X Axis" + } + materials: [ + DefaultMaterial { + id: hCenterLineMaterial + emissiveColor: "#cb211a" + lighting: DefaultMaterial.NoLighting + cullingMode: Material.DisableCulling + } + ] + } +} diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/IconGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/IconGizmo.qml index 6fbf17367e0..8623b87a840 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/IconGizmo.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/IconGizmo.qml @@ -32,12 +32,13 @@ Node { property View3D view3D property bool highlightOnHover: true property Node targetNode: null + property Node selectedNode: null property alias gizmoModel: gizmoModel property alias iconSource: iconImage.source signal positionCommit() - signal selected(Node node) + signal clicked(Node node) position: targetNode ? targetNode.scenePosition : Qt.vector3d(0, 0, 0) rotation: targetNode ? targetNode.sceneRotation : Qt.vector3d(0, 0, 0) @@ -57,22 +58,27 @@ Node { parent: view3D Rectangle { - width: 24 - height: 24 + width: iconImage.width + height: iconImage.height x: -width / 2 y: -height color: "transparent" border.color: "#7777ff" - border.width: highlightOnHover && iconMouseArea.containsMouse ? 2 : 0 + border.width: iconGizmo.selectedNode === iconGizmo.targetNode + || (iconGizmo.highlightOnHover && iconMouseArea.containsMouse) ? 2 : 0 radius: 5 + opacity: iconGizmo.selectedNode === iconGizmo.targetNode ? 0.3 : 1 Image { id: iconImage - anchors.fill: parent + fillMode: Image.Pad MouseArea { id: iconMouseArea anchors.fill: parent - onClicked: selected(targetNode) - hoverEnabled: highlightOnHover + onClicked: iconGizmo.clicked(iconGizmo.targetNode) + hoverEnabled: iconGizmo.highlightOnHover + && iconGizmo.selectedNode !== iconGizmo.targetNode + acceptedButtons: iconGizmo.selectedNode !== iconGizmo.targetNode + ? Qt.LeftButton : Qt.NoButton } } } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml new file mode 100644 index 00000000000..b2f42b39e2f --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml @@ -0,0 +1,221 @@ +/**************************************************************************** +** +** Copyright (C) 2019 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 QtQuick3D 1.0 +import MouseArea3D 1.0 + +Node { + id: rotateGizmo + + property View3D view3D + property bool highlightOnHover: true + property Node targetNode: null + property bool globalOrientation: true + readonly property bool dragging: cameraRing.dragging + || rotRingX.dragging || rotRingY.dragging || rotRingZ.dragging + property real currentAngle + property point currentMousePos + + signal rotateCommit() + signal rotateChange() + + Rectangle { + id: angleLabel + color: "white" + x: rotateGizmo.currentMousePos.x - (10 + width) + y: rotateGizmo.currentMousePos.y - (10 + height) + width: gizmoLabelText.width + 4 + height: gizmoLabelText.height + 4 + border.width: 1 + visible: rotateGizmo.dragging + parent: rotateGizmo.view3D + + Text { + id: gizmoLabelText + text: { + var l = Qt.locale(); + if (rotateGizmo.targetNode) { + var degrees = currentAngle * (180 / Math.PI); + return qsTr(Number(degrees).toLocaleString(l, 'f', 1)); + } else { + return ""; + } + } + anchors.centerIn: parent + } + } + + Node { + rotation: globalOrientation || !targetNode ? Qt.vector3d(0, 0, 0) : targetNode.sceneRotation + + RotateRing { + id: rotRingX + objectName: "Rotate Ring X" + rotation: Qt.vector3d(0, 90, 0) + targetNode: rotateGizmo.targetNode + color: highlightOnHover && (hovering || dragging) ? Qt.lighter(Qt.rgba(1, 0, 0, 1)) + : Qt.rgba(1, 0, 0, 1) + priority: 40 + view3D: rotateGizmo.view3D + active: rotateGizmo.visible + + onRotateCommit: rotateGizmo.rotateCommit() + onRotateChange: rotateGizmo.rotateChange() + onCurrentAngleChanged: rotateGizmo.currentAngle = currentAngle + onCurrentMousePosChanged: rotateGizmo.currentMousePos = currentMousePos + } + + RotateRing { + id: rotRingY + objectName: "Rotate Ring Y" + rotation: Qt.vector3d(90, 0, 0) + targetNode: rotateGizmo.targetNode + color: highlightOnHover && (hovering || dragging) ? Qt.lighter(Qt.rgba(0, 0.6, 0, 1)) + : Qt.rgba(0, 0.6, 0, 1) + // Just a smidge smaller than higher priority rings so that it doesn't obscure them + scale: Qt.vector3d(0.998, 0.998, 0.998) + priority: 30 + view3D: rotateGizmo.view3D + active: rotateGizmo.visible + + onRotateCommit: rotateGizmo.rotateCommit() + onRotateChange: rotateGizmo.rotateChange() + onCurrentAngleChanged: rotateGizmo.currentAngle = currentAngle + onCurrentMousePosChanged: rotateGizmo.currentMousePos = currentMousePos + } + + RotateRing { + id: rotRingZ + objectName: "Rotate Ring Z" + rotation: Qt.vector3d(0, 0, 0) + targetNode: rotateGizmo.targetNode + color: highlightOnHover && (hovering || dragging) ? Qt.lighter(Qt.rgba(0, 0, 1, 1)) + : Qt.rgba(0, 0, 1, 1) + // Just a smidge smaller than higher priority rings so that it doesn't obscure them + scale: Qt.vector3d(0.996, 0.996, 0.996) + priority: 20 + view3D: rotateGizmo.view3D + active: rotateGizmo.visible + + onRotateCommit: rotateGizmo.rotateCommit() + onRotateChange: rotateGizmo.rotateChange() + onCurrentAngleChanged: rotateGizmo.currentAngle = currentAngle + onCurrentMousePosChanged: rotateGizmo.currentMousePos = currentMousePos + } + } + + RotateRing { + id: cameraRing + objectName: "cameraRing" + rotation: rotateGizmo.view3D.camera.rotation + targetNode: rotateGizmo.targetNode + color: highlightOnHover && (hovering || dragging) ? Qt.lighter(Qt.rgba(0.5, 0.5, 0.5, 1)) + : Qt.rgba(0.5, 0.5, 0.5, 1) + // Just a smidge smaller than higher priority rings so that it doesn't obscure them + scale: Qt.vector3d(0.994, 0.994, 0.994) + priority: 10 + view3D: rotateGizmo.view3D + active: rotateGizmo.visible + + onRotateCommit: rotateGizmo.rotateCommit() + onRotateChange: rotateGizmo.rotateChange() + onCurrentAngleChanged: rotateGizmo.currentAngle = currentAngle + onCurrentMousePosChanged: rotateGizmo.currentMousePos = currentMousePos + } + + Model { + id: freeRotator + + source: "#Sphere" + materials: DefaultMaterial { + id: material + emissiveColor: "black" + opacity: mouseAreaFree.hovering ? 0.15 : 0 + lighting: DefaultMaterial.NoLighting + } + scale: Qt.vector3d(0.15, 0.15, 0.15) + + property vector3d _pointerPosPressed + property vector3d _targetPosOnScreen + property vector3d _startRotation + + function handlePressed(screenPos) + { + if (!rotateGizmo.targetNode) + return; + + _targetPosOnScreen = view3D.mapFrom3DScene(rotateGizmo.targetNode.scenePosition); + _targetPosOnScreen.z = 0; + _pointerPosPressed = Qt.vector3d(screenPos.x, screenPos.y, 0); + + // Recreate vector so we don't follow the changes in targetNode.rotation + _startRotation = Qt.vector3d(rotateGizmo.targetNode.rotation.x, + rotateGizmo.targetNode.rotation.y, + rotateGizmo.targetNode.rotation.z); + } + + function handleDragged(screenPos) + { + if (!rotateGizmo.targetNode) + return; + + mouseAreaFree.applyFreeRotation( + rotateGizmo.targetNode, _startRotation, _pointerPosPressed, + Qt.vector3d(screenPos.x, screenPos.y, 0), _targetPosOnScreen); + + rotateGizmo.rotateChange(); + } + + function handleReleased(screenPos) + { + if (!rotateGizmo.targetNode) + return; + + mouseAreaFree.applyFreeRotation( + rotateGizmo.targetNode, _startRotation, _pointerPosPressed, + Qt.vector3d(screenPos.x, screenPos.y, 0), _targetPosOnScreen); + + rotateGizmo.rotateCommit(); + } + + MouseArea3D { + id: mouseAreaFree + view3D: rotateGizmo.view3D + rotation: rotateGizmo.view3D.camera.rotation + objectName: "Free rotator plane" + x: -50 + y: -50 + width: 100 + height: 100 + circlePickArea: Qt.point(25, 50) + grabsMouse: rotateGizmo.targetNode + active: rotateGizmo.visible + onPressed: freeRotator.handlePressed(screenPos) + onDragged: freeRotator.handleDragged(screenPos) + onReleased: freeRotator.handleReleased(screenPos) + } + } +} diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml new file mode 100644 index 00000000000..634eb017c9b --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml @@ -0,0 +1,133 @@ +/**************************************************************************** +** +** Copyright (C) 2019 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 QtQuick3D 1.0 +import MouseArea3D 1.0 + +Model { + id: rotateRing + + property View3D view3D + property alias color: material.emissiveColor + property Node targetNode: null + property bool dragging: false + property bool active: false + property alias hovering: mouseAreaMain.hovering + property alias priority: mouseAreaMain.priority + property real currentAngle + property point currentMousePos + + property vector3d _pointerPosPressed + property vector3d _targetPosOnScreen + property vector3d _startRotation + property bool _trackBall + + signal rotateCommit() + signal rotateChange() + + source: "meshes/ring.mesh" + + Model { + id: pickModel + objectName: "PickModel for " + rotateRing.objectName + source: "meshes/ringselect.mesh" + pickable: true + } + + materials: DefaultMaterial { + id: material + emissiveColor: "white" + lighting: DefaultMaterial.NoLighting + } + + function applyLocalRotation(screenPos) + { + currentAngle = mouseAreaMain.getNewRotationAngle(targetNode, _pointerPosPressed, + Qt.vector3d(screenPos.x, screenPos.y, 0), + _targetPosOnScreen, currentAngle, + _trackBall); + mouseAreaMain.applyRotationAngleToNode(targetNode, _startRotation, currentAngle); + } + + function handlePressed(screenPos, angle) + { + if (!targetNode) + return; + + _targetPosOnScreen = view3D.mapFrom3DScene(targetNode.scenePosition); + _targetPosOnScreen.z = 0; + _pointerPosPressed = Qt.vector3d(screenPos.x, screenPos.y, 0); + dragging = true; + _trackBall = angle < 0.1; + + // Recreate vector so we don't follow the changes in targetNode.rotation + _startRotation = Qt.vector3d(targetNode.rotation.x, + targetNode.rotation.y, + targetNode.rotation.z); + currentAngle = 0; + currentMousePos = screenPos; + } + + function handleDragged(screenPos) + { + if (!targetNode) + return; + + applyLocalRotation(screenPos); + currentMousePos = screenPos; + rotateChange(); + } + + function handleReleased(screenPos) + { + if (!targetNode) + return; + + applyLocalRotation(screenPos); + rotateCommit(); + dragging = false; + currentAngle = 0; + currentMousePos = screenPos; + } + + MouseArea3D { + id: mouseAreaMain + view3D: rotateRing.view3D + objectName: "Main plane of " + rotateRing.objectName + x: -30 + y: -30 + width: 60 + height: 60 + circlePickArea: Qt.point(9.2, 1.4) + grabsMouse: targetNode + active: rotateRing.active + pickNode: pickModel + minAngle: 0.05 + onPressed: rotateRing.handlePressed(screenPos, angle) + onDragged: rotateRing.handleDragged(screenPos) + onReleased: rotateRing.handleReleased(screenPos) + } +} diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/ToolBarButton.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/ToolBarButton.qml new file mode 100644 index 00000000000..cbc450ed2bc --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/ToolBarButton.qml @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2019 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.12 +import QtQuick 2.0 +import QtQuick.Controls 2.0 + +Rectangle { + property bool selected: false + property string tooltip + property string shortcut + property string currentShortcut + property string tool + property variant buttonsGroup: [] + + id: root + width: img.width + 5 + height: img.height + 5 + color: root.selected ? "#aa000000" : (mouseArea.containsMouse ? "#44000000" : "#00000000") + radius: 3 + + ToolTip { + text: root.tooltip + " (" + root.shortcut + ")" + visible: mouseArea.containsMouse + delay: 1000 + } + + Image { + id: img + anchors.centerIn: parent + source: root.selected ? "qrc:///qtquickplugin/mockfiles/images/" + root.tool + "_selected.png" + : "qrc:///qtquickplugin/mockfiles/images/" + root.tool + "_active.png" + } + + Shortcut { + sequence: root.currentShortcut + onActivated: mouseArea.onClicked(null) + } + + MouseArea { + id: mouseArea + cursorShape: "PointingHandCursor" + anchors.fill: parent + hoverEnabled: true + + onClicked: { + if (!root.selected) { + for (var i = 0; i < root.buttonsGroup.length; ++i) + root.buttonsGroup[i].selected = false; + + root.selected = true; + } + } + } +} + + diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/camera-pick-icon.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/camera-pick-icon.png Binary files differdeleted file mode 100644 index 47610f54501..00000000000 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/images/camera-pick-icon.png +++ /dev/null diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/camera-pick-icon@2x.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/camera-pick-icon@2x.png Binary files differdeleted file mode 100644 index 769934ae01c..00000000000 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/images/camera-pick-icon@2x.png +++ /dev/null diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/editor_camera.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/editor_camera.png Binary files differnew file mode 100644 index 00000000000..4b2bf93d414 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/editor_camera.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/editor_camera@2x.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/editor_camera@2x.png Binary files differnew file mode 100644 index 00000000000..1c690433c2b --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/editor_camera@2x.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/group_selection_active.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/group_selection_active.png Binary files differnew file mode 100644 index 00000000000..c5801b34654 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/group_selection_active.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/group_selection_active@2x.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/group_selection_active@2x.png Binary files differnew file mode 100644 index 00000000000..85851c7c130 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/group_selection_active@2x.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/group_selection_selected.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/group_selection_selected.png Binary files differnew file mode 100644 index 00000000000..bfb848aa384 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/group_selection_selected.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/group_selection_selected@2x.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/group_selection_selected@2x.png Binary files differnew file mode 100644 index 00000000000..f18895dc440 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/group_selection_selected@2x.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/item_selection_active.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/item_selection_active.png Binary files differnew file mode 100644 index 00000000000..5fa81302cde --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/item_selection_active.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/item_selection_active@2x.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/item_selection_active@2x.png Binary files differnew file mode 100644 index 00000000000..566da2ef1af --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/item_selection_active@2x.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/item_selection_selected.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/item_selection_selected.png Binary files differnew file mode 100644 index 00000000000..2b685d3d00a --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/item_selection_selected.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/item_selection_selected@2x.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/item_selection_selected@2x.png Binary files differnew file mode 100644 index 00000000000..eb0051a606e --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/item_selection_selected@2x.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/move_active.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/move_active.png Binary files differnew file mode 100644 index 00000000000..d21d290349c --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/move_active.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/move_active@2x.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/move_active@2x.png Binary files differnew file mode 100644 index 00000000000..bd0827f918c --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/move_active@2x.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/move_selected.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/move_selected.png Binary files differnew file mode 100644 index 00000000000..5c8ce42a758 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/move_selected.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/move_selected@2x.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/move_selected@2x.png Binary files differnew file mode 100644 index 00000000000..fad362a3e6a --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/move_selected@2x.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/rotate_active.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/rotate_active.png Binary files differnew file mode 100644 index 00000000000..bdabaf30285 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/rotate_active.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/rotate_active@2x.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/rotate_active@2x.png Binary files differnew file mode 100644 index 00000000000..8c81f409d32 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/rotate_active@2x.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/rotate_selected.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/rotate_selected.png Binary files differnew file mode 100644 index 00000000000..42dc2763ce4 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/rotate_selected.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/rotate_selected@2x.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/rotate_selected@2x.png Binary files differnew file mode 100644 index 00000000000..b6cc48c0533 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/rotate_selected@2x.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/scale_active.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/scale_active.png Binary files differnew file mode 100644 index 00000000000..cd63c1d03bc --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/scale_active.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/scale_active@2x.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/scale_active@2x.png Binary files differnew file mode 100644 index 00000000000..0d95e8e8913 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/scale_active@2x.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/scale_selected.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/scale_selected.png Binary files differnew file mode 100644 index 00000000000..4cca7726170 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/scale_selected.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/images/scale_selected@2x.png b/share/qtcreator/qml/qmlpuppet/mockfiles/images/scale_selected@2x.png Binary files differnew file mode 100644 index 00000000000..690cf5f924f --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/images/scale_selected@2x.png diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/meshes/ring.mesh b/share/qtcreator/qml/qmlpuppet/mockfiles/meshes/ring.mesh Binary files differnew file mode 100644 index 00000000000..56e1b82f29d --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/meshes/ring.mesh diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/meshes/ringselect.mesh b/share/qtcreator/qml/qmlpuppet/mockfiles/meshes/ringselect.mesh Binary files differnew file mode 100644 index 00000000000..b110b308f03 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/meshes/ringselect.mesh diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/editor3d.pri b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/editor3d.pri index 4e39a4cba9a..e8f546e8187 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/editor3d.pri +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/editor3d.pri @@ -1,7 +1,9 @@ HEADERS += $$PWD/cameracontrolhelper.h \ $$PWD/mousearea3d.h \ - $$PWD/camerageometry.h + $$PWD/camerageometry.h \ + $$PWD/gridgeometry.h SOURCES += $$PWD/cameracontrolhelper.cpp \ $$PWD/mousearea3d.cpp \ - $$PWD/camerageometry.cpp + $$PWD/camerageometry.cpp \ + $$PWD/gridgeometry.cpp diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/gridgeometry.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/gridgeometry.cpp new file mode 100644 index 00000000000..55158180819 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/gridgeometry.cpp @@ -0,0 +1,163 @@ +/**************************************************************************** +** +** Copyright (C) 2019 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. +** +****************************************************************************/ + +#ifdef QUICK3D_MODULE + +#include "gridgeometry.h" + +#include <QtQuick3DRuntimeRender/private/qssgrendergeometry_p.h> + +namespace QmlDesigner { +namespace Internal { + +GridGeometry::GridGeometry() + : QQuick3DGeometry() +{ +} + +GridGeometry::~GridGeometry() +{ +} + +int GridGeometry::lines() const +{ + return m_lines; +} + +float GridGeometry::step() const +{ + return m_step; +} + +bool GridGeometry::isCenterLine() const +{ + return m_isCenterLine; +} + +// Number of lines on each side of the center lines. +// These lines are not drawn if m_isCenterLine is true; lines and step are simply used to calculate +// the length of the center line in that case. +void GridGeometry::setLines(int count) +{ + count = qMax(count, 1); + if (m_lines == count) + return; + m_lines = qMax(count, 1); + emit linesChanged(); + update(); +} + +// Space between lines +void GridGeometry::setStep(float step) +{ + step = qMax(step, 0.0f); + if (qFuzzyCompare(m_step, step)) + return; + m_step = step; + emit stepChanged(); + update(); +} + +void GridGeometry::setIsCenterLine(bool enabled) +{ + if (m_isCenterLine == enabled) + return; + + m_isCenterLine = enabled; + emit isCenterLineChanged(); + update(); +} + +QSSGRenderGraphObject *GridGeometry::updateSpatialNode(QSSGRenderGraphObject *node) +{ + node = QQuick3DGeometry::updateSpatialNode(node); + QSSGRenderGeometry *geometry = static_cast<QSSGRenderGeometry *>(node); + geometry->clear(); + + QByteArray vertexData; + fillVertexData(vertexData); + + geometry->addAttribute(QSSGRenderGeometry::Attribute::PositionSemantic, 0, + QSSGRenderGeometry::Attribute::ComponentType::F32Type); + geometry->setStride(12); + geometry->setVertexData(vertexData); + geometry->setPrimitiveType(QSSGRenderGeometry::Lines); + + int lastIndex = (vertexData.size() - 1) / int(sizeof(QVector3D)); + auto vertexPtr = reinterpret_cast<QVector3D *>(vertexData.data()); + geometry->setBounds(QVector3D(vertexPtr[0][0], vertexPtr[0][1], 0.0), + QVector3D(vertexPtr[lastIndex][0], vertexPtr[lastIndex][1], 0.0)); + return node; +} + +void GridGeometry::fillVertexData(QByteArray &vertexData) +{ + const int size = m_isCenterLine + ? int(sizeof(float)) * 3 * 2 + : 4 * m_lines * int(sizeof(float)) * 3 * 2; + vertexData.resize(size); + float *dataPtr = reinterpret_cast<float *>(vertexData.data()); + + float y0 = -float(m_lines) * m_step; + float x0 = -float(m_lines) * m_step; + float y1 = -y0; + float x1 = -x0; + + if (m_isCenterLine) { + // start position + dataPtr[0] = 0.f; + dataPtr[1] = y0; + dataPtr[2] = 0.f; + // end position + dataPtr[3] = 0.f; + dataPtr[4] = y1; + dataPtr[5] = 0.f; + } else { + auto generateLines = [this, &dataPtr](float x0, float y0, float x1, float y1, bool vertical) { + for (int i = 0; i < m_lines; ++i) { + // start position + dataPtr[0] = vertical ? x0 + i * m_step : x0; + dataPtr[1] = vertical ? y0 : y0 + i * m_step; + dataPtr[2] = .0f; + // end position + dataPtr[3] = vertical ? x0 + i * m_step : x1; + dataPtr[4] = vertical ? y1 : y0 + i * m_step; + dataPtr[5] = .0f; + dataPtr += 6; + } + }; + + // Lines are created so that bounding box can later be calculated from first and last vertex + generateLines(x0, y0, x1, y1, true); + generateLines(x0, y0, x1, y1, false); + generateLines(x0, m_step, x1, y1, false); + generateLines(m_step, y0, x1, y1, true); + } +} + +} +} + +#endif // QUICK3D_MODULE diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/gridgeometry.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/gridgeometry.h new file mode 100644 index 00000000000..41b83abca6e --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/gridgeometry.h @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2019 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. +** +****************************************************************************/ + +#pragma once + +#ifdef QUICK3D_MODULE + +#include <QtQuick3D/private/qquick3dgeometry_p.h> + +namespace QmlDesigner { +namespace Internal { + +class GridGeometry : public QQuick3DGeometry +{ + Q_OBJECT + Q_PROPERTY(int lines READ lines WRITE setLines NOTIFY linesChanged) + Q_PROPERTY(float step READ step WRITE setStep NOTIFY stepChanged) + Q_PROPERTY(bool isCenterLine READ isCenterLine WRITE setIsCenterLine NOTIFY isCenterLineChanged) + +public: + GridGeometry(); + ~GridGeometry() override; + + int lines() const; + float step() const; + bool isCenterLine() const; + +public Q_SLOTS: + void setLines(int count); + void setStep(float step); + void setIsCenterLine(bool enabled); + +Q_SIGNALS: + void linesChanged(); + void stepChanged(); + void isCenterLineChanged(); + +protected: + QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override; + +private: + void fillVertexData(QByteArray &vertexData); + + int m_lines = 1000; + float m_step = .1f; + bool m_isCenterLine = false; +}; + +} +} + +QML_DECLARE_TYPE(QmlDesigner::Internal::GridGeometry) + +#endif // QUICK3D_MODULE diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp index d4135de9732..31ed6611250 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.cpp @@ -29,11 +29,15 @@ #include <QtGui/qguiapplication.h> #include <QtQml/qqmlinfo.h> +#include <QtQuick3D/private/qquick3dcamera_p.h> +#include <QtQuick3D/private/qquick3dorthographiccamera_p.h> +#include <QtQuick3DRuntimeRender/private/qssgrendercamera_p.h> namespace QmlDesigner { namespace Internal { MouseArea3D *MouseArea3D::s_mouseGrab = nullptr; +static const qreal s_mouseDragMultiplier = .02; MouseArea3D::MouseArea3D(QQuick3DNode *parent) : QQuick3DNode(parent) @@ -65,6 +69,21 @@ bool MouseArea3D::active() const return m_active; } +QPointF MouseArea3D::circlePickArea() const +{ + return m_circlePickArea; +} + +qreal MouseArea3D::minAngle() const +{ + return m_minAngle; +} + +QQuick3DNode *MouseArea3D::pickNode() const +{ + return m_pickNode; +} + qreal MouseArea3D::x() const { return m_x; @@ -105,7 +124,7 @@ void MouseArea3D::setGrabsMouse(bool grabsMouse) return; m_grabsMouse = grabsMouse; - emit grabsMouseChanged(grabsMouse); + emit grabsMouseChanged(); } void MouseArea3D::setActive(bool active) @@ -114,7 +133,37 @@ void MouseArea3D::setActive(bool active) return; m_active = active; - emit activeChanged(active); + emit activeChanged(); +} + +void MouseArea3D::setCirclePickArea(const QPointF &pickArea) +{ + if (m_circlePickArea == pickArea) + return; + + m_circlePickArea = pickArea; + emit circlePickAreaChanged(); +} + +// This is the minimum angle for circle picking. At lower angles we fall back to picking on pickNode +void MouseArea3D::setMinAngle(qreal angle) +{ + if (qFuzzyCompare(m_minAngle, angle)) + return; + + m_minAngle = angle; + emit minAngleChanged(); +} + +// This is the fallback pick node when circle picking can't be done due to low angle +// Pick node can't be used except in low angles, as long as only bounding box picking is supported +void MouseArea3D::setPickNode(QQuick3DNode *node) +{ + if (m_pickNode == node) + return; + + m_pickNode = node; + emit pickNodeChanged(); } void MouseArea3D::setX(qreal x) @@ -123,7 +172,7 @@ void MouseArea3D::setX(qreal x) return; m_x = x; - emit xChanged(x); + emit xChanged(); } void MouseArea3D::setY(qreal y) @@ -132,7 +181,7 @@ void MouseArea3D::setY(qreal y) return; m_y = y; - emit yChanged(y); + emit yChanged(); } void MouseArea3D::setWidth(qreal width) @@ -141,7 +190,7 @@ void MouseArea3D::setWidth(qreal width) return; m_width = width; - emit widthChanged(width); + emit widthChanged(); } void MouseArea3D::setHeight(qreal height) @@ -150,7 +199,7 @@ void MouseArea3D::setHeight(qreal height) return; m_height = height; - emit heightChanged(height); + emit heightChanged(); } void MouseArea3D::setPriority(int level) @@ -159,7 +208,7 @@ void MouseArea3D::setPriority(int level) return; m_priority = level; - emit priorityChanged(level); + emit priorityChanged(); } void MouseArea3D::componentComplete() @@ -278,6 +327,84 @@ QVector3D MouseArea3D::getNewScale(QQuick3DNode *node, const QVector3D &startSca return startScale; } +qreal QmlDesigner::Internal::MouseArea3D::getNewRotationAngle( + QQuick3DNode *node, const QVector3D &pressPos, const QVector3D ¤tPos, + const QVector3D &nodePos, qreal prevAngle, bool trackBall) +{ + const QVector3D cameraToNodeDir = getCameraToNodeDir(node); + if (trackBall) { + // Only the distance in plane direction is relevant in trackball drag + QVector3D dragDir = QVector3D::crossProduct(getNormal(), cameraToNodeDir).normalized(); + QVector3D screenDragDir = m_view3D->mapFrom3DScene(node->scenePosition() + dragDir); + screenDragDir.setZ(0); + dragDir = (screenDragDir - nodePos).normalized(); + const QVector3D pressToCurrent = (currentPos - pressPos); + float magnitude = QVector3D::dotProduct(pressToCurrent, dragDir); + qreal angle = -s_mouseDragMultiplier * qreal(magnitude); + return angle; + } else { + const QVector3D nodeToPress = (pressPos - nodePos).normalized(); + const QVector3D nodeToCurrent = (currentPos - nodePos).normalized(); + qreal angle = qAcos(qreal(QVector3D::dotProduct(nodeToPress, nodeToCurrent))); + + // Determine drag direction left/right + const QVector3D dragNormal = QVector3D::crossProduct(nodeToPress, nodeToCurrent).normalized(); + angle *= QVector3D::dotProduct(QVector3D(0.f, 0.f, 1.f), dragNormal) < 0 ? -1.0 : 1.0; + + // Determine drag ring orientation relative to camera + angle *= QVector3D::dotProduct(getNormal(), cameraToNodeDir) < 0 ? 1.0 : -1.0; + + qreal adjustedPrevAngle = prevAngle; + const qreal PI_2 = M_PI * 2.0; + while (adjustedPrevAngle < -PI_2) + adjustedPrevAngle += PI_2; + while (adjustedPrevAngle > PI_2) + adjustedPrevAngle -= PI_2; + + // at M_PI rotation, the angle flips to negative + if (qAbs(angle - adjustedPrevAngle) > M_PI) { + if (angle > adjustedPrevAngle) + return prevAngle - (PI_2 - angle + adjustedPrevAngle); + else + return prevAngle + (PI_2 + angle - adjustedPrevAngle); + } else { + return prevAngle + angle - adjustedPrevAngle; + } + } + +} + +void QmlDesigner::Internal::MouseArea3D::applyRotationAngleToNode( + QQuick3DNode *node, const QVector3D &startRotation, qreal angle) +{ + if (!qFuzzyIsNull(angle)) { + node->setRotation(startRotation); + node->rotate(qRadiansToDegrees(angle), getNormal(), QQuick3DNode::SceneSpace); + } +} + +void MouseArea3D::applyFreeRotation(QQuick3DNode *node, const QVector3D &startRotation, + const QVector3D &pressPos, const QVector3D ¤tPos) +{ + QVector3D dragVector = currentPos - pressPos; + + if (dragVector.length() < 0.001f) + return; + + const float *dataPtr(sceneTransform().data()); + QVector3D xAxis = QVector3D(-dataPtr[0], -dataPtr[1], -dataPtr[2]).normalized(); + QVector3D yAxis = QVector3D(-dataPtr[4], -dataPtr[5], -dataPtr[6]).normalized(); + + QVector3D finalAxis = (dragVector.x() * yAxis + dragVector.y() * xAxis); + + qreal degrees = qRadiansToDegrees(qreal(finalAxis.length()) * s_mouseDragMultiplier); + + finalAxis.normalize(); + + node->setRotation(startRotation); + node->rotate(degrees, finalAxis, QQuick3DNode::SceneSpace); +} + QVector3D MouseArea3D::getMousePosInPlane(const QPointF &mousePosInView) const { const QVector3D mousePos1(float(mousePosInView.x()), float(mousePosInView.y()), 0); @@ -300,12 +427,50 @@ bool MouseArea3D::eventFilter(QObject *, QEvent *event) return false; } - auto mouseOnTopOfMouseArea = [this](const QVector3D &mousePosInPlane) -> bool { - return !qFuzzyCompare(mousePosInPlane.z(), -1) + qreal pickAngle = 0.; + + auto mouseOnTopOfMouseArea = [this, &pickAngle]( + const QVector3D &mousePosInPlane, const QPointF &mousePos) -> bool { + const bool onPlane = !qFuzzyCompare(mousePosInPlane.z(), -1) && mousePosInPlane.x() >= float(m_x) && mousePosInPlane.x() <= float(m_x + m_width) && mousePosInPlane.y() >= float(m_y) && mousePosInPlane.y() <= float(m_y + m_height); + + bool onCircle = true; + bool pickSuccess = false; + if (!qFuzzyIsNull(m_circlePickArea.y()) || !qFuzzyIsNull(m_minAngle)) { + + QVector3D cameraToMouseAreaDir = getCameraToNodeDir(this); + const QVector3D mouseAreaDir = getNormal(); + qreal angle = qreal(QVector3D::dotProduct(cameraToMouseAreaDir, mouseAreaDir)); + // Do not allow selecting ring that is nearly perpendicular to camera, as dragging along + // that plane would be difficult + pickAngle = qAcos(angle); + pickAngle = pickAngle > M_PI_2 ? pickAngle - M_PI_2 : M_PI_2 - pickAngle; + if (pickAngle > m_minAngle) { + if (!qFuzzyIsNull(m_circlePickArea.y())) { + qreal ringCenter = m_circlePickArea.x(); + // Thickness is increased according to the angle to camera to keep projected + // circle thickness constant at all angles. + qreal divisor = qSin(pickAngle) * 2.; // This is never zero + qreal thickness = ((m_circlePickArea.y() / divisor)); + qreal mousePosRadius = qSqrt(qreal(mousePosInPlane.x() * mousePosInPlane.x()) + + qreal(mousePosInPlane.y() * mousePosInPlane.y())); + onCircle = ringCenter - thickness <= mousePosRadius + && ringCenter + thickness >= mousePosRadius; + } + } else { + // Fall back to picking on the pickNode. At this angle, bounding box pick is not + // a problem + onCircle = false; + if (m_pickNode) { + QQuick3DPickResult pr = m_view3D->pick(float(mousePos.x()), float(mousePos.y())); + pickSuccess = pr.objectHit() == m_pickNode; + } + } + } + return (onCircle && onPlane) || pickSuccess; }; switch (event->type()) { @@ -313,9 +478,9 @@ bool MouseArea3D::eventFilter(QObject *, QEvent *event) auto const mouseEvent = static_cast<QMouseEvent *>(event); if (mouseEvent->button() == Qt::LeftButton) { m_mousePosInPlane = getMousePosInPlane(mouseEvent->pos()); - if (mouseOnTopOfMouseArea(m_mousePosInPlane)) { + if (mouseOnTopOfMouseArea(m_mousePosInPlane, mouseEvent->pos())) { setDragging(true); - emit pressed(m_mousePosInPlane, mouseEvent->globalPos()); + emit pressed(m_mousePosInPlane, mouseEvent->pos(), pickAngle); if (m_grabsMouse) { if (s_mouseGrab && s_mouseGrab != this) { s_mouseGrab->setDragging(false); @@ -338,13 +503,13 @@ bool MouseArea3D::eventFilter(QObject *, QEvent *event) if (qFuzzyCompare(mousePosInPlane.z(), -1)) mousePosInPlane = m_mousePosInPlane; setDragging(false); - emit released(mousePosInPlane, mouseEvent->globalPos()); + emit released(mousePosInPlane, mouseEvent->pos()); if (m_grabsMouse) { if (s_mouseGrab && s_mouseGrab != this) { s_mouseGrab->setDragging(false); s_mouseGrab->setHovering(false); } - if (mouseOnTopOfMouseArea(mousePosInPlane)) { + if (mouseOnTopOfMouseArea(mousePosInPlane, mouseEvent->pos())) { s_mouseGrab = this; setHovering(true); } else { @@ -362,7 +527,7 @@ bool MouseArea3D::eventFilter(QObject *, QEvent *event) case QEvent::HoverMove: { auto const mouseEvent = static_cast<QMouseEvent *>(event); const QVector3D mousePosInPlane = getMousePosInPlane(mouseEvent->pos()); - const bool hasMouse = mouseOnTopOfMouseArea(mousePosInPlane); + const bool hasMouse = mouseOnTopOfMouseArea(mousePosInPlane, mouseEvent->pos()); setHovering(hasMouse); @@ -376,9 +541,9 @@ bool MouseArea3D::eventFilter(QObject *, QEvent *event) s_mouseGrab = nullptr; } - if (m_dragging && !qFuzzyCompare(mousePosInPlane.z(), -1)) { + if (m_dragging && (m_circlePickArea.y() > 0. || !qFuzzyCompare(mousePosInPlane.z(), -1))) { m_mousePosInPlane = mousePosInPlane; - emit dragged(mousePosInPlane, mouseEvent->globalPos()); + emit dragged(mousePosInPlane, mouseEvent->pos()); } break; @@ -408,6 +573,25 @@ void MouseArea3D::setHovering(bool enable) emit hoveringChanged(); } +QVector3D MouseArea3D::getNormal() const +{ + const float *dataPtr(sceneTransform().data()); + return QVector3D(dataPtr[8], dataPtr[9], dataPtr[10]).normalized(); +} + +QVector3D MouseArea3D::getCameraToNodeDir(QQuick3DNode *node) const +{ + QVector3D dir; + if (qobject_cast<QQuick3DOrthographicCamera *>(m_view3D->camera())) { + dir = m_view3D->camera()->cameraNode()->getDirection(); + // Camera direction has x and y flipped + dir = QVector3D(-dir.x(), -dir.y(), dir.z()); + } else { + dir = (node->scenePosition() - m_view3D->camera()->scenePosition()).normalized(); + } + return dir; +} + } } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.h index af465576829..e227b3f9dde 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/mousearea3d.h @@ -28,9 +28,11 @@ #ifdef QUICK3D_MODULE #include <QtGui/qvector3d.h> +#include <QtCore/qpoint.h> #include <QtCore/qpointer.h> #include <QtQuick3D/private/qquick3dnode_p.h> +#include <QtQuick3D/private/qquick3dmodel_p.h> #include <QtQuick3D/private/qquick3dviewport_p.h> #include <QtQuick3D/private/qtquick3dglobal_p.h> @@ -50,6 +52,9 @@ class MouseArea3D : public QQuick3DNode Q_PROPERTY(bool dragging READ dragging NOTIFY draggingChanged) Q_PROPERTY(int priority READ priority WRITE setPriority NOTIFY priorityChanged) Q_PROPERTY(int active READ active WRITE setActive NOTIFY activeChanged) + Q_PROPERTY(QPointF circlePickArea READ circlePickArea WRITE setCirclePickArea NOTIFY circlePickAreaChanged) + Q_PROPERTY(qreal minAngle READ minAngle WRITE setMinAngle NOTIFY minAngleChanged) + Q_PROPERTY(QQuick3DNode *pickNode READ pickNode WRITE setPickNode NOTIFY pickNodeChanged) Q_INTERFACES(QQmlParserStatus) @@ -68,11 +73,17 @@ public: bool dragging() const; bool grabsMouse() const; bool active() const; + QPointF circlePickArea() const; + qreal minAngle() const; + QQuick3DNode *pickNode() const; public slots: void setView3D(QQuick3DViewport *view3D); void setGrabsMouse(bool grabsMouse); void setActive(bool active); + void setCirclePickArea(const QPointF &pickArea); + void setMinAngle(qreal angle); + void setPickNode(QQuick3DNode *node); void setX(qreal x); void setY(qreal y); @@ -89,22 +100,35 @@ public slots: const QVector3D &pressPos, const QVector3D &sceneRelativeDistance, bool global); + Q_INVOKABLE qreal getNewRotationAngle(QQuick3DNode *node, const QVector3D &pressPos, + const QVector3D ¤tPos, const QVector3D &nodePos, + qreal prevAngle, bool trackBall); + Q_INVOKABLE void applyRotationAngleToNode(QQuick3DNode *node, const QVector3D &startRotation, + qreal angle); + Q_INVOKABLE void applyFreeRotation(QQuick3DNode *node, const QVector3D &startRotation, + const QVector3D &pressPos, const QVector3D ¤tPos); + signals: void view3DChanged(); - void xChanged(qreal x); - void yChanged(qreal y); - void widthChanged(qreal width); - void heightChanged(qreal height); - void priorityChanged(int level); + void xChanged(); + void yChanged(); + void widthChanged(); + void heightChanged(); + void priorityChanged(); void hoveringChanged(); void draggingChanged(); - void activeChanged(bool active); - void pressed(const QVector3D &scenePos, const QPoint &screenPos); + void activeChanged(); + void grabsMouseChanged(); + void circlePickAreaChanged(); + void minAngleChanged(); + void pickNodeChanged(); + + // angle parameter is only set if circlePickArea is specified + void pressed(const QVector3D &scenePos, const QPoint &screenPos, qreal angle); void released(const QVector3D &scenePos, const QPoint &screenPos); void dragged(const QVector3D &scenePos, const QPoint &screenPos); - void grabsMouseChanged(bool grabsMouse); protected: void classBegin() override {} @@ -114,6 +138,8 @@ protected: private: void setDragging(bool enable); void setHovering(bool enable); + QVector3D getNormal() const; + QVector3D getCameraToNodeDir(QQuick3DNode *node) const; Q_DISABLE_COPY(MouseArea3D) QQuick3DViewport *m_view3D = nullptr; @@ -133,6 +159,9 @@ private: static MouseArea3D *s_mouseGrab; bool m_grabsMouse; QVector3D m_mousePosInPlane; + QPointF m_circlePickArea; + qreal m_minAngle = 0.; + QQuick3DNode *m_pickNode = nullptr; }; } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp index 9103ef5de01..e2e6564c893 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp @@ -67,6 +67,7 @@ #include <tokencommand.h> #include <removesharedmemorycommand.h> #include <changeselectioncommand.h> +#include <drop3dlibraryitemcommand.h> #include <QDebug> #include <QQmlEngine> @@ -1171,6 +1172,11 @@ ChangeSelectionCommand NodeInstanceServer::createChangeSelectionCommand(const QL return ChangeSelectionCommand(idVector); } +Drop3DLibraryItemCommand NodeInstanceServer::createDrop3DLibraryItemCommand(const QByteArray &itemData) +{ + return Drop3DLibraryItemCommand(itemData); +} + ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QVector<InstancePropertyPair> &propertyList) const { QVector<PropertyValueContainer> valueVector; diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h index 7af63c0b5be..9eab649af71 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h @@ -70,6 +70,7 @@ class AddImportContainer; class MockupTypeContainer; class IdContainer; class ChangeSelectionCommand; +class Drop3DLibraryItemCommand; namespace Internal { class ChildrenChangeEventFilter; @@ -180,6 +181,7 @@ protected: ChildrenChangedCommand createChildrenChangedCommand(const ServerNodeInstance &parentInstance, const QList<ServerNodeInstance> &instanceList) const; ComponentCompletedCommand createComponentCompletedCommand(const QList<ServerNodeInstance> &instanceList); ChangeSelectionCommand createChangeSelectionCommand(const QList<ServerNodeInstance> &instanceList); + Drop3DLibraryItemCommand createDrop3DLibraryItemCommand(const QByteArray &itemData); void addChangedProperty(const InstancePropertyPair &property); diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp index a0783eff577..2cd59af4607 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp @@ -27,6 +27,8 @@ #include <QQuickItem> #include <QQuickView> +#include <QDropEvent> +#include <QMimeData> #include "servernodeinstance.h" #include "childrenchangeeventfilter.h" @@ -57,11 +59,13 @@ #include "removesharedmemorycommand.h" #include "changeselectioncommand.h" #include "objectnodeinstance.h" +#include <drop3dlibraryitemcommand.h> #include "dummycontextobject.h" #include "../editor3d/cameracontrolhelper.h" #include "../editor3d/mousearea3d.h" #include "../editor3d/camerageometry.h" +#include "../editor3d/gridgeometry.h" #include <designersupportdelegate.h> @@ -79,6 +83,25 @@ static QVariant objectToVariant(QObject *object) return QVariant::fromValue(object); } +bool Qt5InformationNodeInstanceServer::eventFilter(QObject *, QEvent *event) +{ + switch (event->type()) { + case QEvent::Drop: { + QDropEvent *dropEvent = static_cast<QDropEvent *>(event); + QByteArray data = dropEvent->mimeData()->data( + QStringLiteral("application/vnd.bauhaus.itemlibraryinfo")); + if (!data.isEmpty()) + nodeInstanceClient()->library3DItemDropped(createDrop3DLibraryItemCommand(data)); + + } break; + + default: + break; + } + + return false; +} + QObject *Qt5InformationNodeInstanceServer::createEditView3D(QQmlEngine *engine) { auto helper = new QmlDesigner::Internal::CameraControlHelper(); @@ -87,6 +110,7 @@ QObject *Qt5InformationNodeInstanceServer::createEditView3D(QQmlEngine *engine) #ifdef QUICK3D_MODULE qmlRegisterType<QmlDesigner::Internal::MouseArea3D>("MouseArea3D", 1, 0, "MouseArea3D"); qmlRegisterType<QmlDesigner::Internal::CameraGeometry>("CameraGeometry", 1, 0, "CameraGeometry"); + qmlRegisterType<QmlDesigner::Internal::GridGeometry>("GridGeometry", 1, 0, "GridGeometry"); #endif QQmlComponent component(engine, QUrl("qrc:/qtquickplugin/mockfiles/EditView3D.qml")); @@ -98,6 +122,7 @@ QObject *Qt5InformationNodeInstanceServer::createEditView3D(QQmlEngine *engine) return nullptr; } + window->installEventFilter(this); QObject::connect(window, SIGNAL(objectClicked(QVariant)), this, SLOT(objectClicked(QVariant))); QObject::connect(window, SIGNAL(commitObjectProperty(QVariant, QVariant)), this, SLOT(handleObjectPropertyCommit(QVariant, QVariant))); diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h index dc1e342fbd8..0597947024d 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.h @@ -57,6 +57,7 @@ private slots: protected: void collectItemChangesAndSendChangeCommands() override; + bool eventFilter(QObject *obj, QEvent *event) override; void sendChildrenChangedCommand(const QList<ServerNodeInstance> &childList); void sendTokenBack(); bool isDirtyRecursiveForNonInstanceItems(QQuickItem *item) const; diff --git a/share/qtcreator/qml/qmlpuppet/qmlpuppet.qrc b/share/qtcreator/qml/qmlpuppet/qmlpuppet.qrc index fd17d551d8a..f818f23fd52 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlpuppet.qrc +++ b/share/qtcreator/qml/qmlpuppet/qmlpuppet.qrc @@ -15,17 +15,43 @@ <file>mockfiles/LightGizmo.qml</file> <file>mockfiles/IconGizmo.qml</file> <file>mockfiles/Overlay2D.qml</file> + <file>mockfiles/HelperGrid.qml</file> <file>mockfiles/DirectionalDraggable.qml</file> <file>mockfiles/PlanarDraggable.qml</file> <file>mockfiles/PlanarMoveHandle.qml</file> <file>mockfiles/PlanarScaleHandle.qml</file> <file>mockfiles/ScaleRod.qml</file> <file>mockfiles/ScaleGizmo.qml</file> + <file>mockfiles/ToolBarButton.qml</file> + <file>mockfiles/RotateGizmo.qml</file> + <file>mockfiles/RotateRing.qml</file> <file>mockfiles/meshes/arrow.mesh</file> <file>mockfiles/meshes/scalerod.mesh</file> - <file>mockfiles/images/camera-pick-icon.png</file> - <file>mockfiles/images/camera-pick-icon@2x.png</file> + <file>mockfiles/meshes/ring.mesh</file> + <file>mockfiles/meshes/ringselect.mesh</file> + <file>mockfiles/images/editor_camera.png</file> + <file>mockfiles/images/editor_camera@2x.png</file> <file>mockfiles/images/light-pick-icon.png</file> <file>mockfiles/images/light-pick-icon@2x.png</file> + <file>mockfiles/images/item_selection_active.png</file> + <file>mockfiles/images/item_selection_active@2x.png</file> + <file>mockfiles/images/item_selection_selected.png</file> + <file>mockfiles/images/item_selection_selected@2x.png</file> + <file>mockfiles/images/group_selection_selected.png</file> + <file>mockfiles/images/group_selection_selected@2x.png</file> + <file>mockfiles/images/group_selection_active.png</file> + <file>mockfiles/images/group_selection_active@2x.png</file> + <file>mockfiles/images/move_active.png</file> + <file>mockfiles/images/move_active@2x.png</file> + <file>mockfiles/images/move_selected.png</file> + <file>mockfiles/images/move_selected@2x.png</file> + <file>mockfiles/images/rotate_active.png</file> + <file>mockfiles/images/rotate_active@2x.png</file> + <file>mockfiles/images/rotate_selected.png</file> + <file>mockfiles/images/rotate_selected@2x.png</file> + <file>mockfiles/images/scale_active.png</file> + <file>mockfiles/images/scale_active@2x.png</file> + <file>mockfiles/images/scale_selected.png</file> + <file>mockfiles/images/scale_selected@2x.png</file> </qresource> </RCC> diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextEditSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextEditSpecifics.qml index c1a7a1e8d6d..6a09b44a29c 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextEditSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextEditSpecifics.qml @@ -32,8 +32,7 @@ Column { anchors.right: parent.right StandardTextSection { - showIsWrapping: true - useLineEdit: true + showVerticalAlignment: true showFormatProperty: true } @@ -62,6 +61,18 @@ Column { } } + Section { + anchors.left: parent.left + anchors.right: parent.right + caption: qsTr("Selected Text Color") + + ColorEditor { + caption: qsTr("Selected Text Color") + backendValue: backendValues.selectedTextColor + supportGradient: false + } + } + FontSection { showStyle: false } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSection.qml index addcf393dec..0a86f113583 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSection.qml @@ -40,6 +40,16 @@ Section { columns: 2 Label { + text: qsTr("Mouse selection mode") + } + ComboBox { + Layout.fillWidth: true + backendValue: backendValues.mouseSelectionMode + scope: "TextInput" + model: ["SelectCharacters", "SelectWords"] + } + + Label { visible: textInputSection.isTextInput text: qsTr("Input mask") } @@ -48,6 +58,7 @@ Section { visible: textInputSection.isTextInput backendValue: backendValues.inputMask Layout.fillWidth: true + showTranslateCheckBox: false } Label { @@ -73,6 +84,33 @@ Section { visible: textInputSection.isTextInput backendValue: backendValues.passwordCharacter Layout.fillWidth: true + showTranslateCheckBox: false + } + + Label { + visible: !textInputSection.isTextInput + text: qsTr("Tab stop distance") + tooltip: qsTr("Sets the default distance, in device units, between tab stops.") + } + SpinBox { + visible: !textInputSection.isTextInput + Layout.fillWidth: true + backendValue: backendValues.tabStopDistance + maximumValue: 200 + minimumValue: 0 + } + + Label { + visible: !textInputSection.isTextInput + text: qsTr("Text margin") + tooltip: qsTr("Sets the margin, in pixels, around the text in the TextEdit..") + } + SpinBox { + visible: !textInputSection.isTextInput + Layout.fillWidth: true + backendValue: backendValues.textMargin + maximumValue: 200 + minimumValue: -200 } Label { @@ -101,10 +139,36 @@ Section { } CheckBox { + visible: textInputSection.isTextInput Layout.fillWidth: true text: qsTr("Auto scroll") backendValue: backendValues.autoScroll } + + CheckBox { + Layout.fillWidth: true + text: qsTr("Overwrite mode") + backendValue: backendValues.overwriteMode + } + + CheckBox { + Layout.fillWidth: true + text: qsTr("Persistent selection") + backendValue: backendValues.persistentSelection + } + + CheckBox { + Layout.fillWidth: true + text: qsTr("Select by mouse") + backendValue: backendValues.selectByMouse + } + + CheckBox { + visible: !textInputSection.isTextInput + Layout.fillWidth: true + text: qsTr("Select by keyboard") + backendValue: backendValues.selectByKeyboard + } } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSpecifics.qml index 615ce16aefe..29702303b26 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSpecifics.qml @@ -32,8 +32,7 @@ Column { anchors.right: parent.right StandardTextSection { - useLineEdit: false - showIsWrapping: false + showVerticalAlignment: true } Section { @@ -61,6 +60,18 @@ Column { } } + Section { + anchors.left: parent.left + anchors.right: parent.right + caption: qsTr("Selected Text Color") + + ColorEditor { + caption: qsTr("Selected Text Color") + backendValue: backendValues.selectedTextColor + supportGradient: false + } + } + FontSection { showStyle: false } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml index 64ea73f1cd6..550ffb32408 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml @@ -32,12 +32,11 @@ Column { anchors.right: parent.right StandardTextSection { - useLineEdit: true - showIsWrapping: true showVerticalAlignment: true showFormatProperty: true showElide: true showFontSizeMode: true + showLineHeight: true } Section { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml index 917cad87342..6ecc8d525ce 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml @@ -35,9 +35,10 @@ Section { property bool showIsWrapping: false property bool showElide: false property bool showVerticalAlignment: false - property bool useLineEdit: true property bool showFormatProperty: false property bool showFontSizeMode: false + property bool showLineHeight: false + SectionLayout { columns: 2 @@ -46,7 +47,6 @@ Section { text: qsTr("Text") } LineEdit { - //visible: useLineEdit backendValue: backendValues.text Layout.fillWidth: true } @@ -119,10 +119,12 @@ Section { } Label { + visible: showFontSizeMode text: qsTr("Font size mode") toolTip: qsTr("Specifies how the font size of the displayed text is determined.") } ComboBox { + visible: showFontSizeMode scope: "Text" model: ["FixedSize", "HorizontalFit", "VerticalFit", "Fit"] backendValue: backendValues.fontSizeMode @@ -131,11 +133,13 @@ Section { Label { + visible: showLineHeight text: qsTr("Line height") tooltip: qsTr("Sets the line height for the text.") } SpinBox { + visible: showLineHeight Layout.fillWidth: true backendValue: (backendValues.lineHeight === undefined) ? dummyBackendValue : backendValues.lineHeight maximumValue: 500 diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml index 5f044b73f44..9f525f2fc5a 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml @@ -114,6 +114,7 @@ Rectangle { var y = root.mapToGlobal(0,0).y - 32 bindingEditor.showWidget(x, y) bindingEditor.text = delegateWhenConditionString + bindingEditor.prepareBindings() } } @@ -205,6 +206,8 @@ Rectangle { id: bindingEditor + stateModelNodeProperty: statesEditorModel.stateModelNode() + onRejected: { hideWidget() } diff --git a/share/qtcreator/templates/wizards/projects/qtquick2-extension/wizard.json b/share/qtcreator/templates/wizards/projects/qtquick2-extension/wizard.json index b0f9e33ae38..6be8cbff6d0 100644 --- a/share/qtcreator/templates/wizards/projects/qtquick2-extension/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtquick2-extension/wizard.json @@ -62,6 +62,16 @@ ] }, { + "trDisplayName": "Kit Selection", + "trShortTitle": "Kits", + "typeId": "Kits", + "enabled": "%{JS: !value('IsSubproject')}", + "data": { + "projectFilePath": "%{ProjectFile}", + "requiredFeatures": [ "QtSupport.Wizards.FeatureQt.5"] + } + }, + { "trDisplayName": "Project Management", "trShortTitle": "Summary", "typeId": "Summary" @@ -84,7 +94,8 @@ }, { "source": "plugin.cpp", - "target": "%{PluginSrc}" + "target": "%{PluginSrc}", + "openInEditor": true }, { "source": "plugin.h", diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index 16a28c2f650..538f8be8cef 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -284,12 +284,6 @@ The minimum API level required by the kit is %1.</source> <translation>Сбой запуска виртуального устройства Android.</translation> </message> <message> - <source>Cleaning Qt libraries on device failed. -%1</source> - <translation>Не удалось очистить библиотеки Qt на устройстве. -%1</translation> - </message> - <message> <source>Android package installation failed. %1</source> <translation>Не удалось установить пакет для Android. @@ -567,6 +561,10 @@ The files in the Android package source directory are copied to the build direct <translation>Использовать внешнее приложение Ministro для загрузки и обслуживания библиотек Qt.</translation> </message> <message> + <source>Build .aab (Android App Bundle)</source> + <translation>Собирать .aab (Android App Bundle)</translation> + </message> + <message> <source>Libraries (*.so)</source> <translation>Библиотеки (*.so)</translation> </message> @@ -619,7 +617,7 @@ The files in the Android package source directory are copied to the build direct <message> <source>Deploy to Android device</source> <extracomment>AndroidDeployQtStep default display name</extracomment> - <translation>Установка на устройство Android</translation> + <translation>Развёртывание на устройство Android</translation> </message> <message> <source>No Android arch set by the .pro file.</source> @@ -631,11 +629,11 @@ The files in the Android package source directory are copied to the build direct </message> <message> <source>Deploy to Android device or emulator</source> - <translation>Установить на устройство или эмулятор Android</translation> + <translation>Развернуть на устройство или эмулятор Android</translation> </message> <message> <source>Deploying to %1</source> - <translation>Установка на %1</translation> + <translation>Развёртывание на %1</translation> </message> <message> <source>Cannot find the androiddeployqt tool.</source> @@ -663,11 +661,7 @@ The files in the Android package source directory are copied to the build direct </message> <message> <source>Package deploy: Failed to pull "%1" to "%2".</source> - <translation>Установка пакета: Не удалось получить «%1» в «%2».</translation> - </message> - <message> - <source>Package deploy: Running command "%1 %2".</source> - <translation>Установка пакета: Выполнение команды «%1 %2».</translation> + <translation>Развёртывание пакета: не удалось получить «%1» в «%2».</translation> </message> <message> <source>Install failed</source> @@ -682,10 +676,6 @@ The files in the Android package source directory are copied to the build direct <translation>Сбросить устройства по умолчанию</translation> </message> <message> - <source>Clean Temporary Libraries Directory on Device</source> - <translation>Очистить временный каталог на устройстве</translation> - </message> - <message> <source>Install Ministro from APK</source> <translation>Установить Ministro из APK</translation> </message> @@ -699,7 +689,7 @@ The files in the Android package source directory are copied to the build direct </message> <message> <source>Initializing deployment to Android device/simulator</source> - <translation>Инициализация установки на устройство/эмулятор Android</translation> + <translation>Инициализация развёртывания на устройство/эмулятор Android</translation> </message> <message> <source>Starting: "%1"</source> @@ -709,7 +699,7 @@ The files in the Android package source directory are copied to the build direct <source>Deployment failed with the following errors: </source> - <translation>Не удалось установить из-за следующих ошибок: + <translation>Не удалось развернуть из-за следующих ошибок: </translation> </message> @@ -725,6 +715,10 @@ Do you want to uninstall the existing package?</source> <source>Pulling files necessary for debugging.</source> <translation>Загрузка файлов, необходимых для отладки.</translation> </message> + <message> + <source>Package deploy: Running command "%1".</source> + <translation>Развёртывание пакета: выполняется команда «%1».</translation> + </message> </context> <context> <name>Android::Internal::AndroidDevice</name> @@ -788,6 +782,10 @@ Do you want to uninstall the existing package?</source> <translation><p>Утилита adb в Android SDK выводит список всех подключённых устройств запущенных через «устройства adb».</p></translation> </message> <message> + <source>Always use this device for this project</source> + <translation>Всегда использовать это устройство для этого проекта</translation> + </message> + <message> <source>No Device Found</source> <translation>Устройства не обнаружены</translation> </message> @@ -805,7 +803,7 @@ Do you want to uninstall the existing package?</source> </message> <message> <source>This can be later reset in deployment settings in the Projects mode.</source> - <translation>Можно в любой момент выключить в настройках установки в режиме Проекты.</translation> + <translation>Можно в любой момент выключить в настройках развёртывания в режиме Проекты.</translation> </message> <message> <source>Always use this device for architecture %1 for this project</source> @@ -874,41 +872,6 @@ Do you want to uninstall the existing package?</source> </message> </context> <context> - <name>Android::Internal::AndroidGdbServerKitAspect</name> - <message> - <source>Android GDB server</source> - <translation>Сервер GDB для Android</translation> - </message> - <message> - <source>The GDB server to use for this kit.</source> - <translation>Сервер GDB для этого комплекта.</translation> - </message> - <message> - <source>GDB server</source> - <translation>Сервер GDB</translation> - </message> - <message> - <source>Manage...</source> - <translation>Управление...</translation> - </message> - <message> - <source>Auto-detect</source> - <translation>Обнаружить</translation> - </message> - <message> - <source>Edit...</source> - <translation>Изменить...</translation> - </message> - <message> - <source>&Binary:</source> - <translation>&Программа:</translation> - </message> - <message> - <source>GDB Server for "%1"</source> - <translation>Сервер GDB для «%1»</translation> - </message> -</context> -<context> <name>Android::Internal::AndroidManifestEditor</name> <message> <source>General</source> @@ -1089,8 +1052,16 @@ Do you want to uninstall the existing package?</source> <context> <name>Android::Internal::AndroidQtVersion</name> <message> - <source>Failed to detect the ABIs used by the Qt version.</source> - <translation>Не удалось определить ABI, используемые профилем Qt.</translation> + <source>NDK is not configured in Devices > Android.</source> + <translation>NDK не настроен в Устройства > Android.</translation> + </message> + <message> + <source>SDK is not configured in Devices > Android.</source> + <translation>SDK не настроен в Устройства > Android.</translation> + </message> + <message> + <source>Failed to detect the ABIs used by the Qt version. Check the settings in Devices > Android for errors.</source> + <translation>Не удалось обнаружить ABI, используемые профилем Qt. Проверьте настройки в Устройства > Android.</translation> </message> <message> <source>Android</source> @@ -1421,6 +1392,10 @@ Cancelling pending operations... <translation>Путь к Android SDK существует.</translation> </message> <message> + <source>Android SDK path writable.</source> + <translation>Каталог с Android SDK доступен для записи.</translation> + </message> + <message> <source>SDK tools installed.</source> <translation>Инструменты SDK установлены.</translation> </message> @@ -1429,6 +1404,10 @@ Cancelling pending operations... <translation>Инструменты платформы установлены.</translation> </message> <message> + <source>SDK manager runs (requires exactly Java 1.8).</source> + <translation>Управление SDK работает (требуется Java только версии 1.8).</translation> + </message> + <message> <source>Build tools installed.</source> <translation>Инструменты сборки установлены.</translation> </message> @@ -1854,6 +1833,21 @@ Install an SDK of at least API version %1.</source> <context> <name>Autotest::Internal::AutotestPlugin</name> <message> + <source>&Run Test Under Cursor</source> + <translation>&Запустить тест под курсором</translation> + </message> + <message> + <source>&Debug Test Under Cursor</source> + <translation>&Отладить тест под курсором</translation> + </message> +</context> +<context> + <name>Autotest::Internal::AutotestPluginPrivate</name> + <message> + <source>Testing</source> + <translation>Тестирование</translation> + </message> + <message> <source>&Tests</source> <translation>&Тесты</translation> </message> @@ -1866,14 +1860,14 @@ Install an SDK of at least API version %1.</source> <translation>Запуск всех тестов</translation> </message> <message> - <source>Alt+Shift+T,Alt+A</source> - <translation>Alt+Shift+T,Alt+A</translation> - </message> - <message> <source>Ctrl+Meta+T, Ctrl+Meta+A</source> <translation>Ctrl+Meta+T, Ctrl+Meta+A</translation> </message> <message> + <source>Alt+Shift+T,Alt+A</source> + <translation>Alt+Shift+T,Alt+A</translation> + </message> + <message> <source>&Run Selected Tests</source> <translation>&Запустить выбранные</translation> </message> @@ -1882,14 +1876,14 @@ Install an SDK of at least API version %1.</source> <translation>Запуск выбранных тестов</translation> </message> <message> - <source>Alt+Shift+T,Alt+R</source> - <translation>Alt+Shift+T,Alt+R</translation> - </message> - <message> <source>Ctrl+Meta+T, Ctrl+Meta+R</source> <translation>Ctrl+Meta+T, Ctrl+Meta+R</translation> </message> <message> + <source>Alt+Shift+T,Alt+R</source> + <translation>Alt+Shift+T,Alt+R</translation> + </message> + <message> <source>Run Tests for Current &File</source> <translation>Запустить тесты для текущего &файла</translation> </message> @@ -1898,32 +1892,24 @@ Install an SDK of at least API version %1.</source> <translation>Запуск тестов для текущего файла</translation> </message> <message> - <source>Alt+Shift+T,Alt+F</source> - <translation>Alt+Shift+T,Alt+F</translation> - </message> - <message> <source>Ctrl+Meta+T, Ctrl+Meta+F</source> <translation>Ctrl+Meta+T, Ctrl+Meta+F</translation> </message> <message> - <source>Re&scan Tests</source> - <translation>&Пересканировать</translation> + <source>Alt+Shift+T,Alt+F</source> + <translation>Alt+Shift+T,Alt+F</translation> </message> <message> - <source>Alt+Shift+T,Alt+S</source> - <translation>Alt+Shift+T,Alt+S</translation> + <source>Re&scan Tests</source> + <translation>&Пересканировать</translation> </message> <message> <source>Ctrl+Meta+T, Ctrl+Meta+S</source> <translation>Ctrl+Meta+T, Ctrl+Meta+S</translation> </message> <message> - <source>&Run Test Under Cursor</source> - <translation>&Запустить тест под курсором</translation> - </message> - <message> - <source>&Debug Test Under Cursor</source> - <translation>&Отладить тест под курсором</translation> + <source>Alt+Shift+T,Alt+S</source> + <translation>Alt+Shift+T,Alt+S</translation> </message> <message> <source>Selected test was not found (%1).</source> @@ -2106,6 +2092,37 @@ See Google Test documentation for further information on GTest filters.</source> </message> </context> <context> + <name>Autotest::Internal::ProjectTestSettingsWidget</name> + <message> + <source>Global</source> + <translation>Общие</translation> + </message> + <message> + <source>Custom</source> + <translation>Особые</translation> + </message> + <message> + <source>Active frameworks:</source> + <translation>Активная среда:</translation> + </message> + <message> + <source>Automatically run tests after build</source> + <translation>Автозапуск тестов после сборки</translation> + </message> + <message> + <source>None</source> + <translation>Нет</translation> + </message> + <message> + <source>All</source> + <translation>Всех</translation> + </message> + <message> + <source>Selected</source> + <translation>Выбранных</translation> + </message> +</context> +<context> <name>Autotest::Internal::QtTestOutputReader</name> <message> <source>%1 %2 per iteration (total: %3, iterations: %4)</source> @@ -2269,10 +2286,6 @@ Warning: Plain text misses some information, such as duration.</source> <context> <name>Autotest::Internal::TestCodeParser</name> <message> - <source>AutoTest Plugin WARNING: No files left after filtering test scan folders. Check test filter settings.</source> - <translation>Модуль AutoTest: ПРЕДУПРЕЖДЕНИЕ: Ни один файл не отфильтровался при сканирование папок для тестов. Проверьте настройки фильтра тестов.</translation> - </message> - <message> <source>Scanning for Tests</source> <translation>Поиск тестов</translation> </message> @@ -2293,7 +2306,7 @@ Warning: Plain text misses some information, such as duration.</source> </message> <message> <source>Run Without Deployment</source> - <translation>Запустить без установки</translation> + <translation>Запустить без развёртывания</translation> </message> <message> <source>Debug This Test</source> @@ -2301,7 +2314,7 @@ Warning: Plain text misses some information, such as duration.</source> </message> <message> <source>Debug Without Deployment</source> - <translation>Отладить без установки</translation> + <translation>Отладить без развёртывания</translation> </message> <message> <source>Select All</source> @@ -2348,13 +2361,6 @@ Warning: Plain text misses some information, such as duration.</source> </message> </context> <context> - <name>Autotest::Internal::TestOutputReader</name> - <message> - <source>Test executable crashed.</source> - <translation>Сбой программы тестирования.</translation> - </message> -</context> -<context> <name>Autotest::Internal::TestResultsPane</name> <message> <source>Expand All</source> @@ -2735,6 +2741,26 @@ Warning: this is an experimental feature and might lead to failing to execute th <source>Only for unsuccessful test runs</source> <translation>Только в случае неуспешных результатов</translation> </message> + <message> + <source>Automatically run</source> + <translation>Автозапуск тестов</translation> + </message> + <message> + <source>Runs chosen tests automatically if a build succeeded.</source> + <translation>Автоматически запускать выбранные тесты после успешной сборки.</translation> + </message> + <message> + <source>None</source> + <translation>Нет</translation> + </message> + <message> + <source>All</source> + <translation>Всех</translation> + </message> + <message> + <source>Selected</source> + <translation>Выбранных</translation> + </message> </context> <context> <name>Autotest::Internal::TestSettingsWidget</name> @@ -2756,6 +2782,13 @@ Warning: this is an experimental feature and might lead to failing to execute th </message> </context> <context> + <name>Autotest::TestOutputReader</name> + <message> + <source>Test executable crashed.</source> + <translation>Сбой программы тестирования.</translation> + </message> +</context> +<context> <name>AutotoolsProjectManager::Internal::AutogenStep</name> <message> <source>Autogen</source> @@ -2925,6 +2958,10 @@ Warning: this is an experimental feature and might lead to failing to execute th <source>Bare Metal</source> <translation>Голое железо</translation> </message> + <message> + <source>Bare Metal Device</source> + <translation>Устройство на голом железе</translation> + </message> </context> <context> <name>BareMetal::Internal::BareMetalDeviceConfigurationWidget</name> @@ -2932,6 +2969,18 @@ Warning: this is an experimental feature and might lead to failing to execute th <source>GDB server provider:</source> <translation>Тип сервера GDB:</translation> </message> + <message> + <source>Peripheral description files (*.svd)</source> + <translation>Файлы описания устройств (*.svd)</translation> + </message> + <message> + <source>Select Peripheral Description File</source> + <translation>Выбор файла описания внешнего устройства</translation> + </message> + <message> + <source>Peripheral description file:</source> + <translation>Файл описания устройства:</translation> + </message> </context> <context> <name>BareMetal::Internal::BareMetalDeviceConfigurationWizard</name> @@ -2954,16 +3003,12 @@ Warning: this is an experimental feature and might lead to failing to execute th <source>GDB server provider:</source> <translation>Тип сервера GDB:</translation> </message> - <message> - <source>Bare Metal Device</source> - <translation>Голое устройство</translation> - </message> </context> <context> <name>BareMetal::Internal::BareMetalDeviceFactory</name> <message> <source>Bare Metal Device</source> - <translation>Голое устройство</translation> + <translation>Устройство на голом железе</translation> </message> </context> <context> @@ -3267,6 +3312,13 @@ Warning: this is an experimental feature and might lead to failing to execute th </message> </context> <context> + <name>BareMetalDeployConfiguration</name> + <message> + <source>Deploy to BareMetal Device</source> + <translation>Развёртывание на устройство на голом железе</translation> + </message> +</context> +<context> <name>BaseFileWizard</name> <message> <source>Unable to create the directory %1.</source> @@ -4585,6 +4637,13 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou </message> </context> <context> + <name>Boot2Qt</name> + <message> + <source>Boot2Qt: %1</source> + <translation>Boot2Qt: %1</translation> + </message> +</context> +<context> <name>BorderImageSpecifics</name> <message> <source>Border Image</source> @@ -4761,6 +4820,13 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou </message> </context> <context> + <name>CMakeProjectManager::CMakeBuildSystem</name> + <message> + <source>Scan "%1" project tree</source> + <translation>Сканирование дерева проекта «%1»</translation> + </message> +</context> +<context> <name>CMakeProjectManager::CMakeConfigItem</name> <message> <source>Failed to open %1 for reading.</source> @@ -4768,6 +4834,135 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou </message> </context> <context> + <name>CMakeProjectManager::CMakeConfigurationKitAspect</name> + <message> + <source>CMake Configuration</source> + <translation>Конфигурация CMake</translation> + </message> + <message> + <source>Default configuration passed to CMake when setting up a project.</source> + <translation>Конфигурация по умолчанию, передаваемая CMake при настройке проекта.</translation> + </message> + <message> + <source>CMake configuration has no path to qmake binary set, even though the kit has a valid Qt version.</source> + <translation>В конфигурации CMake не указан путь к qmake, даже при заданном профиле Qt комплекта.</translation> + </message> + <message> + <source>CMake configuration has a path to a qmake binary set, even though the kit has no valid Qt version.</source> + <translation>В конфигурации CMake указан путь к qmake, при незаданном верном профиле Qt комплекта.</translation> + </message> + <message> + <source>CMake configuration has a path to a qmake binary set that does not match the qmake binary path configured in the Qt version.</source> + <translation>В конфигурации CMake указан путь к qmake, но он не совпадает с заданным в профиле Qt комплекта.</translation> + </message> + <message> + <source>CMake configuration has no CMAKE_PREFIX_PATH set that points to the kit Qt version.</source> + <translation>В конфигурации CMake не задан параметр CMAKE_PREFIX_PATH, указывающий на профиль Qt комплекта.</translation> + </message> + <message> + <source>CMake configuration has no path to a C compiler set, even though the kit has a valid tool chain.</source> + <translation>В концигурации CMake не задан путь к компилятору C, но в комплекте указан корректный иструментарий.</translation> + </message> + <message> + <source>CMake configuration has a path to a C compiler set, even though the kit has no valid tool chain.</source> + <translation>В концигурации CMake задан путь к компилятору C, но в комплекте не указан корректный иструментарий.</translation> + </message> + <message> + <source>CMake configuration has a path to a C compiler set that does not match the compiler path configured in the tool chain of the kit.</source> + <translation>В конфигурации CMake указан путь к компилятору С, но он не совпадает с заданным в инструментарии комплекта.</translation> + </message> + <message> + <source>CMake configuration has no path to a C++ compiler set, even though the kit has a valid tool chain.</source> + <translation>В конфигурации CMake не указан путь к компилятору С++, при заданном верном инструментарии комплекта.</translation> + </message> + <message> + <source>CMake configuration has a path to a C++ compiler set, even though the kit has no valid tool chain.</source> + <translation>В конфигурации CMake указан путь к компилятору С++, при незаданном верном инструментарии комплекта.</translation> + </message> + <message> + <source>CMake configuration has a path to a C++ compiler set that does not match the compiler path configured in the tool chain of the kit.</source> + <translation>В конфигурации CMake указан путь к компилятору С++, но он не совпадает с заданным в инструментарии комплекта.</translation> + </message> +</context> +<context> + <name>CMakeProjectManager::CMakeGeneratorKitAspect</name> + <message> + <source>CMake generator</source> + <translation>Генератор CMake</translation> + </message> + <message> + <source>CMake generator defines how a project is built when using CMake.<br>This setting is ignored when using other build systems.</source> + <translation>Генератор CMake определяет, как проект будет собираться при использовании CMake.<br>Он игнорируется при использовании других систем сборки.</translation> + </message> + <message> + <source>CMake Tool is unconfigured, CMake generator will be ignored.</source> + <translation>Программа CMake не настроена, генератор CMake игнорируется.</translation> + </message> + <message> + <source>CMake Tool does not support the configured generator.</source> + <translation>Программа CMake не поддерживает выбранный генератор.</translation> + </message> + <message> + <source>Platform is not supported by the selected CMake generator.</source> + <translation>Платформа не поддерживается выбранным генератором CMake.</translation> + </message> + <message> + <source>Toolset is not supported by the selected CMake generator.</source> + <translation>Инструментарий не поддерживается выбранным генератором CMake.</translation> + </message> + <message> + <source>The selected CMake binary has no server-mode and the CMake generator does not generate a CodeBlocks file. %1 will not be able to parse CMake projects.</source> + <translation>Выбранная программа CMake не имеет серверного режима, а генератор CMake не создаёт файлы CodeBlocks. %1 не имеет возможности разбирать проекты CMake.</translation> + </message> + <message> + <source><Use Default Generator></source> + <translation><Генератор по умолчанию></translation> + </message> + <message> + <source>Generator: %1<br>Extra generator: %2</source> + <translation>Генератор: %1<br>Дополнительный генератор: %2</translation> + </message> + <message> + <source>Platform: %1</source> + <translation>Платформа: %1</translation> + </message> + <message> + <source>Toolset: %1</source> + <translation>Инструментарий: %1</translation> + </message> + <message> + <source>CMake Generator</source> + <translation>Генератор CMake</translation> + </message> +</context> +<context> + <name>CMakeProjectManager::CMakeKitAspect</name> + <message> + <source>CMake Tool</source> + <translation>Программа CMake</translation> + </message> + <message> + <source>The CMake Tool to use when building a project with CMake.<br>This setting is ignored when using other build systems.</source> + <translation>Программа CMake используется для сборки проектов на базе CMake.<br>Эта настройка игнорируется при использовании других систем сборки.</translation> + </message> + <message> + <source>CMake version %1 is unsupported. Please update to version 3.0 or later.</source> + <translation>CMake версии %1 не поддерживается. Обновите до версии 3.0 или более поздней.</translation> + </message> + <message> + <source>CMake</source> + <translation>CMake</translation> + </message> + <message> + <source>Unconfigured</source> + <translation>Не настроено</translation> + </message> + <message> + <source>Path to the cmake executable</source> + <translation>Путь к программе cmake</translation> + </message> +</context> +<context> <name>CMakeProjectManager::CMakeProject</name> <message> <source>No cmake tool set.</source> @@ -4777,14 +4972,22 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou <source>No compilers set in kit.</source> <translation>У комплекта не заданы компиляторы.</translation> </message> - <message> - <source>Scan "%1" project tree</source> - <translation>Сканирование дерева проекта «%1»</translation> - </message> </context> <context> <name>CMakeProjectManager::CMakeSettingsPage</name> <message> + <source>Version: %1<br>Supports fileApi: %2<br>Supports server-mode: %3</source> + <translation>Версия: %1<br>Поддерживается fileApi: %2<br>Поддерживается серверный режим: %3</translation> + </message> + <message> + <source>yes</source> + <translation>да</translation> + </message> + <message> + <source>no</source> + <translation>нет</translation> + </message> + <message> <source> (Default)</source> <translation> (По умолчанию)</translation> </message> @@ -4832,10 +5035,6 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou <context> <name>CMakeProjectManager::CMakeToolManager</name> <message> - <source>CMake at %1</source> - <translation>CMake в %1</translation> - </message> - <message> <source>System CMake at %1</source> <translation>Системная CMake в %1</translation> </message> @@ -4879,6 +5078,88 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou </message> </context> <context> + <name>CMakeProjectManager::Internal</name> + <message> + <source>Failed to set up CMake file API support. Qt Creator can not extract project information.</source> + <translation>Не удалось настроить поддержку API файла CMake. Qt Creator не может извлечь информацию о проекте.</translation> + </message> + <message> + <source>Invalid reply file created by CMake.</source> + <translation>CMake создал неверный файл-ответ.</translation> + </message> + <message> + <source>Invalid cache file generated by CMake.</source> + <translation>CMake создал неверный файл кэша.</translation> + </message> + <message> + <source>Invalid cmakeFiles file generated by CMake.</source> + <translation>CMake создал неверный файл cmakeFiles.</translation> + </message> + <message> + <source>Invalid codemodel file generated by CMake: No directories.</source> + <translation>CMake создал неверный файл codemodel: нет каталогов.</translation> + </message> + <message> + <source>Invalid codemodel file generated by CMake: Empty directory object.</source> + <translation>CMake создал неверный файл codemodel: пустой объект каталога.</translation> + </message> + <message> + <source>Invalid codemodel file generated by CMake: No projects.</source> + <translation>CMake создал неверный файл codemodel: нет проектов.</translation> + </message> + <message> + <source>Invalid codemodel file generated by CMake: Empty project object.</source> + <translation>CMake создал неверный файл codemodel: пустой объект проекта.</translation> + </message> + <message> + <source>Invalid codemodel file generated by CMake: Broken project data.</source> + <translation>CMake создал неверный файл codemodel: повреждены данные проекта.</translation> + </message> + <message> + <source>Invalid codemodel file generated by CMake: No targets.</source> + <translation>CMake создал неверный файл codemodel: нет целей.</translation> + </message> + <message> + <source>Invalid codemodel file generated by CMake: Empty target object.</source> + <translation>CMake создал неверный файл codemodel: пустой объект цели.</translation> + </message> + <message> + <source>Invalid codemodel file generated by CMake: Broken target data.</source> + <translation>CMake создал неверный файл codemodel: повреждены данные цели.</translation> + </message> + <message> + <source>Invalid codemodel file generated by CMake: No configurations.</source> + <translation>CMake создал неверный файл codemodel: нет конфигураций.</translation> + </message> + <message> + <source>Invalid codemodel file generated by CMake: Empty configuration object.</source> + <translation>CMake создал неверный файл codemodel: пустой объект конфигурации.</translation> + </message> + <message> + <source>Invalid codemodel file generated by CMake: Broken indexes in directories, projects, or targets.</source> + <translation>CMake создал неверный файл codemodel: повреждены индексы в каталогах, проектах или целях.</translation> + </message> + <message> + <source>Invalid codemodel file generated by CMake.</source> + <translation>CMake создал неверный файл codemodel.</translation> + </message> + <message> + <source>Invalid target file: Information is missing.</source> + <translation>Неверный файл цели: отсутствует информация.</translation> + </message> + <message> + <source>Invalid target file generated by CMake: Broken indexes in target details.</source> + <translation>CMake создал неверный цели файл: повреждены индексы в деталях цели.</translation> + </message> +</context> +<context> + <name>CMakeProjectManager::Internal::BuildCMakeTargetLocatorFilter</name> + <message> + <source>Build CMake target</source> + <translation>Собрать цель CMake</translation> + </message> +</context> +<context> <name>CMakeProjectManager::Internal::BuildDirManager</name> <message> <source>Failed to create build directory "%1".</source> @@ -4893,6 +5174,10 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou <translation>В комплекте должна быть задана программа CMake для разбора этого проекта.</translation> </message> <message> + <source>CMakeLists.txt in source directory</source> + <translation>CMakeLists.txt в каталоге исходников</translation> + </message> + <message> <source>CMakeCache.txt file not found.</source> <translation>Не удалось найти файл CMakeCache.txt.</translation> </message> @@ -5122,54 +5407,6 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou <source>Enter one variable per line with the variable name separated from the variable value by "=".<br>You may provide a type hint by adding ":TYPE" before the "=".</source> <translation>Задавайте значения переменных по одной в строке, отделяя значение от имени символом "=".<br>Можно указывать тип, добавляя «:ТИП» перед "=".<br>Например: CMAKE_BUILD_TYPE:STRING=DebWithRelInfo.</translation> </message> - <message> - <source>CMake Configuration</source> - <translation>Конфигурация CMake</translation> - </message> - <message> - <source>Default configuration passed to CMake when setting up a project.</source> - <translation>Конфигурация по умолчанию, передаваемая CMake при настройке проекта.</translation> - </message> - <message> - <source>CMake configuration has no path to qmake binary set, even though the kit has a valid Qt version.</source> - <translation>В конфигурации CMake не указан путь к qmake, даже при заданном профиле Qt комплекта.</translation> - </message> - <message> - <source>CMake configuration has a path to a qmake binary set, even though the kit has no valid Qt version.</source> - <translation>В конфигурации CMake указан путь к qmake, при незаданном верном профиле Qt комплекта.</translation> - </message> - <message> - <source>CMake configuration has a path to a qmake binary set that does not match the qmake binary path configured in the Qt version.</source> - <translation>В конфигурации CMake указан путь к qmake, но он не совпадает с заданным в профиле Qt комплекта.</translation> - </message> - <message> - <source>CMake configuration has no CMAKE_PREFIX_PATH set that points to the kit Qt version.</source> - <translation>В конфигурации CMake не задан параметр CMAKE_PREFIX_PATH, указывающий на профиль Qt комплекта.</translation> - </message> - <message> - <source>CMake configuration has no path to a C compiler set, even though the kit has a valid tool chain.</source> - <translation>В концигурации CMake не задан путь к компилятору C, но в комплекте указан корректный иструментарий.</translation> - </message> - <message> - <source>CMake configuration has a path to a C compiler set, even though the kit has no valid tool chain.</source> - <translation>В концигурации CMake задан путь к компилятору C, но в комплекте не указан корректный иструментарий.</translation> - </message> - <message> - <source>CMake configuration has a path to a C compiler set that does not match the compiler path configured in the tool chain of the kit.</source> - <translation>В конфигурации CMake указан путь к компилятору С, но он не совпадает с заданным в инструментарии комплекта.</translation> - </message> - <message> - <source>CMake configuration has no path to a C++ compiler set, even though the kit has a valid tool chain.</source> - <translation>В конфигурации CMake не указан путь к компилятору С++, при заданном верном инструментарии комплекта.</translation> - </message> - <message> - <source>CMake configuration has a path to a C++ compiler set, even though the kit has no valid tool chain.</source> - <translation>В конфигурации CMake указан путь к компилятору С++, при незаданном верном инструментарии комплекта.</translation> - </message> - <message> - <source>CMake configuration has a path to a C++ compiler set that does not match the compiler path configured in the tool chain of the kit.</source> - <translation>В конфигурации CMake указан путь к компилятору С++, но он не совпадает с заданным в инструментарии комплекта.</translation> - </message> </context> <context> <name>CMakeProjectManager::Internal::CMakeEditorFactory</name> @@ -5212,50 +5449,6 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou <source>Toolset:</source> <translation>Инструментарий:</translation> </message> - <message> - <source>CMake generator</source> - <translation>Генератор CMake</translation> - </message> - <message> - <source>CMake generator defines how a project is built when using CMake.<br>This setting is ignored when using other build systems.</source> - <translation>Генератор CMake определяет, как проект будет собираться при использовании CMake.<br>Он игнорируется при использовании других систем сборки.</translation> - </message> - <message> - <source>CMake Tool is unconfigured, CMake generator will be ignored.</source> - <translation>Программа CMake не настроена, генератор CMake игнорируется.</translation> - </message> - <message> - <source>CMake Tool does not support the configured generator.</source> - <translation>Программа CMake не поддерживает выбранный генератор.</translation> - </message> - <message> - <source>Platform is not supported by the selected CMake generator.</source> - <translation>Платформа не поддерживается выбранным генератором CMake.</translation> - </message> - <message> - <source>Toolset is not supported by the selected CMake generator.</source> - <translation>Инструментарий не поддерживается выбранным генератором CMake.</translation> - </message> - <message> - <source>The selected CMake binary has no server-mode and the CMake generator does not generate a CodeBlocks file. %1 will not be able to parse CMake projects.</source> - <translation>Выбранная программа CMake не имеет серверного режима, а генератор CMake не создаёт файлы CodeBlocks. %1 не имеет возможности разбирать проекты CMake.</translation> - </message> - <message> - <source><Use Default Generator></source> - <translation><Генератор по умолчанию></translation> - </message> - <message> - <source>Generator: %1<br>Extra generator: %2</source> - <translation>Генератор: %1<br>Дополнительный генератор: %2</translation> - </message> - <message> - <source>Platform: %1</source> - <translation>Платформа: %1</translation> - </message> - <message> - <source>Toolset: %1</source> - <translation>Инструментарий: %1</translation> - </message> </context> <context> <name>CMakeProjectManager::Internal::CMakeKitAspect</name> @@ -5263,37 +5456,6 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou <source><No CMake Tool available></source> <translation><Программа CMake недоступна></translation> </message> - <message> - <source>CMake Tool</source> - <translation>Программа CMake</translation> - </message> - <message> - <source>The CMake Tool to use when building a project with CMake.<br>This setting is ignored when using other build systems.</source> - <translation>Программа CMake используется для сборки проектов на базе CMake.<br>Эта настройка игнорируется при использовании других систем сборки.</translation> - </message> - <message> - <source>CMake version %1 is unsupported. Please update to version 3.0 or later.</source> - <translation>CMake версии %1 не поддерживается. Обновите до версии 3.0 или более поздней.</translation> - </message> - <message> - <source>CMake</source> - <translation>CMake</translation> - </message> - <message> - <source>Unconfigured</source> - <translation>Не настроено</translation> - </message> - <message> - <source>Path to the cmake executable</source> - <translation>Путь к программе cmake</translation> - </message> -</context> -<context> - <name>CMakeProjectManager::Internal::CMakeLocatorFilter</name> - <message> - <source>Build CMake target</source> - <translation>Собрать цель CMake</translation> - </message> </context> <context> <name>CMakeProjectManager::Internal::CMakeManager</name> @@ -5331,6 +5493,29 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou </message> </context> <context> + <name>CMakeProjectManager::Internal::CMakeProcess</name> + <message> + <source>Running %1 in %2.</source> + <translation>Работа %1 на %2.</translation> + </message> + <message> + <source>Configuring "%1"</source> + <translation>Настройка «%1»</translation> + </message> + <message> + <source>CMake process was canceled by the user.</source> + <translation>Процесс CMake был прерван пользователем.</translation> + </message> + <message> + <source>CMake process crashed.</source> + <translation>Процесс CMake завершился крахом.</translation> + </message> + <message> + <source>CMake process exited with exit code %1.</source> + <translation>Процесс CMake завершился с кодом %1.</translation> + </message> +</context> +<context> <name>CMakeProjectManager::Internal::CMakeProjectPlugin</name> <message> <source>CMake</source> @@ -5347,13 +5532,6 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou </message> </context> <context> - <name>CMakeProjectManager::Internal::CMakeRunConfiguration</name> - <message> - <source>The project no longer builds the target associated with this run configuration.</source> - <translation>Проект больше не собирает цель, ассоциированную с ним в конфигурации запуска.</translation> - </message> -</context> -<context> <name>CMakeProjectManager::Internal::CMakeSettingsPage</name> <message> <source>CMake</source> @@ -5422,6 +5600,39 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou </message> </context> <context> + <name>CMakeProjectManager::Internal::CMakeToolTreeItem</name> + <message> + <source>CMake executable path does not exist.</source> + <translation>Не найден путь к программе CMake.</translation> + </message> + <message> + <source>CMake executable path is not a file.</source> + <translation>Путь к программе CMake не является файлом.</translation> + </message> + <message> + <source>CMake executable path is not executable.</source> + <translation>Путь к программе CMake не исполняемый.</translation> + </message> +</context> +<context> + <name>CMakeProjectManager::Internal::FileApi</name> + <message> + <source><Build Directory></source> + <translation><Каталог сборки></translation> + </message> + <message> + <source><Other Locations></source> + <translation><Другие места></translation> + </message> +</context> +<context> + <name>CMakeProjectManager::Internal::OpenCMakeTargetLocatorFilter</name> + <message> + <source>Open CMake target</source> + <translation>Открыть цель CMake</translation> + </message> +</context> +<context> <name>CMakeProjectManager::Internal::ServerMode</name> <message> <source>Running "%1" in %2.</source> @@ -5573,22 +5784,6 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou <source>The build directory is not for %1 but for %2</source> <translation>Каталог сборки не для %1, а для %2</translation> </message> - <message> - <source>Running "%1 %2" in %3.</source> - <translation>Выполнение "%1 %2" в %3.</translation> - </message> - <message> - <source>Configuring "%1"</source> - <translation>Настройка «%1»</translation> - </message> - <message> - <source>*** cmake process crashed.</source> - <translation>*** процесс cmake аварийно завершился.</translation> - </message> - <message> - <source>*** cmake process exited with exit code %1.</source> - <translation>*** процесс cmake завершился с кодом %1.</translation> - </message> </context> <context> <name>CMakeTargetNode</name> @@ -5813,18 +6008,6 @@ However, using the relaxed and extended rules means also that no highlighting/co <context> <name>ClangDiagnosticConfigsModel</name> <message> - <source>Clang-only checks for questionable constructs</source> - <translation>Проверки Clang для сомнительных конструкций</translation> - </message> - <message> - <source>Clang-only pedantic checks</source> - <translation>Педантичные проверки Clang</translation> - </message> - <message> - <source>Clang-only checks for almost everything</source> - <translation>Проверки Clang для всего</translation> - </message> - <message> <source>Clang-Tidy thorough checks</source> <translation>Тщательные проверки Clang-Tidy</translation> </message> @@ -5841,6 +6024,10 @@ However, using the relaxed and extended rules means also that no highlighting/co <translation>Выбранные проверки Clang-Tidy и Clazy</translation> </message> <message> + <source>Checks for questionable constructs</source> + <translation>Проверки на сомнительные конструкции</translation> + </message> + <message> <source>Build-system warnings</source> <translation>Предупреждения системы сборки</translation> </message> @@ -5848,6 +6035,14 @@ However, using the relaxed and extended rules means also that no highlighting/co <source>%1 [built-in]</source> <translation>%1 [встроенный]</translation> </message> + <message> + <source>Pedantic checks</source> + <translation>Педантичные проверки</translation> + </message> + <message> + <source>Checks for almost everything</source> + <translation>Проверки всего</translation> + </message> </context> <context> <name>ClangDiagnosticWidget</name> @@ -5914,6 +6109,55 @@ However, using the relaxed and extended rules means also that no highlighting/co </message> </context> <context> + <name>ClangIndexingProjectSettingsWidget</name> + <message> + <source>Form</source> + <translation></translation> + </message> + <message> + <source>Reindex</source> + <translation>Переиндексировать</translation> + </message> +</context> +<context> + <name>ClangPchManager::ClangIndexingProjectSettingsWidget</name> + <message> + <source>Clang Indexing</source> + <translation>Индексация Clang</translation> + </message> +</context> +<context> + <name>ClangPchManager::PreprocessorMacroWidget</name> + <message> + <source>Macro already exists.</source> + <translation>Сценарий уже существует.</translation> + </message> + <message> + <source>Ed&it</source> + <translation>&Изменить</translation> + </message> + <message> + <source>&Add</source> + <translation>&Добавить</translation> + </message> + <message> + <source>&Reset</source> + <translation>&Вернуть</translation> + </message> + <message> + <source>&Unset</source> + <translation>&Сбросить</translation> + </message> + <message> + <source>Unset <a href="%1"><b>%1</b></a></source> + <translation>Сброшено значение <a href="%1"><b>%1</b></a></translation> + </message> + <message> + <source>Set <a href="%1"><b>%1</b></a> to <b>%2</b></source> + <translation>Присвоено <a href="%1"><b>%1</b></a> значение <b>%2</b></translation> + </message> +</context> +<context> <name>ClangPchProgressManager</name> <message> <source>Creating PCHs</source> @@ -5958,10 +6202,6 @@ However, using the relaxed and extended rules means also that no highlighting/co <translation>Описание:</translation> </message> <message> - <source>Context:</source> - <translation>Контекст:</translation> - </message> - <message> <source>Location:</source> <translation>Размещение:</translation> </message> @@ -5977,48 +6217,52 @@ However, using the relaxed and extended rules means also that no highlighting/co <translation>Сообщение:</translation> </message> <message> - <source>Extended message:</source> - <translation>Подробное сообщение:</translation> - </message> - <message> <source>Location:</source> <translation>Размещение:</translation> </message> </context> <context> - <name>ClangTools::Internal::ClangTidyClazyRunner</name> + <name>ClangTools::Internal::ClangTidyRunner</name> <message> - <source>Clang-Tidy and Clazy</source> - <translation>Clang-Tidy и Clazy</translation> + <source>Clang-Tidy</source> + <translation>Clang-Tidy</translation> </message> </context> <context> - <name>ClangTools::Internal::ClangTidyClazyTool</name> - <message> - <source>Go to previous diagnostic.</source> - <translation>Перейти к предыдущей проблеме.</translation> - </message> + <name>ClangTools::Internal::ClangTool</name> <message> - <source>Go to next diagnostic.</source> - <translation>Перейти к следующей проблеме.</translation> + <source>In general, the project should be built before starting the analysis to ensure that the code to analyze is valid.<br/><br/>Building the project might also run code generators that update the source files as necessary.</source> + <translation>Проект должен быть собран перед анализом, чтобы убедиться, что анализируемый код верен.<br/><br/>Сборка проекта так же может запускать кодогенераторы, которые обновляют при необходимости исходники.</translation> </message> <message> - <source>Apply Fixits</source> - <translation>Исправить</translation> + <source>Info About Build the Project Before Analysis</source> + <translation>Информация о сборке проекта перед анализом</translation> </message> <message> - <source>Clang-Tidy and Clazy</source> - <translation>Clang-Tidy и Clazy</translation> + <source>Analyze Project...</source> + <translation>Проанализировать проект...</translation> </message> <message> - <source>Clang-Tidy and Clazy...</source> - <translation>Clang-Tidy и Clazy...</translation> + <source>Analyze Current File</source> + <translation>Проанализировать текущий файл</translation> </message> <message> <source>Clang-Tidy and Clazy Diagnostics</source> <translation>Проблемы по Clang-Tidy и Clazy</translation> </message> <message> + <source>Go to previous diagnostic.</source> + <translation>Перейти к предыдущей проблеме.</translation> + </message> + <message> + <source>Go to next diagnostic.</source> + <translation>Перейти к следующей проблеме.</translation> + </message> + <message> + <source>Load Diagnostics from YAML Files exported with "-export-fixes".</source> + <translation>Загрузить проблемы из файлов YAML, созданных с помощью «-export-fixes».</translation> + </message> + <message> <source>Clear</source> <translation>Очистить</translation> </message> @@ -6035,24 +6279,56 @@ However, using the relaxed and extended rules means also that no highlighting/co <translation>Фильтр проблем</translation> </message> <message> + <source>Apply Fixits</source> + <translation>Применить исправления</translation> + </message> + <message> <source>Clang-Tidy and Clazy use a customized Clang executable from the Clang project to search for diagnostics.</source> <translation>Clang-Tidy и Clazy используют модифицированную программу Clang из проекта Clang для поиска проблем.</translation> </message> <message> + <source>Clang-Tidy and Clazy...</source> + <translation>Clang-Tidy и Clazy...</translation> + </message> + <message> + <source>Clang-Tidy and Clazy</source> + <translation>Clang-Tidy и Clazy</translation> + </message> + <message> <source>Clang-Tidy and Clazy tool stopped by user.</source> <translation>Утилиты Clang-Tidy и Clazy остановлены пользователем.</translation> </message> <message> - <source>Clang-Tidy and Clazy are still running.</source> - <translation>Clang-Tidy и Clazy ещё работают.</translation> + <source>Select YAML Files with Diagnostics</source> + <translation>Выбор файлов YAML с проблемами</translation> + </message> + <message> + <source>YAML Files (*.yml *.yaml);;All Files (*)</source> + <translation>Файлы YAML (*.yml *.yaml);;Все файлы (*)</translation> + </message> + <message> + <source>Error Loading Diagnostics</source> + <translation>Ошибка загрузки проблем</translation> + </message> + <message> + <source>All Files</source> + <translation>Все файлы</translation> </message> <message> - <source>Start Clang-Tidy and Clazy.</source> - <translation>Запуск Clang-Tidy и Clazy.</translation> + <source>Opened Files</source> + <translation>Открытые файлы</translation> </message> <message> - <source>This is not a C++ project.</source> - <translation>Это не проект на языке C++.</translation> + <source>Edited Files</source> + <translation>Изменённые файлы</translation> + </message> + <message> + <source>Clang-Tidy and Clazy are still running.</source> + <translation>Clang-Tidy и Clazy ещё работают.</translation> + </message> + <message> + <source>This is not a C/C++ project.</source> + <translation>Это не проект на C/C++.</translation> </message> <message numerus="yes"> <source>Running - %n diagnostics</source> @@ -6080,18 +6356,7 @@ However, using the relaxed and extended rules means also that no highlighting/co </message> </context> <context> - <name>ClangTools::Internal::ClangTool</name> - <message> - <source>In general, the project should be built before starting the analysis to ensure that the code to analyze is valid.<br/><br/>Building the project might also run code generators that update the source files as necessary.</source> - <translation>Проект должен быть собран перед анализом, чтобы убедиться, что анализируемый код верен.<br/><br/>Сборка проекта так же может запускать кодогенераторы, которые обновляют при необходимости исходники.</translation> - </message> - <message> - <source>Info About Build the Project Before Analysis</source> - <translation>Информация о сборке проекта перед анализом</translation> - </message> -</context> -<context> - <name>ClangTools::Internal::ClangToolRunControl</name> + <name>ClangTools::Internal::ClangToolRunWorker</name> <message> <source>Release</source> <translation>Выпуск</translation> @@ -6109,44 +6374,44 @@ However, using the relaxed and extended rules means also that no highlighting/co <translation>Продолжить запуск в режиме %1?</translation> </message> <message> - <source>%1: Can't find clang executable, stop.</source> - <translation>%1: не удалось найти программу clang, остановлено.</translation> - </message> - <message> <source>The project configuration changed since the start of the %1. Please re-run with current configuration.</source> <translation>Настройки проекта изменились с момента запуска %1. Перезапустите с текущей конфигурацией.</translation> </message> <message> - <source>Running %1 on %2</source> - <translation>Запуск %1 на %2</translation> + <source>Running %1 on %2 with configuration "%3".</source> + <translation>Выполнение %1 на %2 в конфигурации «%3».</translation> </message> <message> - <source>%1: Failed to create temporary dir, stop.</source> - <translation>%1: не удалось создать временный каталог, остановлено.</translation> + <source>%1: Failed to create temporary directory. Stopped.</source> + <translation>%1: не удалось создать временный каталог. Остановлено.</translation> </message> <message> - <source>%1 finished: Processed %2 files successfully, %3 failed.</source> - <translation>%1 завершено: успешно обработано %2 файл(ов) и %3 обработать не удалось.</translation> + <source>Analyzing</source> + <translation>Анализ</translation> </message> <message> - <source>%1: Not all files could be analyzed.</source> - <translation>%1: не все файлы возможно проанализировать.</translation> + <source>%1: Invalid executable "%2". Stopped.</source> + <translation>%1: неверная программа «%2». Остановлено.</translation> </message> <message> - <source>%1: You might need to build the project to generate or update source files. To build automatically, enable "Build the project before starting analysis".</source> - <translation>%1: возможно требуется пересобрать проект для создания или обновления исходных файлов. Включите «Собирать проект перед запуском анализа», чтобы он собирался автоматически.</translation> + <source>Analyzing "%1" [%2].</source> + <translation>Анализ «%1» [%2].</translation> </message> <message> - <source>Analyzing</source> - <translation>Анализ</translation> + <source>Failed to analyze "%1": %2</source> + <translation>Не удалось проанализировать «%1»: %2</translation> </message> <message> - <source>Analyzing "%1".</source> - <translation>Анализ «%1».</translation> + <source>%1 finished: Processed %2 files successfully, %3 failed.</source> + <translation>%1 завершено: успешно обработано %2 файл(ов) и %3 обработать не удалось.</translation> </message> <message> - <source>Failed to analyze "%1": %2</source> - <translation>Не удалось проанализировать «%1»: %2</translation> + <source>%1: Not all files could be analyzed.</source> + <translation>%1: не все файлы возможно проанализировать.</translation> + </message> + <message> + <source>%1: You might need to build the project to generate or update source files. To build automatically, enable "Build the project before starting analysis".</source> + <translation>%1: возможно требуется пересобрать проект для создания или обновления исходных файлов. Включите «Собирать проект перед запуском анализа», чтобы он собирался автоматически.</translation> </message> </context> <context> @@ -6175,24 +6440,6 @@ Output: </message> </context> <context> - <name>ClangTools::Internal::ClangToolsBasicSettings</name> - <message> - <source>Build the project before analysis</source> - <translation>Собирать проект перед анализом</translation> - </message> -</context> -<context> - <name>ClangTools::Internal::ClangToolsConfigWidget</name> - <message> - <source>General</source> - <translation>Основное</translation> - </message> - <message> - <source>Simultaneous processes:</source> - <translation>Одновременных процессов:</translation> - </message> -</context> -<context> <name>ClangTools::Internal::ClangToolsDiagnosticModel</name> <message> <source>Diagnostic</source> @@ -6238,6 +6485,20 @@ Output: </message> </context> <context> + <name>ClangTools::Internal::ClazyPluginRunner</name> + <message> + <source>Clazy</source> + <translation>Clazy</translation> + </message> +</context> +<context> + <name>ClangTools::Internal::ClazyStandaloneRunner</name> + <message> + <source>Clazy</source> + <translation>Clazy</translation> + </message> +</context> +<context> <name>ClangTools::Internal::DiagnosticView</name> <message> <source>Suppress This Diagnostic</source> @@ -6247,10 +6508,6 @@ Output: <context> <name>ClangTools::Internal::ProjectSettingsWidget</name> <message> - <source>Suppressed diagnostics:</source> - <translation>Игнорированные проблемы:</translation> - </message> - <message> <source>Remove Selected</source> <translation>Удалить выбранное</translation> </message> @@ -6258,25 +6515,52 @@ Output: <source>Remove All</source> <translation>Удалить всё</translation> </message> + <message> + <source>Use Global Settings</source> + <translation>Используются глобальные настройки</translation> + </message> + <message> + <source>Use Customized Settings</source> + <translation>Используются особые настройки</translation> + </message> + <message> + <source>Restore Global Settings</source> + <translation>Восстановить настройки</translation> + </message> + <message> + <source><a href="target">Show Global Settings</a></source> + <translation><a href="target">Показать глобальные</a></translation> + </message> + <message> + <source><a href="target">Go to Analyzer</a></source> + <translation><a href="target">Перейти к анализу</a></translation> + </message> + <message> + <source>Suppressed diagnostics</source> + <translation>Игнорируемые проблемы</translation> + </message> </context> <context> - <name>ClangTools::Internal::SelectableFilesDialog</name> + <name>ClangTools::Internal::RunSettingsWidget</name> <message> - <source>Analyzer Configuration</source> - <translation>Конфигурация анализатора</translation> + <source>Form</source> + <translation></translation> </message> <message> - <source>General</source> - <translation>Основное</translation> + <source>Run Options</source> + <translation>Параметры запуска</translation> </message> <message> - <source>Global Settings</source> - <translation>Глобальные настройки</translation> + <source>Build the project before analysis</source> + <translation>Собирать проект перед анализом</translation> </message> <message> - <source>Custom Settings</source> - <translation>Особые настройки</translation> + <source>Parallel jobs:</source> + <translation>Распараллелить на:</translation> </message> +</context> +<context> + <name>ClangTools::Internal::SelectableFilesDialog</name> <message> <source>Files to Analyze</source> <translation>Анализируемые файлы</translation> @@ -6291,23 +6575,38 @@ Output: </message> </context> <context> + <name>ClangTools::Internal::SettingsWidget</name> + <message> + <source>Executables</source> + <translation>Программы</translation> + </message> + <message> + <source>Clang-Tidy:</source> + <translation>Clang-Tidy:</translation> + </message> + <message> + <source>Clazy-Standalone:</source> + <translation>Clazy-Standalone:</translation> + </message> + <message> + <source>Clang-Tidy Executable</source> + <translation>Программа Clang-Tidy</translation> + </message> + <message> + <source>Clazy Executable</source> + <translation>Программа Clazy</translation> + </message> +</context> +<context> <name>ClangTools::Internal::SuppressedDiagnosticsModel</name> <message> <source>File</source> <translation>Файл</translation> </message> <message> - <source>Context</source> - <translation>Контекст</translation> - </message> - <message> <source>Diagnostic</source> <translation>Проблема</translation> </message> - <message> - <source>Function "%1"</source> - <translation>Функция «%1»</translation> - </message> </context> <context> <name>ClangUtils</name> @@ -8046,6 +8345,30 @@ Continue?</source> <source>Create Folder</source> <translation>Создать каталог</translation> </message> + <message> + <source>Settings File Error</source> + <translation>Ошибка файла настроек</translation> + </message> + <message> + <source>The settings file "%1" is not writable. +You will not be able to store any %2 settings.</source> + <translation>Файл настроек «%1» защищён от записи. +Нет возможности сохранить настройки %2.</translation> + </message> + <message> + <source>The file is not readable.</source> + <translation>Файл не читается.</translation> + </message> + <message> + <source>The file is invalid.</source> + <translation>Неверный файл.</translation> + </message> + <message> + <source>Error reading settings file "%1": %2 +You will likely experience further problems using this instance of %3.</source> + <translation>При чтении файла настроек «%1» возникла ошибка: %2 +Возможны проблемы при дальнейшем использованнии %3 без перезапуска.</translation> + </message> </context> <context> <name>Core::Internal::CurrentDocumentFind</name> @@ -8630,8 +8953,8 @@ Do you want to kill it?</source> <translation>Не удалось найти программу для «%1» (полностью «%2»)</translation> </message> <message> - <source>Starting external tool "%1" %2</source> - <translation>Запускается внешняя утилита «%1» %2</translation> + <source>Starting external tool "%1"</source> + <translation>Запускается внешняя утилита «%1»</translation> </message> <message> <source>"%1" finished</source> @@ -8655,6 +8978,22 @@ Do you want to kill it?</source> <source>Create and Open "%1"</source> <translation>Создать и открыть «%1»</translation> </message> + <message> + <source>Create File</source> + <translation>Создание файла</translation> + </message> + <message> + <source>Create "%1"?</source> + <translation>Создать «%1»?</translation> + </message> + <message> + <source>Always create</source> + <translation>Создавать всегда</translation> + </message> + <message> + <source>Create</source> + <translation>Создать</translation> + </message> </context> <context> <name>Core::Internal::FileSystemFilterOptions</name> @@ -8834,6 +9173,10 @@ Do you want to kill it?</source> <translation><Системный></translation> </message> <message> + <source>Show keyboard shortcuts in context menus (default: %1)</source> + <translation>Показывать сочетания клавиш в контекстном меню (по умолчанию: %1)</translation> + </message> + <message> <source>Restart Required</source> <translation>Требуется перезапуск</translation> </message> @@ -8887,11 +9230,6 @@ Do you want to kill it?</source> <source>Enable high DPI scaling</source> <translation>Масштабировать при большом DPI</translation> </message> - <message> - <source>High DPI scaling:</source> - <translatorcomment>На форме полный перевод выглядит коряво</translatorcomment> - <translation>Высокий DPI:</translation> - </message> </context> <context> <name>Core::Internal::JavaScriptFilter</name> @@ -10038,6 +10376,10 @@ Do you want to kill it?</source> <source>Command line arguments used for "Run in terminal".</source> <translation>Параметры командной строки для «Запустить в терминале».</translation> </message> + <message> + <source>Maximum number of entries in "Recent Files":</source> + <translation>Максимальное число записей в меню «Недавние файлы»:</translation> + </message> </context> <context> <name>Core::Internal::ThemeChooser</name> @@ -10299,11 +10641,11 @@ Do you want to check them out now?</source> </message> <message> <source>Insert Unexpanded Value</source> - <translation>Вставить неразворачиваемое значение</translation> + <translation>Вставить неразвёрнутое значение</translation> </message> <message> <source>Insert Expanded Value</source> - <translation>Вставить разворачиваемое значение</translation> + <translation>Вставить развёрнутое значение</translation> </message> <message> <source>Select a variable to insert.</source> @@ -10713,8 +11055,8 @@ to version control (%2) <translation>Свернуть</translation> </message> <message> - <source><b>Warning</b>: This file is not part of any project. The code model might have issues to parse this file properly.</source> - <translation><b>Внимание!</b> Этот файл не является частью какого-либо проекта. Модель кода может не разобрать его корректно.</translation> + <source><b>Warning</b>: This file is not part of any project. The code model might have issues parsing this file properly.</source> + <translation><b>Внимание!</b> Этот файл не является частью какого-либо проекта. У модели кода могут возникнуть сложности при его разборе.</translation> </message> <message> <source><b>Warning</b>: The code model could not parse an included file, which might lead to incorrect code completion and highlighting, for example.</source> @@ -11084,10 +11426,6 @@ to version control (%2) <source>Clang Code Model</source> <translation>Модель кода Clang</translation> </message> - <message> - <source>The selected configuration has potentially expensive Clang-Tidy or Clazy checks enabled.<br/>Consider to run these in a separate <a href="target">Clang-Tidy and Clazy analyzer</a> run.</source> - <translation>Выбранная конфигурация включает потенциально тяжёлые проверки Clang-Tidy или Clazy.<br/>Возможно, их стоит выделить в отдельный запуск <a href="target">анализатора Clang-Tidy и Clazy</a>.</translation> - </message> </context> <context> <name>CppTools::Internal::CppCodeStyleSettingsPage</name> @@ -11850,6 +12188,156 @@ Flags: %3</source> </message> </context> <context> + <name>CtfVisualizer::Internal::CtfStatisticsModel</name> + <message> + <source>Title</source> + <translation>Заголовок</translation> + </message> + <message> + <source>Count</source> + <translation>Число</translation> + </message> + <message> + <source>Total Time</source> + <translation>Общее время</translation> + </message> + <message> + <source>Minimum Time</source> + <translation>Минимальное время</translation> + </message> + <message> + <source>Average Time</source> + <translation>Среднее время</translation> + </message> + <message> + <source>Maximum Time</source> + <translation>Максимальное время</translation> + </message> +</context> +<context> + <name>CtfVisualizer::Internal::CtfTimelineModel</name> + <message> + <source>Stack Level %1</source> + <translation>Уровень %1 стека</translation> + </message> + <message> + <source>Start</source> + <translation>Начало</translation> + </message> + <message> + <source>Wall Duration</source> + <translation type="unfinished">Продолжительность</translation> + </message> + <message> + <source>Unfinished</source> + <translation>Незавершено</translation> + </message> + <message> + <source>true</source> + <translation>true</translation> + </message> + <message> + <source>> Thread %1</source> + <translation>> Поток %1</translation> + </message> + <message> + <source>Categories</source> + <translation>Категории</translation> + </message> + <message> + <source>Arguments</source> + <translation>Параметры</translation> + </message> + <message> + <source>Instant</source> + <translation>Момент</translation> + </message> + <message> + <source>Scope</source> + <translation>Область</translation> + </message> + <message> + <source>global</source> + <translation>глобальная</translation> + </message> + <message> + <source>process</source> + <translation>процесс</translation> + </message> + <message> + <source>thread</source> + <translation>поток</translation> + </message> + <message> + <source>Return Arguments</source> + <translation>Возвращаемые аргументы</translation> + </message> +</context> +<context> + <name>CtfVisualizer::Internal::CtfTraceManager</name> + <message> + <source>CTF Visualizer</source> + <translation>Визуализатор CTF</translation> + </message> + <message> + <source>Cannot read the CTF file.</source> + <translation>Не удалось прочитать файл CTF.</translation> + </message> + <message> + <source>The trace contains threads with stack depth > 512. +Do you want to display them anyway?</source> + <translation>Трассировка содержит потоки с глубиной стека > 512. +Всё равно отобразить?</translation> + </message> +</context> +<context> + <name>CtfVisualizer::Internal::CtfVisualizerTool</name> + <message> + <source>Chrome Trace Format Viewer</source> + <translation>Просмотрщик Chrome Trace Format</translation> + </message> + <message> + <source>Load JSON File</source> + <translation>Загрузить файл JSON</translation> + </message> + <message> + <source>Timeline</source> + <translation>Временная шкала</translation> + </message> + <message> + <source>Reset Zoom</source> + <translation>Сбросить приближение</translation> + </message> + <message> + <source>Statistics</source> + <translation>Статистика</translation> + </message> + <message> + <source>Load Chrome Trace Format File</source> + <translation>Загрузить файл Chrome Trace Format</translation> + </message> + <message> + <source>JSON File (*.json)</source> + <translation>Файл JSON (*.json)</translation> + </message> + <message> + <source>CTF Visualizer</source> + <translation>Визуализатор CTF</translation> + </message> + <message> + <source>The file does not contain any trace data.</source> + <translation>Файл не содержит данных трассировки.</translation> + </message> + <message> + <source>Loading CTF File</source> + <translation>Загрузка файла CTF</translation> + </message> + <message> + <source>Chrome Trace Format Visualizer</source> + <translation>Визуализатор Chrome Trace Format</translation> + </message> +</context> +<context> <name>CustomExecutableDialog</name> <message> <source>Could not find the executable, please specify one.</source> @@ -12475,6 +12963,26 @@ Flags: %3</source> <source>Debugger settings</source> <translation>Настройки отладчика</translation> </message> + <message> + <source>Enable C++</source> + <translation>Включить C++</translation> + </message> + <message> + <source>Enable QML</source> + <translation>Включить QML</translation> + </message> + <message> + <source><a href="qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html">What are the prerequisites?</a></source> + <translation><a href="qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html">Зачем нужно?</a></translation> + </message> + <message> + <source>Enable Debugging of Subprocesses</source> + <translation>Допускать отладку дочерних процессов</translation> + </message> + <message> + <source>Additional startup commands:</source> + <translation>Дополнительные команды запуска:</translation> + </message> </context> <context> <name>Debugger::DebuggerRunTool</name> @@ -12798,6 +13306,10 @@ Flags: %3</source> <translation>&Спецификация потока:</translation> </message> <message> + <source>Propagate Change to Preset Breakpoint</source> + <translation>Распространять изменения на предустановленные точки останова</translation> + </message> + <message> <source>&Condition:</source> <translation>&Условие:</translation> </message> @@ -13685,6 +14197,46 @@ If you build %2 from sources and want to use a CDB executable with another bitne <translation>Выберите корректное выражение для вычисления.</translation> </message> <message> + <source>Symbol</source> + <translation>Символ</translation> + </message> + <message> + <source>Address</source> + <translation>Адрес</translation> + </message> + <message> + <source>Code</source> + <translation>Код</translation> + </message> + <message> + <source>Section</source> + <translation>Секция</translation> + </message> + <message> + <source>Name</source> + <translation>Имя</translation> + </message> + <message> + <source>Symbols in "%1"</source> + <translation>Символы в «%1»</translation> + </message> + <message> + <source>From</source> + <translation>От</translation> + </message> + <message> + <source>To</source> + <translation>Кому</translation> + </message> + <message> + <source>Flags</source> + <translation>Флаги</translation> + </message> + <message> + <source>Sections in "%1"</source> + <translation>Секции в «%1»</translation> + </message> + <message> <source>The inferior is in the Portable Executable format. Selecting %1 as debugger would improve the debugging experience for this binary format.</source> <translation>Программа имеет формат Portable Executable. @@ -13846,6 +14398,10 @@ Setting breakpoints by file name and line number may fail.</source> <translation>&Регистры</translation> </message> <message> + <source>Peripheral Reg&isters</source> + <translation>Регистры пери&ферии</translation> + </message> + <message> <source>&Stack</source> <translation>&Стек</translation> </message> @@ -13936,51 +14492,6 @@ Setting breakpoints by file name and line number may fail.</source> <translation>Процесс %1</translation> </message> <message> - <source>Symbol</source> - <translation>Символ</translation> - </message> - <message> - <source>Address</source> - <translation>Адрес</translation> - </message> - <message> - <source>Code</source> - <translation>Код</translation> - </message> - <message> - <source>Section</source> - <translation>Секция</translation> - </message> - <message> - <source>Name</source> - <translation>Имя</translation> - </message> - <message> - <source>Symbols in "%1"</source> - <translation>Символы в «%1»</translation> - </message> - <message> - <source>From</source> - <translation>От</translation> - </message> - <message> - <source>To</source> - <translation>Кому</translation> - </message> - <message> - <source>Flags</source> - <translation>Флаги</translation> - </message> - <message> - <source>Sections in "%1"</source> - <translation>Секции в «%1»</translation> - </message> - <message> - <source>Debugger</source> - <extracomment>Category under which Analyzer tasks are listed in Issues view</extracomment> - <translation>Отладчик</translation> - </message> - <message> <source>Cannot start %1 without a project. Please open the project and try again.</source> <translation>Невозможно запустить %1 без проекта. Откройте проект и попробуйте снова.</translation> </message> @@ -14260,6 +14771,7 @@ Affected are breakpoints %1</source> </message> <message> <source>Debugger</source> + <extracomment>Category under which Analyzer tasks are listed in Issues view</extracomment> <translation>Отладчик</translation> </message> <message> @@ -15596,6 +16108,65 @@ You may be asked to share the contents of this log when reporting bugs related t </message> </context> <context> + <name>Debugger::Internal::PeripheralRegisterHandler</name> + <message> + <source>RO</source> + <translation>RO</translation> + </message> + <message> + <source>WO</source> + <translation>WO</translation> + </message> + <message> + <source>RW</source> + <translation>RW</translation> + </message> + <message> + <source>N/A</source> + <translation>Н/Д</translation> + </message> + <message> + <source>[%1..%2]</source> + <translation>[%1..%2]</translation> + </message> + <message> + <source>Name</source> + <translation>Имя</translation> + </message> + <message> + <source>Value</source> + <translation>Значение</translation> + </message> + <message> + <source>Access</source> + <translation>Доступ</translation> + </message> + <message> + <source>View Groups</source> + <translation>Просмотр групп</translation> + </message> + <message> + <source>Format</source> + <translation>Формат</translation> + </message> + <message> + <source>Hexadecimal</source> + <translation>Шестнадцатеричный</translation> + </message> + <message> + <source>Decimal</source> + <translation>Десятичный</translation> + </message> + <message> + <source>Octal</source> + <translation>Восьмеричный</translation> + </message> + <message> + <source>Binary</source> + <translation>Двоичный</translation> + </message> +</context> +<context> <name>Debugger::Internal::QmlEngine</name> <message> <source>No application output received in time</source> @@ -15616,8 +16187,8 @@ Do you want to retry?</source> <translation>Не удалось подключиться к внутрипроцессному отладчику QML. %1</translation> </message> <message> - <source>Starting %1 %2</source> - <translation>Запускается %1 %2</translation> + <source>Starting %1</source> + <translation>Запускается %1</translation> </message> <message> <source>Waiting for JavaScript engine to interrupt on next statement.</source> @@ -15755,29 +16326,6 @@ Do you want to retry?</source> </message> </context> <context> - <name>Debugger::Internal::RunConfigWidget</name> - <message> - <source>Enable C++</source> - <translation>Включить C++</translation> - </message> - <message> - <source>Enable QML</source> - <translation>Включить QML</translation> - </message> - <message> - <source>Debug port:</source> - <translation>Порт отладки:</translation> - </message> - <message> - <source><a href="qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html">What are the prerequisites?</a></source> - <translation><a href="qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html">Зачем нужно?</a></translation> - </message> - <message> - <source>Enable Debugging of Subprocesses</source> - <translation>Допускать отладку дочерних процессов</translation> - </message> -</context> -<context> <name>Debugger::Internal::SelectRemoteFileDialog</name> <message> <source>Download of remote file succeeded.</source> @@ -17638,10 +18186,6 @@ Rebuilding the project might help.</source> <source>Insert Keyframe</source> <translation>Вставить ключевой кадр</translation> </message> - <message> - <source>Binding Editor</source> - <translation>Редактор привязок</translation> - </message> </context> <context> <name>ExtensionSystem::Internal::PluginDetailsView</name> @@ -18456,10 +19000,6 @@ will also disable the following plugins: <source>No data available</source> <translation>Нет данных</translation> </message> - <message> - <source>Visualize %1</source> - <translation>Отобразить %1</translation> - </message> </context> <context> <name>FlickableSection</name> @@ -18806,6 +19346,21 @@ See also Google Test settings.</source> </message> </context> <context> + <name>GenerateResource</name> + <message> + <source>Generate Resource File</source> + <translation>Создать файл ресурсов</translation> + </message> + <message> + <source>Save Project As Resource</source> + <translation>Сохранить проект как ресурс</translation> + </message> + <message> + <source>QML Resource File (*.qmlrc)</source> + <translation>Файл ресурсов QML (*.qmlrc)</translation> + </message> +</context> +<context> <name>GenericProjectManager::Internal::FilesSelectionWizardPage</name> <message> <source>Files</source> @@ -18837,6 +19392,14 @@ See also Google Test settings.</source> <source>Edit Files...</source> <translation>Изменить файлы...</translation> </message> + <message> + <source>Remove Directory</source> + <translation>Внешний каталог</translation> + </message> + <message> + <source>Project files list update failed.</source> + <translation>Не удалось обновить список файлов проекта.</translation> + </message> </context> <context> <name>GenericProjectManager::Internal::GenericProjectWizard</name> @@ -19629,6 +20192,10 @@ Would you like to terminate it?</source> <source>Select a Git Commit</source> <translation>Выбор фиксации Git</translation> </message> + <message> + <source>&Archive...</source> + <translation>&Сжать...</translation> + </message> </context> <context> <name>Git::Internal::CommitData</name> @@ -19638,7 +20205,7 @@ Would you like to terminate it?</source> </message> <message> <source>staged + </source> - <translation>подготовлен +</translation> + <translation>подготовлен + </translation> </message> <message> <source>modified</source> @@ -20037,6 +20604,26 @@ Commit now?</source> <translation>Не удалось получить данные последней фиксации хранилища «%1».</translation> </message> <message> + <source>Tarball (*.tar.gz)</source> + <translation>Тарбол (*.tar.gz)</translation> + </message> + <message> + <source>Zip archive (*.zip)</source> + <translation>Архив Zip (*.zip)</translation> + </message> + <message> + <source>Generate %1 archive</source> + <translation>Создание архива %1</translation> + </message> + <message> + <source>Overwrite?</source> + <translation>Перезаписать?</translation> + </message> + <message> + <source>An item named "%1" already exists at this location. Do you want to overwrite it?</source> + <translation>Элемент с названием «%1» уже существует в указанном месте. Желаете его перезаписать?</translation> + </message> + <message> <source>Reset</source> <translation>Сброс</translation> </message> @@ -20218,6 +20805,14 @@ Commit now?</source> <translation>Показать граф журнала в ASCII графике.</translation> </message> <message> + <source>Follow</source> + <translation>Следовать</translation> + </message> + <message> + <source>Show log also for previous names of the file.</source> + <translation>Показывать историю до переименования файла.</translation> + </message> + <message> <source>Reload</source> <translation>Перезагрузить</translation> </message> @@ -20589,6 +21184,10 @@ Commit now?</source> <translation>Перейти...</translation> </message> <message> + <source>Archive...</source> + <translation>Сжать...</translation> + </message> + <message> <source>Rebase...</source> <translation>Перебазировать...</translation> </message> @@ -21565,6 +22164,15 @@ Add, modify, and remove document filters, which determine the documentation set <translation>Основное</translation> </message> <message> + <source>Change takes effect after reloading help pages.</source> + <translation>Изменения вступят в силу после перезагрузки страниц справки.</translation> + </message> + <message> + <source>Default (%1)</source> + <comment>Default viewer backend</comment> + <translation>По умолчанию (%1)</translation> + </message> + <message> <source>Import Bookmarks</source> <translation>Импорт закладок</translation> </message> @@ -21684,6 +22292,10 @@ Add, modify, and remove document filters, which determine the documentation set <source>Enable scroll wheel zooming</source> <translation>Масштабирование колесом прокрутки</translation> </message> + <message> + <source>Viewer backend:</source> + <translation>Просмотрщик:</translation> + </message> </context> <context> <name>Help::Internal::HelpIndexFilter</name> @@ -21772,6 +22384,10 @@ Add, modify, and remove document filters, which determine the documentation set <context> <name>Help::Internal::HelpWidget</name> <message> + <source>(Untitled)</source> + <translation>(Без имени)</translation> + </message> + <message> <source>Open in Help Mode</source> <translation>Открыть в режиме справки</translation> </message> @@ -21800,6 +22416,10 @@ Add, modify, and remove document filters, which determine the documentation set <translation>Ctrl+M</translation> </message> <message> + <source>Open Online Documentation...</source> + <translation>Открыть онлайн документацию...</translation> + </message> + <message> <source>Increase Font Size</source> <translation>Увеличить шрифт</translation> </message> @@ -21812,6 +22432,10 @@ Add, modify, and remove document filters, which determine the documentation set <translation>Восстановить размер шрифта</translation> </message> <message> + <source>Open in Edit Mode</source> + <translation>Открыть в режиме редактирования</translation> + </message> + <message> <source>Open in New Page</source> <translation>Открыть на новой странице</translation> </message> @@ -21820,6 +22444,10 @@ Add, modify, and remove document filters, which determine the documentation set <translation>Отрыть в окне</translation> </message> <message> + <source>Reload</source> + <translation>Перезагрузить</translation> + </message> + <message> <source>Meta+Shift+C</source> <translation>Meta+Shift+C</translation> </message> @@ -21900,17 +22528,40 @@ Add, modify, and remove document filters, which determine the documentation set </message> </context> <context> - <name>Help::Internal::OpenPagesManager</name> + <name>Help::Internal::LiteHtmlHelpViewer</name> <message> - <source>Copy Full Path to Clipboard</source> - <translation>Скопировать полный путь в буфер обмена</translation> + <source>Copy Link</source> + <translation>Скопировать ссылку</translation> + </message> + <message> + <source>Copy</source> + <translation>Копировать</translation> </message> </context> <context> - <name>Help::Internal::OpenPagesModel</name> + <name>Help::Internal::LocalHelpManager</name> <message> - <source>(Untitled)</source> - <translation>(Без имени)</translation> + <source>QtWebEngine</source> + <translation>QtWebEngine</translation> + </message> + <message> + <source>litehtml</source> + <translation>litehtml</translation> + </message> + <message> + <source>WebKit</source> + <translation>WebKit</translation> + </message> + <message> + <source>QTextBrowser</source> + <translation>QTextBrowser</translation> + </message> +</context> +<context> + <name>Help::Internal::OpenPagesManager</name> + <message> + <source>Copy Full Path to Clipboard</source> + <translation>Скопировать полный путь в буфер обмена</translation> </message> </context> <context> @@ -22009,10 +22660,6 @@ Add, modify, and remove document filters, which determine the documentation set <source>Copy</source> <translation>Копировать</translation> </message> - <message> - <source>Reload</source> - <translation>Перезагрузить</translation> - </message> </context> <context> <name>Help::Internal::XbelReader</name> @@ -22218,8 +22865,7 @@ Add, modify, and remove document filters, which determine the documentation set <name>HoverHandler</name> <message> <source>Got unsupported markup hover content: </source> - <translatorcomment>Идей перевода нет. Все равно это то, что идет в лог.</translatorcomment> - <translation type="unfinished"></translation> + <translation>Получен неподдерживаемый форматированный текст под курсором: </translation> </message> </context> <context> @@ -22613,6 +23259,11 @@ Ids must begin with a lowercase letter.</source> <translation>Доп. параметры:</translation> </message> <message> + <source>iOS build</source> + <comment>iOS BuildStep display name.</comment> + <translation>Сборка iOS</translation> + </message> + <message> <source>xcodebuild</source> <translation>xcodebuild</translation> </message> @@ -22622,14 +23273,6 @@ Ids must begin with a lowercase letter.</source> </message> </context> <context> - <name>Ios::Internal::IosBuildStepConfigWidget</name> - <message> - <source>iOS build</source> - <comment>iOS BuildStep display name.</comment> - <translation>Сборка iOS</translation> - </message> -</context> -<context> <name>Ios::Internal::IosConfigurations</name> <message> <source>%1 Simulator</source> @@ -22687,7 +23330,7 @@ Ids must begin with a lowercase letter.</source> </message> <message> <source>Deploy to iOS device or emulator</source> - <translation>Установка на устройство или эмулятор iOS</translation> + <translation>Развёртывание на устройство или эмулятор iOS</translation> </message> </context> <context> @@ -23188,6 +23831,102 @@ Error: %5</translation> <translation>Компоновка</translation> </message> <message> + <source>Align</source> + <translation>Выравнивание</translation> + </message> + <message> + <source>Align objects</source> + <translation>Выравнивание объектов</translation> + </message> + <message> + <source>Align objects to left edge</source> + <translation>Выравнивание объектов по левому краю</translation> + </message> + <message> + <source>Align objects horizontal center</source> + <translation>Горизонтальное выравнивание объектов по центру</translation> + </message> + <message> + <source>Align objects to right edge</source> + <translation>Выравнивание объектов по правому краю</translation> + </message> + <message> + <source>Align objects to top edge</source> + <translation>Выравнивание объектов по верхнему краю</translation> + </message> + <message> + <source>Align objects vertical center</source> + <translation>Вертикальное выравнивание объектов по центру</translation> + </message> + <message> + <source>Align objects to bottom edge</source> + <translation>Выравнивание объектов по нижнему краю</translation> + </message> + <message> + <source>Distribute objects</source> + <translation>Распределение объектов</translation> + </message> + <message> + <source>Distribute objects left edge</source> + <translation>Распределение объектов по левому краю</translation> + </message> + <message> + <source>Distribute objects horizontal center</source> + <translation>Горизонтальное распределение объектов по центру</translation> + </message> + <message> + <source>Distribute objects right edge</source> + <translation>Распределение объектов по правому краю</translation> + </message> + <message> + <source>Distribute objects top edge</source> + <translation>Распределение объектов по верхнему краю</translation> + </message> + <message> + <source>Distribute objects vertical center</source> + <translation>Вертикальное распределение объектов по центру</translation> + </message> + <message> + <source>Distribute objects bottom edge</source> + <translation>Распределение объектов по нижнему краю</translation> + </message> + <message> + <source>Distribute spacing</source> + <translation>Распределение пространства</translation> + </message> + <message> + <source>Distribute spacing horizontal</source> + <translation>Горизонтальное распределение пространства</translation> + </message> + <message> + <source>Distribute spacing vertical</source> + <translation>Вертикальное распределение пространства</translation> + </message> + <message> + <source>Align to</source> + <translation>Выровнять по</translation> + </message> + <message> + <source>Key object</source> + <translation>Ключевой объект</translation> + </message> + <message> + <source>Warning</source> + <translation>Предупреждение</translation> + </message> + <message> + <source>- The selection contains the root item.</source> + <translation>- Выбор содержит корневой элемент.</translation> + </message> + <message> + <source>- The selection contains a non visual item.</source> + <translation>- Выбор содержит неотображаемый элемент.</translation> + </message> + <message> + <source>- An item in the selection uses anchors.</source> + <translation>- Выбранный элемент использует привязки.</translation> + </message> + <message> <source>Advanced</source> <translation>Дополнительно</translation> </message> @@ -23250,6 +23989,13 @@ Error: %5</translation> </message> </context> <context> + <name>Language</name> + <message> + <source>None</source> + <translation>Отсутствует</translation> + </message> +</context> +<context> <name>LanguageClient</name> <message> <source>Language Client</source> @@ -23509,10 +24255,6 @@ Error: %5</translation> <translation>Максимальный размер в компоновщике.</translation> </message> <message> - <source>Margins</source> - <translation>Внешние отступы</translation> - </message> - <message> <source>Row span</source> <translation>Межстрочный интервал</translation> </message> @@ -23664,6 +24406,10 @@ Error: %5</translation> <source>File "%1" does not exist or is not readable.</source> <translation>Файл «%1» не существует или не читается.</translation> </message> + <message> + <source>Error: Failed to parse YAML file "%1": %2.</source> + <translation>Ошибка: Не удалось разобрать файл YAML «%1»: %2.</translation> + </message> </context> <context> <name>Macros</name> @@ -24073,6 +24819,101 @@ Error: %5</translation> </message> </context> <context> + <name>McuSupport::Internal::FlashAndRunConfiguration</name> + <message> + <source>Effective flash and run call:</source> + <translation>Команда прошивки и запуска:</translation> + </message> + <message> + <source>Flash and run</source> + <translation>Прошивка и запуск</translation> + </message> +</context> +<context> + <name>McuSupport::Internal::McuSupportDevice</name> + <message> + <source>MCU Device</source> + <translation>Микроконтроллер</translation> + </message> +</context> +<context> + <name>McuSupport::Internal::McuSupportDeviceFactory</name> + <message> + <source>MCU Device</source> + <translation>Микроконтроллер</translation> + </message> +</context> +<context> + <name>McuSupport::Internal::McuSupportOptionsPage</name> + <message> + <source>Target:</source> + <translation>Цель:</translation> + </message> + <message> + <source>Packages</source> + <translation>Пакеты</translation> + </message> + <message> + <source>No kits can currently be generated. Select a target and provide the package paths. Afterwards, press Apply to generate a kit for your board.</source> + <translation>Невозможно сейчас создать комплект. Выберите цель и укажите пути к пакету. Затем создайте комплект для вашей платы нажав Применить.</translation> + </message> + <message> + <source>Kits for the following targets can be generated: %1 Press Apply to generate a kit for your target.</source> + <translation>Могут быть созданы комплекты для следующих целей: %1. Создайте комплект для вашей цели нажав Применить.</translation> + </message> + <message> + <source>MCU</source> + <translation>Микроконтроллер</translation> + </message> +</context> +<context> + <name>McuSupport::Internal::PackageOptions</name> + <message> + <source>Download from "%1"</source> + <translation>Загрузить по «%1»</translation> + </message> + <message> + <source>Path is valid, "%1" was found.</source> + <translation>Путь верен, «%1» найден.</translation> + </message> + <message> + <source>Path exists, but does not contain "%1".</source> + <translation>Путь существует, но не содержит «%1».</translation> + </message> + <message> + <source>Path does not exist.</source> + <translation>Путь не существует.</translation> + </message> + <message> + <source>Qt MCU SDK</source> + <translation>Qt SDK для микроконтроллеров</translation> + </message> + <message> + <source>GNU Arm Embedded Toolchain</source> + <translation>GNU Arm Embedded Toolchain</translation> + </message> + <message> + <source>STM32Cube SDK</source> + <translation>STM32Cube SDK</translation> + </message> + <message> + <source>STM32CubeProgrammer</source> + <translation>STM32CubeProgrammer</translation> + </message> + <message> + <source>NXP i.MXRT SDK</source> + <translation>NXP i.MXRT SDK</translation> + </message> + <message> + <source>SEGGER JLink</source> + <translation>SEGGER JLink</translation> + </message> + <message> + <source>Arm GDB at %1</source> + <translation>Arm GDB в %1</translation> + </message> +</context> +<context> <name>Mercurial::Internal::AuthenticationDialog</name> <message> <source>Dialog</source> @@ -24854,6 +25695,10 @@ Error: %5</translation> <translation>Этап очистки компилятора Nim</translation> </message> <message> + <source>Working directory:</source> + <translation>Рабочий каталог:</translation> + </message> + <message> <source>Build directory "%1" does not exist.</source> <translation>Каталог сборки «%1» отсутствует.</translation> </message> @@ -24869,12 +25714,9 @@ Error: %5</translation> <source>Clean step completed successfully.</source> <translation>Этап очистки завершился успешно.</translation> </message> -</context> -<context> - <name>Nim::NimCompilerCleanStepConfigWidget</name> <message> - <source>Working directory:</source> - <translation>Рабочий каталог:</translation> + <source>Nim Compiler Clean Step</source> + <translation>Этап очистки компилятора Nim</translation> </message> </context> <context> @@ -24888,10 +25730,6 @@ Error: %5</translation> <context> <name>Nim::NimProject</name> <message> - <source>Scanning for Nim files</source> - <translation>Поиск файлов Nim</translation> - </message> - <message> <source>No Nim compiler set.</source> <translation>Компилятор Nim не задан.</translation> </message> @@ -24988,20 +25826,6 @@ Error: %5</translation> </message> </context> <context> - <name>NimCompilerCleanStepFactory</name> - <message> - <source>Nim Compiler Clean Step</source> - <translation>Этап очистки компилятора Nim</translation> - </message> -</context> -<context> - <name>NimCompilerCleanStepWidget</name> - <message> - <source>Nim clean step</source> - <translation>Этап очистки Nim</translation> - </message> -</context> -<context> <name>NimToolsSettingsPage</name> <message> <source>Tools</source> @@ -25081,6 +25905,10 @@ Error: %5</translation> <source>SCXML Editor</source> <translation>Редактор SCXML</translation> </message> + <message> + <source>Qt Quick Designer</source> + <translation>Дизайнер Qt Quick</translation> + </message> </context> <context> <name>PaddingSection</name> @@ -26732,6 +27560,10 @@ Error: %5</translation> <translation>Параметры</translation> </message> <message> + <source>Toggle multi-line mode</source> + <translation>Переключение многострочного режима</translation> + </message> + <message> <source>Command line arguments:</source> <translation>Параметры командной строки:</translation> </message> @@ -26774,6 +27606,14 @@ Error: %5</translation> <source>Clean Environment</source> <translation>Чистая среда</translation> </message> + <message> + <source>The project is currently being parsed.</source> + <translation>Проект ещё разбирается.</translation> + </message> + <message> + <source>The project was not parsed successfully.</source> + <translation>Не удалось разобрать проект.</translation> + </message> </context> <context> <name>ProjectExplorer::BuildEnvironmentWidget</name> @@ -26868,6 +27708,11 @@ Error: %5</translation> <extracomment>Display name of the clean build step list. Used as part of the labels in the project window.</extracomment> <translation>Очистка</translation> </message> + <message> + <source>Deploy</source> + <extracomment>Display name of the deploy build step list. Used as part of the labels in the project window.</extracomment> + <translation>Развёртывание</translation> + </message> </context> <context> <name>ProjectExplorer::BuildableHelperLibrary</name> @@ -26939,14 +27784,6 @@ Error: %5</translation> <context> <name>ProjectExplorer::CustomWizard</name> <message> - <source>URI:</source> - <translation>URI:</translation> - </message> - <message> - <source>The project name and the object class-name cannot be the same.</source> - <translation>Название проекта и имя класса объекта не могут совпадать.</translation> - </message> - <message> <source>Creates a custom Qt Creator plugin.</source> <translation>Создание особого подключаемого модуля для Qt Creator.</translation> </message> @@ -26959,14 +27796,6 @@ Error: %5</translation> <translation>URL:</translation> </message> <message> - <source>Object class-name:</source> - <translation>Имя класса объекта:</translation> - </message> - <message> - <source>Qt Quick 2 Extension Plugin</source> - <translation>Модуль, расширяющий Qt Quick 2</translation> - </message> - <message> <source>Qt Creator Plugin</source> <translation>Модуль Qt Creator</translation> </message> @@ -27054,14 +27883,6 @@ Error: %5</translation> <source>Local user settings</source> <translation>Локальные настройки пользователя</translation> </message> - <message> - <source>Custom QML Extension Plugin Parameters</source> - <translation>Параметры особого модуля расширяющего QML</translation> - </message> - <message> - <source>Creates a C++ plugin to load extensions dynamically into applications using the QQmlEngine class. Requires Qt 5.0 or newer.</source> - <translation>Создание C++ модуля для динамической загрузки расширений в приложение, использующее класс QQmlEngine. Требуется Qt версии 5.0 или выше.</translation> - </message> </context> <context> <name>ProjectExplorer::DebuggingHelperLibrary</name> @@ -27087,11 +27908,6 @@ Error: %5</translation> <context> <name>ProjectExplorer::DeployConfiguration</name> <message> - <source>Deploy</source> - <extracomment>Display name of the deploy build step list. Used as part of the labels in the project window.</extracomment> - <translation>Развёртывание</translation> - </message> - <message> <source>Deploy locally</source> <extracomment>Default DeployConfiguration display name</extracomment> <translation>Локальное развёртывание</translation> @@ -27107,24 +27923,6 @@ Error: %5</translation> </message> </context> <context> - <name>ProjectExplorer::DeploymentDataModel</name> - <message> - <source>Local File Path</source> - <translation>Путь к локальному файлу</translation> - </message> - <message> - <source>Remote Directory</source> - <translation>Внешний каталог</translation> - </message> -</context> -<context> - <name>ProjectExplorer::DeploymentDataView</name> - <message> - <source>Files to deploy:</source> - <translation>Файлы для развёртывания:</translation> - </message> -</context> -<context> <name>ProjectExplorer::DesktopDevice</name> <message> <source>Local PC</source> @@ -27136,29 +27934,6 @@ Error: %5</translation> </message> </context> <context> - <name>ProjectExplorer::DesktopDeviceConfigurationWidget</name> - <message> - <source>Machine type:</source> - <translation>Тип машины:</translation> - </message> - <message> - <source>TextLabel</source> - <translation></translation> - </message> - <message> - <source>Free ports:</source> - <translation>Свободные порты:</translation> - </message> - <message> - <source>Physical Device</source> - <translation>Физическое устройство</translation> - </message> - <message> - <source>You will need at least one port for QML debugging.</source> - <translation>Необходим как минимум один порт для отладки QML.</translation> - </message> -</context> -<context> <name>ProjectExplorer::DesktopProcessSignalOperation</name> <message> <source>Cannot open process.</source> @@ -27401,14 +28176,11 @@ Error: %5</translation> </message> </context> <context> - <name>ProjectExplorer::EnvironmentValidator</name> + <name>ProjectExplorer::EnvironmentWidget</name> <message> <source>Variable already exists.</source> <translation>Переменная уже существует.</translation> </message> -</context> -<context> - <name>ProjectExplorer::EnvironmentWidget</name> <message> <source>Ed&it</source> <translation>&Изменить</translation> @@ -27426,6 +28198,10 @@ Error: %5</translation> <translation>&Сбросить</translation> </message> <message> + <source>Disable</source> + <translation>Отключить</translation> + </message> + <message> <source>Append Path...</source> <translation>Добавить после пути...</translation> </message> @@ -27454,6 +28230,10 @@ Error: %5</translation> <translation>Присвоено <a href="%1"><b>%1</b></a> значение <b>%2</b></translation> </message> <message> + <source>Set <a href="%1"><b>%1</b></a> to <b>%2</b> [disabled]</source> + <translation>Присвоено <a href="%1"><b>%1</b></a> значение <b>%2</b> [отключено]</translation> + </message> + <message> <source>Use <b>%1</b></source> <extracomment>%1 is "System Environment" or some such.</extracomment> <translation>Используется <b>%1</b></translation> @@ -27467,6 +28247,10 @@ Error: %5</translation> <source>Choose Directory</source> <translation>Выбор каталога</translation> </message> + <message> + <source>Enable</source> + <translation>Включить</translation> + </message> </context> <context> <name>ProjectExplorer::ExecutableAspect</name> @@ -27620,18 +28404,30 @@ Excluding: %2 <translation>Объединять stderr и stdout</translation> </message> <message> - <source>Open pane on output when running</source> - <translation>Открывать вкладку вывода при запуске</translation> + <source>Always</source> + <translation>Всегда</translation> + </message> + <message> + <source>Never</source> + <translation>Никогда</translation> </message> <message> - <source>Open pane on output when debugging</source> - <translation>Открывать вкладку вывода при отладке</translation> + <source>On first output only</source> + <translation>Только при первом выводе</translation> </message> <message> <source>Limit output to %1 characters</source> <translation>Ограничить вывод %1 символами</translation> </message> <message> + <source>Open pane on output when running:</source> + <translation>Открывать вкладку вывода при запуске:</translation> + </message> + <message> + <source>Open pane on output when debugging:</source> + <translation>Открывать вкладку вывода при отладке:</translation> + </message> + <message> <source>Application Output</source> <translation>Вывод приложения</translation> </message> @@ -27757,17 +28553,6 @@ Excluding: %2 </message> </context> <context> - <name>ProjectExplorer::Internal::BuildStepsPage</name> - <message> - <source>Build Steps</source> - <translation>Этапы сборки</translation> - </message> - <message> - <source>Clean Steps</source> - <translation>Этапы очистки</translation> - </message> -</context> -<context> <name>ProjectExplorer::Internal::ClangClToolChainConfigWidget</name> <message> <source>Initialization:</source> @@ -28058,6 +28843,21 @@ Excluding: %2 </message> </context> <context> + <name>ProjectExplorer::Internal::DeploymentDataView</name> + <message> + <source>Local File Path</source> + <translation>Путь к локальному файлу</translation> + </message> + <message> + <source>Remote Directory</source> + <translation>Внешний каталог</translation> + </message> + <message> + <source>Files to deploy:</source> + <translation>Развёртываемые файлы:</translation> + </message> +</context> +<context> <name>ProjectExplorer::Internal::DesktopDeviceFactory</name> <message> <source>Desktop</source> @@ -28065,6 +28865,17 @@ Excluding: %2 </message> </context> <context> + <name>ProjectExplorer::Internal::DesktopRunConfiguration</name> + <message> + <source>Qt Run Configuration</source> + <translation>Конфигурация выполнения Qt</translation> + </message> + <message> + <source>The project no longer builds the target associated with this run configuration.</source> + <translation>Проект больше не собирает цель, ассоциированную с ним в конфигурации запуска.</translation> + </message> +</context> +<context> <name>ProjectExplorer::Internal::DeviceFactorySelectionDialog</name> <message> <source>Device Configuration Wizard Selection</source> @@ -28220,6 +29031,17 @@ Excluding: %2 <translation>Для этого проекта не включены комплекты. Включите их в режиме «Проект».</translation> </message> <message> + <source>Rename More Files?</source> + <translatorcomment>Это заголовок диалогового окна</translatorcomment> + <translation>Переименование файлов</translation> + </message> + <message> + <source>Would you like to rename these files as well? + %1</source> + <translation>Переименовать ли ещё эти файлы? + %1</translation> + </message> + <message> <source>Choose Drop Action</source> <translation>Выбор реакции на перетаскивание</translation> </message> @@ -28509,8 +29331,8 @@ What should Qt Creator do now?</source> <context> <name>ProjectExplorer::Internal::LinuxIccToolChainFactory</name> <message> - <source>Linux ICC</source> - <translation></translation> + <source>ICC</source> + <translation>ICC</translation> </message> </context> <context> @@ -28535,6 +29357,14 @@ What should Qt Creator do now?</source> <source>Override MAKEFLAGS</source> <translation>Переопределение MAKEFLAGS</translation> </message> + <message> + <source>Disable in subdirectories:</source> + <translation>Выключить по подкаталогах:</translation> + </message> + <message> + <source>Runs this step only for a top-level build.</source> + <translation>Запускать этот этап только для сборки верхнего уровня.</translation> + </message> </context> <context> <name>ProjectExplorer::Internal::MingwToolChainFactory</name> @@ -28840,6 +29670,18 @@ What should Qt Creator do now?</source> <source>Deduced From Project</source> <translation>Согласно проекту</translation> </message> + <message> + <source>Abort on error when building all projects</source> + <translation>Прерываться по ошибке при сборке всех проектов</translation> + </message> + <message> + <source>Enable this if your system becomes unresponsive while building.</source> + <translation>Включите, если при сборке ваша система перестаёт отвечать.</translation> + </message> + <message> + <source>Start build processes with low priority</source> + <translation>Запускать процессы сборки с низким приоритетом</translation> + </message> </context> <context> <name>ProjectExplorer::Internal::ProjectFileWizardExtension</name> @@ -28986,20 +29828,20 @@ to project "%2".</source> <translation>проект</translation> </message> <message> - <source>New Project</source> - <translation>Новый проект</translation> + <source>Manage</source> + <translation>Настроить</translation> </message> <message> - <source>Open Project</source> - <translation>Открыть проект</translation> + <source>New</source> + <translation>Создать</translation> </message> <message> - <source>Sessions</source> - <translation>Сессии</translation> + <source>Open</source> + <translation>Открыть</translation> </message> <message> - <source>Recent Projects</source> - <translation>Недавние проекты</translation> + <source>Sessions</source> + <translation>Сессии</translation> </message> </context> <context> @@ -29332,6 +30174,10 @@ to project "%2".</source> <context> <name>ProjectExplorer::Internal::TargetSetupWidget</name> <message> + <source>You cannot use this kit, because it does not fulfill the project's prerequisites.</source> + <translation>Невозможно использовать этот комплект, так как он не соответствует требованиям проекта.</translation> + </message> + <message> <source><b>Error:</b> </source> <comment>Severity is Task::Error</comment> <translation><b>Ошибка:</b> </translation> @@ -29877,6 +30723,14 @@ to project "%2".</source> <translation>Этот мастер создаст проект простейшего юнит-теста.</translation> </message> <message> + <source>Googletest source directory (optional):</source> + <translation>Каталог исходников Googletest (опционально):</translation> + </message> + <message> + <source>Boost include directory (optional):</source> + <translation>Каталог заголовков Boost (опционально):</translation> + </message> + <message> <source>Project Management</source> <translation>Управление проектом</translation> </message> @@ -29885,6 +30739,10 @@ to project "%2".</source> <translation>Итог</translation> </message> <message> + <source>Add Q_OBJECT</source> + <translation>Добавить Q_OBJECT</translation> + </message> + <message> <source>Creates a C++ header and a source file for a new class that you can add to a C++ project.</source> <translation>Создание заголовочного и исходного файлов C++ для нового класса, добавляемого в проект C++.</translation> </message> @@ -30277,10 +31135,6 @@ Preselects a desktop Qt for building the application if available.</source> <translation>Разрешить C++11</translation> </message> <message> - <source>Googletest repository:</source> - <translation>Хранилище Googletest:</translation> - </message> - <message> <source>Project and Test Information</source> <translation>Информация о проекте и тестах</translation> </message> @@ -30387,10 +31241,6 @@ Use this only if you are prototyping. You cannot create a full application with <translation>Название набора тестов:</translation> </message> <message> - <source>Boost include dir (optional):</source> - <translation>Каталог подключаемых файлов Boost (не обязательно):</translation> - </message> - <message> <source>%{JS: Cpp.classToFileName(value('Class'), Util.preferredSuffix('text/x-c++hdr'))}</source> <translatorcomment>зачем это переводить?!?</translatorcomment> <translation>%{JS: Cpp.classToFileName(value('Class'), Util.preferredSuffix('text/x-c++hdr'))}</translation> @@ -30412,6 +31262,14 @@ Use this only if you are prototyping. You cannot create a full application with <translation>"%{JS: Util.toNativeSeparators(value('TargetPath'))}" exists in the filesystem.</translation> </message> <message> + <source>Translation File</source> + <translation>Файл переводов</translation> + </message> + <message> + <source>Translation</source> + <translation>Перевод</translation> + </message> + <message> <source>This wizard creates a C++ library project.</source> <translation>Этот мастер создаст проект библиотеки С++.</translation> </message> @@ -30500,6 +31358,38 @@ Use this only if you are prototyping. You cannot create a full application with <translation>Библиотека C++</translation> </message> <message> + <source>MyItem</source> + <translation>MyItem</translation> + </message> + <message> + <source>Object class-name:</source> + <translation>Имя класса объекта:</translation> + </message> + <message> + <source>com.mycompany.qmlcomponents</source> + <translation>com.mycompany.qmlcomponents</translation> + </message> + <message> + <source>URI:</source> + <translation>URI:</translation> + </message> + <message> + <source>Custom Parameters</source> + <translation>Особые параметры</translation> + </message> + <message> + <source>Creates a C++ plugin to load Qt Quick extensions dynamically into applications using the QQmlEngine class.</source> + <translation>Создание C++ модуля для динамической загрузки расширений Qt Quick в приложение, использующее класс QQmlEngine.</translation> + </message> + <message> + <source>Qt Quick 2 Extension Plugin</source> + <translation>Модуль расширения Qt Quick 2</translation> + </message> + <message> + <source>Qt 5.14</source> + <translation>Qt 5.14</translation> + </message> + <message> <source>Qt 5.13</source> <translation>Qt 5.13</translation> </message> @@ -30648,6 +31538,10 @@ Preselects a desktop Qt for building the application if available.</source> <translation>Приложение Qt Quick - Swipe</translation> </message> <message> + <source>Repository URL is not valid</source> + <translation>Неверный URL хранилища</translation> + </message> + <message> <source>Use existing directory</source> <translation>Использовать существующий каталог</translation> </message> @@ -31435,6 +32329,10 @@ Please close all running instances of your application before starting a build.< <translation>Добавить существующие файлы...</translation> </message> <message> + <source>Duplicate File...</source> + <translation>Дублировать файл...</translation> + </message> + <message> <source>Remove Project...</source> <extracomment>Remove project from parent profile (Project explorer view); will not physically delete any files.</extracomment> <translation>Убрать проект...</translation> @@ -31568,10 +32466,18 @@ Please close all running instances of your application before starting a build.< <translation>Сборка ещё выполняется.</translation> </message> <message> + <source>A run action is already scheduled for the active project.</source> + <translation>Запуск уже запланирован для активного проекта.</translation> + </message> + <message> <source>Run %1</source> <translation>Запустить %1</translation> </message> <message> + <source>%1 in %2</source> + <translation>%1 в %2</translation> + </message> + <message> <source>New Subproject</source> <comment>Title of dialog</comment> <translation>Создание подпроекта</translation> @@ -31611,18 +32517,10 @@ Please try again.</source> <translation>_копия</translation> </message> <message> - <source>_copy%1</source> - <translation>_копия%1</translation> - </message> - <message> <source>Duplicating File Failed</source> <translation>Не удалось дублировать файл</translation> </message> <message> - <source>Could not duplicate the file %1.</source> - <translation>Не удалось дублировать файл %1.</translation> - </message> - <message> <source>Deleting File Failed</source> <translation>Не удалось удалить файл</translation> </message> @@ -31714,6 +32612,14 @@ Do you want to ignore them?</source> <translation>Закрыть все документы и проекты</translation> </message> <message> + <source>Build for Run Configuration</source> + <translation>Сборка для конфигурации запуска</translation> + </message> + <message> + <source>Build for Run Configuration "%1"</source> + <translation>Собрать для конфигурации запуска «%1»</translation> + </message> + <message> <source>Build</source> <translation>Собрать</translation> </message> @@ -31742,10 +32648,6 @@ Do you want to ignore them?</source> <translation>Свойства...</translation> </message> <message> - <source>Duplicate File</source> - <translation>Дублировать файл</translation> - </message> - <message> <source>Set "%1" as Active Project</source> <translation>Сделать «%1» активным проектом</translation> </message> @@ -31880,6 +32782,22 @@ Do you want to ignore them?</source> <translation>Не удалось запустить «%1».</translation> </message> <message> + <source>Choose File Name</source> + <translation>Выбор имени файла</translation> + </message> + <message> + <source>New file name:</source> + <translation>Имя нового файла:</translation> + </message> + <message> + <source>Failed to copy file "%1" to "%2": %3.</source> + <translation>Не удалось скопировать файл «%1» в «%2»: %3.</translation> + </message> + <message> + <source>Failed to add new file "%1" to the project.</source> + <translation>Не удалось добавить в проект новый файл «%1».</translation> + </message> + <message> <source>Could not delete file %1.</source> <translation>Не удалось удалить файл «%1».</translation> </message> @@ -31940,8 +32858,8 @@ Do you want to ignore them?</source> <translation>Рабочий каталог текущей активной конфигурации запуска</translation> </message> <message> - <source>The Project is currently being parsed.</source> - <translation>Проект сейчас разбирается.</translation> + <source>The project is currently being parsed.</source> + <translation>Проект ещё разбирается.</translation> </message> <message> <source>The project could not be fully parsed.</source> @@ -32244,12 +33162,8 @@ These files are preserved.</source> <context> <name>ProjectExplorer::TargetSetupPage</name> <message> - <source><span style=" font-weight:600;">No valid kits found.</span></source> - <translation><b>Отсутствуют подходящие комплекты.</b></translation> - </message> - <message> - <source>Please add a kit in the <a href="buildandrun">options</a> or via the maintenance tool of the SDK.</source> - <translation>Добавьте комплект в <a href="buildandrun">настройках</a> или через инструмент обслуживания SDK.</translation> + <source><span style=" font-weight:600;">No suitable kits found.</span><br/>Add a kit in the <a href="buildandrun">options</a> or via the maintenance tool of the SDK.</source> + <translation><span style=" font-weight:600;">Отсутствуют подходящие комплекты.</span><br/>Добавьте комплект в <a href="buildandrun">настройках</a> или через инструмент обслуживания SDK.</translation> </message> <message> <source>Select all kits</source> @@ -32485,7 +33399,72 @@ App ID: %2 </message> </context> <context> - <name>PythonEditor::Internal::PythonProject</name> + <name>Python::Internal::InterpreterAspect</name> + <message> + <source>Manage...</source> + <translation>Управление...</translation> + </message> + <message> + <source>Interpreter</source> + <translation>Интерпретатор</translation> + </message> +</context> +<context> + <name>Python::Internal::PyLSConfigureAssistant</name> + <message> + <source>Python Language Server (%1)</source> + <translation>Сервер языка Python (%1)</translation> + </message> + <message> + <source>Install and set up Python language server (PyLS) for %1 (%2). The language server provides Python specific completion and annotation.</source> + <translation>Установка и настройка сервера языка Python (PyLS) для %1 (%2). Языковой сервер обеспечивает дополнение и аннотирование.</translation> + </message> + <message> + <source>Install</source> + <translation>Установить</translation> + </message> + <message> + <source>Found a Python language server for %1 (%2). Set it up for this document?</source> + <translation>Найден сервер языка Python для %1 (%2). Использовать его для текущего документа?</translation> + </message> + <message> + <source>Setup</source> + <translation>Задать</translation> + </message> + <message> + <source>Enable Python language server for %1 (%2)?</source> + <translation>Включить сервер языка Python для %1 (%2)?</translation> + </message> + <message> + <source>Enable</source> + <translation>Включить</translation> + </message> +</context> +<context> + <name>Python::Internal::PythonLSInstallHelper</name> + <message> + <source>Running "%1 %2" to install Python language server</source> + <translation>Выполнение «%1 %2» для установки сервера языка Python</translation> + </message> + <message> + <source>The Python language server installation was canceled by %1.</source> + <translation>Установка сервера языка Python была отменена %1.</translation> + </message> + <message> + <source>user</source> + <translation>пользователем</translation> + </message> + <message> + <source>time out</source> + <translation>по истечению времени</translation> + </message> + <message> + <source>Installing the Python language server failed with exit code %1</source> + <translation>Не удалось установить сервер языка Python, код завершения %1</translation> + </message> +</context> +<context> + <name>Python::Internal::PythonProject</name> <message> <source>Unable to open "%1" for reading: %2</source> <translation>Не удалось открыть «%1» для чтения: %2</translation> @@ -32500,18 +33479,49 @@ App ID: %2 </message> </context> <context> - <name>PythonEditor::Internal::PythonRunConfiguration</name> - <message> - <source>Interpreter:</source> - <translation>Интерпретатор:</translation> - </message> + <name>Python::Internal::PythonRunConfiguration</name> <message> <source>Script:</source> - <translation>Сценарии:</translation> + <translation>Сценарий:</translation> </message> <message> <source>Run %1</source> - <translation>Запуск %1</translation> + <translation>Выполнить %1</translation> + </message> +</context> +<context> + <name>Python::Internal::PythonSettings</name> + <message> + <source>Name:</source> + <translation>Имя:</translation> + </message> + <message> + <source>Executable</source> + <translation>Программа</translation> + </message> + <message> + <source>&Add</source> + <translation>&Добавить</translation> + </message> + <message> + <source>&Delete</source> + <translation>&Удалить</translation> + </message> + <message> + <source>&Make Default</source> + <translation>&По умолчанию</translation> + </message> + <message> + <source>Interpreters</source> + <translation>Интерпретаторы</translation> + </message> + <message> + <source>Python</source> + <translation>Python</translation> + </message> + <message> + <source> (Windowed)</source> + <translation> (в окне)</translation> </message> </context> <context> @@ -32591,9 +33601,20 @@ Copy the path to the source files to the clipboard?</source> <source>Updating syntax definition for '%1' to version %2...</source> <translation>Обновление определений синтаксиса для «%1» до версии «%2»...</translation> </message> +</context> +<context> + <name>QQmlParser</name> + <message> + <source>Syntax error</source> + <translation>Синтаксическая ошибка</translation> + </message> + <message> + <source>Unexpected token `%1'</source> + <translation>Неожиданная лексема «%1»</translation> + </message> <message> - <source>Frame %1</source> - <translation>Кадр %1</translation> + <source>Expected token `%1'</source> + <translation>Ожидается лексема «%1»</translation> </message> </context> <context> @@ -32759,6 +33780,13 @@ Copy the path to the source files to the clipboard?</source> </message> </context> <context> + <name>QbsInstallStep</name> + <message> + <source><b>Qbs:</b> %1</source> + <translation type="unfinished"><b>Qbs:</b> %1</translation> + </message> +</context> +<context> <name>QbsProductNode</name> <message> <source>Generated files</source> @@ -32815,14 +33843,6 @@ Copy the path to the source files to the clipboard?</source> <source>Configuration name:</source> <translation>Название конфигурации:</translation> </message> - <message> - <source>Parsing the Qbs project.</source> - <translation>Разбор проекта Qbs.</translation> - </message> - <message> - <source>Parsing of Qbs project has failed.</source> - <translation>Не удалось разобрать проект Qbs.</translation> - </message> </context> <context> <name>QbsProjectManager::Internal::QbsBuildConfigurationFactory</name> @@ -33008,9 +34028,6 @@ Copy the path to the source files to the clipboard?</source> <source>Qbs Install</source> <translation>Установка с Qbs</translation> </message> -</context> -<context> - <name>QbsProjectManager::Internal::QbsInstallStepConfigWidget</name> <message> <source>Install root:</source> <translation>Корень установки:</translation> @@ -33035,10 +34052,6 @@ Copy the path to the source files to the clipboard?</source> <source>Equivalent command line:</source> <translation>Итоговая командная строка:</translation> </message> - <message> - <source><b>Qbs:</b> %1</source> - <translation><b>Qbs:</b> %1</translation> - </message> </context> <context> <name>QbsProjectManager::Internal::QbsKitAspect</name> @@ -33184,6 +34197,241 @@ Copy the path to the source files to the clipboard?</source> </message> </context> <context> + <name>Qdb</name> + <message> + <source>Flash wizard "%1" failed to start.</source> + <translation>Не удалось запустить программатор «%1».</translation> + </message> + <message> + <source>Flash wizard executable "%1" not found.</source> + <translation>Исполняемый файл программатора «%1» не найден.</translation> + </message> + <message> + <source>Flash Boot to Qt Device</source> + <translation>Запрограммировать устройство Boot to Qt</translation> + </message> +</context> +<context> + <name>Qdb::Internal::DeviceDetector</name> + <message> + <source>Device "%1" %2</source> + <translation>Устройство «%1» %2</translation> + </message> + <message> + <source>Qt Debug Bridge device %1</source> + <translation>Устройство моста отладки Qt %1</translation> + </message> + <message> + <source>Device detection error: %1</source> + <translation>Ошибка определения устройства: %1</translation> + </message> +</context> +<context> + <name>Qdb::Internal::QdbDeployConfiguration</name> + <message> + <source>Deploy to Boot2Qt target</source> + <translation>Развёртывание на Boot2Qt</translation> + </message> +</context> +<context> + <name>Qdb::Internal::QdbDevice</name> + <message> + <source>Starting command "%1" on device "%2".</source> + <translation>Запуск команды «%1» на устройстве «%2».</translation> + </message> + <message> + <source>Command failed on device "%1": %2</source> + <translation>Команда завершилась с ошибкой на устройстве «%1»: %2</translation> + </message> + <message> + <source>Command failed on device "%1".</source> + <translation>Команда завершилась с ошибкой на устройстве «%1».</translation> + </message> + <message> + <source>stdout was: "%1"</source> + <translation>stdout был: «%1»</translation> + </message> + <message> + <source>stderr was: "%1"</source> + <translation>stderr был: «%1»</translation> + </message> + <message> + <source>Commands on device "%1" finished successfully.</source> + <translation>Команда на устройстве «%1» завершилась успешно.</translation> + </message> + <message> + <source>Boot2Qt Device</source> + <translation>Устройство Boot2Qt</translation> + </message> + <message> + <source>Reboot Device</source> + <translation>Перезагрузить устройство</translation> + </message> + <message> + <source>Restore Default App</source> + <translation>Восстановить приложения по умолчанию</translation> + </message> + <message> + <source>WizardPage</source> + <translation></translation> + </message> + <message> + <source>Device Settings</source> + <translation>Настройки устройства</translation> + </message> + <message> + <source>A short, free-text description</source> + <translation>Короткое текстовое описание</translation> + </message> + <message> + <source>Host name or IP address</source> + <translation>Имя узла или IP адрес</translation> + </message> + <message> + <source>Device name:</source> + <translation>Имя устройства:</translation> + </message> + <message> + <source>Device address:</source> + <translation>Адрес устройства:</translation> + </message> + <message> + <source>Boot2Qt Network Device Setup</source> + <translation>Настройка сетевого устройства Boot2Qt</translation> + </message> +</context> +<context> + <name>Qdb::Internal::QdbDeviceTracker</name> + <message> + <source>Shutting down device discovery due to unexpected response: %1</source> + <translation>Завершение определения устройств из-за неожиданного ответа: %1</translation> + </message> +</context> +<context> + <name>Qdb::Internal::QdbLinuxDeviceFactory</name> + <message> + <source>Boot2Qt Device</source> + <translation>Устройство Boot2Qt</translation> + </message> +</context> +<context> + <name>Qdb::Internal::QdbMakeDefaultAppService</name> + <message> + <source>Remote process failed: %1</source> + <translation>Ошибка внешнего процесса: %1</translation> + </message> + <message> + <source>Application set as the default one.</source> + <translation>Приложение выбрано по умолчанию.</translation> + </message> + <message> + <source>Reset the default application.</source> + <translation>Сбросить приложение по умолчанию.</translation> + </message> +</context> +<context> + <name>Qdb::Internal::QdbMakeDefaultAppStep</name> + <message> + <source>Set this application to start by default</source> + <translation>Установите запуск этого приложения по умолчанию</translation> + </message> + <message> + <source>Reset default application</source> + <translation>Сбросить приложение по умолчанию</translation> + </message> +</context> +<context> + <name>Qdb::Internal::QdbMessageTracker</name> + <message> + <source>Shutting down message reception due to unexpected response: %1</source> + <translation>Завершение приёма сообщения из-за неожиданного ответа: %1</translation> + </message> + <message> + <source>QDB message: %1</source> + <translation>Сообщение QDB: %1</translation> + </message> +</context> +<context> + <name>Qdb::Internal::QdbRunConfiguration</name> + <message> + <source>Full command line:</source> + <translation>Полная командная строка:</translation> + </message> + <message> + <source>Executable on device:</source> + <translation>Программа на устройстве:</translation> + </message> + <message> + <source>Remote path not set</source> + <translation>Не задан внешний путь</translation> + </message> + <message> + <source>Executable on host:</source> + <translation>Программа на машине:</translation> + </message> + <message> + <source>Run on Boot2Qt Device</source> + <translation>Запуск на устройстве Boot2Qt</translation> + </message> + <message> + <source>The remote executable must be set in order to run on a Boot2Qt device.</source> + <translation>Для запуска на устройстве Boot2Qt внешнего приложения, его необходимо задать.</translation> + </message> +</context> +<context> + <name>Qdb::Internal::QdbStopApplicationService</name> + <message> + <source>Could not check and possibly stop running application.</source> + <translation>Не удалось проверить и, вероятно, остановить работающее приложение.</translation> + </message> + <message> + <source>Checked that there is no running application.</source> + <translation>Проверено, работающего приложения нет.</translation> + </message> + <message> + <source>Stopped the running application.</source> + <translation>Работающее приложение остановлено.</translation> + </message> +</context> +<context> + <name>Qdb::Internal::QdbStopApplicationStep</name> + <message> + <source>Stop already running application</source> + <translation>Остановка работающего приложения</translation> + </message> +</context> +<context> + <name>Qdb::Internal::QdbWatcher</name> + <message> + <source>Unexpected QLocalSocket error: %1</source> + <translation>Неожиданная ошибка QLocalSocket: %1</translation> + </message> + <message> + <source>Could not connect to QDB host server even after trying to start it.</source> + <translation>Не удалось подключиться к серверу QDB даже после попытки его запуска.</translation> + </message> + <message> + <source>Invalid JSON response received from QDB server: %1</source> + <translation>Получен неверный ответ JSON от сервера QDB: %1</translation> + </message> + <message> + <source>Could not find QDB host server executable. You can set the location with environment variable %1.</source> + <translation>Не удалось найти программу сервера QDB. Необходимо задать ее размещением в переменной среды %1.</translation> + </message> + <message> + <source>QDB host server started.</source> + <translation>Сервер QDB запущен.</translation> + </message> + <message> + <source>Could not start QDB host server in %1</source> + <translation>Не удалось запустить сервер QDB в %1</translation> + </message> + <message> + <source>Starting QDB host server.</source> + <translation>Запуска сервера QDB.</translation> + </message> +</context> +<context> <name>QmakePriFile</name> <message> <source>Failed</source> @@ -33443,13 +34691,6 @@ Please update your kit (%3) or choose a mkspec for qmake that matches your targe </message> </context> <context> - <name>QmakeProjectManager::Internal::DesktopQmakeRunConfiguration</name> - <message> - <source>Qt Run Configuration</source> - <translation>Конфигурация выполнения Qt</translation> - </message> -</context> -<context> <name>QmakeProjectManager::Internal::DetailsPage</name> <message> <source>Details</source> @@ -33681,21 +34922,6 @@ Neither the path to the library nor the path to its includes is added to the .pr </message> </context> <context> - <name>QmakeProjectManager::Internal::ModulesPage</name> - <message> - <source>Select Required Modules</source> - <translation>Выбор необходимых модулей</translation> - </message> - <message> - <source>Select the modules you want to include in your project. The recommended modules for this project are selected by default.</source> - <translation>Выберите модули, которые хотите включить в проект. Рекомендуемые для этого проекта модули уже выбраны по умолчанию.</translation> - </message> - <message> - <source>Modules</source> - <translation>Модули</translation> - </message> -</context> -<context> <name>QmakeProjectManager::Internal::PluginGenerator</name> <message> <source>Creating multiple widget libraries (%1, %2) in one project (%3) is not supported.</source> @@ -33726,7 +34952,7 @@ Neither the path to the library nor the path to its includes is added to the .pr </message> <message> <source>Effective qmake call:</source> - <translation>Параметры вызова qmake:</translation> + <translation>Команда запуска qmake:</translation> </message> <message> <source>Use QML compiler:</source> @@ -33736,6 +34962,10 @@ Neither the path to the library nor the path to its includes is added to the .pr <source>Generate separate debug info:</source> <translation>Отделять отладочную информацию:</translation> </message> + <message> + <source>ABIs:</source> + <translation>ABI:</translation> + </message> </context> <context> <name>QmakeProjectManager::Internal::QmakeKitAspect</name> @@ -34079,10 +35309,6 @@ Neither the path to the library nor the path to its includes is added to the .pr <source>The mkspec has changed.</source> <translation>Изменился mkspec.</translation> </message> - <message> - <source>Parsing the .pro file</source> - <translation>Разбор файла .pro</translation> - </message> </context> <context> <name>QmakeProjectManager::QmakeBuildConfigurationFactory</name> @@ -34305,6 +35531,17 @@ Neither the path to the library nor the path to its includes is added to the .pr </message> </context> <context> + <name>QmlDesigner::AlignDistribute</name> + <message> + <source>Cannot distribute perfectly</source> + <translation>Полное распределение невозможно</translation> + </message> + <message> + <source>These objects cannot be distributed to equal pixel values. Do you want to distribute to the nearest possible values?</source> + <translation>Невозможно распределить эти объекты с одинаковым пиксельным значением. Распределить с ближайшими возможными значениями?</translation> + </message> +</context> +<context> <name>QmlDesigner::BackgroundAction</name> <message> <source>Set the color of the canvas.</source> @@ -34312,6 +35549,28 @@ Neither the path to the library nor the path to its includes is added to the .pr </message> </context> <context> + <name>QmlDesigner::BindingEditorDialog</name> + <message> + <source>Binding Editor</source> + <translation>Редактор привязок</translation> + </message> +</context> +<context> + <name>QmlDesigner::BindingEditorWidget</name> + <message> + <source>Trigger Completion</source> + <translation>Выполнить дополнение</translation> + </message> + <message> + <source>Meta+Space</source> + <translation>Meta+Space</translation> + </message> + <message> + <source>Ctrl+Space</source> + <translation>Ctrl+Space</translation> + </message> +</context> +<context> <name>QmlDesigner::ColorTool</name> <message> <source>Color Tool</source> @@ -34916,6 +36175,10 @@ Neither the path to the library nor the path to its includes is added to the .pr <translatorcomment>Должен быть какой-то стандартный термин</translatorcomment> <translation>Включить редактор по временной шкале</translation> </message> + <message> + <source>Always open ui.qml files in Design mode</source> + <translation>Всегда открывать файлы ui.qml в режиме дизайна</translation> + </message> </context> <context> <name>QmlDesigner::InvalidArgumentException</name> @@ -34925,6 +36188,114 @@ Neither the path to the library nor the path to its includes is added to the .pr </message> </context> <context> + <name>QmlDesigner::ItemLibraryAssetImportDialog</name> + <message> + <source>Asset Import</source> + <translation>Импорт ресурсов</translation> + </message> + <message> + <source>Import Options</source> + <translation>Импорт настроек</translation> + </message> + <message> + <source>Import</source> + <translation>Импортировать</translation> + </message> + <message> + <source>Select import options and press "Import" to import the following files:</source> + <translation>Задайте настройки и нажмите «Импортировать», чтобы импортировать следующие файлы:</translation> + </message> + <message> + <source>No options available for this type.</source> + <translation>Для данного типа параметров нет.</translation> + </message> + <message> + <source>%1 options</source> + <translation>Настройки %1</translation> + </message> + <message> + <source>Cancel</source> + <translation>Отмена</translation> + </message> + <message> + <source>Close</source> + <translation>Закрыть</translation> + </message> + <message> + <source>Import interrupted.</source> + <translation>Импорт прерван.</translation> + </message> + <message> + <source>Import done.</source> + <translation>Импорт завершён.</translation> + </message> + <message> + <source>Canceling import.</source> + <translation>Отмена импорта.</translation> + </message> +</context> +<context> + <name>QmlDesigner::ItemLibraryAssetImporter</name> + <message> + <source>Could not create a temporary directory for import.</source> + <translation>Не удалось создать временный каталог для импорта.</translation> + </message> + <message> + <source>Updating data model.</source> + <translation>Обновление модели данных.</translation> + </message> + <message> + <source>Importing 3D assets requires building against Qt Quick 3D module.</source> + <translation>Для импорта ресурсов 3D необходима сборка с модулем Qt Quick 3D.</translation> + </message> + <message> + <source>Parsing files.</source> + <translation>Разбор файлов.</translation> + </message> + <message> + <source>Parsing 3D Model</source> + <translation>Разбор трёхмерной модели</translation> + </message> + <message> + <source>Skipped import of existing asset: "%1"</source> + <translation>Пропущен импорт существующего ресурса «%1»</translation> + </message> + <message> + <source>Could not access temporary asset directory: "%1"</source> + <translation>Не удалось получить доступ к временному каталогу ресурсов: «%1»</translation> + </message> + <message> + <source>Generating 3D assets for: "%1"</source> + <translation>Создание трёхмерных ресурсов для: «%1»</translation> + </message> + <message> + <source>Failed to import 3D asset with error: %1</source> + <translation>Не удалось импортировать трёхмерный ресурс: %1</translation> + </message> + <message> + <source>Failed to create qmldir file for asset: "%1"</source> + <translation>Не удалось создать файл qmldir для ресурса: «%1»</translation> + </message> + <message> + <source>Removing old overwritten assets.</source> + <translation>Удаление старых ресурсов.</translation> + </message> + <message> + <source>Copying asset files.</source> + <translation>Копирование файлов ресурсов.</translation> + </message> + <message> + <source>Overwrite Existing Asset?</source> + <translation>Перезапись существующих ресурсов</translation> + </message> + <message> + <source>Asset already exists. Overwrite? +"%1"</source> + <translation>Ресурс уже существует. Перезаписать? +«%1»</translation> + </message> +</context> +<context> <name>QmlDesigner::ItemLibraryResourceView</name> <message> <source>Large Icons</source> @@ -34979,6 +36350,10 @@ Neither the path to the library nor the path to its includes is added to the .pr <translation>Добавление новых ресурсов в проект.</translation> </message> <message> + <source>3D Assets</source> + <translation>Ресурсы 3D</translation> + </message> + <message> <source>Add import %1</source> <translation>Добавить импорт %1</translation> </message> @@ -35125,6 +36500,21 @@ This is independent of the visibility property in QML.</source> </message> </context> <context> + <name>QmlDesigner::Option3DAction</name> + <message> + <source>2D</source> + <translation>2D</translation> + </message> + <message> + <source>2D/3D</source> + <translation>2D/3D</translation> + </message> + <message> + <source>Enable/Disable 3D edit mode.</source> + <translation>Включение/выключение редактирования в трёхмерном режиме.</translation> + </message> +</context> +<context> <name>QmlDesigner::PathItem</name> <message> <source>Closed Path</source> @@ -35269,8 +36659,12 @@ This is independent of the visibility property in QML.</source> <translation>Значение</translation> </message> <message> - <source>Change %1</source> - <translation>Изменение %1</translation> + <source>Frame</source> + <translation>Рамка</translation> + </message> + <message> + <source>Edit Keyframe</source> + <translation>Изменить ключевой кадр</translation> </message> </context> <context> @@ -35434,6 +36828,17 @@ This is independent of the visibility property in QML.</source> </message> </context> <context> + <name>QmlDesigner::SubComponentManager</name> + <message> + <source>My QML Components</source> + <translation>Мои компоненты QML</translation> + </message> + <message> + <source>My Quick3D Components</source> + <translation>Мои компоненты Quick3D</translation> + </message> +</context> +<context> <name>QmlDesigner::SwitchLanguageComboboxAction</name> <message> <source>Switch the language used by preview.</source> @@ -35623,8 +37028,8 @@ This is independent of the visibility property in QML.</source> <translation>Изменить переходную кривую...</translation> </message> <message> - <source>Edit Value for Keyframe...</source> - <translation>Изменить значение для ключевого кадра...</translation> + <source>Edit Keyframe...</source> + <translation>Изменить ключевой кадр...</translation> </message> <message> <source>Remove Property</source> @@ -35704,6 +37109,10 @@ This is independent of the visibility property in QML.</source> <translation>Настройки временной шкалы</translation> </message> <message> + <source>Animation Curve Editor</source> + <translation>Редактор анимационных кривых</translation> + </message> + <message> <source>To Start</source> <translation>В начало</translation> </message> @@ -35733,8 +37142,8 @@ This is independent of the visibility property in QML.</source> <translation>Автоматический ключевой кадр</translation> </message> <message> - <source>Curve Picker</source> - <translation>Захват кривой</translation> + <source>Easing Curve Editor</source> + <translation>Редактор переходных кривых</translation> </message> <message> <source>Curve Editor</source> @@ -36034,8 +37443,12 @@ This is independent of the visibility property in QML.</source> <context> <name>QmlDesignerTimeline</name> <message> - <source>Frame %1</source> - <translation>Кадр %1</translation> + <source>Playhead frame %1</source> + <translation>Текущий кадр %1</translation> + </message> + <message> + <source>Keyframe %1</source> + <translation>Ключевой кадр %1</translation> </message> </context> <context> @@ -36750,12 +38163,16 @@ For more information, see the "Checking Code Syntax" documentation.</s <translation>Ожидается объектный литерал после запятой.</translation> </message> <message> - <source>Expected object literal to contain only 'string: number' elements.</source> - <translation>Ожидается, чтобы объектный литерал содержал только элементы «строка: число».</translation> + <source>Expected expression after colon.</source> + <translation>Требуется выражением после двоеточия.</translation> </message> <message> - <source>Enum should not contain getter and setters, but only 'string: number' elements.</source> - <translation>Перечисление не должно содержать ни геттеров, ни сеттеров, а только элементы «строка: число».</translation> + <source>Expected strings as enum keys.</source> + <translation>Требуются строки в качестве ключей перечисления.</translation> + </message> + <message> + <source>Expected either array or object literal as enum definition.</source> + <translation>В качестве определения перечисления требуется или массив, или объектный литерал.</translation> </message> </context> <context> @@ -36847,17 +38264,6 @@ For more information, see the "Checking Code Syntax" documentation.</s </message> </context> <context> - <name>QmlJSEditor::Internal::QmlJSEditorDocumentPrivate</name> - <message> - <source>This file should only be edited in <b>Design</b> mode.</source> - <translation>Этот файл можно редактировать только в режиме <b>дизайна</b>.</translation> - </message> - <message> - <source>Switch Mode</source> - <translation>Переключить режим</translation> - </message> -</context> -<context> <name>QmlJSEditor::Internal::QmlJSEditorPlugin</name> <message> <source>QML</source> @@ -36902,29 +38308,6 @@ For more information, see the "Checking Code Syntax" documentation.</s </message> </context> <context> - <name>QmlJSEditor::Internal::QmlJSEditorWidget</name> - <message> - <source>Show Qt Quick ToolBar</source> - <translation>Показать панель Qt Quick</translation> - </message> - <message> - <source>Code Model Not Available</source> - <translation>Модель кода недоступна</translation> - </message> - <message> - <source>Code model not available.</source> - <translation>Модель кода недоступна.</translation> - </message> - <message> - <source>Code Model of %1</source> - <translation>Модель кода %1</translation> - </message> - <message> - <source>Refactoring</source> - <translation>Рефакторинг</translation> - </message> -</context> -<context> <name>QmlJSEditor::Internal::QmlJSOutlineTreeView</name> <message> <source>Expand All</source> @@ -36978,6 +38361,40 @@ For more information, see the "Checking Code Syntax" documentation.</s </message> </context> <context> + <name>QmlJSEditor::QmlJSEditorDocument</name> + <message> + <source>This file should only be edited in <b>Design</b> mode.</source> + <translation>Этот файл можно редактировать только в режиме <b>дизайна</b>.</translation> + </message> + <message> + <source>Switch Mode</source> + <translation>Переключить режим</translation> + </message> +</context> +<context> + <name>QmlJSEditor::QmlJSEditorWidget</name> + <message> + <source>Show Qt Quick ToolBar</source> + <translation>Показать панель Qt Quick</translation> + </message> + <message> + <source>Code Model Not Available</source> + <translation>Модель кода недоступна</translation> + </message> + <message> + <source>Code model not available.</source> + <translation>Модель кода недоступна.</translation> + </message> + <message> + <source>Code Model of %1</source> + <translation>Модель кода %1</translation> + </message> + <message> + <source>Refactoring</source> + <translation>Рефакторинг</translation> + </message> +</context> +<context> <name>QmlJSEditor::QuickFix</name> <message> <source>Split Initializer</source> @@ -37153,6 +38570,14 @@ the QML editor know about a likely URI.</source> <translation>При импорте модуля требуется версия</translation> </message> <message> + <source>Module import requires a minor version (missing dot)</source> + <translation>При импорте модуля требуется минорная версия (отсутствует точка)</translation> + </message> + <message> + <source>Module import requires a minor version (missing number)</source> + <translation>При импорте модуля требуется минорная версия (отсутствует число)</translation> + </message> + <message> <source>File import requires a qualifier</source> <translation>При импорте файла требуется спецификатор</translation> </message> @@ -37164,14 +38589,6 @@ the QML editor know about a likely URI.</source> <source>Invalid import qualifier</source> <translation>Неверный спецификатор импорта</translation> </message> - <message> - <source>Unexpected token `%1'</source> - <translation>Неожиданная лексема «%1»</translation> - </message> - <message> - <source>Expected token `%1'</source> - <translation>Ожидается лексема «%1»</translation> - </message> </context> <context> <name>QmlPreview::Internal::QmlPreviewPlugin</name> @@ -38424,11 +39841,11 @@ Saving failed.</source> </message> <message> <source>Closing the dialog will stop the deployment. Are you sure you want to do this?</source> - <translation>Закрытие диалога остановит установку. Закрыть?</translation> + <translation>Закрытие диалога остановит развёртывание. Закрыть?</translation> </message> <message> <source>Please input a remote directory to deploy to.</source> - <translation>Введите внешний каталог для установки.</translation> + <translation>Введите внешний каталог для развёртывания.</translation> </message> <message> <source>Connection failed: %1</source> @@ -38438,7 +39855,7 @@ Saving failed.</source> <source>The remote directory "%1" already exists. Deploying to that directory will remove any files already present. Are you sure you want to continue?</source> - <translation>Внешний каталог «%1» уже существует. Установка в него удалит все существующие в нём файлы. + <translation>Внешний каталог «%1» уже существует. Развёртывание в него удалит все существующие в нём файлы. Продолжить?</translation> </message> @@ -38452,7 +39869,7 @@ Are you sure you want to continue?</source> </message> <message> <source>Deploy Qt to QNX Device</source> - <translation>Установить Qt на устройство QNX</translation> + <translation>Развёртывание Qt на устройство QNX</translation> </message> </context> <context> @@ -38462,8 +39879,12 @@ Are you sure you want to continue?</source> <translation>QNX</translation> </message> <message> + <source>QNX Device</source> + <translation>Устройство QNX</translation> + </message> + <message> <source>Deploy Qt libraries...</source> - <translation>Установить библиотеки Qt...</translation> + <translation>Развернуть библиотеки Qt...</translation> </message> </context> <context> @@ -38515,10 +39936,6 @@ Are you sure you want to continue?</source> <context> <name>Qnx::Internal::QnxDeviceWizard</name> <message> - <source>QNX Device</source> - <translation>Устройство QNX</translation> - </message> - <message> <source>New QNX Device Configuration Setup</source> <translation>Настройка новой конфигурации устройства QNX</translation> </message> @@ -38552,6 +39969,18 @@ Are you sure you want to continue?</source> <context> <name>Qnx::Internal::QnxRunConfiguration</name> <message> + <source>Executable on device:</source> + <translation>Программа на устройстве:</translation> + </message> + <message> + <source>Remote path not set</source> + <translation>Не задан внешний путь</translation> + </message> + <message> + <source>Executable on host:</source> + <translation>Программа на машине:</translation> + </message> + <message> <source>Path to Qt libraries on device</source> <translation>Путь к библиотекам Qt на устройстве</translation> </message> @@ -38657,10 +40086,6 @@ Are you sure you want to continue?</source> <context> <name>QrcEditor</name> <message> - <source>Add</source> - <translation>Добавить</translation> - </message> - <message> <source>Remove</source> <translation>Удалить</translation> </message> @@ -38684,6 +40109,14 @@ Are you sure you want to continue?</source> <source>Remove Missing Files</source> <translation>Удалить отсутствующие файлы</translation> </message> + <message> + <source>Add Prefix</source> + <translation>Добавить префикс</translation> + </message> + <message> + <source>Add Files</source> + <translation>Добавить файлы</translation> + </message> </context> <context> <name>QtCreatorSearchHandle</name> @@ -38728,105 +40161,6 @@ For more details, see /etc/sysctl.d/10-ptrace.conf </message> </context> <context> - <name>QtModulesInfo</name> - <message> - <source>Core non-GUI classes used by other modules</source> - <translation>Основные неграфические классы, используемые другими модулями</translation> - </message> - <message> - <source>Base classes for graphical user interface (GUI) components. (Qt 4: Includes widgets. Qt 5: Includes OpenGL.)</source> - <translation>Базовые классы для компонентов графического интерфейса пользователя (GUI). (Qt 4: включает виджеты. Qt 5: включает OpenGL.)</translation> - </message> - <message> - <source>Classes to extend Qt GUI with C++ widgets (Qt 5)</source> - <translation>Классы для улучшения Qt GUI виджетами C++ (Qt5)</translation> - </message> - <message> - <source>Qt Quick 1 classes</source> - <translation>Классы Qt Quick 1</translation> - </message> - <message> - <source>Classes for QML and JavaScript languages (Qt 5)</source> - <translation>Классы для языков QML и JavaScript (Qt 5)</translation> - </message> - <message> - <source>A declarative framework for building highly dynamic applications with custom user interfaces</source> - <translation>Декларативная среда для создания динамичных приложений с особым интерфейсом</translation> - </message> - <message> - <source>Classes for network programming</source> - <translation>Классы для работы с сетью</translation> - </message> - <message> - <source>OpenGL support classes</source> - <translation>Классы для работы с OpenGL</translation> - </message> - <message> - <source>Print support classes (Qt 5)</source> - <translation>Классы поддержки печати (Qt 5)</translation> - </message> - <message> - <source>Classes for database integration using SQL</source> - <translation>Классы интеграции с базами данных SQL</translation> - </message> - <message> - <source>Classes for evaluating Qt Scripts</source> - <translation>Классы для обработки сценариев Qt</translation> - </message> - <message> - <source>Additional Qt Script components</source> - <translation>Дополнительные компоненты Qt Script</translation> - </message> - <message> - <source>Classes for displaying the contents of SVG files</source> - <translation>Классы для отображения содержимого файлов SVG</translation> - </message> - <message> - <source>Classes for displaying and editing Web content using Chromium backend</source> - <translation>Классы для отображения и изменения Web-содержимого с использованием движка Chromium</translation> - </message> - <message> - <source>WebEngine and QWidget-based classes using Chromium backend</source> - <translation>WebEngine и классы на базе QWidget, использующие движок Chromium</translation> - </message> - <message> - <source>Classes for displaying and editing Web content</source> - <translation>Классы для отображения и правки веб-страниц</translation> - </message> - <message> - <source>WebKit1 and QWidget-based classes from Qt 4 (Qt 5)</source> - <translation>Классы на базе WebKit1 и QWidget из Qt 4 (Qt 5)</translation> - </message> - <message> - <source>Classes for handling XML</source> - <translation>Классы для работы с XML</translation> - </message> - <message> - <source>An XQuery/XPath engine for XML and custom data models</source> - <translation>Движок XQuery/XPath для XML и пользовательских моделей данных</translation> - </message> - <message> - <source>Multimedia framework classes (Qt 4 only)</source> - <translation>Классы мультимедийной системы (только Qt 4)</translation> - </message> - <message> - <source>Classes that ease porting from Qt 3 to Qt 4 (Qt 4 only)</source> - <translation>Классы для упрощённой миграции с Qt 3 на Qt 4 (только Qt 4)</translation> - </message> - <message> - <source>Classes for low-level multimedia functionality</source> - <translation>Классы для низкоуровневой работы с мультимедиа-содержимым</translation> - </message> - <message> - <source>Tool classes for unit testing</source> - <translation>Служебные классы для юнит-тестирования</translation> - </message> - <message> - <source>Classes for Inter-Process Communication using the D-Bus</source> - <translation>Классы для межпроцессного взаимодействия с использованием D-Bus</translation> - </message> -</context> -<context> <name>QtObjectPane</name> <message> <source>Type</source> @@ -39085,6 +40419,25 @@ For more details, see /etc/sysctl.d/10-ptrace.conf </message> </context> <context> + <name>QtSupport::Internal::TranslationWizardPage</name> + <message> + <source>If you plan to provide translations for your project's user interface via the Qt Linguist tool, please select a language here. A corresponding translation (.ts) file will be generated for you.</source> + <translation>Укажите здесь язык, если планируете обеспечить проект переводами интерфейса утилитой Qt Linguist. Будет создан соответствующий файл перевода (.ts).</translation> + </message> + <message> + <source><none></source> + <translation><нет></translation> + </message> + <message> + <source>Language:</source> + <translation>Язык:</translation> + </message> + <message> + <source>Translation file:</source> + <translation>Файл перевода:</translation> + </message> +</context> +<context> <name>QtSupport::ProMessageHandler</name> <message> <source>[Inexact] </source> @@ -39303,6 +40656,11 @@ For more details, see /etc/sysctl.d/10-ptrace.conf <comment>Qt Version is used for embedded Linux development</comment> <translation>Встраиваемый Linux</translation> </message> + <message> + <source>Boot2Qt</source> + <comment>Qt version is used for Boot2Qt development</comment> + <translation>Boot2Qt</translation> + </message> </context> <context> <name>QuickFix::ExtractFunction</name> @@ -39373,6 +40731,21 @@ For more details, see /etc/sysctl.d/10-ptrace.conf </message> </context> <context> + <name>RangeDetails</name> + <message> + <source>Edit note</source> + <translation>Изменить заметку</translation> + </message> + <message> + <source>View event information on mouseover.</source> + <translation>Показывать информацию о событии при наведении курсора.</translation> + </message> + <message> + <source>Close</source> + <translation>Закрыть</translation> + </message> +</context> +<context> <name>RectangleSpecifics</name> <message> <source>Color</source> @@ -39402,14 +40775,14 @@ For more details, see /etc/sysctl.d/10-ptrace.conf <name>RemoteLinux</name> <message> <source>Deploy to Remote Linux Host</source> - <translation>Установить на удалённую машину с Linux</translation> + <translation>Развернуть на удалённую машину с Linux</translation> </message> </context> <context> <name>RemoteLinux::AbstractRemoteLinuxDeployService</name> <message> <source>No deployment action necessary. Skipping.</source> - <translation>Нет необходимости в установке. Пропущено.</translation> + <translation>Нет необходимости в развёртывании. Пропущено.</translation> </message> <message> <source>No device configuration set.</source> @@ -39440,19 +40813,19 @@ For more details, see /etc/sysctl.d/10-ptrace.conf <name>RemoteLinux::AbstractRemoteLinuxDeployStep</name> <message> <source>Cannot deploy: %1</source> - <translation>Невозможно установить: %1</translation> + <translation>Невозможно развернуть: %1</translation> </message> <message> <source>User requests deployment to stop; cleaning up.</source> - <translation>Пользователь потребовал остановить установку; очистка.</translation> + <translation>Пользователь потребовал остановить развёртывание; очистка.</translation> </message> <message> <source>Deploy step failed.</source> - <translation>Ошибка этапа установки.</translation> + <translation>Ошибка этапа развёртывания.</translation> </message> <message> <source>Deploy step finished.</source> - <translation>Этап установки завершён.</translation> + <translation>Этап развёртывания завершён.</translation> </message> </context> <context> @@ -39485,7 +40858,7 @@ For more details, see /etc/sysctl.d/10-ptrace.conf <name>RemoteLinux::GenericDirectUploadService</name> <message> <source>Failed to retrieve remote timestamp for file "%1". Incremental deployment will not work. Error message was: %2</source> - <translation>Не удалось получить временную метку внешнего файла «%1». Инкрементальная установка не будет работать. Ошибка: %2</translation> + <translation>Не удалось получить временную метку внешнего файла «%1». Инкрементальное развёртывание не будет работать. Ошибка: %2</translation> </message> <message> <source>Unexpected stat output for remote file "%1": %2</source> @@ -39493,7 +40866,7 @@ For more details, see /etc/sysctl.d/10-ptrace.conf </message> <message> <source>All files successfully deployed.</source> - <translation>Все файлы успешно установлены.</translation> + <translation>Все файлы успешно развёрнуты.</translation> </message> <message> <source>No files need to be uploaded.</source> @@ -39520,7 +40893,7 @@ For more details, see /etc/sysctl.d/10-ptrace.conf <name>RemoteLinux::GenericDirectUploadStep</name> <message> <source>Incremental deployment</source> - <translation>Инкрементальная установка</translation> + <translation>Инкрементальное развёртывание</translation> </message> <message> <source>Ignore missing files</source> @@ -39620,10 +40993,6 @@ For more details, see /etc/sysctl.d/10-ptrace.conf <source>New Generic Linux Device Configuration Setup</source> <translation>Настройка новой конфигурации устройства на базе Linux</translation> </message> - <message> - <source>Generic Linux Device</source> - <translation>Обычное Linux-устройство</translation> - </message> </context> <context> <name>RemoteLinux::GenericLinuxDeviceConfigurationWizardFinalPage</name> @@ -39719,10 +41088,6 @@ If you do not have a private key yet, you can also create one here.</source> </translation> </message> <message> - <source>sftp finished unexpectedly.</source> - <translation>sftp неожиданно завершился.</translation> - </message> - <message> <source>Error setting up SFTP connection: %1 </source> <translation>Ошибка установки SFTP подключения: %1 @@ -39753,13 +41118,13 @@ If you do not have a private key yet, you can also create one here.</source> <message> <source>SFTP will be used for deployment, because rsync is not available. </source> - <translation>Для установки будет использоваться SFTP, так как rsync недоступен. + <translation>Для развёртывания будет использоваться SFTP, так как rsync недоступен. </translation> </message> <message> <source>Deployment to this device will not work out of the box. </source> - <translation>Установка на это устройство не работает «из коробки». + <translation>Развёртывание на это устройство не работает «из коробки». </translation> </message> <message> @@ -39799,6 +41164,10 @@ If you do not have a private key yet, you can also create one here.</source> <translation>Обычный Linux</translation> </message> <message> + <source>Generic Linux Device</source> + <translation>Обычное Linux-устройство</translation> + </message> + <message> <source>Deploy Public Key...</source> <translation>Установить ключ...</translation> </message> @@ -39823,50 +41192,6 @@ If you do not have a private key yet, you can also create one here.</source> </message> </context> <context> - <name>RemoteLinux::Internal::MakeInstallStep</name> - <message> - <source>Command:</source> - <translation>Команда:</translation> - </message> - <message> - <source>Install root:</source> - <translation>Корень установки:</translation> - </message> - <message> - <source>Clean install root first</source> - <translation>Сначала очищать корень установки</translation> - </message> - <message> - <source>Full command line:</source> - <translation>Полная командная строка:</translation> - </message> - <message> - <source>Install into temporary host directory</source> - <translatorcomment>что-то сомневаюсь, что речь о том, чтобы установить в каталог временного хоста</translatorcomment> - <translation>Установить во временный каталог хоста</translation> - </message> - <message> - <source>You must provide an install root.</source> - <translation>Необходимо указать корень установки.</translation> - </message> - <message> - <source>The install root "%1" could not be cleaned.</source> - <translation>Не удалось очистить корень установки «%1».</translation> - </message> - <message> - <source>The install root "%1" could not be created.</source> - <translation>Не удалось создать корень установки «%1».</translation> - </message> - <message> - <source>The "make install" step should probably not be last in the list of deploy steps. Consider moving it up.</source> - <translation>Шаг «make install», обычно, должен быть не последним в списке шагов развёртывания. Возможно, стоит его поднять.</translation> - </message> - <message> - <source>You need to add an install statement to your CMakeLists.txt file for deployment to work.</source> - <translation>Для работы развёртывания необходимо добавить оператор установки в файл CMakeLists.txt.</translation> - </message> -</context> -<context> <name>RemoteLinux::Internal::PackageUploader</name> <message> <source>Preparing SFTP connection...</source> @@ -39933,6 +41258,21 @@ If you do not have a private key yet, you can also create one here.</source> </message> </context> <context> + <name>RemoteLinux::Internal::RemoteLinuxRunConfiguration</name> + <message> + <source>Executable on device:</source> + <translation>Программа на устройстве:</translation> + </message> + <message> + <source>Remote path not set</source> + <translation>Не задан внешний путь</translation> + </message> + <message> + <source>Executable on host:</source> + <translation>Программа на машине:</translation> + </message> +</context> +<context> <name>RemoteLinux::Internal::RsyncDeployService</name> <message> <source>Failed to create remote directories: %1</source> @@ -39959,6 +41299,49 @@ If you do not have a private key yet, you can also create one here.</source> </message> </context> <context> + <name>RemoteLinux::MakeInstallStep</name> + <message> + <source>Command:</source> + <translation>Команда:</translation> + </message> + <message> + <source>Install root:</source> + <translation>Корень установки:</translation> + </message> + <message> + <source>Clean install root first</source> + <translation>Сначала очищать корень установки</translation> + </message> + <message> + <source>Full command line:</source> + <translation>Полная командная строка:</translation> + </message> + <message> + <source>Install into temporary host directory</source> + <translation>Установить во временный каталог хоста</translation> + </message> + <message> + <source>You must provide an install root.</source> + <translation>Необходимо указать корень установки.</translation> + </message> + <message> + <source>The install root "%1" could not be cleaned.</source> + <translation>Не удалось очистить корень установки «%1».</translation> + </message> + <message> + <source>The install root "%1" could not be created.</source> + <translation>Не удалось создать корень установки «%1».</translation> + </message> + <message> + <source>The "make install" step should probably not be last in the list of deploy steps. Consider moving it up.</source> + <translation>Шаг «make install», обычно, должен быть не последним в списке шагов развёртывания. Возможно, стоит его поднять.</translation> + </message> + <message> + <source>You need to add an install statement to your CMakeLists.txt file for deployment to work.</source> + <translation>Для работы развёртывания необходимо добавить оператор установки в файл CMakeLists.txt.</translation> + </message> +</context> +<context> <name>RemoteLinux::PublicKeyDeploymentDialog</name> <message> <source>Choose Public Key File</source> @@ -40126,21 +41509,6 @@ If you do not have a private key yet, you can also create one here.</source> </message> </context> <context> - <name>RemoteLinux::RemoteLinuxRunConfiguration</name> - <message> - <source>Executable on device:</source> - <translation>Программа на устройстве:</translation> - </message> - <message> - <source>Remote path not set</source> - <translation>Не задан внешний путь</translation> - </message> - <message> - <source>Executable on host:</source> - <translation>Программа на машине:</translation> - </message> -</context> -<context> <name>RemoteLinux::RemoteLinuxSignalOperation</name> <message> <source>Exit code is %1. stderr:</source> @@ -40280,14 +41648,6 @@ If you do not have a private key yet, you can also create one here.</source> <context> <name>ResourceEditor::Internal::QrcEditor</name> <message> - <source>Add Files</source> - <translation>Добавить файлы</translation> - </message> - <message> - <source>Add Prefix</source> - <translation>Добавить префикс</translation> - </message> - <message> <source>Invalid file location</source> <translation>Неверное размещение файла</translation> </message> @@ -41434,6 +42794,10 @@ Row: %4, Column: %5 <source>Duration</source> <translation>Продолжительность</translation> </message> + <message> + <source>Close</source> + <translation>Закрыть</translation> + </message> </context> <context> <name>SerialTerminal::Internal::SerialControl</name> @@ -41993,13 +43357,6 @@ Row: %4, Column: %5 </message> </context> <context> - <name>Syntax highlighting</name> - <message> - <source>None</source> - <translation>Нет</translation> - </message> -</context> -<context> <name>SyntaxHighlightingCLI</name> <message> <source>Command line syntax highlighter using Kate syntax definitions.</source> @@ -42128,18 +43485,6 @@ Row: %4, Column: %5 <translation>Настроить проект</translation> </message> <message> - <source>The project <b>%1</b> is not yet configured.<br/>%2 cannot parse the project, because no kit has been set up.</source> - <translation>Проект <b>%1</b> ещё не настроен.<br/>%2 не может обработать проект, так как комплект не задан.</translation> - </message> - <message> - <source>The project <b>%1</b> is not yet configured.<br/>%2 uses the kit <b>%3</b> to parse the project.</source> - <translation>Проект <b>%1</b> ещё не настроен.<br/>Для обработки проекта %2 использует комплект <b>%3</b>.</translation> - </message> - <message> - <source>The project <b>%1</b> is not yet configured.<br/>%2 uses the <b>invalid</b> kit <b>%3</b> to parse the project.</source> - <translation>Проект <b>%1</b> ещё не настроен.<br/>Для обработки проекта %2 использует <b>неверный</b> комплект <b>%3</b>.</translation> - </message> - <message> <source>Kit is unsuited for project</source> <translation>Комплект не подходит проекту</translation> </message> @@ -42202,6 +43547,10 @@ Row: %4, Column: %5 <source>Warning</source> <translation>Предупреждение</translation> </message> + <message> + <source>Build Issue</source> + <translation>Проблема сборки</translation> + </message> </context> <context> <name>TaskList::Internal::StopMonitoringHandler</name> @@ -42400,12 +43749,12 @@ Row: %4, Column: %5 <context> <name>TextEditor::BaseTextEditor</name> <message> - <source>A highlight definition was not found for this file. Would you like to update highlight definition files?</source> - <translation>Не удалось найти определения подсветки для этого файла. Обновить файлы определений подсветки?</translation> + <source>A highlight definition was not found for this file. Would you like to download additional highlight definition files?</source> + <translation>Не удалось найти определения подсветки для этого файла. Загрузить дополнительные файлы определений подсветки?</translation> </message> <message> - <source>Update Definitions</source> - <translation>Обновить определения</translation> + <source>Download Definitions</source> + <translation>Загрузить определения</translation> </message> <message> <source>More than one highlight definition was found for this file. Which one should be used to highlight this file?</source> @@ -42434,6 +43783,14 @@ Row: %4, Column: %5 <source>Displays context-sensitive help or type information on Shift+Mouseover.</source> <translation>Отображать контекстную справку или информацию о типе при наведении курсора мыши с зажатой клавишей Shift.</translation> </message> + <message> + <source>Unix (LF)</source> + <translation>Unix (LF)</translation> + </message> + <message> + <source>Windows (CRLF)</source> + <translation>Windows (CRLF)</translation> + </message> </context> <context> <name>TextEditor::CodeStyleEditor</name> @@ -42599,8 +43956,8 @@ Excluding: %3 <translation>Общая подсветка</translation> </message> <message> - <source>Update finished</source> - <translation>Обновление завершено</translation> + <source>Download finished</source> + <translation>Загрузка завершена</translation> </message> </context> <context> @@ -43330,10 +44687,6 @@ In addition, Shift+Enter inserts an escape character at the cursor position and <p>Определения подсветки предоставляются движком <a href="https://api.kde.org/frameworks/syntax-highlighting/html/index.html">KSyntaxHighlighting</a>.</p></body></html></translation> </message> <message> - <source>Update Definitions</source> - <translation>Обновить определения</translation> - </message> - <message> <source>User Highlight Definition Files</source> <translation>Пользовательские файлы определений подсветки</translation> </message> @@ -43345,6 +44698,22 @@ In addition, Shift+Enter inserts an escape character at the cursor position and <source>Reset Remembered Definitions</source> <translation>Сбросить привязки определений</translation> </message> + <message> + <source>Download missing and update existing syntax definition files.</source> + <translation>Загрузить отсутствующие и обновить существующие файлы определения синтаксиса.</translation> + </message> + <message> + <source>Download Definitions</source> + <translation>Загрузить</translation> + </message> + <message> + <source>Reload externally modified definition files.</source> + <translation>Перезагрузить из-вне изменённые файлы определений.</translation> + </message> + <message> + <source>Reload Definitions</source> + <translation>Перезагрузить</translation> + </message> </context> <context> <name>TextEditor::Internal::LineNumberFilter</name> @@ -44968,8 +46337,8 @@ The trace data is lost.</source> <translation>Изменить переходную кривую...</translation> </message> <message> - <source>Edit Value for Keyframe...</source> - <translation>Изменить значение для ключевого кадра...</translation> + <source>Edit Keyframe...</source> + <translation>Изменить ключевой кадр...</translation> </message> </context> <context> @@ -45221,12 +46590,16 @@ The trace data is lost.</source> <translation>Проверка обновлений</translation> </message> <message> - <source>Qt Updater</source> - <translation>Программа обновления Qt</translation> + <source>New updates are available. Start the update?</source> + <translation>Доступны новые обновления. Начать обновление?</translation> + </message> + <message> + <source>Start Update</source> + <translation>Начать обновление</translation> </message> <message> - <source>New updates are available. Do you want to start the update?</source> - <translation>Доступны новые обновления. Обновить?</translation> + <source>Available updates:</source> + <translation>Доступны обновления:</translation> </message> <message> <source>No updates found.</source> @@ -45430,18 +46803,20 @@ The trace data is lost.</source> <context> <name>Utils::EnvironmentDialog</name> <message> + <source>Edit Environment</source> + <translation>Изменение среды</translation> + </message> + <message> <source>Enter one environment variable per line. To set or change a variable, use VARIABLE=VALUE. Existing variables can be referenced in a VALUE with ${OTHER}. -To clear a variable, put its name on a line with nothing else on it.</source> +To clear a variable, put its name on a line with nothing else on it. +To disable a variable, prefix the line with "#"</source> <translation>Вводите по одной переменной среды на строку. Для задания или изменения переменной используйте VARIABLE=VALUE. В значениях можно обращаться к другим переменным через ${OTHER}. -Для очистки переменной в строке укажите только её имя и больше ничего.</translation> - </message> - <message> - <source>Edit Environment</source> - <translation>Изменение среды</translation> +Для очистки переменной в строке укажите только её имя и больше ничего. +Для отключения переменной, закомментируйте строку символом «#»</translation> </message> </context> <context> @@ -45458,27 +46833,9 @@ To clear a variable, put its name on a line with nothing else on it.</source> <context> <name>Utils::EnvironmentModel</name> <message> - <source><UNSET></source> - <translation><не задано></translation> - </message> - <message> - <source>Variable</source> - <translation>Переменная</translation> - </message> - <message> - <source>Value</source> - <translation>Значение</translation> - </message> - <message> <source><VARIABLE></source> - <extracomment>Name when inserting a new variable</extracomment> <translation><переменная></translation> </message> - <message> - <source><VALUE></source> - <extracomment>Value when inserting a new variable</extracomment> - <translation><значение></translation> - </message> </context> <context> <name>Utils::FancyLineEdit</name> @@ -45699,6 +47056,31 @@ To clear a variable, put its name on a line with nothing else on it.</source> </message> </context> <context> + <name>Utils::NameValueModel</name> + <message> + <source><UNSET></source> + <translation><не задано></translation> + </message> + <message> + <source>Variable</source> + <translation>Переменная</translation> + </message> + <message> + <source>Value</source> + <translation>Значение</translation> + </message> + <message> + <source><VARIABLE></source> + <extracomment>Name when inserting a new variable</extracomment> + <translation><переменная></translation> + </message> + <message> + <source><VALUE></source> + <extracomment>Value when inserting a new variable</extracomment> + <translation><значение></translation> + </message> +</context> +<context> <name>Utils::NewClassWidget</name> <message> <source>Invalid base class name</source> @@ -45982,8 +47364,8 @@ To clear a variable, put its name on a line with nothing else on it.</source> <translation>Подходящие настройки не найдены</translation> </message> <message> - <source><p>No valid settings file could be found.</p><p>All settings files found in directory "%1" were unsuitable for the current version of %2.</p></source> - <translation><p>Не удалось найти корректный файл настроек.</p><p>Все найденные в каталоге «%1» файлы настроек не подходят для текущей версии %2.</p></translation> + <source><p>No valid settings file could be found.</p><p>All settings files found in directory "%1" were unsuitable for the current version of %2, for instance because they were written by an incompatible version of %2, or because a different settings path was used.</p></source> + <translation><p>Не удалось найти корректный файл настроек.</p><p>Все найденные в каталоге «%1» файлы настроек не подходят для текущей версии %2, например, потому что они могли быть написаны для несовместимой версии %2, или по причине использования другого пути к настройкам.</p></translation> </message> <message> <source><p>No valid settings file could be found.</p><p>All settings files found in directory "%1" were either too new or too old to be read.</p></source> @@ -47825,12 +49207,63 @@ What do you want to do?</source> </message> </context> <context> - <name>Welcome::Internal::IntroductionWidget</name> + <name>WebAssembly::Internal::EmrunRunConfigurationFactory</name> + <message> + <source>Effective emrun call:</source> + <translation>Команда запуска emrun:</translation> + </message> + <message> + <source>Launch with emrun</source> + <translation>Запустить через emrun</translation> + </message> +</context> +<context> + <name>WebAssembly::Internal::WebAssemblyDevice</name> + <message> + <source>Web Browser</source> + <translation>Браузер</translation> + </message> +</context> +<context> + <name>WebAssembly::Internal::WebAssemblyDeviceFactory</name> + <message> + <source>WebAssembly Runtime</source> + <translation>Среда WebAssembly</translation> + </message> +</context> +<context> + <name>WebAssembly::Internal::WebAssemblyToolChainFactory</name> + <message> + <source>Emscripten Compiler</source> + <translation>Компилятор Emscripten</translation> + </message> + <message> + <source>WebAssembly</source> + <translation>WebAssembly</translation> + </message> +</context> +<context> + <name>WebAssembly::Internal::WebBrowserSelectionAspect</name> <message> - <source>Take a UI Tour</source> - <translation>Знакомство с интерфейсом пользователя</translation> + <source>Web browser</source> + <translation>Браузер</translation> </message> <message> + <source>Web browser:</source> + <translation>Браузер:</translation> + </message> +</context> +<context> + <name>WebAssemblyPlugin</name> + <message> + <source>WebAssembly</source> + <comment>Qt Version is meant for WebAssembly</comment> + <translation>WebAssembly</translation> + </message> +</context> +<context> + <name>Welcome::Internal::IntroductionWidget</name> + <message> <source>Would you like to take a quick UI tour? This tour highlights important user interface elements and shows how they are used. To take the tour later, select Help > UI Tour.</source> <translation>Желаете познакомиться с интерфейсом программы? Всего за минуту вы узнаете, где и как используются наиболее важные элементы интерфейса пользователя. Ознакомиться можно и позже, для этого нужно зайти в Справка > Знакомство.</translation> </message> @@ -48069,11 +49502,11 @@ What do you want to do?</source> </message> <message> <source>Deploy to Windows Phone</source> - <translation>Установка на Windows Phone</translation> + <translation>Развёртывание на Windows Phone</translation> </message> <message> <source>Deploy to Windows Phone Emulator</source> - <translation>Установка на эмулятор Windows Phone</translation> + <translation>Развёртывание на эмулятор Windows Phone</translation> </message> </context> <context> @@ -48149,7 +49582,7 @@ What do you want to do?</source> </message> <message> <source>No executable to deploy found in %1.</source> - <translation>В %1 не обнаружен исполняемый файл для установки.</translation> + <translation>В %1 не обнаружен исполняемый файл для развёртывания.</translation> </message> <message> <source>Cannot find windeployqt.exe in "%1".</source> diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index 87f2d8b60e6..d8714476ed6 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -870,6 +870,7 @@ FilePath AndroidConfig::qtLiveApkPath() const /////////////////////////////////// void AndroidConfigurations::setConfig(const AndroidConfig &devConfigs) { + emit m_instance->aboutToUpdate(); m_instance->m_config = devConfigs; m_instance->save(); diff --git a/src/plugins/android/androidconfigurations.h b/src/plugins/android/androidconfigurations.h index aba533fc279..c19e68dbf44 100644 --- a/src/plugins/android/androidconfigurations.h +++ b/src/plugins/android/androidconfigurations.h @@ -209,6 +209,7 @@ public: static QProcessEnvironment toolsEnvironment(const AndroidConfig &config); signals: + void aboutToUpdate(); void updated(); private: diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index 4958bd02a3c..80e6fbbd801 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -288,8 +288,8 @@ QJsonObject AndroidManager::deploymentSettings(const Target *target) Utils::FilePath AndroidManager::dirPath(const ProjectExplorer::Target *target) { - if (target->activeBuildConfiguration()) - return target->activeBuildConfiguration()->buildDirectory().pathAppended(Constants::ANDROID_BUILDDIRECTORY); + if (auto *bc = target->activeBuildConfiguration()) + return bc->buildDirectory().pathAppended(Constants::ANDROID_BUILDDIRECTORY); return Utils::FilePath(); } diff --git a/src/plugins/android/androidqtversion.cpp b/src/plugins/android/androidqtversion.cpp index ff8606a1e0a..48aeab8e543 100644 --- a/src/plugins/android/androidqtversion.cpp +++ b/src/plugins/android/androidqtversion.cpp @@ -49,7 +49,12 @@ namespace Internal { AndroidQtVersion::AndroidQtVersion() : QtSupport::BaseQtVersion() + , m_guard(std::make_unique<QObject>()) { + QObject::connect(AndroidConfigurations::instance(), + &AndroidConfigurations::aboutToUpdate, + m_guard.get(), + [this] { resetCache(); }); } bool AndroidQtVersion::isValid() const diff --git a/src/plugins/android/androidqtversion.h b/src/plugins/android/androidqtversion.h index c9869608191..5098f533565 100644 --- a/src/plugins/android/androidqtversion.h +++ b/src/plugins/android/androidqtversion.h @@ -58,6 +58,7 @@ public: protected: void parseMkSpec(ProFileEvaluator *) const override; private: + std::unique_ptr<QObject> m_guard; mutable QStringList m_androidAbis; mutable int m_minNdk = -1; }; diff --git a/src/plugins/android/androidrunnerworker.cpp b/src/plugins/android/androidrunnerworker.cpp index e4e1adf924a..caf97cb2829 100644 --- a/src/plugins/android/androidrunnerworker.cpp +++ b/src/plugins/android/androidrunnerworker.cpp @@ -67,7 +67,7 @@ using namespace Utils; namespace Android { namespace Internal { -static const QString pidScript = "pidof -s \"%1\""; +static const QString pidScript = "pidof -s '%1'"; static const QString pidScriptPreNougat = QStringLiteral("for p in /proc/[0-9]*; " "do cat <$p/cmdline && echo :${p##*/}; done"); static const QString pidPollingScript = QStringLiteral("while [ -d /proc/%1 ]; do sleep 1; done"); @@ -288,8 +288,8 @@ bool AndroidRunnerWorker::uploadGdbServer() qCDebug(androidRunWorkerLog) << "Gdbserver copy from temp directory failed"; return false; } - QTC_ASSERT(runAdb({"shell", "run-as", m_packageName, "chmod", "+x", "./gdbserver"}), - qCDebug(androidRunWorkerLog) << "Gdbserver chmod +x failed."); + QTC_ASSERT(runAdb({"shell", "run-as", m_packageName, "chmod", "777", "./gdbserver"}), + qCDebug(androidRunWorkerLog) << "Gdbserver chmod 777 failed."); return true; } diff --git a/src/plugins/autotest/gtest/gtest_utils.cpp b/src/plugins/autotest/gtest/gtest_utils.cpp index 94f608b3341..1035cf5bb2a 100644 --- a/src/plugins/autotest/gtest/gtest_utils.cpp +++ b/src/plugins/autotest/gtest/gtest_utils.cpp @@ -34,7 +34,8 @@ namespace GTestUtils { static const QStringList valid = { QStringLiteral("TEST"), QStringLiteral("TEST_F"), QStringLiteral("TEST_P"), - QStringLiteral("TYPED_TEST"), QStringLiteral("TYPED_TEST_P") + QStringLiteral("TYPED_TEST"), QStringLiteral("TYPED_TEST_P"), + QStringLiteral("GTEST_TEST") }; bool isGTestMacro(const QString ¯o) diff --git a/src/plugins/autotest/testresultspane.cpp b/src/plugins/autotest/testresultspane.cpp index 234c521b87e..baac198a376 100644 --- a/src/plugins/autotest/testresultspane.cpp +++ b/src/plugins/autotest/testresultspane.cpp @@ -46,7 +46,9 @@ #include <coreplugin/icore.h> #include <projectexplorer/buildmanager.h> #include <projectexplorer/projectexplorer.h> +#include <texteditor/fontsettings.h> #include <texteditor/texteditor.h> +#include <texteditor/texteditorsettings.h> #include <utils/qtcassert.h> #include <utils/theme/theme.h> #include <utils/utilsicons.h> @@ -131,9 +133,7 @@ TestResultsPane::TestResultsPane(QObject *parent) : m_textOutput = new QPlainTextEdit; m_textOutput->setPalette(pal); - QFont font("monospace"); - font.setStyleHint(QFont::TypeWriter); - m_textOutput->setFont(font); + m_textOutput->setFont(TextEditor::TextEditorSettings::fontSettings().font()); m_textOutput->setWordWrapMode(QTextOption::WordWrap); m_textOutput->setReadOnly(true); new OutputHighlighter(m_textOutput->document()); diff --git a/src/plugins/bineditor/bineditorwidget.cpp b/src/plugins/bineditor/bineditorwidget.cpp index 561b133925a..9cf0a06c4d1 100644 --- a/src/plugins/bineditor/bineditorwidget.cpp +++ b/src/plugins/bineditor/bineditorwidget.cpp @@ -1179,7 +1179,6 @@ QString BinEditorWidget::toolTip(const QHelpEvent *helpEvent) const if (!pos) return QString(); selStart = pos.value(); - selEnd = selStart; byteCount = 1; } diff --git a/src/plugins/clangcodemodel/clangutils.cpp b/src/plugins/clangcodemodel/clangutils.cpp index e7d7de420a8..2734f232557 100644 --- a/src/plugins/clangcodemodel/clangutils.cpp +++ b/src/plugins/clangcodemodel/clangutils.cpp @@ -315,15 +315,11 @@ static ::Utils::FilePath compilerPath(const CppTools::ProjectPart &projectPart) static ::Utils::FilePath buildDirectory(const ProjectExplorer::Project &project) { - ProjectExplorer::Target *target = project.activeTarget(); - if (!target) - return ::Utils::FilePath(); - - ProjectExplorer::BuildConfiguration *buildConfig = target->activeBuildConfiguration(); - if (!buildConfig) - return ::Utils::FilePath(); - - return buildConfig->buildDirectory(); + if (auto *target = project.activeTarget()) { + if (auto *bc = target->activeBuildConfiguration()) + return bc->buildDirectory(); + } + return {}; } static QStringList projectPartArguments(const ProjectPart &projectPart) diff --git a/src/plugins/clangtools/clangtoolruncontrol.cpp b/src/plugins/clangtools/clangtoolruncontrol.cpp index e58b77a7690..b4d7804f962 100644 --- a/src/plugins/clangtools/clangtoolruncontrol.cpp +++ b/src/plugins/clangtools/clangtoolruncontrol.cpp @@ -495,7 +495,7 @@ void ClangToolRunWorker::finalize() QString msg = tr("%1: Not all files could be analyzed.").arg(toolName); TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID); Target *target = runControl()->target(); - if (target && !target->activeBuildConfiguration()->buildDirectory().exists() + if (target && target->activeBuildConfiguration() && !target->activeBuildConfiguration()->buildDirectory().exists() && !m_runSettings.buildBeforeAnalysis()) { msg = tr("%1: You might need to build the project to generate or update source " "files. To build automatically, enable \"Build the project before starting " diff --git a/src/plugins/clangtools/clangtoolsunittests.cpp b/src/plugins/clangtools/clangtoolsunittests.cpp index 609d666ed54..cd20781c172 100644 --- a/src/plugins/clangtools/clangtoolsunittests.cpp +++ b/src/plugins/clangtools/clangtoolsunittests.cpp @@ -159,7 +159,7 @@ void ClangToolsUnitTests::testProject_data() // Test that tidy and clazy diagnostics are emitted for the same project. addTestRow("clangtidy_clazy/clangtidy_clazy.pro", 1 /*tidy*/ + 1 /*clazy*/, - configFor("misc-unconventional-assign-operator", "base-class-event")); + configFor("misc-unconventional-assign-operator", "qgetenv")); } void ClangToolsUnitTests::addTestRow(const QByteArray &relativeFilePath, diff --git a/src/plugins/clangtools/unit-tests/clangtidy_clazy/clazy_example.cpp b/src/plugins/clangtools/unit-tests/clangtidy_clazy/clazy_example.cpp index 5cd980d24c4..c692e5e697c 100644 --- a/src/plugins/clangtools/unit-tests/clangtidy_clazy/clazy_example.cpp +++ b/src/plugins/clangtools/unit-tests/clangtidy_clazy/clazy_example.cpp @@ -23,19 +23,11 @@ ** ****************************************************************************/ -#include <QCoreApplication> +#include <QByteArray> +#include <QtGlobal> -// -Wclazy-ctor-missing-parent-argument -class TestObject : public QObject +void test() { - Q_OBJECT - -public: - TestObject(); - - bool event(QEvent *) override - { - // -Wclazy-base-class-event - return false; - } -}; + // -Wclazy-qgetenv + qgetenv("Foo").isEmpty(); +} diff --git a/src/plugins/cmakeprojectmanager/builddirparameters.cpp b/src/plugins/cmakeprojectmanager/builddirparameters.cpp index 6bf4ccc8c39..1c71396c760 100644 --- a/src/plugins/cmakeprojectmanager/builddirparameters.cpp +++ b/src/plugins/cmakeprojectmanager/builddirparameters.cpp @@ -27,6 +27,8 @@ #include "cmakebuildconfiguration.h" #include "cmakekitinformation.h" +#include "cmakeprojectplugin.h" +#include "cmakespecificsettings.h" #include "cmaketoolmanager.h" #include <projectexplorer/kit.h> @@ -61,6 +63,10 @@ BuildDirParameters::BuildDirParameters(CMakeBuildConfiguration *bc) if (Utils::HostOsInfo::isAnyUnixHost()) environment.set("ICECC", "no"); + CMakeSpecificSettings *settings = CMakeProjectPlugin::projectTypeSpecificSettings(); + if (!settings->ninjaPath().isEmpty()) + environment.appendOrSetPath(settings->ninjaPath().toString()); + cmakeToolId = CMakeKitAspect::cmakeToolId(k); auto tc = ToolChainKitAspect::toolChain(k, Constants::CXX_LANGUAGE_ID); diff --git a/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp b/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp index 53f69dac90b..49761545661 100644 --- a/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp +++ b/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp @@ -31,20 +31,24 @@ namespace Internal { namespace { static const char SETTINGS_KEY[] = "CMakeSpecificSettings"; static const char AFTER_ADD_FILE_ACTION_KEY[] = "ProjectPopupSetting"; +static const char NINJA_PATH[] = "NinjaPath"; } void CMakeSpecificSettings::fromSettings(QSettings *settings) { const QString rootKey = QString(SETTINGS_KEY) + '/'; - afterAddFileToProjectSetting = static_cast<AfterAddFileAction>( + m_afterAddFileToProjectSetting = static_cast<AfterAddFileAction>( settings->value(rootKey + AFTER_ADD_FILE_ACTION_KEY, static_cast<int>(AfterAddFileAction::ASK_USER)).toInt()); + + m_ninjaPath = Utils::FilePath::fromUserInput( + settings->value(rootKey + NINJA_PATH, QString()).toString()); } void CMakeSpecificSettings::toSettings(QSettings *settings) const { settings->beginGroup(QString(SETTINGS_KEY)); - settings->setValue(QString(AFTER_ADD_FILE_ACTION_KEY), static_cast<int>(afterAddFileToProjectSetting)); + settings->setValue(QString(AFTER_ADD_FILE_ACTION_KEY), static_cast<int>(m_afterAddFileToProjectSetting)); settings->endGroup(); } } diff --git a/src/plugins/cmakeprojectmanager/cmakespecificsettings.h b/src/plugins/cmakeprojectmanager/cmakespecificsettings.h index fe4d222593a..ca94bc2c73b 100644 --- a/src/plugins/cmakeprojectmanager/cmakespecificsettings.h +++ b/src/plugins/cmakeprojectmanager/cmakespecificsettings.h @@ -24,6 +24,7 @@ ****************************************************************************/ #pragma once +#include <utils/fileutils.h> #include <QSettings> namespace CMakeProjectManager { @@ -42,11 +43,14 @@ public: void fromSettings(QSettings *settings); void toSettings(QSettings *settings) const; - void setAfterAddFileSetting(AfterAddFileAction settings) { afterAddFileToProjectSetting = settings; } - AfterAddFileAction afterAddFileSetting() const { return afterAddFileToProjectSetting; } + void setAfterAddFileSetting(AfterAddFileAction settings) { m_afterAddFileToProjectSetting = settings; } + AfterAddFileAction afterAddFileSetting() const { return m_afterAddFileToProjectSetting; } + + Utils::FilePath ninjaPath() const { return m_ninjaPath; } private: - AfterAddFileAction afterAddFileToProjectSetting; + AfterAddFileAction m_afterAddFileToProjectSetting; + Utils::FilePath m_ninjaPath; }; } diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp index e8284c5e7e9..4efc3515295 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp @@ -107,7 +107,7 @@ class IntrospectionData { public: bool m_didAttemptToRun = false; - bool m_didRun = false; + bool m_didRun = true; bool m_hasServerMode = false; bool m_queriedServerMode = false; @@ -207,26 +207,17 @@ bool CMakeTool::isValid() const return m_introspection->m_didRun; } -Utils::SynchronousProcessResponse CMakeTool::run(const QStringList &args, bool mayFail) const +Utils::SynchronousProcessResponse CMakeTool::run(const QStringList &args, int timeoutS) const { - if (m_introspection->m_didAttemptToRun && !m_introspection->m_didRun) { - Utils::SynchronousProcessResponse response; - response.result = Utils::SynchronousProcessResponse::StartFailed; - return response; - } - Utils::SynchronousProcess cmake; - cmake.setTimeoutS(1); + cmake.setTimeoutS(timeoutS); cmake.setFlags(Utils::SynchronousProcess::UnixTerminalDisabled); Utils::Environment env = Utils::Environment::systemEnvironment(); Utils::Environment::setupEnglishOutput(&env); cmake.setProcessEnvironment(env.toProcessEnvironment()); cmake.setTimeOutMessageBoxEnabled(false); - Utils::SynchronousProcessResponse response = cmake.runBlocking({cmakeExecutable(), args}); - m_introspection->m_didAttemptToRun = true; - m_introspection->m_didRun = mayFail ? true : (response.result == Utils::SynchronousProcessResponse::Finished); - return response; + return cmake.runBlocking({cmakeExecutable(), args}); } QVariantMap CMakeTool::toMap() const @@ -298,21 +289,21 @@ QList<CMakeTool::Generator> CMakeTool::supportedGenerators() const TextEditor::Keywords CMakeTool::keywords() { - if (m_introspection->m_functions.isEmpty()) { + if (m_introspection->m_functions.isEmpty() && m_introspection->m_didRun) { Utils::SynchronousProcessResponse response; - response = run({"--help-command-list"}); + response = run({"--help-command-list"}, 5); if (response.result == Utils::SynchronousProcessResponse::Finished) m_introspection->m_functions = response.stdOut().split('\n'); - response = run({"--help-commands"}); + response = run({"--help-commands"}, 5); if (response.result == Utils::SynchronousProcessResponse::Finished) parseFunctionDetailsOutput(response.stdOut()); - response = run({"--help-property-list"}); + response = run({"--help-property-list"}, 5); if (response.result == Utils::SynchronousProcessResponse::Finished) m_introspection->m_variables = parseVariableOutput(response.stdOut()); - response = run({"--help-variable-list"}); + response = run({"--help-variable-list"}, 5); if (response.result == Utils::SynchronousProcessResponse::Finished) { m_introspection->m_variables.append(parseVariableOutput(response.stdOut())); m_introspection->m_variables = Utils::filteredUnique(m_introspection->m_variables); @@ -417,25 +408,30 @@ Utils::FilePath CMakeTool::searchQchFile(const Utils::FilePath &executable) void CMakeTool::readInformation(CMakeTool::QueryType type) const { + if (!m_introspection->m_didRun && m_introspection->m_didAttemptToRun) + return; + + m_introspection->m_didAttemptToRun = true; + if (!m_introspection->m_triedCapabilities) { fetchFromCapabilities(); m_introspection->m_triedCapabilities = true; m_introspection->m_queriedServerMode = true; // Got added after "-E capabilities" support! - } - - if ((type == QueryType::GENERATORS && !m_introspection->m_generators.isEmpty()) - || (type == QueryType::SERVER_MODE && m_introspection->m_queriedServerMode) - || (type == QueryType::VERSION && !m_introspection->m_version.fullVersion.isEmpty())) - return; - - if (type == QueryType::GENERATORS) { - fetchGeneratorsFromHelp(); - } else if (type == QueryType::SERVER_MODE) { - // Nothing to do... - } else if (type == QueryType::VERSION) { - fetchVersionFromVersionOutput(); } else { - QTC_ASSERT(false, return ); + if ((type == QueryType::GENERATORS && !m_introspection->m_generators.isEmpty()) + || (type == QueryType::SERVER_MODE && m_introspection->m_queriedServerMode) + || (type == QueryType::VERSION && !m_introspection->m_version.fullVersion.isEmpty())) + return; + + if (type == QueryType::GENERATORS) { + fetchGeneratorsFromHelp(); + } else if (type == QueryType::SERVER_MODE) { + // Nothing to do... + } else if (type == QueryType::VERSION) { + fetchVersionFromVersionOutput(); + } else { + QTC_ASSERT(false, return ); + } } } @@ -533,9 +529,11 @@ QStringList CMakeTool::parseVariableOutput(const QString &output) void CMakeTool::fetchGeneratorsFromHelp() const { Utils::SynchronousProcessResponse response = run({"--help"}); - if (response.result != Utils::SynchronousProcessResponse::Finished) - return; - parseGeneratorsFromHelp(response.stdOut().split('\n')); + m_introspection->m_didRun = m_introspection->m_didRun + && response.result == Utils::SynchronousProcessResponse::Finished; + + if (response.result == Utils::SynchronousProcessResponse::Finished) + parseGeneratorsFromHelp(response.stdOut().split('\n')); } void CMakeTool::parseGeneratorsFromHelp(const QStringList &lines) const @@ -588,10 +586,12 @@ void CMakeTool::parseGeneratorsFromHelp(const QStringList &lines) const void CMakeTool::fetchVersionFromVersionOutput() const { Utils::SynchronousProcessResponse response = run({"--version"}); - if (response.result != Utils::SynchronousProcessResponse::Finished) - return; - parseVersionFormVersionOutput(response.stdOut().split('\n')); + m_introspection->m_didRun = m_introspection->m_didRun + && response.result == Utils::SynchronousProcessResponse::Finished; + + if (response.result == Utils::SynchronousProcessResponse::Finished) + parseVersionFormVersionOutput(response.stdOut().split('\n')); } void CMakeTool::parseVersionFormVersionOutput(const QStringList &lines) const @@ -612,11 +612,10 @@ void CMakeTool::parseVersionFormVersionOutput(const QStringList &lines) const void CMakeTool::fetchFromCapabilities() const { - Utils::SynchronousProcessResponse response = run({"-E", "capabilities"}, true); - if (response.result != Utils::SynchronousProcessResponse::Finished) - return; + Utils::SynchronousProcessResponse response = run({"-E", "capabilities"}); - parseFromCapabilities(response.stdOut()); + if (response.result == Utils::SynchronousProcessResponse::Finished) + parseFromCapabilities(response.stdOut()); } static int getVersion(const QVariantMap &obj, const QString value) diff --git a/src/plugins/cmakeprojectmanager/cmaketool.h b/src/plugins/cmakeprojectmanager/cmaketool.h index 1e305b2dd34..fd2c087c20b 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.h +++ b/src/plugins/cmakeprojectmanager/cmaketool.h @@ -126,7 +126,7 @@ private: }; void readInformation(QueryType type) const; - Utils::SynchronousProcessResponse run(const QStringList &args, bool mayFail = false) const; + Utils::SynchronousProcessResponse run(const QStringList &args, int timeoutS = 1) const; void parseFunctionDetailsOutput(const QString &output); QStringList parseVariableOutput(const QString &output); diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index 193a675833f..01e838f83c9 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -735,7 +735,7 @@ EditorView *SplitterOrView::takeView() return oldView; } -void SplitterOrView::split(Qt::Orientation orientation) +void SplitterOrView::split(Qt::Orientation orientation, bool activateView) { Q_ASSERT(m_view && m_splitter == nullptr); m_splitter = new MiniSplitter(this); @@ -766,7 +766,8 @@ void SplitterOrView::split(Qt::Orientation orientation) otherView->view()->setCloseSplitIcon(Utils::Icons::CLOSE_SPLIT_BOTTOM.icon()); } - EditorManagerPrivate::activateView(otherView->view()); + if (activateView) + EditorManagerPrivate::activateView(otherView->view()); emit splitStateChanged(); } @@ -933,7 +934,7 @@ void SplitterOrView::restoreState(const QByteArray &state) qint32 orientation; QByteArray splitter, first, second; stream >> orientation >> splitter >> first >> second; - split((Qt::Orientation)orientation); + split((Qt::Orientation) orientation, false); m_splitter->restoreState(splitter); static_cast<SplitterOrView*>(m_splitter->widget(0))->restoreState(first); static_cast<SplitterOrView*>(m_splitter->widget(1))->restoreState(second); diff --git a/src/plugins/coreplugin/editormanager/editorview.h b/src/plugins/coreplugin/editormanager/editorview.h index 7187989579a..752addecb3a 100644 --- a/src/plugins/coreplugin/editormanager/editorview.h +++ b/src/plugins/coreplugin/editormanager/editorview.h @@ -173,7 +173,7 @@ public: explicit SplitterOrView(EditorView *view); ~SplitterOrView() override; - void split(Qt::Orientation orientation); + void split(Qt::Orientation orientation, bool activateView = true); void unsplit(); inline bool isView() const { return m_view != nullptr; } diff --git a/src/plugins/cpptools/headerpathfilter.cpp b/src/plugins/cpptools/headerpathfilter.cpp index 2fa71b58b27..b656f8e136e 100644 --- a/src/plugins/cpptools/headerpathfilter.cpp +++ b/src/plugins/cpptools/headerpathfilter.cpp @@ -116,7 +116,7 @@ QString clangIncludeDirectory(const QString &clangVersion, const QString &clangR #else Q_UNUSED(clangVersion) Q_UNUSED(clangResourceDirectory) - return CLANG_RESOURCE_DIR; + return {CLANG_RESOURCE_DIR}; #endif } diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index 65c6f092643..ea26e929995 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -457,33 +457,31 @@ bool StackHandler::contextMenuEvent(const ItemViewEvent &ev) void StackHandler::copyContentsToClipboard() { - QString str; - int n = rowCount(); - int m = columnCount(QModelIndex()); + const int m = columnCount(QModelIndex()); QVector<int> largestColumnWidths(m, 0); // First, find the widths of the largest columns, // so that we can print them out nicely aligned. - for (int i = 0; i != n; ++i) { + forItemsAtLevel<2>([m, &largestColumnWidths](StackFrameItem *item) { for (int j = 0; j < m; ++j) { - const QModelIndex idx = index(i, j); - const int columnWidth = data(idx, Qt::DisplayRole).toString().size(); + const int columnWidth = item->data(j, Qt::DisplayRole).toString().size(); if (columnWidth > largestColumnWidths.at(j)) largestColumnWidths[j] = columnWidth; } - } + }); - for (int i = 0; i != n; ++i) { + QString str; + forItemsAtLevel<2>([m, largestColumnWidths, &str](StackFrameItem *item) { for (int j = 0; j != m; ++j) { - QModelIndex idx = index(i, j); - const QString columnEntry = data(idx, Qt::DisplayRole).toString(); + const QString columnEntry = item->data(j, Qt::DisplayRole).toString(); str += columnEntry; const int difference = largestColumnWidths.at(j) - columnEntry.size(); // Add one extra space between columns. - str += QString().fill(' ', difference > 0 ? difference + 1 : 1); + str += QString(qMax(difference, 0) + 1, QChar(' ')); } str += '\n'; - } + }); + QClipboard *clipboard = QApplication::clipboard(); clipboard->setText(str, QClipboard::Selection); clipboard->setText(str, QClipboard::Clipboard); diff --git a/src/plugins/help/qlitehtml/CMakeLists.txt b/src/plugins/help/qlitehtml/CMakeLists.txt index 357e60cf2ce..6dde535396a 100644 --- a/src/plugins/help/qlitehtml/CMakeLists.txt +++ b/src/plugins/help/qlitehtml/CMakeLists.txt @@ -5,7 +5,7 @@ project(QLiteHtml) if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/litehtml/CMakeLists.txt) set(ORIG_FPIC ${CMAKE_POSITION_INDEPENDENT_CODE}) if (WIN32) - set(LITEHTML_UTF8 ON) + set(LITEHTML_UTF8 ON CACHE BOOL "") endif() set(CMAKE_POSITION_INDEPENDENT_CODE ON) add_subdirectory(litehtml) diff --git a/src/plugins/languageclient/languageclientmanager.cpp b/src/plugins/languageclient/languageclientmanager.cpp index defbd0bdac7..543ec74a20a 100644 --- a/src/plugins/languageclient/languageclientmanager.cpp +++ b/src/plugins/languageclient/languageclientmanager.cpp @@ -503,9 +503,9 @@ void LanguageClientManager::findLinkAt(TextEditor::TextDocument *document, } } }); - for (Client *interface : reachableClients()) { - if (interface->findLinkAt(request)) - m_exclusiveRequests[request.id()] << interface; + if (Client *client = clientForUri(uri)) { + if (client->reachable()) + client->findLinkAt(request); } } diff --git a/src/plugins/mcusupport/mcusupportconstants.h b/src/plugins/mcusupport/mcusupportconstants.h index 4643ed34758..cc9233eee4f 100644 --- a/src/plugins/mcusupport/mcusupportconstants.h +++ b/src/plugins/mcusupport/mcusupportconstants.h @@ -28,23 +28,15 @@ namespace McuSupport { namespace Constants { -const char TOOLCHAIN_TYPEID[] = "McuSupport.ToolChain.ARM-GCC"; const char DEVICE_TYPE[] = "McuSupport.DeviceType"; const char DEVICE_ID[] = "McuSupport.Device"; -const char MCUSUPPORT_QT_VERSION[] = "Qt4ProjectManager.QtVersion.McuSupport"; const char RUNCONFIGURATION[] = "McuSupport.RunConfiguration"; const char SETTINGS_ID[] = "CC.McuSupport.Configuration"; -const char KIT_BOARD_VENDOR_KEY[] = "McuSupport.BoardVendor"; -const char KIT_BOARD_MODEL_KEY[] = "McuSupport.BoardModel"; - -const char ENVVAR_ARMGCC_DIR[] = "ARMGCC_DIR"; -const char ENVVAR_STM32CUBE_FW_F7_SDK_PATH[] = "STM32Cube_FW_F7_SDK_PATH"; +const char KIT_MCUTARGET_VENDOR_KEY[] = "McuSupport.McuTargetVendor"; +const char KIT_MCUTARGET_MODEL_KEY[] = "McuSupport.McuTargetModel"; const char SETTINGS_GROUP[] = "McuSupport"; -const char SETTINGS_KEY_PACKAGE_PREFIX[] = "package_"; -const char SETTINGS_KEY_PACKAGE_ARMGCC[] = "ArmGcc"; -const char SETTINGS_KEY_STM32CUBE_FW_F7_SDK_PATH[] = "STM32Cube_FW_F7_SDK_PATH"; -const char SETTINGS_KEY_STM32CUBE_PROGRAMMER_PATH[] = "STM32Cube_Cube_Programmer_Path"; +const char SETTINGS_KEY_PACKAGE_PREFIX[] = "Package_"; } // namespace McuSupport } // namespace Constants diff --git a/src/plugins/mcusupport/mcusupportoptions.cpp b/src/plugins/mcusupport/mcusupportoptions.cpp index 4352f49f1fd..10147d2ac3f 100644 --- a/src/plugins/mcusupport/mcusupportoptions.cpp +++ b/src/plugins/mcusupport/mcusupportoptions.cpp @@ -54,8 +54,8 @@ namespace McuSupport { namespace Internal { -PackageOptions::PackageOptions(const QString &label, const QString &defaultPath, - const QString &detectionPath, const QString &settingsKey) +McuPackage::McuPackage(const QString &label, const QString &defaultPath, + const QString &detectionPath, const QString &settingsKey) : m_label(label) , m_defaultPath(defaultPath) , m_detectionPath(detectionPath) @@ -68,33 +68,28 @@ PackageOptions::PackageOptions(const QString &label, const QString &defaultPath, s->endGroup(); } -QString PackageOptions::path() const +QString McuPackage::path() const { return QFileInfo(m_fileChooser->path() + m_relativePathModifier).absoluteFilePath(); } -QString PackageOptions::label() const +QString McuPackage::label() const { return m_label; } -QString PackageOptions::detectionPath() const +QString McuPackage::detectionPath() const { return m_detectionPath; } -QWidget *PackageOptions::widget() +QWidget *McuPackage::widget() { if (m_widget) return m_widget; m_widget = new QWidget; m_fileChooser = new Utils::PathChooser; - QObject::connect(m_fileChooser, &Utils::PathChooser::pathChanged, - [this](){ - updateStatus(); - emit changed(); - }); auto layout = new QGridLayout(m_widget); layout->setContentsMargins(0, 0, 0, 0); @@ -119,41 +114,49 @@ QWidget *PackageOptions::widget() layout->addWidget(m_statusIcon, 1, 0); layout->addWidget(m_statusLabel, 1, 1, 1, -1); - m_fileChooser->setPath(m_path); // Triggers updateStatus() call + m_fileChooser->setPath(m_path); + + QObject::connect(m_fileChooser, &Utils::PathChooser::pathChanged, + [this](){ + updateStatus(); + emit changed(); + }); + + updateStatus(); return m_widget; } -PackageOptions::Status PackageOptions::status() const +McuPackage::Status McuPackage::status() const { return m_status; } -void PackageOptions::setDownloadUrl(const QString &url) +void McuPackage::setDownloadUrl(const QString &url) { m_downloadUrl = url; } -void PackageOptions::setEnvironmentVariableName(const QString &name) +void McuPackage::setEnvironmentVariableName(const QString &name) { m_environmentVariableName = name; } -QString PackageOptions::environmentVariableName() const +QString McuPackage::environmentVariableName() const { return m_environmentVariableName; } -void PackageOptions::setAddToPath(bool addToPath) +void McuPackage::setAddToPath(bool addToPath) { m_addToPath = addToPath; } -bool PackageOptions::addToPath() const +bool McuPackage::addToPath() const { return m_addToPath; } -void PackageOptions::writeToSettings() const +void McuPackage::writeToSettings() const { if (m_path.compare(m_defaultPath) == 0) return; @@ -163,12 +166,12 @@ void PackageOptions::writeToSettings() const s->endGroup(); } -void PackageOptions::setRelativePathModifier(const QString &path) +void McuPackage::setRelativePathModifier(const QString &path) { m_relativePathModifier = path; } -void PackageOptions::updateStatus() +void McuPackage::updateStatus() { m_path = m_fileChooser->rawPath(); const bool validPath = m_fileChooser->isValid(); @@ -198,54 +201,78 @@ void PackageOptions::updateStatus() m_statusLabel->setText(statusText); } -BoardOptions::BoardOptions(const QString &vendor, const QString &model, - const QString &toolChainFileName, const QString &qulPlatform, - const QVector<PackageOptions*> &packages) +McuTarget::McuTarget(const QString &vendor, const QString &model, + const QVector<McuPackage*> &packages) : m_vendor(vendor) , m_model(model) - , m_toolChainFile(toolChainFileName) - , m_qulPlatform(qulPlatform) , m_packages(packages) { } -QString BoardOptions::model() const +QString McuTarget::vendor() const +{ + return m_vendor; +} + +QString McuTarget::model() const { return m_model; } -QString BoardOptions::toolChainFile() const +QVector<McuPackage *> McuTarget::packages() const +{ + return m_packages; +} + +void McuTarget::setToolChainFile(const QString &toolChainFile) +{ + m_toolChainFile = toolChainFile; +} + +QString McuTarget::toolChainFile() const { return m_toolChainFile; } -QString BoardOptions::qulPlatform() const +void McuTarget::setQulPlatform(const QString &qulPlatform) +{ + m_qulPlatform = qulPlatform; +} + +QString McuTarget::qulPlatform() const { return m_qulPlatform; } -QVector<PackageOptions *> BoardOptions::packages() const +bool McuTarget::isValid() const { - return m_packages; + return !Utils::anyOf(packages(), [](McuPackage *package) { + return package->status() != McuPackage::ValidPackage; + }); } -QString BoardOptions::vendor() const +int McuTarget::colorDepth() const { - return m_vendor; + return m_colorDepth; +} + +void McuTarget::setColorDepth(int colorDepth) +{ + m_colorDepth = colorDepth; } -static PackageOptions *createQulPackage() +static McuPackage *createQtForMCUsPackage() { - auto result = new PackageOptions( - PackageOptions::tr("Qt MCU SDK"), + auto result = new McuPackage( + McuPackage::tr("Qt for MCUs SDK"), QDir::homePath(), Utils::HostOsInfo::withExecutableSuffix("bin/qmltocpp"), - "qulSdk"); + "QtMCUSdk"); result->setEnvironmentVariableName("Qul_DIR"); return result; } -static PackageOptions *createArmGccPackage() +static McuPackage *createArmGccPackage() { const char envVar[] = "ARMGCC_DIR"; @@ -267,43 +294,43 @@ static PackageOptions *createArmGccPackage() if (defaultPath.isEmpty()) defaultPath = QDir::homePath(); - auto result = new PackageOptions( - PackageOptions::tr("GNU Arm Embedded Toolchain"), + auto result = new McuPackage( + McuPackage::tr("GNU Arm Embedded Toolchain"), defaultPath, Utils::HostOsInfo::withExecutableSuffix("bin/arm-none-eabi-g++"), - Constants::SETTINGS_KEY_PACKAGE_ARMGCC); + "GNUArmEmbeddedToolchain"); result->setDownloadUrl( "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads"); result->setEnvironmentVariableName(envVar); return result; } -static PackageOptions *createStm32CubeFwF7SdkPackage() +static McuPackage *createStm32CubeFwF7SdkPackage() { - auto result = new PackageOptions( - PackageOptions::tr("STM32Cube SDK"), + auto result = new McuPackage( + McuPackage::tr("STM32Cube SDK"), "%{Env:STM32Cube_FW_F7_SDK_PATH}", "Drivers/STM32F7xx_HAL_Driver", - "stm32CubeFwF7Sdk"); + "Stm32CubeFwF7Sdk"); result->setDownloadUrl( "https://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-mcu-packages/stm32cubef7.html"); result->setEnvironmentVariableName("STM32Cube_FW_F7_SDK_PATH"); return result; } -static PackageOptions *createStm32CubeProgrammerPackage() +static McuPackage *createStm32CubeProgrammerPackage() { const QString defaultPath = Utils::HostOsInfo::isWindowsHost() ? QDir::fromNativeSeparators(qEnvironmentVariable("ProgramFiles")) + "/STMicroelectronics/STM32Cube/STM32CubeProgrammer/" : QDir::homePath(); - auto result = new PackageOptions( - PackageOptions::tr("STM32CubeProgrammer"), + auto result = new McuPackage( + McuPackage::tr("STM32CubeProgrammer"), defaultPath, QLatin1String(Utils::HostOsInfo::isWindowsHost() ? "/bin/STM32_Programmer_CLI.exe" : "/bin/STM32_Programmer.sh"), - "stm32CubeProgrammer"); + "Stm32CubeProgrammer"); result->setRelativePathModifier("/bin"); result->setDownloadUrl( "https://www.st.com/en/development-tools/stm32cubeprog.html"); @@ -311,29 +338,29 @@ static PackageOptions *createStm32CubeProgrammerPackage() return result; } -static PackageOptions *createEvkbImxrt1050SdkPackage() +static McuPackage *createEvkbImxrt1050SdkPackage() { - auto result = new PackageOptions( - PackageOptions::tr("NXP i.MXRT SDK"), + auto result = new McuPackage( + McuPackage::tr("NXP i.MXRT SDK"), "%{Env:EVKB_IMXRT1050_SDK_PATH}", // TODO: Try to not use 1050 specifics "EVKB-IMXRT1050_manifest_v3_5.xml", - "evkbImxrt1050Sdk"); + "EvkbImxrt1050Sdk"); result->setDownloadUrl("https://mcuxpresso.nxp.com/en/welcome"); return result; } -static PackageOptions *createSeggerJLinkPackage() +static McuPackage *createSeggerJLinkPackage() { const QString defaultPath = Utils::HostOsInfo::isWindowsHost() ? QDir::fromNativeSeparators(qEnvironmentVariable("ProgramFiles(x86)")) + "/SEGGER/JLink" : QString("%{Env:SEGGER_JLINK_SOFTWARE_AND_DOCUMENTATION_PATH}"); - auto result = new PackageOptions( - PackageOptions::tr("SEGGER JLink"), + auto result = new McuPackage( + McuPackage::tr("SEGGER JLink"), defaultPath, Utils::HostOsInfo::withExecutableSuffix("JLink"), - "seggerJLink"); + "SeggerJLink"); result->setDownloadUrl("https://www.segger.com/downloads/jlink"); result->setEnvironmentVariableName("SEGGER_JLINK_SOFTWARE_AND_DOCUMENTATION_PATH"); return result; @@ -342,38 +369,65 @@ static PackageOptions *createSeggerJLinkPackage() McuSupportOptions::McuSupportOptions(QObject *parent) : QObject(parent) { - PackageOptions* qulPackage = createQulPackage(); - PackageOptions* armGccPackage = createArmGccPackage(); - PackageOptions* stm32CubeFwF7SdkPackage = createStm32CubeFwF7SdkPackage(); - PackageOptions* stm32CubeProgrammerPackage = createStm32CubeProgrammerPackage(); - PackageOptions* evkbImxrt1050SdkPackage = createEvkbImxrt1050SdkPackage(); - PackageOptions* seggerJLinkPackage = createSeggerJLinkPackage(); - - toolchainPackage = armGccPackage; - - - auto stmPackages = {armGccPackage, stm32CubeFwF7SdkPackage, stm32CubeProgrammerPackage, - qulPackage}; - auto nxpPackages = {armGccPackage, evkbImxrt1050SdkPackage, seggerJLinkPackage, - qulPackage}; - auto desktopPackages = {qulPackage}; - packages = {armGccPackage, stm32CubeFwF7SdkPackage, stm32CubeProgrammerPackage, - evkbImxrt1050SdkPackage, seggerJLinkPackage, qulPackage}; + qtForMCUsSdkPackage = createQtForMCUsPackage(); + armGccPackage = createArmGccPackage(); + McuPackage* stm32CubeFwF7SdkPackage = createStm32CubeFwF7SdkPackage(); + McuPackage* stm32CubeProgrammerPackage = createStm32CubeProgrammerPackage(); + McuPackage* evkbImxrt1050SdkPackage = createEvkbImxrt1050SdkPackage(); + McuPackage* seggerJLinkPackage = createSeggerJLinkPackage(); + + auto stmEvalPackages = { + armGccPackage, stm32CubeProgrammerPackage, qtForMCUsSdkPackage}; + auto stmEngPackages = { + armGccPackage, stm32CubeFwF7SdkPackage, stm32CubeProgrammerPackage, qtForMCUsSdkPackage}; + auto nxpEvalPackages = { + armGccPackage, seggerJLinkPackage, qtForMCUsSdkPackage}; + auto nxpEngPackages = { + armGccPackage, evkbImxrt1050SdkPackage, seggerJLinkPackage, qtForMCUsSdkPackage}; + auto desktopPackages = { + qtForMCUsSdkPackage}; + packages = { + armGccPackage, stm32CubeFwF7SdkPackage, stm32CubeProgrammerPackage, evkbImxrt1050SdkPackage, + seggerJLinkPackage, qtForMCUsSdkPackage}; const QString vendorStm = "STM"; const QString vendorNxp = "NXP"; const QString vendorQt = "Qt"; - boards.append(new BoardOptions(vendorStm, - "stm32f7508", "CMake/stm32f7508-discovery.cmake", "", stmPackages)); - boards.append(new BoardOptions(vendorStm, - "stm32f769i", "CMake/stm32f769i-discovery.cmake", "", stmPackages)); - boards.append(new BoardOptions(vendorNxp, - "evkbimxrt1050", "CMake/evkbimxrt1050-toolchain.cmake", "", nxpPackages)); - boards.append(new BoardOptions(vendorQt, - "Desktop", "", "Qt", desktopPackages)); + + // STM + auto mcuTarget = new McuTarget(vendorStm, "stm32f7508", stmEvalPackages); + mcuTarget->setToolChainFile("CMake/stm32f7508-discovery.cmake"); + mcuTarget->setColorDepth(32); + mcuTargets.append(mcuTarget); + + mcuTarget = new McuTarget(vendorStm, "stm32f7508", stmEvalPackages); + mcuTarget->setToolChainFile("CMake/stm32f7508-discovery.cmake"); + mcuTarget->setColorDepth(16); + mcuTargets.append(mcuTarget); + + mcuTarget = new McuTarget(vendorStm, "stm32f769i", stmEvalPackages); + mcuTarget->setToolChainFile("CMake/stm32f769i-discovery.cmake"); + mcuTargets.append(mcuTarget); + + mcuTarget = new McuTarget(vendorStm, "Engineering", stmEngPackages); + mcuTargets.append(mcuTarget); + + // NXP + mcuTarget = new McuTarget(vendorNxp, "evkbimxrt1050", nxpEvalPackages); + mcuTarget->setToolChainFile("CMake/evkbimxrt1050-toolchain.cmake"); + mcuTargets.append(mcuTarget); + + mcuTarget = new McuTarget(vendorNxp, "Engineering", nxpEngPackages); + mcuTargets.append(mcuTarget); + + // Desktop + mcuTarget = new McuTarget(vendorQt, "Desktop", desktopPackages); + mcuTarget->setQulPlatform("Qt"); + mcuTarget->setColorDepth(32); + mcuTargets.append(mcuTarget); for (auto package : packages) - connect(package, &PackageOptions::changed, [this](){ + connect(package, &McuPackage::changed, [this](){ emit changed(); }); } @@ -382,16 +436,8 @@ McuSupportOptions::~McuSupportOptions() { qDeleteAll(packages); packages.clear(); - qDeleteAll(boards); - boards.clear(); -} - -QVector<BoardOptions *> McuSupportOptions::validBoards() const -{ - return Utils::filtered(boards, [](BoardOptions *board){ - return !Utils::anyOf(board->packages(), [](PackageOptions *package){ - return package->status() != PackageOptions::ValidPackage;}); - }); + qDeleteAll(mcuTargets); + mcuTargets.clear(); } static ProjectExplorer::ToolChain* armGccToolchain(const Utils::FilePath &path, Core::Id language) @@ -420,20 +466,24 @@ static ProjectExplorer::ToolChain* armGccToolchain(const Utils::FilePath &path, return toolChain; } -static bool isDesktop(const BoardOptions* board) +static bool mcuTargetIsDesktop(const McuTarget* mcuTarget) { - return board->qulPlatform() == "Qt"; + return mcuTarget->qulPlatform() == "Qt"; } -static void setKitProperties(ProjectExplorer::Kit *k, const BoardOptions* board) +static void setKitProperties(const QString &kitName, ProjectExplorer::Kit *k, + const McuTarget* mcuTarget) { using namespace ProjectExplorer; - k->setUnexpandedDisplayName("QtMCU - " + board->model()); - k->setValue(Constants::KIT_BOARD_VENDOR_KEY, board->vendor()); - k->setValue(Constants::KIT_BOARD_MODEL_KEY, board->model()); - k->setAutoDetected(false); - if (!isDesktop(board)) { + k->setUnexpandedDisplayName(kitName); + k->setValue(Constants::KIT_MCUTARGET_VENDOR_KEY, mcuTarget->vendor()); + k->setValue(Constants::KIT_MCUTARGET_MODEL_KEY, mcuTarget->model()); + k->setAutoDetected(true); + k->makeSticky(); + if (mcuTargetIsDesktop(mcuTarget)) { + k->setDeviceTypeForIcon(Constants::DEVICE_TYPE); + } else { k->setIrrelevantAspects({SysRootKitAspect::id(), "QtSupport.QtInformation" // QtKitAspect::id() }); @@ -468,7 +518,7 @@ static void setKitDebugger(ProjectExplorer::Kit *k, const QString &armGccPath) DebuggerItem newDebugger; newDebugger.setCommand(command); newDebugger.setUnexpandedDisplayName( - PackageOptions::tr("Arm GDB at %1").arg(command.toUserOutput())); + McuPackage::tr("Arm GDB at %1").arg(command.toUserOutput())); debuggerId = DebuggerItemManager::registerDebugger(newDebugger); } else { debuggerId = debugger->id(); @@ -484,13 +534,13 @@ static void setKitDevice(ProjectExplorer::Kit *k) DeviceTypeKitAspect::setDeviceTypeId(k, Constants::DEVICE_TYPE); } -static void setKitEnvironment(ProjectExplorer::Kit *k, const BoardOptions* board) +static void setKitEnvironment(ProjectExplorer::Kit *k, const McuTarget* mcuTarget) { using namespace ProjectExplorer; Utils::EnvironmentItems changes; QStringList pathAdditions; - for (auto package : board->packages()) { + for (auto package : mcuTarget->packages()) { if (package->addToPath()) pathAdditions.append(QDir::toNativeSeparators(package->path())); if (!package->environmentVariableName().isEmpty()) @@ -505,55 +555,72 @@ static void setKitEnvironment(ProjectExplorer::Kit *k, const BoardOptions* board EnvironmentKitAspect::setEnvironmentChanges(k, changes); } -static void setKitCMakeOptions(ProjectExplorer::Kit *k, const BoardOptions* board) +static void setKitCMakeOptions(ProjectExplorer::Kit *k, const McuTarget* mcuTarget, + const QString &qulDir) { using namespace CMakeProjectManager; CMakeConfig config = CMakeConfigurationKitAspect::configuration(k); - if (!board->toolChainFile().isEmpty()) + config.append(CMakeConfigItem("CMAKE_CXX_COMPILER", "%{Compiler:Executable:Cxx}")); + config.append(CMakeConfigItem("CMAKE_C_COMPILER", "%{Compiler:Executable:C}")); + if (!mcuTarget->toolChainFile().isEmpty()) config.append(CMakeConfigItem("CMAKE_TOOLCHAIN_FILE", - ("%{CurrentBuild:Env:Qul_DIR}/" + - board->toolChainFile()).toUtf8())); - if (!board->qulPlatform().isEmpty()) + (qulDir + "/" + mcuTarget->toolChainFile()).toUtf8())); + if (!mcuTarget->qulPlatform().isEmpty()) config.append(CMakeConfigItem("QUL_PLATFORM", - board->qulPlatform().toUtf8())); - if (isDesktop(board)) { + mcuTarget->qulPlatform().toUtf8())); + if (mcuTargetIsDesktop(mcuTarget)) config.append(CMakeConfigItem("CMAKE_PREFIX_PATH", "%{Qt:QT_INSTALL_PREFIX}")); - // TODO: Hack! Implement color depth variants of all targets - config.append(CMakeConfigItem("QUL_COLOR_DEPTH", "32")); - } + if (mcuTarget->colorDepth() >= 0) + config.append(CMakeConfigItem("QUL_COLOR_DEPTH", + QString::number(mcuTarget->colorDepth()).toLatin1())); CMakeConfigurationKitAspect::setConfiguration(k, config); if (Utils::HostOsInfo::isWindowsHost()) CMakeGeneratorKitAspect::setGenerator(k, "NMake Makefiles JOM"); } -ProjectExplorer::Kit *McuSupportOptions::kit(const BoardOptions* board) +QString McuSupportOptions::kitName(const McuTarget *mcuTarget) const { - using namespace ProjectExplorer; + // TODO: get version from qulSdkPackage and insert into name + const QString colorDepth = mcuTarget->colorDepth() > 0 + ? QString::fromLatin1(" %1bpp").arg(mcuTarget->colorDepth()) + : ""; + return QString::fromLatin1("Qt for MCUs - %1 %2%3") + .arg(mcuTarget->vendor(), mcuTarget->model(), colorDepth); +} - Kit *kit = KitManager::kit([board](const Kit *k){ - return board->model() == k->value(Constants::KIT_BOARD_MODEL_KEY).toString(); +QList<ProjectExplorer::Kit *> McuSupportOptions::existingKits(const McuTarget *mcuTargt) +{ + using namespace ProjectExplorer; + const QString mcuTargetKitName = kitName(mcuTargt); + return Utils::filtered(KitManager::kits(), [&mcuTargetKitName](Kit *kit) { + return kit->isAutoDetected() && kit->unexpandedDisplayName() == mcuTargetKitName; }); - if (!kit) { - const QString armGccPath = toolchainPackage->path(); - const auto init = [board, &armGccPath](Kit *k) { - KitGuard kitGuard(k); - - setKitProperties(k, board); - if (!isDesktop(board)) { - setKitToolchains(k, armGccPath); - setKitDebugger(k, armGccPath); - setKitDevice(k); - } - setKitEnvironment(k, board); - setKitCMakeOptions(k, board); +} - k->setup(); - k->fix(); - }; - kit = KitManager::registerKit(init); - } - return kit; +ProjectExplorer::Kit *McuSupportOptions::newKit(const McuTarget *mcuTarget) +{ + using namespace ProjectExplorer; + + const QString armGccPath = armGccPackage->path(); + const QString qulDir = qtForMCUsSdkPackage->path(); + const auto init = [this, mcuTarget](Kit *k) { + KitGuard kitGuard(k); + + setKitProperties(kitName(mcuTarget), k, mcuTarget); + if (!mcuTargetIsDesktop(mcuTarget)) { + setKitToolchains(k, armGccPackage->path()); + setKitDebugger(k, armGccPackage->path()); + setKitDevice(k); + } + setKitEnvironment(k, mcuTarget); + setKitCMakeOptions(k, mcuTarget, qtForMCUsSdkPackage->path()); + + k->setup(); + k->fix(); + }; + + return KitManager::registerKit(init); } } // Internal diff --git a/src/plugins/mcusupport/mcusupportoptions.h b/src/plugins/mcusupport/mcusupportoptions.h index f7f2d84b390..f8cba931997 100644 --- a/src/plugins/mcusupport/mcusupportoptions.h +++ b/src/plugins/mcusupport/mcusupportoptions.h @@ -42,7 +42,7 @@ class Kit; namespace McuSupport { namespace Internal { -class PackageOptions : public QObject +class McuPackage : public QObject { Q_OBJECT @@ -53,8 +53,8 @@ public: ValidPackage }; - PackageOptions(const QString &label, const QString &defaultPath, const QString &detectionPath, - const QString &settingsKey); + McuPackage(const QString &label, const QString &defaultPath, const QString &detectionPath, + const QString &settingsKey); QString path() const; QString label() const; @@ -96,26 +96,31 @@ private: Status m_status = InvalidPath; }; -class BoardOptions : public QObject +class McuTarget : public QObject { Q_OBJECT public: - BoardOptions(const QString &vendor, const QString &model, const QString &toolChainFile, - const QString &qulPlatform, const QVector<PackageOptions *> &packages); + McuTarget(const QString &vendor, const QString &model, const QVector<McuPackage *> &packages); QString vendor() const; QString model() const; + QVector<McuPackage *> packages() const; + void setToolChainFile(const QString &toolChainFile); QString toolChainFile() const; + void setQulPlatform(const QString &qulPlatform); QString qulPlatform() const; - QVector<PackageOptions *> packages() const; + void setColorDepth(int colorDepth); + int colorDepth() const; + bool isValid() const; private: const QString m_vendor; const QString m_model; - const QString m_toolChainFile; - const QString m_qulPlatform; - const QVector<PackageOptions*> m_packages; + const QVector<McuPackage*> m_packages; + QString m_toolChainFile; + QString m_qulPlatform; + int m_colorDepth = -1; }; class McuSupportOptions : public QObject @@ -126,13 +131,15 @@ public: McuSupportOptions(QObject *parent = nullptr); ~McuSupportOptions() override; - QVector<BoardOptions*> validBoards() const; + QVector<McuPackage*> packages; + QVector<McuTarget*> mcuTargets; + McuPackage *armGccPackage = nullptr; + McuPackage *qtForMCUsSdkPackage = nullptr; - QVector<PackageOptions*> packages; - QVector<BoardOptions*> boards; - PackageOptions *toolchainPackage = nullptr; + QString kitName(const McuTarget* mcuTarget) const; - ProjectExplorer::Kit *kit(const BoardOptions* board); + QList<ProjectExplorer::Kit *> existingKits(const McuTarget *mcuTargt); + ProjectExplorer::Kit *newKit(const McuTarget *mcuTarget); signals: void changed(); diff --git a/src/plugins/mcusupport/mcusupportoptionspage.cpp b/src/plugins/mcusupport/mcusupportoptionspage.cpp index 02c2044cf40..06bb9a86e63 100644 --- a/src/plugins/mcusupport/mcusupportoptionspage.cpp +++ b/src/plugins/mcusupport/mcusupportoptionspage.cpp @@ -28,6 +28,7 @@ #include "mcusupportoptions.h" #include <coreplugin/icore.h> +#include <projectexplorer/kitmanager.h> #include <projectexplorer/projectexplorerconstants.h> #include <utils/algorithm.h> #include <utils/qtcassert.h> @@ -49,16 +50,17 @@ public: McuSupportOptionsWidget(const McuSupportOptions *options, QWidget *parent = nullptr); void updateStatus(); - void showBoardPackages(int boardIndex); + void showMcuTargetPackages(); + McuTarget *currentMcuTarget() const; private: QString m_armGccPath; const McuSupportOptions *m_options; - int m_currentBoardIndex = 0; - QMap <PackageOptions*, QWidget*> m_packageWidgets; - QMap <BoardOptions*, QWidget*> m_boardPacketWidgets; + QMap <McuPackage*, QWidget*> m_packageWidgets; + QMap <McuTarget*, QWidget*> m_mcuTargetPacketWidgets; QFormLayout *m_packagesLayout = nullptr; QLabel *m_statusLabel = nullptr; + QComboBox *m_mcuTargetComboBox = nullptr; }; McuSupportOptionsWidget::McuSupportOptionsWidget(const McuSupportOptions *options, QWidget *parent) @@ -67,16 +69,18 @@ McuSupportOptionsWidget::McuSupportOptionsWidget(const McuSupportOptions *option { auto mainLayout = new QVBoxLayout(this); - auto boardChooserlayout = new QHBoxLayout; - auto boardChooserLabel = new QLabel(McuSupportOptionsPage::tr("Target:")); - boardChooserlayout->addWidget(boardChooserLabel); - auto boardComboBox = new QComboBox; - boardChooserLabel->setBuddy(boardComboBox); - boardChooserLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); - boardComboBox->addItems(Utils::transform<QStringList>(m_options->boards, [](BoardOptions *b){ - return b->model();})); - boardChooserlayout->addWidget(boardComboBox); - mainLayout->addLayout(boardChooserlayout); + auto mcuTargetChooserlayout = new QHBoxLayout; + auto mcuTargetChooserLabel = new QLabel(McuSupportOptionsPage::tr("Target:")); + mcuTargetChooserlayout->addWidget(mcuTargetChooserLabel); + m_mcuTargetComboBox = new QComboBox; + mcuTargetChooserLabel->setBuddy(m_mcuTargetComboBox); + mcuTargetChooserLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); + m_mcuTargetComboBox->addItems( + Utils::transform<QStringList>(m_options->mcuTargets, [this](McuTarget *t){ + return m_options->kitName(t); + })); + mcuTargetChooserlayout->addWidget(m_mcuTargetComboBox); + mainLayout->addLayout(mcuTargetChooserlayout); auto m_packagesGroupBox = new QGroupBox(McuSupportOptionsPage::tr("Packages")); mainLayout->addWidget(m_packagesGroupBox); @@ -84,57 +88,59 @@ McuSupportOptionsWidget::McuSupportOptionsWidget(const McuSupportOptions *option m_packagesGroupBox->setLayout(m_packagesLayout); m_statusLabel = new QLabel; - mainLayout->addWidget(m_statusLabel); - m_statusLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + mainLayout->addWidget(m_statusLabel, 2); m_statusLabel->setWordWrap(true); - m_statusLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft); + m_statusLabel->setAlignment(Qt::AlignBottom | Qt::AlignLeft); connect(options, &McuSupportOptions::changed, this, &McuSupportOptionsWidget::updateStatus); - connect(boardComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), - this, &McuSupportOptionsWidget::showBoardPackages); + connect(m_mcuTargetComboBox, &QComboBox::currentTextChanged, + this, &McuSupportOptionsWidget::showMcuTargetPackages); - showBoardPackages(m_currentBoardIndex); -} - -static QString ulOfBoardModels(const QVector<BoardOptions*> &validBoards) -{ - return "<ul><li>" - + Utils::transform<QStringList>(validBoards,[](BoardOptions* board) - {return board->model();}).join("</li><li>") - + "</li></ul>"; + showMcuTargetPackages(); + updateStatus(); } void McuSupportOptionsWidget::updateStatus() { - const QVector<BoardOptions*> validBoards = m_options->validBoards(); - m_statusLabel->setText(validBoards.isEmpty() - ? McuSupportOptionsPage::tr("No kits can currently be generated. " - "Select a target and provide the package paths. " - "Afterwards, press Apply to generate a kit for " - "your board.") - : McuSupportOptionsPage::tr("Kits for the following targets can be generated: " - "%1 " - "Press Apply to generate a kit for " - "your target.").arg(ulOfBoardModels(validBoards))); + const McuTarget *mcuTarget = currentMcuTarget(); + if (!mcuTarget) + return; + + m_statusLabel->setText(mcuTarget->isValid() + ? QString::fromLatin1("A kit <b>%1</b> for the selected target can be generated. " + "Press Apply to generate it.").arg(m_options->kitName( + mcuTarget)) + : QString::fromLatin1("Provide the package paths in order to create a kit for " + "your target.")); } -void McuSupportOptionsWidget::showBoardPackages(int boardIndex) +void McuSupportOptionsWidget::showMcuTargetPackages() { + const McuTarget *mcuTarget = currentMcuTarget(); + if (!mcuTarget) + return; + while (m_packagesLayout->rowCount() > 0) { QFormLayout::TakeRowResult row = m_packagesLayout->takeRow(0); row.labelItem->widget()->hide(); row.fieldItem->widget()->hide(); } - const BoardOptions *currentBoard = m_options->boards.at(boardIndex); - for (auto package : m_options->packages) { QWidget *packageWidget = package->widget(); - if (!currentBoard->packages().contains(package)) + if (!mcuTarget->packages().contains(package)) continue; m_packagesLayout->addRow(package->label(), packageWidget); packageWidget->show(); } + + updateStatus(); +} + +McuTarget *McuSupportOptionsWidget::currentMcuTarget() const +{ + const int mcuTargetIndex = m_mcuTargetComboBox->currentIndex(); + return m_options->mcuTargets.isEmpty() ? nullptr : m_options->mcuTargets.at(mcuTargetIndex); } McuSupportOptionsPage::McuSupportOptionsPage(QObject* parent) @@ -159,14 +165,18 @@ void McuSupportOptionsPage::apply() for (auto package : m_options->packages) package->writeToSettings(); - QTC_ASSERT(m_options->toolchainPackage, return); + QTC_ASSERT(m_options->armGccPackage, return); + QTC_ASSERT(m_options->qtForMCUsSdkPackage, return); - const QVector<BoardOptions*> validBoards = m_options->validBoards(); + const McuTarget *mcuTarget = m_widget->currentMcuTarget(); + if (!mcuTarget) + return; using namespace ProjectExplorer; - for (auto board : validBoards) - m_options->kit(board); + for (auto existingKit : m_options->existingKits(mcuTarget)) + ProjectExplorer::KitManager::deregisterKit(existingKit); + m_options->newKit(mcuTarget); } void McuSupportOptionsPage::finish() diff --git a/src/plugins/mcusupport/mcusupportrunconfiguration.cpp b/src/plugins/mcusupport/mcusupportrunconfiguration.cpp index 83acc2035bf..47e2d6af4fb 100644 --- a/src/plugins/mcusupport/mcusupportrunconfiguration.cpp +++ b/src/plugins/mcusupport/mcusupportrunconfiguration.cpp @@ -51,7 +51,7 @@ static CommandLine flashAndRunCommand(Target *target) // TODO: Hack! Implement flash target name handling, properly const QString targetName = - target->kit()->value(Constants::KIT_BOARD_VENDOR_KEY).toString() == "NXP" + target->kit()->value(Constants::KIT_MCUTARGET_VENDOR_KEY).toString() == "NXP" ? QString("flash_%1").arg(projectName) : QString("flash_%1_and_bootloader").arg(projectName); diff --git a/src/plugins/mcusupport/wizards/application/wizard.json b/src/plugins/mcusupport/wizards/application/wizard.json index 4583b48c2ba..5e512f420a4 100644 --- a/src/plugins/mcusupport/wizards/application/wizard.json +++ b/src/plugins/mcusupport/wizards/application/wizard.json @@ -51,6 +51,11 @@ "source": "main.qml.tpl", "target": "%{ProjectDirectory}/%{MainQmlFile}", "openInEditor": true + }, + { + "source": "%{IDE:ResourcePath}/templates/wizards/projects/git.ignore", + "target": ".gitignore", + "condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}" } ] } diff --git a/src/plugins/perfprofiler/perfloaddialog.cpp b/src/plugins/perfprofiler/perfloaddialog.cpp index a88c57ae643..b0602ed725c 100644 --- a/src/plugins/perfprofiler/perfloaddialog.cpp +++ b/src/plugins/perfprofiler/perfloaddialog.cpp @@ -106,11 +106,8 @@ void PerfLoadDialog::chooseDefaults() ui->kitChooser->setCurrentKitId(target->kit()->id()); - ProjectExplorer::BuildConfiguration *buildConfig = target->activeBuildConfiguration(); - if (!buildConfig) - return; - - ui->executableDirLineEdit->setText(buildConfig->buildDirectory().toString()); + if (auto *bc = target->activeBuildConfiguration()) + ui->executableDirLineEdit->setText(bc->buildDirectory().toString()); } } // namespace Internal diff --git a/src/plugins/projectexplorer/kitinformation.cpp b/src/plugins/projectexplorer/kitinformation.cpp index d3c14a0250a..500dd7d7053 100644 --- a/src/plugins/projectexplorer/kitinformation.cpp +++ b/src/plugins/projectexplorer/kitinformation.cpp @@ -39,6 +39,7 @@ #include <coreplugin/variablechooser.h> #include <ssh/sshconnection.h> #include <utils/algorithm.h> +#include <utils/elidinglabel.h> #include <utils/environment.h> #include <utils/environmentdialog.h> #include <utils/macroexpander.h> @@ -1129,7 +1130,7 @@ class EnvironmentKitAspectWidget : public KitAspectWidget public: EnvironmentKitAspectWidget(Kit *workingCopy, const KitAspect *ki) : KitAspectWidget(workingCopy, ki), - m_summaryLabel(new QLabel), + m_summaryLabel(new Utils::ElidingLabel), m_manageButton(new QPushButton), m_mainWidget(new QWidget) { @@ -1153,9 +1154,7 @@ private: void refresh() override { const Utils::EnvironmentItems changes = currentEnvironment(); - QString shortSummary = Utils::EnvironmentItem::toStringList(changes).join(QLatin1String("; ")); - QFontMetrics fm(m_summaryLabel->font()); - shortSummary = fm.elidedText(shortSummary, Qt::ElideRight, m_summaryLabel->width()); + const QString shortSummary = Utils::EnvironmentItem::toStringList(changes).join("; "); m_summaryLabel->setText(shortSummary.isEmpty() ? tr("No changes to apply.") : shortSummary); } @@ -1216,7 +1215,7 @@ private: }); } - QLabel *m_summaryLabel; + Utils::ElidingLabel *m_summaryLabel; QPushButton *m_manageButton; QCheckBox *m_vslangCheckbox; QWidget *m_mainWidget; diff --git a/src/plugins/python/pythonrunconfiguration.cpp b/src/plugins/python/pythonrunconfiguration.cpp index fa6931fb997..e4fb477d902 100644 --- a/src/plugins/python/pythonrunconfiguration.cpp +++ b/src/plugins/python/pythonrunconfiguration.cpp @@ -270,6 +270,7 @@ PythonRunConfiguration::PythonRunConfiguration(Target *target, Core::Id id) auto argumentsAspect = addAspect<ArgumentsAspect>(); + addAspect<WorkingDirectoryAspect>(); addAspect<TerminalAspect>(); setCommandLineGetter([this, interpreterAspect, argumentsAspect] { @@ -299,6 +300,9 @@ void PythonRunConfiguration::updateLanguageServer() PyLSConfigureAssistant::instance()->openDocumentWithPython(python, document); } } + + aspect<WorkingDirectoryAspect>()->setDefaultWorkingDirectory( + Utils::FilePath::fromString(mainScript()).parentDir()); } bool PythonRunConfiguration::supportsDebugger() const @@ -324,7 +328,7 @@ QString PythonRunConfiguration::interpreter() const void PythonRunConfiguration::updateTargetInformation() { const BuildTargetInfo bti = buildTargetInfo(); - const QString script = bti.targetFilePath.toString(); + const QString script = bti.targetFilePath.toUserOutput(); setDefaultDisplayName(tr("Run %1").arg(script)); aspect<MainScriptAspect>()->setValue(script); } diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index d212caa10d4..299e550e52c 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -599,7 +599,17 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step) connect(step->qmakeBuildConfiguration(), &QmakeBuildConfiguration::qmakeBuildConfigurationChanged, this, &QMakeStepConfigWidget::qmakeBuildConfigChanged); connect(step->target(), &Target::kitChanged, this, &QMakeStepConfigWidget::qtVersionChanged); - connect(m_ui->abisListWidget, &QListWidget::itemChanged, this, &QMakeStepConfigWidget::abisChanged); + connect(m_ui->abisListWidget, &QListWidget::itemChanged, this, [this]{ + abisChanged(); + QmakeBuildConfiguration *bc = m_step->qmakeBuildConfiguration(); + if (!bc) + return; + + QList<ProjectExplorer::BuildStepList *> stepLists; + const Core::Id clean = ProjectExplorer::Constants::BUILDSTEPS_CLEAN; + stepLists << bc->stepList(clean); + BuildManager::buildLists(stepLists, {ProjectExplorerPlugin::displayNameForStepId(clean)}); + }); auto chooser = new Core::VariableChooser(m_ui->qmakeAdditonalArgumentsLineEdit); chooser->addMacroExpanderProvider([step] { return step->macroExpander(); }); chooser->addSupportedWidget(m_ui->qmakeAdditonalArgumentsLineEdit); diff --git a/src/plugins/qmldesigner/CMakeLists.txt b/src/plugins/qmldesigner/CMakeLists.txt index df5d3815112..9d291c7bad2 100644 --- a/src/plugins/qmldesigner/CMakeLists.txt +++ b/src/plugins/qmldesigner/CMakeLists.txt @@ -139,6 +139,7 @@ extend_qtc_plugin(QmlDesigner tokencommand.cpp tokencommand.h valueschangedcommand.cpp valueschangedcommand.h changeselectioncommand.cpp changeselectioncommand.h + drop3dlibraryitemcommand.cpp drop3dlibraryitemcommand.h ) extend_qtc_plugin(QmlDesigner diff --git a/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp b/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp index c98789587f3..e56822b2a3b 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.cpp @@ -134,7 +134,7 @@ bool BindingEditorWidget::event(QEvent *event) TextEditor::AssistInterface *BindingEditorWidget::createAssistInterface( TextEditor::AssistKind assistKind, TextEditor::AssistReason assistReason) const { - Q_UNUSED(assistKind); + Q_UNUSED(assistKind) return new QmlJSEditor::QmlJSCompletionAssistInterface( document(), position(), QString(), assistReason, qmljsdocument->semanticInfo()); @@ -489,44 +489,56 @@ void BindingEditor::setModelNodeBackend(const QVariant &modelNodeBackend) if (!modelNodeBackend.isNull() && modelNodeBackend.isValid()) { m_modelNodeBackend = modelNodeBackend; + const auto modelNodeBackendObject = m_modelNodeBackend.value<QObject*>(); + + const auto backendObjectCasted = + qobject_cast<const QmlDesigner::QmlModelNodeProxy *>(modelNodeBackendObject); + + if (backendObjectCasted) { + m_modelNode = backendObjectCasted->qmlObjectNode().modelNode(); + } + emit modelNodeBackendChanged(); } } -void BindingEditor::prepareBindings() +void BindingEditor::setStateModelNode(const QVariant &stateModelNode) { - if (m_backendValue.isNull() || m_modelNodeBackend.isNull()) - return; + if (stateModelNode.isValid()) + { + m_stateModelNode = stateModelNode; + m_modelNode = m_stateModelNode.value<QmlDesigner::ModelNode>(); - if (!(m_backendValue.isValid() && m_modelNodeBackend.isValid())) - return; + if (m_modelNode.isValid()) + m_backendValueTypeName = "bool"; - const auto modelNodeBackendObject = m_modelNodeBackend.value<QObject*>(); + emit stateModelNodeChanged(); + } +} - const auto backendObjectCasted = - qobject_cast<const QmlDesigner::QmlModelNodeProxy *>(modelNodeBackendObject); +void BindingEditor::prepareBindings() +{ + if (!m_modelNode.isValid() || m_backendValueTypeName.isEmpty()) + return; - if (backendObjectCasted) { - const QmlDesigner::ModelNode a = backendObjectCasted->qmlObjectNode().modelNode(); - const QList<QmlDesigner::ModelNode> allNodes = a.view()->allModelNodes(); + const QList<QmlDesigner::ModelNode> allNodes = m_modelNode.view()->allModelNodes(); - QList<BindingEditorDialog::BindingOption> bindings; + QList<BindingEditorDialog::BindingOption> bindings; - for (auto objnode : allNodes) { - BindingEditorDialog::BindingOption binding; - for (auto propertyName : objnode.metaInfo().propertyNames()) - if (m_backendValueTypeName == objnode.metaInfo().propertyTypeName(propertyName)) - binding.properties.append(QString::fromUtf8(propertyName)); + for (auto objnode : allNodes) { + BindingEditorDialog::BindingOption binding; + for (auto propertyName : objnode.metaInfo().propertyNames()) + if (m_backendValueTypeName == objnode.metaInfo().propertyTypeName(propertyName)) + binding.properties.append(QString::fromUtf8(propertyName)); - if (!binding.properties.isEmpty() && objnode.hasId()) { - binding.item = objnode.displayName(); - bindings.append(binding); - } + if (!binding.properties.isEmpty() && objnode.hasId()) { + binding.item = objnode.displayName(); + bindings.append(binding); } - - if (!bindings.isEmpty() && !m_dialog.isNull()) - m_dialog->setAllBindings(bindings); } + + if (!bindings.isEmpty() && !m_dialog.isNull()) + m_dialog->setAllBindings(bindings); } QVariant BindingEditor::backendValue() const @@ -539,5 +551,10 @@ QVariant BindingEditor::modelNodeBackend() const return m_modelNodeBackend; } +QVariant BindingEditor::stateModelNode() const +{ + return m_stateModelNode; +} + } diff --git a/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.h b/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.h index 78614004770..a1deb741080 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.h +++ b/src/plugins/qmldesigner/components/bindingeditor/bindingeditor.h @@ -144,6 +144,7 @@ class BindingEditor : public QObject Q_PROPERTY(QString text READ bindingValue WRITE setBindingValue) Q_PROPERTY(QVariant backendValueProperty READ backendValue WRITE setBackendValue NOTIFY backendValueChanged) Q_PROPERTY(QVariant modelNodeBackendProperty READ modelNodeBackend WRITE setModelNodeBackend NOTIFY modelNodeBackendChanged) + Q_PROPERTY(QVariant stateModelNodeProperty READ stateModelNode WRITE setStateModelNode NOTIFY stateModelNodeChanged) public: BindingEditor(QObject *parent = nullptr); @@ -159,6 +160,7 @@ public: void setBackendValue(const QVariant &backendValue); void setModelNodeBackend(const QVariant &modelNodeBackend); + void setStateModelNode(const QVariant &stateModelNode); Q_INVOKABLE void prepareBindings(); @@ -167,15 +169,19 @@ signals: void rejected(); void backendValueChanged(); void modelNodeBackendChanged(); + void stateModelNodeChanged(); private: QVariant backendValue() const; QVariant modelNodeBackend() const; + QVariant stateModelNode() const; private: QPointer<BindingEditorDialog> m_dialog; QVariant m_backendValue; QVariant m_modelNodeBackend; + QVariant m_stateModelNode; + QmlDesigner::ModelNode m_modelNode; TypeName m_backendValueTypeName; }; diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp index df58f309ec9..c4a928b1ec6 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp @@ -145,6 +145,7 @@ void PropertyEditorValue::setValueWithEmit(const QVariant &value) emit valueChanged(nameAsQString(), value); emit valueChangedQml(); emit isBoundChanged(); + emit isExplicitChanged(); } } @@ -160,6 +161,8 @@ void PropertyEditorValue::setValue(const QVariant &value) if (m_value.isValid()) emit valueChangedQml(); + + emit isExplicitChanged(); emit isBoundChanged(); } diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h index 99c38feb34d..e74196f55cb 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h @@ -77,8 +77,8 @@ class PropertyEditorValue : public QObject Q_PROPERTY(QVariant enumeration READ enumeration NOTIFY valueChangedQml) Q_PROPERTY(QString expression READ expression WRITE setExpressionWithEmit NOTIFY expressionChanged FINAL) Q_PROPERTY(QString valueToString READ valueToString NOTIFY valueChangedQml FINAL) - Q_PROPERTY(bool isInModel READ isInModel NOTIFY valueChangedQml FINAL) - Q_PROPERTY(bool isInSubState READ isInSubState NOTIFY valueChangedQml FINAL) + Q_PROPERTY(bool isInModel READ isInModel NOTIFY isExplicitChanged FINAL) + Q_PROPERTY(bool isInSubState READ isInSubState NOTIFY isExplicitChanged FINAL) Q_PROPERTY(bool isBound READ isBound NOTIFY isBoundChanged FINAL) Q_PROPERTY(bool isValid READ isValid NOTIFY isValidChanged FINAL) Q_PROPERTY(bool isTranslated READ isTranslated NOTIFY expressionChanged FINAL) @@ -147,6 +147,7 @@ signals: void complexNodeChanged(); void isBoundChanged(); void isValidChanged(); + void isExplicitChanged(); private: //variables QmlDesigner::ModelNode m_modelNode; diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp index 5676cc2ca40..d5e21ebe945 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp @@ -216,4 +216,9 @@ QStringList StatesEditorModel::autoComplete(const QString &text, int pos, bool e return QStringList(); } +QVariant StatesEditorModel::stateModelNode() +{ + return QVariant::fromValue(m_statesEditorView->currentStateNode()); +} + } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.h b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.h index 2ea806c9bad..40cad6efefc 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.h +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.h @@ -61,6 +61,7 @@ public: Q_INVOKABLE void setWhenCondition(int internalNodeId, const QString &condition); Q_INVOKABLE void resetWhenCondition(int internalNodeId); Q_INVOKABLE QStringList autoComplete(const QString &text, int pos, bool explicitComplete); + Q_INVOKABLE QVariant stateModelNode(); void reset(); diff --git a/src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp b/src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp index 7b27194582a..34f3afea965 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp @@ -113,7 +113,9 @@ void AnimationCurveEditorModel::setMaximumTime(double time) DesignTools::ValueType typeFrom(const QmlTimelineKeyframeGroup &group) { - if (group.valueType() == TypeName("double") || group.valueType() == TypeName("real")) + if (group.valueType() == TypeName("double") + || group.valueType() == TypeName("real") + || group.valueType() == TypeName("float")) return DesignTools::ValueType::Double; if (group.valueType() == TypeName("boolean") || group.valueType() == TypeName("bool")) diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp index e308d657725..6ecb4ef2320 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp @@ -149,7 +149,7 @@ void TimelineSettingsModel::resetModel() setHorizontalHeaderLabels( QStringList({tr("State"), tr("Timeline"), tr("Animation"), tr("Fixed Frame")})); - if (timelineView()->isAttached() && timelineView()->rootModelNode().hasId()) { + if (timelineView()->isAttached()) { addState(ModelNode()); for (const QmlModelState &state : QmlVisualNode(timelineView()->rootModelNode()).states().allStates()) diff --git a/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h b/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h index ba2f6b283c0..ae58c597d32 100644 --- a/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h +++ b/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h @@ -128,6 +128,7 @@ public: void sendToken(const QString &token, int number, const QVector<ModelNode> &nodeVector); void selectionChanged(const ChangeSelectionCommand &command) override; + void library3DItemDropped(const Drop3DLibraryItemCommand &command) override; void selectedNodesChanged(const QList<ModelNode> &selectedNodeList, const QList<ModelNode> &lastSelectedNodeList) override; diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp index 025402f7bcf..158bbefb6dd 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp @@ -42,6 +42,7 @@ #include <completecomponentcommand.h> #include <changenodesourcecommand.h> #include <changeselectioncommand.h> +#include <drop3dlibraryitemcommand.h> #include <informationchangedcommand.h> #include <pixmapchangedcommand.h> @@ -280,6 +281,7 @@ void NodeInstanceServerProxy::dispatchCommand(const QVariant &command, PuppetStr static const int debugOutputCommandType = QMetaType::type("DebugOutputCommand"); static const int puppetAliveCommandType = QMetaType::type("PuppetAliveCommand"); static const int changeSelectionCommandType = QMetaType::type("ChangeSelectionCommand"); + static const int drop3DLibraryItemCommandType = QMetaType::type("Drop3DLibraryItemCommand"); if (m_destructing) return; @@ -305,6 +307,8 @@ void NodeInstanceServerProxy::dispatchCommand(const QVariant &command, PuppetStr nodeInstanceClient()->debugOutput(command.value<DebugOutputCommand>()); } else if (command.userType() == changeSelectionCommandType) { nodeInstanceClient()->selectionChanged(command.value<ChangeSelectionCommand>()); + } else if (command.userType() == drop3DLibraryItemCommandType) { + nodeInstanceClient()->library3DItemDropped(command.value<Drop3DLibraryItemCommand>()); } else if (command.userType() == puppetAliveCommandType) { puppetAlive(puppetStreamType); } else if (command.userType() == synchronizeCommandType) { diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp index 899dc5caeec..6a285130c53 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp @@ -41,6 +41,7 @@ #include "qmlstate.h" #include "qmltimeline.h" #include "qmltimelinekeyframegroup.h" +#include "qmlvisualnode.h" #include "createscenecommand.h" #include "createinstancescommand.h" @@ -52,6 +53,7 @@ #include "changebindingscommand.h" #include "changeidscommand.h" #include "changeselectioncommand.h" +#include "drop3dlibraryitemcommand.h" #include "changenodesourcecommand.h" #include "removeinstancescommand.h" #include "removepropertiescommand.h" @@ -66,7 +68,6 @@ #include "tokencommand.h" #include "removesharedmemorycommand.h" #include "debugoutputcommand.h" - #include "nodeinstanceserverproxy.h" #include <utils/algorithm.h> @@ -1431,6 +1432,17 @@ void NodeInstanceView::selectionChanged(const ChangeSelectionCommand &command) selectModelNode(modelNodeForInternalId(instanceId)); } } +void NodeInstanceView::library3DItemDropped(const Drop3DLibraryItemCommand &command) +{ + QDataStream stream(command.itemData()); + ItemLibraryEntry itemLibraryEntry; + stream >> itemLibraryEntry; + + if (itemLibraryEntry.category() != "Qt Quick 3D") + return; + + QmlVisualNode::createQmlVisualNode(this, itemLibraryEntry, {}); +} void NodeInstanceView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList, const QList<ModelNode> & /*lastSelectedNodeList*/) diff --git a/src/plugins/qmldesigner/designercore/model/qmlvisualnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlvisualnode.cpp index e9977d5c98c..b3444ce6114 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlvisualnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlvisualnode.cpp @@ -56,6 +56,9 @@ bool QmlVisualNode::isItemOr3DNode(const ModelNode &modelNode) if (modelNode.metaInfo().isSubclassOf("QtQuick3D.Node")) return true; + if (modelNode.metaInfo().isGraphicalItem() && modelNode.isRootNode()) + return true; + return false; } diff --git a/src/plugins/qmldesigner/qmldesignerplugin.qbs b/src/plugins/qmldesigner/qmldesignerplugin.qbs index f2fdd765984..4ebac8ce310 100644 --- a/src/plugins/qmldesigner/qmldesignerplugin.qbs +++ b/src/plugins/qmldesigner/qmldesignerplugin.qbs @@ -169,6 +169,8 @@ Project { "commands/valueschangedcommand.h", "commands/changeselectioncommand.cpp", "commands/changeselectioncommand.h", + "commands/drop3dlibraryitemcommand.cpp", + "commands/drop3dlibraryitemcommand.h", "container/addimportcontainer.cpp", "container/addimportcontainer.h", "container/idcontainer.cpp", diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index d6d4f7fb53f..23fe51d5440 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -2230,6 +2230,11 @@ Abis BaseQtVersion::qtAbisFromLibrary(const FilePathList &coreLibraries) return res; } +void BaseQtVersion::resetCache() const +{ + d->m_data.hasQtAbis = false; + d->m_mkspecReadUpToDate = false; +} // QtVersionFactory diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h index 4a90ca531bc..80489d1bb9d 100644 --- a/src/plugins/qtsupport/baseqtversion.h +++ b/src/plugins/qtsupport/baseqtversion.h @@ -244,6 +244,8 @@ protected: // helper function for desktop and simulator to figure out the supported abis based on the libraries static ProjectExplorer::Abis qtAbisFromLibrary(const Utils::FilePathList &coreLibraries); + void resetCache() const; + void ensureMkSpecParsed() const; virtual void parseMkSpec(ProFileEvaluator *) const; diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index b21684a9f5f..a194b524e03 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -8440,8 +8440,9 @@ void TextEditorWidget::setupGenericHighlighter() // TextEditorLinkLabel // TextEditorLinkLabel::TextEditorLinkLabel(QWidget *parent) - : QLabel(parent) + : Utils::ElidingLabel(parent) { + setElideMode(Qt::ElideMiddle); } void TextEditorLinkLabel::setLink(Utils::Link link) diff --git a/src/plugins/texteditor/texteditor.h b/src/plugins/texteditor/texteditor.h index d5a9a68ead1..dddfa54868a 100644 --- a/src/plugins/texteditor/texteditor.h +++ b/src/plugins/texteditor/texteditor.h @@ -35,10 +35,10 @@ #include <coreplugin/editormanager/ieditorfactory.h> #include <coreplugin/helpitem.h> +#include <utils/elidinglabel.h> #include <utils/link.h> #include <utils/uncommentselection.h> -#include <QLabel> #include <QPlainTextEdit> #include <QSharedPointer> #include <functional> @@ -611,7 +611,7 @@ private: friend class RefactorOverlay; }; -class TEXTEDITOR_EXPORT TextEditorLinkLabel : public QLabel +class TEXTEDITOR_EXPORT TextEditorLinkLabel : public Utils::ElidingLabel { public: TextEditorLinkLabel(QWidget *parent = nullptr); diff --git a/src/shared/qbs b/src/shared/qbs -Subproject 3e5268b08883eb98ab539887d63985f149e0224 +Subproject de04ecbbf59b361320a174ee0117c2cfa8c1001 diff --git a/src/tools/qml2puppet/CMakeLists.txt b/src/tools/qml2puppet/CMakeLists.txt index b3995849486..b62d063e621 100644 --- a/src/tools/qml2puppet/CMakeLists.txt +++ b/src/tools/qml2puppet/CMakeLists.txt @@ -45,6 +45,7 @@ extend_qtc_executable(qml2puppet synchronizecommand.cpp synchronizecommand.h tokencommand.cpp tokencommand.h changeselectioncommand.cpp changeselectioncommand.h + drop3dlibraryitemcommand.cpp drop3dlibraryitemcommand.h valueschangedcommand.cpp ) @@ -110,6 +111,7 @@ extend_qtc_executable(qml2puppet cameracontrolhelper.cpp cameracontrolhelper.h mousearea3d.cpp mousearea3d.h camerageometry.cpp camerageometry.h + gridgeometry.cpp gridgeometry.h ) extend_qtc_executable(qml2puppet diff --git a/src/tools/qml2puppet/qml2puppet.qbs b/src/tools/qml2puppet/qml2puppet.qbs index 540a2a3c08c..ca1c3654fbe 100644 --- a/src/tools/qml2puppet/qml2puppet.qbs +++ b/src/tools/qml2puppet/qml2puppet.qbs @@ -95,6 +95,8 @@ QtcTool { "commands/valueschangedcommand.h", "commands/changeselectioncommand.cpp", "commands/changeselectioncommand.h", + "commands/drop3dlibraryitemcommand.cpp", + "commands/drop3dlibraryitemcommand.h", "container/addimportcontainer.cpp", "container/addimportcontainer.h", "container/idcontainer.cpp", @@ -201,6 +203,8 @@ QtcTool { "editor3d/mousearea3d.h", "editor3d/camerageometry.cpp", "editor3d/camerageometry.h", + "editor3d/gridgeometry.cpp", + "editor3d/gridgeometry.h", "qml2puppetmain.cpp", ] } diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 76c67e69d10..be539035e5f 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -707,8 +707,8 @@ class Data public: Data() {} - Data(const QString &includes, const QString &code) - : includes(includes), code(code) + Data(const QString &includes, const QString &code, const QString &unused) + : includes(includes), code(code), unused(unused) {} const Data &operator+(const Check &check) const @@ -974,6 +974,7 @@ public: mutable QString profileExtra; mutable QString includes; mutable QString code; + mutable QString unused; mutable QList<Check> checks; mutable QList<CheckSet> checksets; @@ -1326,6 +1327,11 @@ void tst_Dumpers::dumper() QFile source(t->buildPath + '/' + data.mainFile); QVERIFY(source.open(QIODevice::ReadWrite)); + + QString unused; + if (!data.unused.isEmpty()) + unused = "unused(" + data.unused + ");"; + QString fullCode = QString() + "\n\n#ifdef _WIN32" + (data.useQt ? "\n#include <qt_windows.h>" : @@ -1372,28 +1378,29 @@ void tst_Dumpers::dumper() "\n#endif" : "") + "\n\nint main(int argc, char *argv[])" "\n{" - "\n unused(&argc, &argv);\n" - "\n int skipall = 0; unused(&skipall);\n" - "\n int qtversion = " + (data.useQt ? "QT_VERSION" : "0") + "; unused(&qtversion);" + "\n int skipall = 0;" + "\n int qtversion = " + (data.useQt ? "QT_VERSION" : "0") + ";" "\n#ifdef __GNUC__" - "\n int gccversion = 10000 * __GNUC__ + 100 * __GNUC_MINOR__; unused(&gccversion);" + "\n int gccversion = 10000 * __GNUC__ + 100 * __GNUC_MINOR__;" "\n#else" - "\n int gccversion = 0; unused(&gccversion);" + "\n int gccversion = 0;" "\n#endif" "\n#ifdef __clang__" - "\n int clangversion = 10000 * __clang_major__ + 100 * __clang_minor__; unused(&clangversion);" + "\n int clangversion = 10000 * __clang_major__ + 100 * __clang_minor__;" "\n gccversion = 0;" "\n#else" - "\n int clangversion = 0; unused(&clangversion);" + "\n int clangversion = 0;" "\n#endif" "\n#ifdef BOOST_VERSION" - "\n int boostversion = BOOST_VERSION; unused(&boostversion);" + "\n int boostversion = BOOST_VERSION;" "\n#else" - "\n int boostversion = 0; unused(&boostversion);" + "\n int boostversion = 0;" "\n#endif" "\n" + (data.useQHash ? "initHashSeed();" : "") + "\n" + data.code + - "\n BREAK;" + "\n BREAK;" + + "\n" + unused + + "\n unused(&argc, &argv, &skipall, &qtversion, &gccversion, &clangversion, &boostversion);" "\n return 0;" "\n}\n"; if (!data.allCode.isEmpty()) @@ -1898,15 +1905,17 @@ void tst_Dumpers::dumper_data() " } // namespace nsB\n" " } // namespace nsA\n"; + QTest::newRow("QBitArray") - << Data("#include <QBitArray>\n", + << Data("#include <QBitArray>", + "QBitArray ba0;\n" - "unused(&ba0);\n" "QBitArray ba1(20, true);\n" "ba1.setBit(1, false);\n" "ba1.setBit(3, false);\n" - "ba1.setBit(16, false);\n" - "unused(&ba1);\n") + "ba1.setBit(16, false);", + + "&ba0, &ba1") + CoreProfile() @@ -1921,6 +1930,7 @@ void tst_Dumpers::dumper_data() + Check("ba1.16", "[16]", "0", "bool") + Check("ba1.17", "[17]", "1", "bool"); + QTest::newRow("QByteArray") << Data("#include <QByteArray>\n" "#include <QString>\n" @@ -1948,12 +1958,13 @@ void tst_Dumpers::dumper_data() "char data[] = { 'H', 'e', 'l', 'l', 'o' };\n" "QByteArray ba4 = QByteArray::fromRawData(data, 4);\n" - "QByteArray ba5 = QByteArray::fromRawData(data + 1, 4);\n\n" + "QByteArray ba5 = QByteArray::fromRawData(data + 1, 4);", - "unused(&buf1, &buf2, &buf3);\n" - "unused(&ba0, &ba1, &ba2, &ba4, &ba5, &s, &ss);\n") + "&ba0, &ba1, &ba2, &s, &ss, &str1, &str2, &str3, &data, &ba4, &ba5, " + "&buf1, &buf2, &buf3, &ba4, &ba5") + CoreProfile() + + Check("ba0", "ba0", "\"\"", "@QByteArray") + Check("ba1", Value(QString("\"Hello\"World") @@ -1977,10 +1988,12 @@ void tst_Dumpers::dumper_data() QTest::newRow("QChar") - << Data("#include <QString>\n", + << Data("#include <QString>", + "QString s = QLatin1String(\"x\");\n" - "QChar c = s.at(0);\n" - "unused(&c);\n") + "QChar c = s.at(0);", + + "&s, &c") + CoreProfile() @@ -1992,28 +2005,33 @@ void tst_Dumpers::dumper_data() "enum Foo { a = 0x1, b = 0x2 };\n" "Q_DECLARE_FLAGS(FooFlags, Foo)\n" "Q_DECLARE_OPERATORS_FOR_FLAGS(FooFlags)\n", + "FooFlags f1(a);\n" - "FooFlags f2(a | b);\n") + "FooFlags f2(a | b);\n", + + "&f1, &f2") + + CoreProfile() + + Check("f1", "a (1)", TypeDef("@QFlags<enum Foo>", "FooFlags")) % CdbEngine + Check("f1", "a (0x0001)", "FooFlags") % NoCdbEngine + Check("f2", "(a | b) (0x0003)", "FooFlags") % GdbEngine; + QTest::newRow("QDateTime") - << Data("#include <QDateTime>\n", + << Data("#include <QDateTime>", "QDate d0;\n" "QDate d1;\n" "d1.setDate(1980, 1, 1);\n" - "unused(&d0, &d1);\n" "QTime t0;\n" "QTime t1(13, 15, 32);\n" - "unused(&t0, &t1);\n\n" "QDateTime dt0;\n" - "QDateTime dt1(QDate(1980, 1, 1), QTime(13, 15, 32), Qt::UTC);\n" - "unused(&dt0, &dt1);\n") + "QDateTime dt1(QDate(1980, 1, 1), QTime(13, 15, 32), Qt::UTC);", + + "&d0, &d1, &t0, &t1, &dt0, &dt1") + CoreProfile() @@ -2047,6 +2065,7 @@ void tst_Dumpers::dumper_data() //+ Check("dt1.toUTC", // Value5("Tue Jan 1 13:15:32 1980 GMT"), "@QDateTime") % Optional(); + #ifdef Q_OS_WIN QString tempDir = "C:/Program Files"; #else @@ -2056,11 +2075,13 @@ void tst_Dumpers::dumper_data() QTest::newRow("QDir") << Data("#include <QDir>\n", + "QDir dir(" + quoted(tempDir) + ");\n" "QString s = dir.absolutePath();\n" "QFileInfoList fil = dir.entryInfoList();\n" - "QFileInfo fi = fil.first();\n" - "unused(&dir, &s, &fi);\n") + "QFileInfo fi = fil.first();", + + "&dir, &s, &fi") + CoreProfile() + QtVersion(0x50300) @@ -2078,22 +2099,32 @@ void tst_Dumpers::dumper_data() #ifdef Q_OS_WIN << Data("#include <QFile>\n" "#include <QFileInfo>\n", + "QFile file(\"C:\\\\Program Files\\\\t\");\n" "file.setObjectName(\"A QFile instance\");\n" "QFileInfo fi(\"C:\\\\Program Files\\\\tt\");\n" - "QString s = fi.absoluteFilePath();\n") + "QString s = fi.absoluteFilePath();", + + "&s") + + CoreProfile() + + Check("fi", "\"C:/Program Files/tt\"", "@QFileInfo") + Check("file", "\"C:\\Program Files\\t\"", "@QFile") + Check("s", "\"C:/Program Files/tt\"", "@QString"); #else << Data("#include <QFile>\n" "#include <QFileInfo>\n", + "QFile file(\"/tmp/t\");\n" "file.setObjectName(\"A QFile instance\");\n" "QFileInfo fi(\"/tmp/tt\");\n" - "QString s = fi.absoluteFilePath();\n") + "QString s = fi.absoluteFilePath();\n", + + "&s") + + CoreProfile() + + Check("fi", "\"/tmp/tt\"", "@QFileInfo") + Check("file", "\"/tmp/t\"", "@QFile") + Check("s", "\"/tmp/tt\"", "@QString"); @@ -2102,7 +2133,8 @@ void tst_Dumpers::dumper_data() QTest::newRow("QFixed") << Data("#include <private/qfixed_p.h>\n", - "QFixed f(1234);\n") + "QFixed f(1234);", + "&f") + Qt5 + GuiPrivateProfile() + Check("f", "78976/64 = 1234.0", "@QFixed"); @@ -2150,7 +2182,9 @@ void tst_Dumpers::dumper_data() "h8[33] = 33.0;\n" "Hash::iterator it1 = h8.begin();\n" "Hash::iterator it2 = it1; ++it2;\n" - "Hash::iterator it3 = it2; ++it3;\n\n") + "Hash::iterator it3 = it2; ++it3;", + + "&it1, &it2, &it3") + CoreProfile() @@ -2209,6 +2243,7 @@ void tst_Dumpers::dumper_data() QTest::newRow("QHostAddress") << Data("#include <QHostAddress>\n", + "QHostAddress ha1(129u * 256u * 256u * 256u + 130u);\n\n" "QHostAddress ha2;\n" "ha2.setAddress(\"127.0.0.1\");\n\n" @@ -2229,8 +2264,9 @@ void tst_Dumpers::dumper_data() "addr.c[13] = 0;\n" "addr.c[14] = 0;\n" "addr.c[15] = 0;\n" - "QHostAddress ha3(addr);\n" - "unused(&ha1, &ha2, &ha3);\n") + "QHostAddress ha3(addr);", + + "&ha1, &ha2, &ha3") + NetworkProfile() @@ -2252,8 +2288,8 @@ void tst_Dumpers::dumper_data() "pain.begin(&im);\n" "pain.drawLine(2, 2, 130, 130);\n" "pain.end();\n" - "QPixmap pm = QPixmap::fromImage(im);\n" - "unused(&app, &pm);\n") + "QPixmap pm = QPixmap::fromImage(im);", + "&app, &pm") + GuiProfile() @@ -2267,39 +2303,34 @@ void tst_Dumpers::dumper_data() "#include <string>\n" + fooData, - "QLinkedList<float> l0;\n" - "unused(&l0);\n\n" + "QLinkedList<float> l0;\n\n" "QLinkedList<int> l1;\n" "l1.append(101);\n" - "l1.append(102);\n" - "unused(&l1);\n\n" + "l1.append(102);\n\n" "QLinkedList<uint> l2;\n" "l2.append(103);\n" - "l2.append(104);\n" - "unused(&l2);\n\n" + "l2.append(104);\n\n" "QLinkedList<Foo *> l3;\n" "l3.append(new Foo(1));\n" "l3.append(0);\n" - "l3.append(new Foo(3));\n" - "unused(&l3);\n\n" + "l3.append(new Foo(3));\n\n" "QLinkedList<qulonglong> l4;\n" "l4.append(42);\n" - "l4.append(43);\n" - "unused(&l4);\n\n" + "l4.append(43);\n\n" "QLinkedList<Foo> l5;\n" "l5.append(Foo(1));\n" - "l5.append(Foo(2));\n" - "unused(&l5);\n\n" + "l5.append(Foo(2));\n\n" "QLinkedList<std::string> l6;\n" "l6.push_back(\"aa\");\n" - "l6.push_back(\"bb\");\n" - "unused(&l6);\n\n") + "l6.push_back(\"bb\");\n\n", + + "&l1, &l2, &l3, &l4, &l5, &l6") + CoreProfile() @@ -2344,79 +2375,69 @@ void tst_Dumpers::dumper_data() "#include <string>\n", "QList<int> l0;\n" - "unused(&l0);\n\n" "QList<int> l1;\n" "for (int i = 0; i < 10; ++i)\n" " l1.push_back(i);\n" - "unused(&l1);\n\n" "QList<int> l2;\n" "l2.append(0);\n" "l2.append(1);\n" "l2.append(2);\n" "l2.takeFirst();\n" - "unused(&l2);\n\n" "QList<QString> l3;\n" "l3.append(\"0\");\n" "l3.append(\"1\");\n" "l3.append(\"2\");\n" "l3.takeFirst();\n" - "unused(&l3);\n\n" "QStringList l4;\n" "l4.append(\"0\");\n" "l4.append(\"1\");\n" "l4.append(\"2\");\n" "l4.takeFirst();\n" - "unused(&l4);\n\n" "QList<int *> l5;\n" "l5.append(new int(1));\n" "l5.append(new int(2));\n" "l5.append(0);\n" - "unused(&l5);\n\n" "QList<int *> l6;\n" - "unused(&l6);\n\n" "QList<uint> l7;\n" "l7.append(101);\n" "l7.append(102);\n" "l7.append(102);\n" - "unused(&l7);\n\n" "QStringList sl;\n" "sl.append(\"aaa\");\n" "QList<QStringList> l8;\n" "l8.append(sl);\n" "l8.append(sl);\n" - "unused(&l8, &sl);\n\n" "QList<ushort> l9;\n" "l9.append(101);\n" "l9.append(102);\n" "l9.append(102);\n" - "unused(&l9);\n\n" "QList<QChar> l10;\n" "l10.append(QChar('a'));\n" "l10.append(QChar('b'));\n" "l10.append(QChar('c'));\n" - "unused(&l10);\n\n" "QList<qulonglong> l11;\n" "l11.append(100);\n" "l11.append(101);\n" "l11.append(102);\n" - "unused(&l11);\n\n" "QList<std::string> l12, l13;\n" "l13.push_back(\"aa\");\n" "l13.push_back(\"bb\");\n" "l13.push_back(\"cc\");\n" - "l13.push_back(\"dd\");") + "l13.push_back(\"dd\");", + + "&l1, &l2, &l3, &l4, &l5, &l6, &l7, &l8, &l9, &l10, &l11, &l12, &l13, &sl") + CoreProfile() @@ -2486,7 +2507,9 @@ void tst_Dumpers::dumper_data() "Reverse rend(l.begin());\n" "QList<int> r;\n" "while (rit != rend)\n" - " r.append(*rit++);\n") + " r.append(*rit++);\n", + + "&r, &l0, &l1, &l") + CoreProfile() @@ -2509,14 +2532,18 @@ void tst_Dumpers::dumper_data() QTest::newRow("QLocale") << Data("#include <QLocale>\n", + "QLocale loc0;\n" "QLocale loc = QLocale::system();\n" "QLocale::MeasurementSystem m = loc.measurementSystem();\n" "QLocale loc1(\"en_US\");\n" - "QLocale::MeasurementSystem m1 = loc1.measurementSystem();\n" - "unused(&loc0, &loc, &m, &loc1, &m1);\n") + "QLocale::MeasurementSystem m1 = loc1.measurementSystem();", + + "&loc0, &loc, &m, &loc1, &m1") + + CoreProfile() + NoCdbEngine + + CheckType("loc", "@QLocale") + CheckType("m", "@QLocale::MeasurementSystem") + Check("loc1", "\"en_US\"", "@QLocale") @@ -2542,7 +2569,6 @@ void tst_Dumpers::dumper_data() "#include <QStringList>\n" + fooData + nsData, "QMap<uint, QStringList> m0;\n" - "unused(&m0);\n\n" "QMap<uint, QStringList> m1;\n" "m1[11] = QStringList() << \"11\";\n" @@ -2581,7 +2607,9 @@ void tst_Dumpers::dumper_data() "m8[\"foo\"] = x;\n" "m8[\"bar\"] = x;\n" "m8[\"1\"] = x;\n" - "m8[\"2\"] = x;\n\n") + "m8[\"2\"] = x;\n\n", + + "&m0, &m1, &m2, &m3, &m4, &m5, &m6, &m7, &m8") + CoreProfile() @@ -2648,7 +2676,6 @@ void tst_Dumpers::dumper_data() "#include <QString>\n" + fooData, "QMultiMap<int, int> m0;\n" - "unused(&m0);\n\n" "QMultiMap<uint, float> m1;\n" "m1.insert(11, 11.0);\n" @@ -2674,7 +2701,9 @@ void tst_Dumpers::dumper_data() "m5.insert(\"Hallo\", QPointer<QObject>(&ob));\n" "m5.insert(\"Welt\", QPointer<QObject>(&ob));\n" "m5.insert(\".\", QPointer<QObject>(&ob));\n" - "m5.insert(\".\", QPointer<QObject>(&ob));\n\n") + "m5.insert(\".\", QPointer<QObject>(&ob));", + + "&m0, &m1, &m2, &m3, &m4, &m5, &ob") + CoreProfile() @@ -2709,13 +2738,16 @@ void tst_Dumpers::dumper_data() QTest::newRow("QObject1") << Data("#include <QObject>\n", + "QObject parent;\n" "parent.setObjectName(\"A Parent\");\n" "QObject child(&parent);\n" "child.setObjectName(\"A Child\");\n" "QObject::connect(&child, SIGNAL(destroyed()), &parent, SLOT(deleteLater()));\n" "QObject::disconnect(&child, SIGNAL(destroyed()), &parent, SLOT(deleteLater()));\n" - "child.setObjectName(\"A renamed Child\");\n") + "child.setObjectName(\"A renamed Child\");", + + "&parent, &child") + CoreProfile() @@ -2758,8 +2790,8 @@ void tst_Dumpers::dumper_data() " };\n" "} // namespace Bar\n" "#include <main.moc>\n", - "" - "QApplication app(argc, argv); unused(&app);\n" + + "QApplication app(argc, argv);\n" "Bar::TestObject test;\n" "test.setObjectName(\"Name\");\n" "test.setMyProp1(\"Hello\");\n" @@ -2770,24 +2802,28 @@ void tst_Dumpers::dumper_data() "s += QString::fromLatin1(test.myProp2());\n" "\n" "const QMetaObject *mo = test.metaObject();\n" - "QMetaMethod mm0; unused(&mm0); \n" + "QMetaMethod mm0;\n" "const QMetaObject smo = test.staticMetaObject;\n" - "QMetaMethod mm = mo->method(0); unused(&mm);\n" + "QMetaMethod mm = mo->method(0);\n" "\n" "QMetaEnum me0;\n" - "QMetaEnum me = mo->enumerator(0); unused(&me);\n" + "QMetaEnum me = mo->enumerator(0);\n" "\n" "QMetaProperty mp0;\n" - "QMetaProperty mp = mo->property(0); unused(&mp);\n" + "QMetaProperty mp = mo->property(0);\n" "\n" "QMetaClassInfo mci0;\n" - "QMetaClassInfo mci = mo->classInfo(0); unused(&mci);\n" + "QMetaClassInfo mci = mo->classInfo(0);\n" "\n" "int n = mo->methodCount();\n" "QVector<QMetaMethod> v(n);\n" "for (int i = 0; i < n; ++i)\n" - " v[i] = mo->method(i);\n") + " v[i] = mo->method(i);\n", + + "&app, &mm0, &mm, &me, &mp, &mci, &smo") + + GuiProfile() + + Check("s", "\"HelloWorld\"", "@QString") + Check("test", "\"Name\"", "Bar::TestObject") + Check("test.[properties]", "<6 items>", "") @@ -2808,6 +2844,7 @@ void tst_Dumpers::dumper_data() + Check("mm.handle", "14", TypeDef("unsigned int", "uint")) + Check("mp", "objectName", "@QMetaProperty"); + QTest::newRow("QObject3") << Data("#include <QWidget>\n" "#include <QList>\n" @@ -2832,8 +2869,8 @@ void tst_Dumpers::dumper_data() "obs.append(&ob1);\n" "obs.append(0);\n" "obs.append(&app);\n" - "ob2.setObjectName(\"A Subobject\");\n" - "unused(&ob, &ob1, &ob2);\n") + "ob2.setObjectName(\"A Subobject\");", + "&ob, &ob1, &ob2") + GuiProfile() @@ -2951,8 +2988,12 @@ void tst_Dumpers::dumper_data() " d->m_extraZ = z;\n" " }\n" "#include \"main.moc\"\n", + "DerivedObject ob;\n" - "ob.setX(26);\n") + "ob.setX(26);", + + "&ob") + + CoreProfile() + CorePrivateProfile(); // FIXME: @@ -2962,13 +3003,18 @@ void tst_Dumpers::dumper_data() QTest::newRow("QRegExp") << Data("#include <QRegExp>\n" "#include <QStringList>\n", + "QRegExp re(QString(\"a(.*)b(.*)c\"));\n" "QString str1 = \"a1121b344c\";\n" "QString str2 = \"Xa1121b344c\";\n" - "int pos1 = re.indexIn(str1); unused(&pos1);\n" - "int pos2 = re.indexIn(str2); unused(&pos2);\n" - "QStringList caps = re.capturedTexts(); unused(&caps);\n") + "int pos1 = re.indexIn(str1);\n" + "int pos2 = re.indexIn(str2);\n" + "QStringList caps = re.capturedTexts();", + + "&pos1, &pos2, &caps") + + CoreProfile() + + Check("re", "\"a(.*)b(.*)c\"", "@QRegExp") + Check("re.captures.0", "[0]", "\"a1121b344c\"", "@QString") + Check("re.captures.1", "[1]", "\"1121\"", "@QString") @@ -2989,25 +3035,23 @@ void tst_Dumpers::dumper_data() "#include <QString> // Dummy for namespace\n", "QString dummy;\n" - "unused(&dummy);\n" "QRect rect0, rect;\n" "rect = QRect(100, 100, 200, 200);\n" "QRectF rectf0, rectf;\n" "rectf = QRectF(100.25, 100.25, 200.5, 200.5);\n" - "unused(&rect0, &rect);\n\n" "QPoint p0, p;\n" "p = QPoint(100, 200);\n" "QPointF pf0, pf;\n" "pf = QPointF(100.5, 200.5);\n" - "unused(&p0, &p);\n" "QSize s0, s;\n" "QSizeF sf0, sf;\n" "sf = QSizeF(100.5, 200.5);\n" - "s = QSize(100, 200);\n" - "unused(&s0, &s);\n") + "s = QSize(100, 200);", + + "&s0, &s, &dummy, &rect0, &rect, &p0, &p") + CoreProfile() @@ -3036,8 +3080,8 @@ void tst_Dumpers::dumper_data() "region1 = region;\n" "QVector<QRect> rects = region1.rects(); // Warm up internal cache.\n" "region += QRect(300, 300, 400, 500);\n" - "region2 = region;\n" - "unused(®ion0, ®ion1, ®ion2, &rects);\n") + "region2 = region;", + "®ion0, ®ion1, ®ion2, &rects") + GuiProfile() @@ -3061,11 +3105,15 @@ void tst_Dumpers::dumper_data() << Data("#include <QSettings>\n" "#include <QCoreApplication>\n" "#include <QVariant>\n", + "QCoreApplication app(argc, argv);\n" "QSettings settings(\"/tmp/test.ini\", QSettings::IniFormat);\n" - "QVariant value = settings.value(\"item1\", \"\").toString();\n" - "unused(&value);\n") + "QVariant value = settings.value(\"item1\", \"\").toString();", + + "&value, &app, &settings") + + CoreProfile() + + Check("settings", "", "@QSettings") //+ Check("settings.@1", "[@QObject]", "", "@QObject") + Check("value", "\"\"", "@QVariant (QString)"); @@ -3095,9 +3143,12 @@ void tst_Dumpers::dumper_data() "QPointer<QObject> ptr(&ob);\n" "s3.insert(ptr);\n" "s3.insert(ptr);\n" - "s3.insert(ptr);\n") + "s3.insert(ptr);\n", + + "&s1, &s2, &s3") + CoreProfile() + + Check("s1", "<2 items>", "@QSet<int>") + Check("s1.0", "[0]", "22", "int") + Check("s1.1", "[1]", "11", "int") @@ -3148,6 +3199,7 @@ void tst_Dumpers::dumper_data() " QSharedDataPointer<EmployeeData> d;\n" " };\n"; + QTest::newRow("QAtomicPointer") << Data("#include <QAtomicPointer>\n" "#include <QStringList>\n\n" @@ -3163,13 +3215,17 @@ void tst_Dumpers::dumper_data() "};\n\n" "typedef Pointer<SomeStruct> SomeStructPointer;\n\n", - "SomeStruct *s = new SomeStruct; unused(s);\n" - "SomeStructPointer p(s); unused(p);\n" - "Pointer<SomeStruct> pp(s); unused(pp);\n" - "QAtomicPointer<SomeStruct> ppp(s); unused(ppp);\n") + "SomeStruct *s = new SomeStruct;\n" + "SomeStructPointer p(s);\n" + "Pointer<SomeStruct> pp(s);\n" + "QAtomicPointer<SomeStruct> ppp(s);", + + "&s, &p, &pp, &ppp") + + CoreProfile() + Cxx11Profile() + MsvcVersion(1900) + + Check("p.@1.a", "1", "int") + Check("p.@1.e", "<2 items>", "@QList<@QString>") + Check("pp.@1.a", "1", "int") @@ -3180,9 +3236,11 @@ void tst_Dumpers::dumper_data() << Data("#include <QPointer>\n" "#include <QTimer>\n", - "QTimer timer; unused(&timer);\n" - "QPointer<QTimer> ptr0; unused(&ptr0);\n" - "QPointer<QTimer> ptr1(&timer); unused(&ptr1);\n\n") + "QTimer timer;\n" + "QPointer<QTimer> ptr0;\n" + "QPointer<QTimer> ptr1(&timer);", + + "&timer, &ptr0, &ptr1") + CoreProfile() @@ -3194,11 +3252,13 @@ void tst_Dumpers::dumper_data() << Data("#include <QScopedPointer>\n" "#include <QString>\n", - "QScopedPointer<int> ptr10; unused(&ptr10);\n" - "QScopedPointer<int> ptr11(new int(32)); unused(&ptr11);\n\n" + "QScopedPointer<int> ptr10;\n" + "QScopedPointer<int> ptr11(new int(32));\n\n" + + "QScopedPointer<QString> ptr20;\n" + "QScopedPointer<QString> ptr21(new QString(\"ABC\"));", - "QScopedPointer<QString> ptr20; unused(&ptr20);\n" - "QScopedPointer<QString> ptr21(new QString(\"ABC\")); unused(&ptr21);\n\n") + "&ptr10, &ptr11, &ptr20, &ptr21") + CoreProfile() @@ -3215,31 +3275,32 @@ void tst_Dumpers::dumper_data() "QSharedPointer<int> ptr10;\n" "QSharedPointer<int> ptr11 = ptr10;\n" - "QSharedPointer<int> ptr12 = ptr10;\n" - "unused(&ptr10, &ptr11, &ptr12);\n\n" + "QSharedPointer<int> ptr12 = ptr10;\n\n" "QSharedPointer<QString> ptr20(new QString(\"hallo\"));\n" "QSharedPointer<QString> ptr21 = ptr20;\n" - "QSharedPointer<QString> ptr22 = ptr20;\n" - "unused(&ptr20, &ptr21, &ptr22);\n\n" + "QSharedPointer<QString> ptr22 = ptr20;\n\n" "QSharedPointer<int> ptr30(new int(43));\n" "QWeakPointer<int> ptr31(ptr30);\n" "QWeakPointer<int> ptr32 = ptr31;\n" - "QWeakPointer<int> ptr33 = ptr32;\n" - "unused(&ptr30, &ptr31, &ptr32);\n\n" + "QWeakPointer<int> ptr33 = ptr32;\n\n" "QSharedPointer<QString> ptr40(new QString(\"hallo\"));\n" "QWeakPointer<QString> ptr41(ptr40);\n" "QWeakPointer<QString> ptr42 = ptr40;\n" - "QWeakPointer<QString> ptr43 = ptr40;\n" - "unused(&ptr40, &ptr41, &ptr42, &ptr43);\n\n" + "QWeakPointer<QString> ptr43 = ptr40;\n\n" "QSharedPointer<Foo> ptr50(new Foo(1));\n" "QWeakPointer<Foo> ptr51(ptr50);\n" "QWeakPointer<Foo> ptr52 = ptr50;\n" - "QWeakPointer<Foo> ptr53 = ptr50;\n" - "unused(&ptr50, &ptr51, &ptr52, &ptr53);\n") + "QWeakPointer<Foo> ptr53 = ptr50;\n", + + "&ptr10, &ptr11, &ptr12, " + "&ptr20, &ptr21, &ptr22, " + "&ptr30, &ptr31, &ptr32, &ptr33, " + "&ptr40, &ptr41, &ptr42, &ptr43, " + "&ptr50, &ptr51, &ptr52, &ptr53") + CoreProfile() @@ -3273,9 +3334,14 @@ void tst_Dumpers::dumper_data() QTest::newRow("QLazilyAllocated") << Data("#include <private/qlazilyallocated_p.h>\n" "#include <QString>\n", + "QLazilyAllocated<QString> l;\n" - "l.value() = \"Hi\";\n") + "l.value() = \"Hi\";\n", + + "&l") + + QmlPrivateProfile() + + Check("l", "\"Hi\"", "@QLazilyAllocated<@QString>"); @@ -3310,10 +3376,11 @@ void tst_Dumpers::dumper_data() "QFiniteStack<bool> s5;\n" "s5.allocate(10);\n" "s5.push(true);\n" - "s5.push(false);\n\n") + "s5.push(false);", - + QmlPrivateProfile() + "&s1, &s2, &s3, &s4, &s5") + + QmlPrivateProfile() + BigArrayProfile() + Check("s1", "<2 items>", "@QFiniteStack<int>") @@ -3377,34 +3444,30 @@ void tst_Dumpers::dumper_data() "QStack<int> s1;\n" "s1.append(1);\n" - "s1.append(2);\n" - "unused(&s1);\n\n" + "s1.append(2);\n\n" "QStack<int> s2;\n" "for (int i = 0; i != 10000; ++i)\n" " s2.append(i);\n" - "unused(&s2);\n\n" "QStack<Foo *> s3;\n" "s3.append(new Foo(1));\n" "s3.append(0);\n" - "s3.append(new Foo(2));\n" - "unused(&s3);\n\n" + "s3.append(new Foo(2));\n\n" "QStack<Foo> s4;\n" "s4.append(1);\n" "s4.append(2);\n" "s4.append(3);\n" - "s4.append(4);\n" - "unused(&s4);\n\n" + "s4.append(4);\n\n" "QStack<bool> s5;\n" "s5.append(true);\n" - "s5.append(false);\n" - "unused(&s5);\n\n") + "s5.append(false);", - + CoreProfile() + "&s1, &s2, &s3, &s4, &s5") + + CoreProfile() + BigArrayProfile() + Check("s1", "<2 items>", "@QStack<int>") @@ -3435,9 +3498,11 @@ void tst_Dumpers::dumper_data() QTest::newRow("QTimeZone") << Data("#include <QTimeZone>\n", + "QTimeZone tz0;\n" - "QTimeZone tz1(\"UTC+05:00\");\n" - "unused(&tz0, &tz1);\n") + "QTimeZone tz1(\"UTC+05:00\");", + + "&tz0, &tz1") + CoreProfile() + QtVersion(0x50200) @@ -3448,11 +3513,13 @@ void tst_Dumpers::dumper_data() QTest::newRow("QUrl") << Data("#include <QUrl>", + "QUrl url0;\n" "QUrl url1 = QUrl::fromEncoded(\"http://foo@qt-project.org:10/have_fun\");\n" "int port = url1.port();\n" - "QString path = url1.path();\n" - "unused(&url0, &url1, &port, &path);\n") + "QString path = url1.path();", + + "&url0, &url1, &port, &path") + CoreProfile() @@ -3471,11 +3538,15 @@ void tst_Dumpers::dumper_data() QTest::newRow("QUuid") << Data("#include <QUuid>", + "QUuid uuid1(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);\n" "QUuid uuid2(0xfffffffeu, 0xfffd, 0xfffc, 0xfb, " - " 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4);\n" - "unused(&uuid1, &uuid2);\n") + " 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4);", + + "&uuid1, &uuid2") + + CoreProfile() + + Check("uuid1", "{00000001-0002-0003-0405-060708090a0b}", "@QUuid") + Check("uuid2", "{fffffffe-fffd-fffc-fbfa-f9f8f7f6f5f4}", "@QUuid"); @@ -3498,7 +3569,6 @@ void tst_Dumpers::dumper_data() "QByteArray s0 = \"Hello\";\n" "s0.prepend(\"Prefix: \");\n" - "unused(&s0);\n\n" "QByteArray s1 = \"AAA\";\n" "s1 += '\\t';\n" @@ -3507,17 +3577,14 @@ void tst_Dumpers::dumper_data() "s1 += char(0);\n" "s1 += char(1);\n" "s1 += \"BBB\";\n" - "unused(&s1);\n\n" "QChar data[] = { 'H', 'e', 'l', 'l', 'o' };\n" "QString s2 = QString::fromRawData(data, 4);\n" "QString s3 = QString::fromRawData(data + 1, 4);\n" - "unused(&data, &s2, &s3);\n\n" "QString s4 = \"Hello \";\n" "QString s5(\"String Test\");\n" "QString *s6 = new QString(\"Pointer String Test\");\n" - "unused(&s4, &s5, &s6);\n\n" "const wchar_t *w = L\"aöa\";\n" "QString s7;\n" @@ -3525,12 +3592,10 @@ void tst_Dumpers::dumper_data() " s7 = QString::fromUcs4((uint *)w);\n" "else\n" " s7 = QString::fromUtf16((ushort *)w);\n" - "unused(&w, &s7);\n\n" "QString str = \"Hello\";\n" "QStringRef s8(&str, 1, 2);\n" "QStringRef s9;\n" - "unused(&s8, &s9);\n\n" "QStringList l;\n" "l << \"Hello \";\n" @@ -3538,25 +3603,31 @@ void tst_Dumpers::dumper_data() "l.takeFirst();\n" "l << \" World \";\n\n" - "QString str1(\"Hello Qt\"); unused(&str1);\n" - "QString str2(\"Hello\\nQt\"); unused(&str2);\n" - "QString str3(\"Hello\\rQt\"); unused(&str3);\n" - "QString str4(\"Hello\\tQt\"); unused(&str4);\n\n" + "QString str1(\"Hello Qt\");\n" + "QString str2(\"Hello\\nQt\");\n" + "QString str3(\"Hello\\rQt\");\n" + "QString str4(\"Hello\\tQt\");\n\n" "#if QT_VERSION > 0x50000\n" "static const QStaticStringData<3> qstring_literal = {\n" " Q_STATIC_STRING_DATA_HEADER_INITIALIZER(3),\n" " QT_UNICODE_LITERAL(u\"ABC\") };\n" "QStringDataPtr holder = { qstring_literal.data_ptr() };\n" - "const QString qstring_literal_temp(holder); unused(&holder);\n\n" + "const QString qstring_literal_temp(holder);\n\n" "QStaticStringData<1> sd;\n" "sd.data[0] = 'Q';\n" "sd.data[1] = 0;\n" - "#endif\n") + "#else\n" + "int qstring_literal_temp, sd, holder;\n" + "#endif", + + "&s0, &s1, &data, &s2, &s3, &s4, &s5, &s6, &w, &s7, &s8, &s9, " + "&l, &qstring_literal_temp, &sd, &str1, &str2, &str3, &str4, &holder") + CoreProfile() + MsvcVersion(1900) + + Check("s0", "\"Prefix: Hello\"", "@QByteArray") + Check("s1", expected1, "@QByteArray") + Check("s2", "\"Hell\"", "@QString") @@ -3595,7 +3666,10 @@ void tst_Dumpers::dumper_data() " BREAK;\n" " unused(&refstring);\n" "}\n", - "stringRefTest(QString(\"Ref String Test\"));\n") + + "stringRefTest(QString(\"Ref String Test\"));\n", + + "") + CoreProfile() @@ -3607,20 +3681,25 @@ void tst_Dumpers::dumper_data() << Data("#include <QApplication>\n" "#include <QTextCursor>\n" "#include <QTextDocument>\n", + "QApplication app(argc, argv);\n" "QTextDocument doc;\n" "doc.setPlainText(\"Hallo\\nWorld\");\n" "QTextCursor tc;\n" "tc = doc.find(\"all\");\n" "int pos = tc.position();\n" - "int anc = tc.anchor();\n" - "unused(&pos, &anc);\n") + "int anc = tc.anchor();", + + "&pos, &anc") + + GuiProfile() + + CheckType("doc", "@QTextDocument") + Check("tc", "4", "@QTextCursor") + Check("pos", "4", "int") + Check("anc", "1", "int"); + QTest::newRow("QThread") << Data("#include <QThread>\n" "struct Thread : QThread\n" @@ -3629,18 +3708,19 @@ void tst_Dumpers::dumper_data() " {\n" " auto mo = &QThread::metaObject;\n" " auto mc = &QThread::qt_metacast;\n" - " auto p0 = (*(void***)this)[0]; unused(&p0);\n" - " auto p1 = (*(void***)this)[1]; unused(&p1);\n" - " auto p2 = (*(void***)this)[2]; unused(&p2);\n" - " auto p3 = (*(void***)this)[3]; unused(&p3);\n" - " auto p4 = (*(void***)this)[4]; unused(&p4);\n" - " auto p5 = (*(void***)this)[5]; unused(&p5);\n" + " auto p0 = (*(void***)this)[0];\n" + " auto p1 = (*(void***)this)[1];\n" + " auto p2 = (*(void***)this)[2];\n" + " auto p3 = (*(void***)this)[3];\n" + " auto p4 = (*(void***)this)[4];\n" + " auto p5 = (*(void***)this)[5];\n" " if (m_id == 3) {\n" " BREAK;\n" " }\n" + " unused(&mo, &mc, &p0, &p1, &p2, &p3, &p4, &p5);\n" " }\n" " int m_id;\n" - "};\n", + "};", "const int N = 14;\n" "Thread thread[N];\n" @@ -3651,7 +3731,9 @@ void tst_Dumpers::dumper_data() "}\n" "for (int i = 0; i != N; ++i) {\n" " thread[i].wait();\n" - "}\n") + "}", + + "&thread, &N") + CoreProfile() @@ -3672,13 +3754,11 @@ void tst_Dumpers::dumper_data() "Q_DECLARE_METATYPE(QList<int>)\n" "#endif\n", - "QVariant v0;\n" - "unused(&v0);\n\n" + "QVariant v0;\n\n" "QVariant::Type t1 = QVariant::String;\n" "QVariant v1 = QVariant(t1, (void*)0);\n" - //"*(QString*)v1.data() = QString(\"Some string\");\n" - "unused(&v1);\n\n" + //"*(QString*)v1.data() = QString(\"Some string\");\n\n" "MyType my;\n" "my[1] = (QStringList() << \"Hello\");\n" @@ -3686,13 +3766,13 @@ void tst_Dumpers::dumper_data() "QVariant v2;\n" "v2.setValue(my);\n" "int t = QMetaType::type(\"MyType\");\n" - "const char *s = QMetaType::typeName(t);\n" - "unused(&v2, &t, &s);\n\n" + "const char *s = QMetaType::typeName(t);\n\n" "QList<int> list;\n" "list << 1 << 2 << 3;\n" - "QVariant v3 = QVariant::fromValue(list);\n" - "unused(&list, &v3);\n\n") + "QVariant v3 = QVariant::fromValue(list);", + + "&my, &v0, &v1, &v2, &t, &s, &list, &v3, &t1") + CoreProfile() @@ -3834,7 +3914,8 @@ void tst_Dumpers::dumper_data() "QVariant var83 = QVector3D(); unused(&var83); // 83 QVector3D\n" "QVariant var84 = QVector4D(); unused(&var84); // 84 QVector4D\n" "QVariant var85 = QQuaternion(); unused(&var85); // 85 QQuaternion\n" - "QVariant var86 = QVariant::fromValue<QPolygonF>(QPolygonF()); unused(&var86);\n" + "QVariant var86 = QVariant::fromValue<QPolygonF>(QPolygonF()); unused(&var86);\n", + "" ) + GuiProfile() @@ -3906,12 +3987,14 @@ void tst_Dumpers::dumper_data() << Data("#include <QHostAddress>\n" "#include <QVariant>\n" "Q_DECLARE_METATYPE(QHostAddress)\n", + "QVariant var;\n" "QHostAddress ha;\n" "ha.setAddress(\"127.0.0.1\");\n" "var.setValue(ha);\n" - "QHostAddress ha1 = var.value<QHostAddress>();\n" - "unused(&ha1);\n") + "QHostAddress ha1 = var.value<QHostAddress>();", + + "&ha1, &var, &ha") + NetworkProfile() @@ -3940,8 +4023,7 @@ void tst_Dumpers::dumper_data() QTest::newRow("QVariantList") << Data("#include <QVariantList>\n", - "QVariantList vl0;\n" - "unused(&vl0);\n\n" + "QVariantList vl0;\n\n" "QVariantList vl1;\n" "vl1.append(QVariant(1));\n" @@ -3949,13 +4031,13 @@ void tst_Dumpers::dumper_data() "vl1.append(QVariant(\"Some String\"));\n" "vl1.append(QVariant(21));\n" "vl1.append(QVariant(22));\n" - "vl1.append(QVariant(\"2Some String\"));\n" - "unused(&vl1);\n\n" + "vl1.append(QVariant(\"2Some String\"));\n\n" "QVariantList vl2;\n" "vl2.append(\"one\");\n" - "QVariant v = vl2;\n\n" - "unused(&vl2, &v);\n\n") + "QVariant v = vl2;", + + "&vl0, &vl1, &vl2, &v") + CoreProfile() @@ -3973,7 +4055,6 @@ void tst_Dumpers::dumper_data() << Data("#include <QVariantMap>\n", "QVariantMap vm0;\n\n" - "unused(&vm0);\n\n" "QVariantMap vm1;\n" "vm1[\"a\"] = QVariant(1);\n" @@ -3981,11 +4062,11 @@ void tst_Dumpers::dumper_data() "vm1[\"c\"] = QVariant(\"Some String\");\n" "vm1[\"d\"] = QVariant(21);\n" "vm1[\"e\"] = QVariant(22);\n" - "vm1[\"f\"] = QVariant(\"2Some String\");\n" - "unused(&vm1);\n\n" + "vm1[\"f\"] = QVariant(\"2Some String\");\n\n" + + "QVariant v = vm1;\n", - "QVariant v = vm1;\n" - "unused(&v);\n") + "&vm0, &vm1, &v") + CoreProfile() @@ -4004,15 +4085,14 @@ void tst_Dumpers::dumper_data() QTest::newRow("QVariantHash") << Data("#include <QVariant>\n", - "QVariantHash h0;\n" - "unused(&h0);\n\n" + "QVariantHash h0;\n\n" "QVariantHash h1;\n" "h1[\"one\"] = \"vone\";\n" - "unused(&h1);\n\n" - "QVariant v = h1;\n" - "unused( &v);\n") + "QVariant v = h1;", + + "&v, &h0, &h1") + CoreProfile() @@ -4032,35 +4112,31 @@ void tst_Dumpers::dumper_data() "QVector<int> v1(10000);\n" "for (int i = 0; i != v1.size(); ++i)\n" " v1[i] = i * i;\n\n" - "unused(&v1);\n\n" "QVector<Foo> v2;\n" "v2.append(1);\n" "v2.append(2);\n" - "unused(&v2);\n\n" "typedef QVector<Foo> FooVector;\n" "FooVector v3;\n" "v3.append(1);\n" "v3.append(2);\n" - "unused(&v3);\n\n" "QVector<Foo *> v4;\n" "v4.append(new Foo(1));\n" "v4.append(0);\n" "v4.append(new Foo(5));\n" - "unused(&v4);\n\n" "QVector<bool> v5;\n" "v5.append(true);\n" "v5.append(false);\n" - "unused(&v5);\n\n" "QVector<QList<int> > v6;\n" "v6.append(QList<int>() << 1);\n" "v6.append(QList<int>() << 2 << 3);\n" - "QVector<QList<int> > *pv = &v6;\n" - "unused(&v6, &pv);\n\n") + "QVector<QList<int> > *pv = &v6;\n", + + "&v1, &v2, &v3, &v4, &v5, &v6, &pv") + CoreProfile() @@ -4106,44 +4182,40 @@ void tst_Dumpers::dumper_data() + Check("v6.1.0", "[0]", "2", "int") + Check("v6.1.1", "[1]", "3", "int"); + QTest::newRow("QVarLengthArray") << Data("#include <QVarLengthArray>\n" + fooData, "QVarLengthArray<int> v1(10000);\n" "for (int i = 0; i != v1.size(); ++i)\n" " v1[i] = i * i;\n\n" - "unused(&v1);\n\n" "QVarLengthArray<Foo> v2;\n" "v2.append(1);\n" - "v2.append(2);\n" - "unused(&v2);\n\n" + "v2.append(2);\n\n" "typedef QVarLengthArray<Foo> FooVector;\n" "FooVector v3;\n" "v3.append(1);\n" - "v3.append(2);\n" - "unused(&v3);\n\n" + "v3.append(2);\n\n" "QVarLengthArray<Foo *> v4;\n" "v4.append(new Foo(1));\n" "v4.append(0);\n" - "v4.append(new Foo(5));\n" - "unused(&v4);\n\n" + "v4.append(new Foo(5));\n\n" "QVarLengthArray<bool> v5;\n" "v5.append(true);\n" - "v5.append(false);\n" - "unused(&v5);\n\n" + "v5.append(false);\n\n" "QVarLengthArray<QList<int> > v6;\n" "v6.append(QList<int>() << 1);\n" "v6.append(QList<int>() << 2 << 3);\n" - "QVarLengthArray<QList<int> > *pv = &v6;\n" - "unused(&v6, &pv);\n\n") + "QVarLengthArray<QList<int> > *pv = &v6;", - + CoreProfile() + "&v1, &v2, &v3, &v4, &v5, &v6, &pv") + + CoreProfile() + BigArrayProfile() + Check("v1", "<10000 items>", "@QVarLengthArray<int, 256>") @@ -4192,7 +4264,8 @@ void tst_Dumpers::dumper_data() "QXmlAttributes atts;\n" "atts.append(\"name1\", \"uri1\", \"localPart1\", \"value1\");\n" "atts.append(\"name2\", \"uri2\", \"localPart2\", \"value2\");\n" - "atts.append(\"name3\", \"uri3\", \"localPart3\", \"value3\");\n") + "atts.append(\"name3\", \"uri3\", \"localPart3\", \"value3\");", + "&atts") + CoreProfile() + Profile("QT += xml\n") @@ -4218,9 +4291,11 @@ void tst_Dumpers::dumper_data() QTest::newRow("StdArray") << Data("#include <array>\n" "#include <QString>\n", + "std::array<int, 4> a = { { 1, 2, 3, 4} };\n" - "std::array<QString, 4> b = { { \"1\", \"2\", \"3\", \"4\"} };\n" - "unused(&a, &b);\n") + "std::array<QString, 4> b = { { \"1\", \"2\", \"3\", \"4\"} };", + + "&a, &b") + CoreProfile() + Cxx11Profile() @@ -4234,8 +4309,11 @@ void tst_Dumpers::dumper_data() QTest::newRow("StdComplex") << Data("#include <complex>\n", - "std::complex<double> c(1, 2);\n" - "unused(&c);\n") + + "std::complex<double> c(1, 2);", + + "&c") + + Check("c", "(1.0, 2.0)", "std::complex<double>") + Check("c.real", FloatValue("1.0"), "double") + Check("c.imag", FloatValue("2.0"), "double"); @@ -4243,10 +4321,12 @@ void tst_Dumpers::dumper_data() QTest::newRow("CComplex") << Data("#include <complex.h>\n", + "// Doesn't work when compiled as C++.\n" "double complex a = 0;\n" - "double _Complex b = 0;\n" - "unused(&a, &b);\n") + "double _Complex b = 0;\n", + + "&a, &b") + ForceC() + GdbVersion(70500) @@ -4257,14 +4337,19 @@ void tst_Dumpers::dumper_data() + Check("a", "0 + 0i", "_Complex double") % LldbEngine + Check("b", "0 + 0i", "_Complex double") % LldbEngine; + QTest::newRow("StdFunction") << Data("#include <functional>\n" "void bar(int) {}", "std::function<void(int)> x;\n" "std::function<void(int)> y = bar;\n" - "std::function<void(int)> z = [](int) {};\n") + "std::function<void(int)> z = [](int) {};", + + "&x, &y, &z") + + GdbEngine + + Check("x", "(null)", "std::function<void(int)>") + Check("y", ValuePattern(".* <bar(int)>"), "std::function<void(int)>"); @@ -4284,7 +4369,9 @@ void tst_Dumpers::dumper_data() "deque2.push_back(new int(2));\n" "deque2.push_back(new int(3));\n" "deque2.pop_back();\n" - "deque2.pop_front();\n") + "deque2.pop_front();", + + "&deque2") + Check("deque0", "<0 items>", "std::deque<int>") @@ -4300,16 +4387,17 @@ void tst_Dumpers::dumper_data() QTest::newRow("StdDequeQt") << Data("#include <deque>\n" + fooData, - "std::deque<Foo> deque0;\n" - "unused(&deque0);\n\n" + "std::deque<Foo> deque0;\n\n" "std::deque<Foo> deque1;\n" "deque1.push_back(1);\n" - "deque1.push_front(2);\n" + "deque1.push_front(2);\n\n" "std::deque<Foo *> deque2;\n" "deque2.push_back(new Foo(1));\n" - "deque2.push_back(new Foo(2));\n") + "deque2.push_back(new Foo(2));", + + "&deque0, &deque1, &deque2") + CoreProfile() @@ -4336,6 +4424,7 @@ void tst_Dumpers::dumper_data() "};\n" "}\n\n" "using namespace __gnu_cxx;\n\n", + "hash_set<int> h;\n" "h.insert(1);\n" "h.insert(194);\n" @@ -4345,7 +4434,9 @@ void tst_Dumpers::dumper_data() "h2.insert(\"1\");\n" "h2.insert(\"194\");\n" "h2.insert(\"2\");\n" - "h2.insert(\"3\");\n") + "h2.insert(\"3\");\n", + + "&h, &h2") + GdbEngine @@ -4370,7 +4461,6 @@ void tst_Dumpers::dumper_data() "struct Derived : public std::list<T>, Base {};\n", "std::list<int> l0;\n" - "unused(&l0);\n\n" "std::list<int> l1;\n" "for (int i = 0; i < 10000; ++i)\n" @@ -4379,18 +4469,17 @@ void tst_Dumpers::dumper_data() "std::list<bool> l2;\n" "l2.push_back(true);\n" "l2.push_back(false);\n" - "unused(&l2);\n\n" "std::list<int *> l3;\n" "l3.push_back(new int(1));\n" "l3.push_back(0);\n" "l3.push_back(new int(2));\n" - "unused(&l3);\n\n" "Derived<int> l4;\n" "l4.push_back(1);\n" - "l4.push_back(2);\n" - "unused(&l4);\n\n") + "l4.push_back(2);\n", + + "&l0, &l1, &l2, &l3, &l4") + BigArrayProfile() @@ -4420,14 +4509,14 @@ void tst_Dumpers::dumper_data() "std::list<Foo> l1;\n" "l1.push_back(15);\n" - "l1.push_back(16);\n" - "unused(&l1);\n\n" + "l1.push_back(16);\n\n" "std::list<Foo *> l2;\n" "l2.push_back(new Foo(1));\n" "l2.push_back(0);\n" - "l2.push_back(new Foo(2));\n" - "unused(&l2);\n") + "l2.push_back(new Foo(2));", + + "&l1, &l2") + CoreProfile() + Check("l1", "<2 items>", "std::list<Foo>") @@ -4450,12 +4539,11 @@ void tst_Dumpers::dumper_data() "std::map<unsigned int, unsigned int> map1;\n" "map1[11] = 1;\n" - "map1[22] = 2;\n" - "unused(&map1);\n\n" + "map1[22] = 2;\n\n" "std::map<unsigned int, float> map2;\n" "map2[11] = 11.0;\n" - "map2[22] = 22.0;\n" + "map2[22] = 22.0;\n\n" "typedef std::map<int, float> Map;\n" "Map map3;\n" @@ -4470,21 +4558,22 @@ void tst_Dumpers::dumper_data() "Map::iterator it3 = it2; ++it3;\n" "Map::iterator it4 = it3; ++it4;\n" "Map::iterator it5 = it4; ++it5;\n" - "Map::iterator it6 = it5; ++it6;\n" - "unused(&it6);\n" + "Map::iterator it6 = it5; ++it6;\n\n" "std::multimap<unsigned int, float> map4;\n" "map4.insert(std::pair<unsigned int, float>(11, 11.0));\n" "map4.insert(std::pair<unsigned int, float>(22, 22.0));\n" "map4.insert(std::pair<unsigned int, float>(22, 23.0));\n" "map4.insert(std::pair<unsigned int, float>(22, 24.0));\n" - "map4.insert(std::pair<unsigned int, float>(22, 25.0));\n" + "map4.insert(std::pair<unsigned int, float>(22, 25.0));\n\n" "std::map<short, long long> map5;\n" - "map5[12] = 42;\n" + "map5[12] = 42;\n\n" "std::map<short, std::string> map6;\n" - "map6[12] = \"42\";\n") + "map6[12] = \"42\";", + + "&map1, &map2, &map3, &map4, &map5, &map5, &it1, &it2, &it3, &it4, &it5, &it6") + Check("map1", "<2 items>", "std::map<unsigned int, unsigned int>") + Check("map1.0", "[0] 11", "1", "") @@ -4526,40 +4615,35 @@ void tst_Dumpers::dumper_data() "map1[\"22.0\"] = Foo(22);\n" "map1[\"33.0\"] = Foo(33);\n" "map1[\"44.0\"] = Foo(44);\n" - "unused(&map1);\n\n" "std::map<const char *, Foo> map2;\n" "map2[\"22.0\"] = Foo(22);\n" "map2[\"33.0\"] = Foo(33);\n" - "unused(&map2);\n\n" "std::map<uint, QStringList> map3;\n" "map3[11] = QStringList() << \"11\";\n" "map3[22] = QStringList() << \"22\";\n" - "unused(&map3);\n\n" "typedef std::map<uint, QStringList> T;\n" "T map4;\n" "map4[11] = QStringList() << \"11\";\n" "map4[22] = QStringList() << \"22\";\n" - "unused(&map4);\n\n" "std::map<QString, float> map5;\n" "map5[\"11.0\"] = 11.0;\n" "map5[\"22.0\"] = 22.0;\n" - "unused(&map5);\n\n" "std::map<int, QString> map6;\n" "map6[11] = \"11.0\";\n" "map6[22] = \"22.0\";\n" - "unused(&map6);\n\n" "QObject ob;\n" "std::map<QString, QPointer<QObject> > map7;\n" "map7[\"Hallo\"] = QPointer<QObject>(&ob);\n" "map7[\"Welt\"] = QPointer<QObject>(&ob);\n" - "map7[\".\"] = QPointer<QObject>(&ob);\n" - "unused(&map7);\n") + "map7[\".\"] = QPointer<QObject>(&ob);\n", + + "&map1, &map2, &map3, &map4, &map5, &map6") + CoreProfile() @@ -4623,10 +4707,13 @@ void tst_Dumpers::dumper_data() QTest::newRow("StdUniquePtr") << Data("#include <memory>\n" "#include <string>\n" + fooData, - "std::unique_ptr<int> p0; unused(&p0);\n\n" - "std::unique_ptr<int> p1(new int(32)); unused(&p1);\n\n" - "std::unique_ptr<Foo> p2(new Foo); unused(&p2);\n\n" - "std::unique_ptr<std::string> p3(new std::string(\"ABC\")); unused(&p3);\n\n") + + "std::unique_ptr<int> p0;\n\n" + "std::unique_ptr<int> p1(new int(32));\n\n" + "std::unique_ptr<Foo> p2(new Foo);\n\n" + "std::unique_ptr<std::string> p3(new std::string(\"ABC\"));", + + "&p0, &p1, &p2, &p3") + CoreProfile() + Cxx11Profile() @@ -4640,21 +4727,28 @@ void tst_Dumpers::dumper_data() QTest::newRow("StdOnce") << Data("#include <mutex>\n", - "std::once_flag x; unused(&x);\n") + + "std::once_flag x;", + "&x") + + Cxx11Profile() + + Check("x", "0", "std::once_flag"); QTest::newRow("StdSharedPtr") << Data("#include <memory>\n" "#include <string>\n" + fooData, - "std::shared_ptr<int> pi(new int(32)); unused(&pi);\n" - "std::shared_ptr<Foo> pf(new Foo); unused(&pf);\n" - "std::shared_ptr<std::string> ps(new std::string(\"ABC\")); " - "unused(&ps);\n" - "std::weak_ptr<int> wi = pi; unused(&wi);\n" - "std::weak_ptr<Foo> wf = pf; unused(&wf);\n" - "std::weak_ptr<std::string> ws = ps; unused(&ws);\n") + + "std::shared_ptr<int> pi(new int(32));\n" + "std::shared_ptr<Foo> pf(new Foo);\n" + "std::shared_ptr<std::string> ps(new std::string(\"ABC\"));\n\n" + + "std::weak_ptr<int> wi = pi;\n" + "std::weak_ptr<Foo> wf = pf;\n" + "std::weak_ptr<std::string> ws = ps;", + + "&pi, &pf, &ps, &wi, &wf, &ws") + CoreProfile() + Cxx11Profile() @@ -4668,6 +4762,7 @@ void tst_Dumpers::dumper_data() + Check("ws", "\"ABC\"", "std::weak_ptr<std::string>") + Check("ps", "\"ABC\"", "std::shared_ptr<std::string>"); + QTest::newRow("StdSharedPtr2") << Data("#include <memory>\n" "struct A {\n" @@ -4677,9 +4772,14 @@ void tst_Dumpers::dumper_data() " int *m_2 = (int *)2;\n" " int x = 3;\n" "};\n", + "std::shared_ptr<A> a(new A);\n" - "A *inner = a.get(); unused(inner);\n") + "A *inner = a.get();", + + "&inner, &a") + + Cxx11Profile() + + Check("inner.m_0", "0x0", "int *") + Check("inner.m_1", "0x1", "int *") + Check("inner.m_2", "0x2", "int *") @@ -4689,14 +4789,13 @@ void tst_Dumpers::dumper_data() + Check("a.m_2", "0x2", "int *") + Check("a.x", "3", "int"); + QTest::newRow("StdSet") << Data("#include <set>\n", - "std::set<double> s0;\n" - "unused(&s0);\n\n" + "std::set<double> s0;\n\n" - "std::set<int> s1{11, 22, 33, 44, 55, 66, 77, 88};\n" - "unused(&s1);\n\n" + "std::set<int> s1{11, 22, 33, 44, 55, 66, 77, 88};\n\n" "typedef std::set<int> Set;\n" "Set s2;\n" @@ -4705,8 +4804,7 @@ void tst_Dumpers::dumper_data() "s2.insert(33.0);\n" "Set::iterator it1 = s2.begin();\n" "Set::iterator it2 = it1; ++it2;\n" - "Set::iterator it3 = it2; ++it3;\n" - "unused(&it3);\n\n" + "Set::iterator it3 = it2; ++it3;\n\n" "std::multiset<int> s3;\n" "s3.insert(1);\n" @@ -4714,7 +4812,9 @@ void tst_Dumpers::dumper_data() "s3.insert(2);\n" "s3.insert(3);\n" "s3.insert(3);\n" - "s3.insert(3);\n") + "s3.insert(3);", + + "&s0, &s1, &s2, &s2, &it1, &it2, &it3") + Cxx11Profile() + Check("s0", "<0 items>", "std::set<double>") @@ -4745,11 +4845,12 @@ void tst_Dumpers::dumper_data() "QObject ob;\n" "std::set<QPointer<QObject> > set2;\n" "QPointer<QObject> ptr(&ob);\n" - "set2.insert(ptr);\n" + "set2.insert(ptr);", - "unused(&ptr, &ob, &set1, &set2);\n") + "&ptr, &ob, &set1, &set2") + CoreProfile() + + Check("set1", "<1 items>", "std::set<@QString>") + Check("set1.0", "[0]", "\"22.0\"", "@QString") @@ -4768,8 +4869,9 @@ void tst_Dumpers::dumper_data() "std::stack<int> s2, s3;\n" "s3.push(1);\n" - "s3.push(2);\n" - "unused(&s0, &s1, &s2, &s3);\n") + "s3.push(2);", + + "&s0, &s1, &s2, &s3") + Check("s0", "<0 items>", "std::stack<int*>") @@ -4787,14 +4889,18 @@ void tst_Dumpers::dumper_data() QTest::newRow("StdStackQt") << Data("#include <stack>\n" + fooData, + "std::stack<Foo *> s0, s1;\n" "std::stack<Foo> s2, s3;\n" "s1.push(new Foo(1));\n" "s1.push(new Foo(2));\n" "s3.push(1);\n" - "s3.push(2);\n" - "unused(&s0, &s1, &s2, &s3);\n") + "s3.push(2);", + + "&s0, &s1, &s2, &s3") + + CoreProfile() + + Check("s0", "<0 items>", "std::stack<Foo*>") + Check("s1", "<2 items>", "std::stack<Foo*>") + Check("s1.0", "[0]", "", "Foo") @@ -4810,11 +4916,15 @@ void tst_Dumpers::dumper_data() QTest::newRow("StdBasicString") + << Data("#include <string>\n" "template<class T>\n" "class myallocator : public std::allocator<T> {};\n", - "std::basic_string<char, std::char_traits<char>, myallocator<char>> str(\"hello\");\n" - "unused(&str);\n") + + "std::basic_string<char, std::char_traits<char>, myallocator<char>> str(\"hello\");", + + "&str") + + Check("str", "\"hello\"", "std::basic_string<char, std::char_traits<char>, myallocator<char> >") + Check("str.0", "[0]", "104", "char") // 104: ASCII 'h' + Check("str.1", "[1]", "101", "char"); // 101: ASCII 'e' @@ -4822,6 +4932,7 @@ void tst_Dumpers::dumper_data() QTest::newRow("StdString") << Data("#include <string>\n", + "std::string str0, str;\n" "std::wstring wstr0, wstr;\n" "str += \"b\";\n" @@ -4834,8 +4945,10 @@ void tst_Dumpers::dumper_data() "str += \"e\";\n" "wstr += wchar_t('e');\n" "wstr += wchar_t('e');\n" - "str += \"e\";\n" - "unused(&str0, &str, &wstr0, &wstr);\n") + "str += \"e\";\n", + + "&str0, &str, &wstr0, &wstr") + + Check("str0", "\"\"", "std::string") + Check("wstr0", "\"\"", "std::wstring") + Check("str", "\"bdebdee\"", "std::string") @@ -4846,15 +4959,19 @@ void tst_Dumpers::dumper_data() << Data("#include <string>\n" "#include <vector>\n" "#include <QList>\n", + "std::string str = \"foo\";\n" "std::vector<std::string> v;\n" "QList<std::string> l0, l;\n" "v.push_back(str);\n" "v.push_back(str);\n" "l.push_back(str);\n" - "l.push_back(str);\n" - "unused(&v, &l);\n") + "l.push_back(str);\n", + + "&v, &l") + + CoreProfile() + + Check("l0", "<0 items>", "@QList<std::string>") + Check("l", "<2 items>", "@QList<std::string>") + Check("str", "\"foo\"", "std::string") @@ -4866,34 +4983,25 @@ void tst_Dumpers::dumper_data() << Data("#include <valarray>\n" "#include <list>\n", - "std::valarray<double> v0, v1 = { 1, 0, 2 };\n" - "unused(&v0, &v1);\n\n" + "std::valarray<double> v0, v1 = { 1, 0, 2 };\n\n" - "std::valarray<int *> v2, v3 = { new int(1), 0, new int(2) };\n" - "unused(&v2, &v3);\n\n" + "std::valarray<int *> v2, v3 = { new int(1), 0, new int(2) };\n\n" - "std::valarray<int> v4 = { 1, 2, 3, 4 };\n" - "unused(&v4);\n\n" + "std::valarray<int> v4 = { 1, 2, 3, 4 };\n\n" "std::list<int> list;\n" "std::list<int> list1 = { 45 };\n" "std::valarray<std::list<int> *> v5 = {\n" " new std::list<int>(list), 0,\n" " new std::list<int>(list1), 0\n" - "};\n" - "unused(&v5);\n\n" - - "std::valarray<bool> b0;\n" - "unused(&b0);\n\n" - - "std::valarray<bool> b1 = { true, false, false, true, false };\n" - "unused(&b1);\n\n" + "};\n\n" - "std::valarray<bool> b2(true, 65);\n" - "unused(&b2);\n\n" + "std::valarray<bool> b0;\n\n" + "std::valarray<bool> b1 = { true, false, false, true, false };\n\n" + "std::valarray<bool> b2(true, 65);\n\n" + "std::valarray<bool> b3(300);\n", - "std::valarray<bool> b3(300);\n" - "unused(&b3);\n") + "&v0, &v1, &v2, &v3, &v4, &v5, &b0, &b1, &b2, &b3") + Cxx11Profile() @@ -4948,17 +5056,16 @@ void tst_Dumpers::dumper_data() "std::vector<double> v0, v1;\n" "v1.push_back(1);\n" "v1.push_back(0);\n" - "v1.push_back(2);\n" - "unused(&v0, &v1);\n\n" + "v1.push_back(2);\n\n" - "std::vector<int *> v2; unused(&v2);\n" + "std::vector<int *> v2;\n\n" - "std::vector<int *> v3; unused(&v3);\n\n" + "std::vector<int *> v3;\n\n" "v3.push_back(new int(1));\n" "v3.push_back(0);\n" "v3.push_back(new int(2));\n\n" - "std::vector<int> v4; unused(&v4);\n" + "std::vector<int> v4;\n" "v4.push_back(1);\n" "v4.push_back(2);\n" "v4.push_back(3);\n" @@ -4970,30 +5077,26 @@ void tst_Dumpers::dumper_data() "v5.push_back(0);\n" "list.push_back(45);\n" "v5.push_back(new std::list<int>(list));\n" - "v5.push_back(0);\n" - "unused(&v5);\n\n" + "v5.push_back(0);\n\n" - "std::vector<bool> b0;\n" - "unused(&b0);\n\n" + "std::vector<bool> b0;\n\n" "std::vector<bool> b1;\n" "b1.push_back(true);\n" "b1.push_back(false);\n" "b1.push_back(false);\n" "b1.push_back(true);\n" - "b1.push_back(false);\n" - "unused(&b1);\n\n" + "b1.push_back(false);\n\n" - "std::vector<bool> b2(65, true);\n" - "unused(&b2);\n\n" + "std::vector<bool> b2(65, true);\n\n" - "std::vector<bool> b3(300);\n" - "unused(&b3);\n" + "std::vector<bool> b3(300);\n\n" "std::vector<bool, myallocator<bool>> b4;\n" "b4.push_back(true);\n" - "b4.push_back(false);\n" - "unused(&b4);\n") + "b4.push_back(false);\n", + + "&v0, &v1, &v2, &v3, &v4, &v5, &b0, &b1, &b2, &b3, &b4") + Check("v0", "<0 items>", "std::vector<double>") + Check("v1", "<3 items>", "std::vector<double>") @@ -5039,6 +5142,7 @@ void tst_Dumpers::dumper_data() + Check("b4.0", "[0]", "1", "bool") + Check("b4.1", "[1]", "0", "bool"); + QTest::newRow("StdVectorQt") << Data("#include <vector>\n" + fooData, @@ -5051,8 +5155,9 @@ void tst_Dumpers::dumper_data() "v2.push_back(1);\n" "v2.push_back(2);\n" "v2.push_back(3);\n" - "v2.push_back(4);\n" - "unused(&v1, &v2);\n") + "v2.push_back(4);", + + "&v1, &v2") + CoreProfile() + Check("v1", "<3 items>", "std::vector<Foo*>") @@ -5074,18 +5179,17 @@ void tst_Dumpers::dumper_data() "std::unordered_map<unsigned int, unsigned int> map1;\n" "map1[11] = 1;\n" - "map1[22] = 2;\n" - "unused(&map1);\n\n" + "map1[22] = 2;\n\n" "std::unordered_map<std::string, float> map2;\n" "map2[\"11.0\"] = 11.0;\n" - "map2[\"22.0\"] = 22.0;\n" - "unused(&map2);\n" + "map2[\"22.0\"] = 22.0;\n\n" "std::unordered_multimap<int, std::string> map3;\n" "map3.insert({1, \"Foo\"});\n" - "map3.insert({1, \"Bar\"});\n" - "unused(&map3);\n" ) + "map3.insert({1, \"Bar\"});", + + "&map1, &map2, &map3") + Cxx11Profile() @@ -5124,12 +5228,12 @@ void tst_Dumpers::dumper_data() "set1.insert(11);\n" "set1.insert(22);\n" "set1.insert(33);\n" - "unused(&set1);\n" "std::unordered_multiset<int> set2;\n" "set2.insert(42);\n" - "set2.insert(42);\n" - "unused(&set2);\n") + "set2.insert(42);", + + "&set1, &set2") + Cxx11Profile() @@ -5151,13 +5255,16 @@ void tst_Dumpers::dumper_data() + Check("set2.0", "[0]", "42", "int") + Check("set2.1", "[1]", "42", "int"); + QTest::newRow("StdInitializerList") << Data("#include <initializer_list>\n", + "auto initb = {true, false, false, true};\n" "auto initi = {1, 2, 3};\n" "auto inits = {\"1\", \"2\", \"3\"};\n" - "std::initializer_list<int> empty;\n" - "unused(&initb, &initi, &inits, &empty);\n") + "std::initializer_list<int> empty;", + + "&initb, &initi, &inits, &empty") + Cxx11Profile() @@ -5327,7 +5434,8 @@ void tst_Dumpers::dumper_data() " struct { int i; int b; };\n" " struct { float f; };\n" " double d;\n" - " } a = { { 42, 43 } };\n (void)a;") + " } a = { { 42, 43 } };", + "&a") + Check("a.d", FloatValue("9.1245819032257467e-313"), "double") @@ -5341,14 +5449,17 @@ void tst_Dumpers::dumper_data() QTest::newRow("Chars") << Data("#include <qglobal.h>\n", + "char c = -12;\n" "signed char sc = -12;\n" "unsigned char uc = -12;\n" "qint8 qs = -12;\n" - "quint8 qu = -12;\n" - "unused(&c, &sc, &uc, &qs, &qu);\n") + "quint8 qu = -12;", + + "&c, &sc, &uc, &qs, &qu") + CoreProfile() + + Check("c", "-12", "char") // on all our platforms char is signed. + Check("sc", "-12", TypeDef("char", "signed char")) + Check("uc", "244", "unsigned char") @@ -5362,12 +5473,14 @@ void tst_Dumpers::dumper_data() "typedef char CHAR;\n" "typedef wchar_t WCHAR;\n" "#endif\n", + "char s[] = \"aöa\";\n" "char t[] = \"aöax\";\n" "wchar_t w[] = L\"aöa\";\n" "CHAR ch[] = \"aöa\";\n" - "WCHAR wch[] = L\"aöa\";\n" - "unused(&s, &t, &w, &ch, &wch);\n") + "WCHAR wch[] = L\"aöa\";", + + "&s, &t, &w, &ch, &wch") + CheckType("s", "char [5]") % NoCdbEngine + CheckType("s", "char [4]") % CdbEngine @@ -5385,12 +5498,14 @@ void tst_Dumpers::dumper_data() QTest::newRow("CharPointers") << Data("", + "const char *s = \"aöa\";\n" "const char *t = \"a\\xc3\\xb6\";\n" "unsigned char uu[] = { 'a', 153 /* ö Latin1 */, 'a' };\n" "const unsigned char *u = uu;\n" - "const wchar_t *w = L\"aöa\";\n" - "unused(&s, &t, &uu, &u, &w);\n") + "const wchar_t *w = L\"aöa\";", + + "&s, &t, &uu, &u, &w") + CheckType("u", "unsigned char *") + CheckType("uu", "unsigned char [3]") @@ -5405,12 +5520,16 @@ void tst_Dumpers::dumper_data() QTest::newRow("GccExtensions") << Data("", + "char v[8] = { 1, 2 };\n" "char w __attribute__ ((vector_size (8))) = { 1, 2 };\n" "int y[2] = { 1, 2 };\n" - "int z __attribute__ ((vector_size (8))) = { 1, 2 };\n" - "unused(&v, &w, &y, &z);\n") + "int z __attribute__ ((vector_size (8))) = { 1, 2 };", + + "&v, &w, &y, &z") + + NoCdbEngine + + Check("v.0", "[0]", "1", "char") + Check("v.1", "[1]", "2", "char") + Check("w.0", "[0]", "1", "char") @@ -5425,6 +5544,7 @@ void tst_Dumpers::dumper_data() << Data("#include <qglobal.h>\n" "#include <limits.h>\n" "#include <QString>\n", + "quint64 u64 = ULLONG_MAX;\n" "qint64 s64 = LLONG_MAX;\n" "quint32 u32 = UINT_MAX;\n" @@ -5433,8 +5553,10 @@ void tst_Dumpers::dumper_data() "qint64 s64s = LLONG_MIN;\n" "quint32 u32s = 0;\n" "qint32 s32s = INT_MIN;\n" - "QString dummy; // needed to get namespace\n" - "unused(&u64, &s64, &u32, &s32, &u64s, &s64s, &u32s, &s32s, &dummy);\n") + "QString dummy; // needed to get namespace", + + "&u64, &s64, &u32, &s32, &u64s, &s64s, &u32s, &s32s, &dummy") + + CoreProfile() + Check("u64", "18446744073709551615", TypeDef("unsigned int64", "@quint64")) + Check("s64", "9223372036854775807", TypeDef("int64", "@qint64")) @@ -5448,15 +5570,19 @@ void tst_Dumpers::dumper_data() QTest::newRow("Int128") << Data("#include <limits.h>\n", + "using typedef_s128 = __int128_t;\n" "using typedef_u128 = __uint128_t;\n" "__int128_t s128 = 12;\n" "__uint128_t u128 = 12;\n" "typedef_s128 ts128 = 12;\n" - "typedef_u128 tu128 = 12;\n" - "unused(&u128, &s128, &tu128, &ts128);\n") + "typedef_u128 tu128 = 12;", + + "&u128, &s128, &tu128, &ts128") + // Sic! The expected type is what gcc 8.2.0 records. + GdbEngine + + Check("s128", "12", "__int128") + Check("u128", "12", "__int128 unsigned") + Check("ts128", "12", "typedef_s128") @@ -5465,10 +5591,15 @@ void tst_Dumpers::dumper_data() QTest::newRow("Float") << Data("#include <QFloat16>\n", - "qfloat16 f1 = 45.3f; unused(&f1);\n" - "qfloat16 f2 = 45.1f; unused(&f2);\n") + + "qfloat16 f1 = 45.3f;\n" + "qfloat16 f2 = 45.1f;", + + "&f1, &f2") + + CoreProfile() + QtVersion(0x50900) + // Using numpy: // + Check("f1", "45.281", "@qfloat16") // + Check("f2", "45.094", "@qfloat16"); @@ -5477,12 +5608,15 @@ void tst_Dumpers::dumper_data() QTest::newRow("Enum") - << Data("\n" - "enum Foo { a = -1000, b, c = 1, d };\n", - "Foo fa = a; unused(&fa);\n" - "Foo fb = b; unused(&fb);\n" - "Foo fc = c; unused(&fc);\n" - "Foo fd = d; unused(&fd);\n") + << Data("enum Foo { a = -1000, b, c = 1, d };\n", + + "Foo fa = a;\n" + "Foo fb = b;\n" + "Foo fc = c;\n" + "Foo fd = d;", + + "&fa, &fb, &fc, &fd") + + Check("fa", "a (-1000)", "Foo") + Check("fb", "b (-999)", "Foo") + Check("fc", "c (1)", "Foo") @@ -5490,13 +5624,17 @@ void tst_Dumpers::dumper_data() QTest::newRow("EnumFlags") - << Data("\n" - "enum Flags { one = 1, two = 2, four = 4 };\n", - "Flags fone = one; unused(&fone);\n" - "Flags fthree = (Flags)(one|two); unused(&fthree);\n" - "Flags fmixed = (Flags)(two|8); unused(&fmixed);\n" - "Flags fbad = (Flags)(24); unused(&fbad);\n") + << Data("enum Flags { one = 1, two = 2, four = 4 };\n", + + "Flags fone = one;\n" + "Flags fthree = (Flags)(one|two);\n" + "Flags fmixed = (Flags)(two|8);\n" + "Flags fbad = (Flags)(24);", + + "&fone, &fthree, &fmixed, &fbad") + + NoCdbEngine + + Check("fone", "one (1)", "Flags") + Check("fthree", "(one | two) (3)", "Flags") + Check("fmixed", "(two | unknown: 8) (10)", "Flags") @@ -5512,20 +5650,31 @@ void tst_Dumpers::dumper_data() " Enum2 e2 = Enum2(c2 | b2);\n" " Enum3 e3 = Enum3(c3 | b3);\n" "};\n", - "E e;\n") + + "E e;", + + "&e") + + NoCdbEngine + + Check("e.e1", "(E::b1 | E::c1) (3)", "E::Enum1") + Check("e.e2", "(E::b2 | E::c2) (3)", "E::Enum2") + Check("e.e3", "(E::b3 | E::c3) (3)", "E::Enum3"); + QTest::newRow("QSizePolicy") << Data("#include <QSizePolicy>\n", + "QSizePolicy qsp1;\n" "qsp1.setHorizontalStretch(6);\n" "qsp1.setVerticalStretch(7);\n" - "QSizePolicy qsp2(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);\n") + "QSizePolicy qsp2(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);", + + "&qsp1, &qsp2") + + GuiProfile() + NoCdbEngine + + Check("qsp1.horStretch", "6", "int") + Check("qsp1.verStretch", "7", "int") + Check("qsp2.horPolicy", "QSizePolicy::Preferred (GrowFlag|ShrinkFlag) (5)", "@QSizePolicy::Policy") @@ -5534,19 +5683,20 @@ void tst_Dumpers::dumper_data() QTest::newRow("Array") << Data("", + "double a1[3][4];\n" "for (int i = 0; i != 3; ++i)\n" " for (int j = 0; j != 3; ++j)\n" - " a1[i][j] = i + 10 * j;\n" - "unused(&a1);\n\n" + " a1[i][j] = i + 10 * j;\n\n" "char a2[20] = { 0 };\n" "a2[0] = 'a';\n" "a2[1] = 'b';\n" "a2[2] = 'c';\n" "a2[3] = 'd';\n" - "a2[4] = 0;\n" - "unused(&a2);\n") + "a2[4] = 0;", + + "&a1, &a2") + Check("a1", Pointer(), "double[3][4]") + Check("a1.0", "[0]", Pointer(), "double[4]") @@ -5561,8 +5711,11 @@ void tst_Dumpers::dumper_data() QTest::newRow("Array10Format") << Data("", + "int arr[4] = { 1, 2, 3, 4};\n" - "int *nums = new int[4] { 1, 2, 3, 4};\n") + "int *nums = new int[4] { 1, 2, 3, 4};", + + "&arr, &nums") + NoLldbEngine // FIXME: DumperOptions not handled yet. + DumperOptions("'formats':{'local.nums':12}") // Array10Format @@ -5589,7 +5742,9 @@ void tst_Dumpers::dumper_data() "Foo a3[10];\n" "for (int i = 0; i < 5; ++i)\n" - " a3[i].a = i;\n") + " a3[i].a = i;\n", + + "&a1, &a2, &a3") + CoreProfile() + CheckType("a1", "@QString [20]") @@ -5611,6 +5766,7 @@ void tst_Dumpers::dumper_data() QTest::newRow("Bitfields") << Data("", + "enum E { V1, V2 };" "struct S\n" "{\n" @@ -5626,8 +5782,9 @@ void tst_Dumpers::dumper_data() " float f;\n" " double d;\n" " int i;\n" - "} s;\n" - "unused(&s);\n") + "} s;", + + "&s") + Check("s", "", "S") % NoCdbEngine + Check("s.b", "0", "bool") @@ -5658,11 +5815,14 @@ void tst_Dumpers::dumper_data() " double min;\n" " double max;\n" "};\n", + "// In order to use this, switch on the 'qDump__Function' in dumper.py\n" "Function func(\"x\", \"sin(x)\", 0, 1);\n" "func.max = 10;\n" "func.f = \"cos(x)\";\n" - "func.max = 7;\n") + "func.max = 7;\n", + + "&func") + CoreProfile() @@ -5702,11 +5862,13 @@ void tst_Dumpers::dumper_data() "}\n" "typedef quint32 myType1;\n" "typedef unsigned int myType2;\n", + "myType1 t1 = 0;\n" "myType2 t2 = 0;\n" "ns::vl j = 1000;\n" - "ns::verylong k = 1000;\n" - "unused(&t1, &t2, &j, &k);\n") + "ns::verylong k = 1000;", + + "&t1, &t2, &j, &k") + CoreProfile() + BigArrayProfile() @@ -5721,12 +5883,15 @@ void tst_Dumpers::dumper_data() QTest::newRow("Typedef2") << Data("#include <vector>\n" "template<typename T> using TVector = std::vector<T>;\n", - "std::vector<bool> b1(10); unused(&b1);\n" - "std::vector<int> b2(10); unused(&b2);\n" - "TVector<bool> b3(10); unused(&b3);\n" - "TVector<int> b4(10); unused(&b4);\n" - "TVector<bool> b5(10); unused(&b5);\n" - "TVector<int> b6(10); unused(&b6);\n") + + "std::vector<bool> b1(10);\n" + "std::vector<int> b2(10);\n" + "TVector<bool> b3(10);\n" + "TVector<int> b4(10);\n" + "TVector<bool> b5(10);\n" + "TVector<int> b6(10);", + + "&b1, &b2, &b3, &b4, &b5, &b6") + NoCdbEngine @@ -5745,7 +5910,11 @@ void tst_Dumpers::dumper_data() QTest::newRow("Typedef3") << Data("typedef enum { Value } Unnamed;\n" "struct Foo { Unnamed u = Value; };\n", - "Foo foo;") + + "Foo foo;", + + "&foo") + + Cxx11Profile() + Check("foo.u", "Value (0)", "Unnamed"); @@ -5753,11 +5922,10 @@ void tst_Dumpers::dumper_data() QTest::newRow("Struct") << Data(fooData, - "Foo f(3);\n" - "unused(&f);\n\n" + "Foo f(3);\n\n" + "Foo *p = new Foo();", - "Foo *p = new Foo();\n" - "unused(&p);\n") + "&f, &p") + CoreProfile() + Check("f", "", "Foo") @@ -5773,19 +5941,24 @@ void tst_Dumpers::dumper_data() " Foo() : x(143) {}\n" " int foo() {\n" " BREAK;\n" + " unused(&x);\n" " return x;\n" " }\n\n" " int x;\n" "};\n", + "Foo f;\n" - "f.foo();\n") + "f.foo();", + + "&f, &f.x") + Check("this", "", "Foo") + Check("this.x", "143", "int"); QTest::newRow("Union") - << Data("union U { int a; int b; };", "U u;\n" - "unused(&u);\n") + << Data("union U { int a; int b; };", + "U u;", + "&u") + Check("u", "", "U") + CheckType("u.a", "int") + CheckType("u.b", "int"); @@ -5813,10 +5986,13 @@ void tst_Dumpers::dumper_data() << Data("typedef void *VoidPtr;\n" "typedef const void *CVoidPtr;\n" "struct A {};\n", + "A a;\n" "VoidPtr p = &a;\n" - "CVoidPtr cp = &a;\n" - "unused(&a, &p, &cp);\n") + "CVoidPtr cp = &a;", + + "&a, &p, &cp") + + Check("a", "", "A") + Check("cp", Pointer(), TypeDef("void*", "CVoidPtr")) + Check("p", Pointer(), TypeDef("void*", "VoidPtr")); @@ -5834,31 +6010,28 @@ void tst_Dumpers::dumper_data() "const int &b1 = a1;\n" "typedef int &Ref1;\n" "const int c1 = 44;\n" - "const Ref1 d1 = a1;\n" - "unused(&a1, &b1, &c1, &d1);\n\n" + "const Ref1 d1 = a1;\n\n" "string a2 = \"hello\";\n" "const string &b2 = fooxx();\n" "typedef string &Ref2;\n" "const string c2= \"world\";\n" - "const Ref2 d2 = a2;\n" - "unused(&a2, &b2, &c2, &d2);\n\n" + "const Ref2 d2 = a2;\n\n" "QString a3 = QLatin1String(\"hello\");\n" "const QString &b3 = a3;\n" "typedef QString &Ref3;\n" - "const Ref3 d3 = const_cast<Ref3>(a3);\n" - "unused(&a3, &b3, &d3);\n\n" + "const Ref3 d3 = const_cast<Ref3>(a3);\n\n" "Foo a4(12);\n" "const Foo &b4 = a4;\n" "typedef Foo &Ref4;\n" - "const Ref4 d4 = const_cast<Ref4>(a4);\n" - "unused(&a4, &b4, &d4);\n" + "const Ref4 d4 = const_cast<Ref4>(a4);\n\n" "int *q = 0;\n" - "int &qq = *q;\n" - "unused(&qq, &q);\n") + "int &qq = *q;", + + "&a1, &b1, &c1, &d1, &a2, &b2, &c2, &d2, &a3, &b3, &d3, &a4, &b4, &d4, &qq, &q") + CoreProfile() + NoCdbEngine // The Cdb has no information about references @@ -5886,14 +6059,19 @@ void tst_Dumpers::dumper_data() + Check("qq", "<null reference>", "int &"); + QTest::newRow("DynamicReference") << Data("struct BaseClass { virtual ~BaseClass() {} };\n" "struct DerivedClass : BaseClass {};\n", + "DerivedClass d;\n" "BaseClass *b1 = &d;\n" - "BaseClass &b2 = d;\n" - "unused(&d, &b1, &b2);\n") + "BaseClass &b2 = d;\n", + + "&d, &b1, &b2") + + NoCdbEngine // The Cdb has no information about references + + CheckType("b1", "DerivedClass") // autoderef + CheckType("b2", "DerivedClass &"); @@ -5918,16 +6096,21 @@ void tst_Dumpers::dumper_data() QTest::newRow("LongEvaluation2") << Data("", - "const int N = 10000;\n" + + "const int N = 1000;\n" "int bigv[N];\n" "for (int i = 0; i < N; ++i)\n" - " bigv[i] = i;\n" - "unused(&bigv[10]);\n") + " bigv[i] = i;\n", + + "&N, &bigv[10]") + + BigArrayProfile() - + Check("N", "10000", "int") - + CheckType("bigv", "int [10000]") + + + Check("N", "1000", "int") + + CheckType("bigv", "int [1000]") + Check("bigv.0", "[0]", "0", "int") - + Check("bigv.9999", "[9999]", "9999", "int"); + + Check("bigv.999", "[999]", "999", "int"); + // QTest::newRow("Fork") // << Data( @@ -5952,12 +6135,12 @@ void tst_Dumpers::dumper_data() "Class x;\n" "func_t f = &Class::testFunctionPointerHelper;\n" - "int a1 = (x.*f)(43);\n" - "unused(&a1);\n" + "int a1 = (x.*f)(43);\n\n" "member_t m = &Class::a;\n" - "int a2 = x.*m;\n" - "unused(&a2);\n") + "int a2 = x.*m;", + + "&x, &f, &m, &a1, &a2") + CheckType("f", TypeDef("<function>", "func_t")) + CheckType("m", TypeDef("int*", "member_t")); @@ -5970,9 +6153,14 @@ void tst_Dumpers::dumper_data() " int dummy = 2;\n" " unused(&f, &dummy);\n" "}\n", + "Foo f(12);\n" - "testPassByReference(f);\n") + "testPassByReference(f);", + + "&f") + + CoreProfile() + + NoCdbEngine // The Cdb has no information about references + CheckType("f", "Foo &") + Check("f.a", "12", "int"); @@ -5981,13 +6169,17 @@ void tst_Dumpers::dumper_data() QTest::newRow("BigInt") << Data("#include <QString>\n" "#include <limits>\n", + "qint64 a = Q_INT64_C(0xF020304050607080);\n" "quint64 b = Q_UINT64_C(0xF020304050607080);\n" "quint64 c = std::numeric_limits<quint64>::max() - quint64(1);\n" "qint64 d = c;\n" - "QString dummy;\n" - "unused(&a, &b, &c, &d, &dummy);\n") + "QString dummy;\n", + + "&a, &b, &c, &d, &dummy") + + CoreProfile() + + Check("a", "-1143861252567568256", TypeDef("int64", "@qint64")) + Check("b", "17302882821141983360", TypeDef("unsigned int64", "@quint64")) + Check("c", "18446744073709551614", TypeDef("unsigned int64", "@quint64")) @@ -5995,7 +6187,8 @@ void tst_Dumpers::dumper_data() QTest::newRow("Hidden") - << Data("#include <QString>\n", + << Data("#include <QString>", + "int n = 1;\n" "{\n" " QString n = \"2\";\n" @@ -6005,9 +6198,12 @@ void tst_Dumpers::dumper_data() " unused(&n);\n" " }\n" " unused(&n);\n" - "}\n" - "unused(&n);\n") + "}\n", + + "&n") + + CoreProfile() + + Check("n", FloatValue("3.5"), "double") + Check("n@1", "\"2\"", "@QString") + Check("n@2", "1", "int"); @@ -6018,26 +6214,34 @@ void tst_Dumpers::dumper_data() "struct X { X() : a(2), b(3) {} int a, b; };\n" "X testRValueReferenceHelper1() { return X(); }\n" "X testRValueReferenceHelper2(X &&x) { return x; }\n", + "X &&x1 = testRValueReferenceHelper1();\n" "X &&x2 = testRValueReferenceHelper2(std::move(x1));\n" "X &&x3 = testRValueReferenceHelper2(testRValueReferenceHelper1());\n" "X y1 = testRValueReferenceHelper1();\n" "X y2 = testRValueReferenceHelper2(std::move(y1));\n" - "X y3 = testRValueReferenceHelper2(testRValueReferenceHelper1());\n" - "unused(&x1, &x2, &x3, &y1, &y2, &y3);\n") + "X y3 = testRValueReferenceHelper2(testRValueReferenceHelper1());", + + "&x1, &x2, &x3, &y1, &y2, &y3") + + Cxx11Profile() + + Check("y1", "", "X") + Check("y2", "", "X") + Check("y3", "", "X"); + QTest::newRow("RValueReference2") << Data(rvalueData) + + DwarfProfile(2) - + NoCdbEngine // The Cdb has no information about references + + NoCdbEngine // Cdb has no information about references. + + Check("x1", "", "X &") + Check("x2", "", "X &") + Check("x3", "", "X &"); + // GCC emits rvalue references with DWARF-4, i.e. after 4.7.4. // GDB doesn't understand them, // https://sourceware.org/bugzilla/show_bug.cgi?id=14441 @@ -6046,27 +6250,37 @@ void tst_Dumpers::dumper_data() QTest::newRow("RValueReference4") << Data(rvalueData) + + DwarfProfile(4) + LldbEngine + + Check("x1", "", "X &") + Check("x2", "", "X &") + Check("x3", "", "X &"); + QTest::newRow("RValueReference") << Data("struct S { int a = 32; };", - "auto foo = [](int && i, S && s) { BREAK; return i + s.a; };\n" - "foo(int(1), S());\n") + + "auto foo = [](int && i, S && s) { BREAK; unused(&i, &s.a); return i + s.a; };\n" + "foo(1, S());", + + "&foo") + + Cxx11Profile() + GdbVersion(80200) + + Check("i", "1", "int &&") % NoCdbEngine + Check("i", "1", "int") % CdbEngine + CheckType("s", "S &&") % NoCdbEngine + CheckType("s", "S") % CdbEngine + Check("s.a", "32", "int"); + QTest::newRow("SSE") << Data("#include <xmmintrin.h>\n" "#include <stddef.h>\n", + "float a[4];\n" "float b[4];\n" "int i;\n" @@ -6076,9 +6290,12 @@ void tst_Dumpers::dumper_data() "}\n" "__m128 sseA, sseB;\n" "sseA = _mm_loadu_ps(a);\n" - "sseB = _mm_loadu_ps(b);\n" - "unused(&i, &sseA, &sseB);\n") + "sseB = _mm_loadu_ps(b);", + + "&i, &sseA, &sseB") + + Profile("QMAKE_CXXFLAGS += -msse2") + + CheckType("sseA", "__m128") + Check("sseA.2", "[2]", FloatValue("4"), "float") + CheckType("sseB", "__m128"); @@ -6089,13 +6306,13 @@ void tst_Dumpers::dumper_data() "#include <QStringList>\n", "boost::optional<int> i0, i1;\n" - "i1 = 1;\n" - "unused(&i0, &i1);\n\n" + "i1 = 1;\n\n" "boost::optional<QStringList> sl0, sl;\n" "sl = (QStringList() << \"xxx\" << \"yyy\");\n" - "sl.get().append(\"zzz\");\n" - "unused(&sl);\n") + "sl.get().append(\"zzz\");", + + "&i0, &i1, &sl") + CoreProfile() + BoostProfile() @@ -6109,11 +6326,13 @@ void tst_Dumpers::dumper_data() QTest::newRow("BoostSharedPtr") << Data("#include <QStringList>\n" "#include <boost/shared_ptr.hpp>\n", + "boost::shared_ptr<int> s;\n" "boost::shared_ptr<int> i(new int(43));\n" "boost::shared_ptr<int> j = i;\n" - "boost::shared_ptr<QStringList> sl(new QStringList(QStringList() << \"HUH!\"));\n" - "unused(&s, &i, &j, &sl);\n") + "boost::shared_ptr<QStringList> sl(new QStringList(QStringList() << \"HUH!\"));", + + "&s, &i, &j, &sl") + CoreProfile() + BoostProfile() @@ -6128,6 +6347,7 @@ void tst_Dumpers::dumper_data() QTest::newRow("BoostGregorianDate") << Data("#include <boost/date_time.hpp>\n" "#include <boost/date_time/gregorian/gregorian.hpp>\n", + "using namespace boost;\n" "using namespace gregorian;\n" "date d(2005, Nov, 29);\n" @@ -6139,9 +6359,12 @@ void tst_Dumpers::dumper_data() "// Also end of the month (expected in boost)\n" "date d4 = d += months(1);\n" "// Not where we started (expected in boost)\n" - "date d5 = d -= months(4);\n" - "unused(&d1, &d2, &d3, &d4, &d5);\n") + "date d5 = d -= months(4);", + + "&d, &d0, &d1, &d2, &d3, &d4, &d5") + + BoostProfile() + + Check("d0", "Tue Nov 29 2005", "boost::gregorian::date") + Check("d1", "Thu Dec 29 2005", "boost::gregorian::date") + Check("d2", "Sun Jan 29 2006", "boost::gregorian::date") @@ -6154,13 +6377,17 @@ void tst_Dumpers::dumper_data() << Data("#include <boost/date_time.hpp>\n" "#include <boost/date_time/gregorian/gregorian.hpp>\n" "#include <boost/date_time/posix_time/posix_time.hpp>\n", + "using namespace boost;\n" "using namespace posix_time;\n" "time_duration d1(1, 0, 0);\n" "time_duration d2(0, 1, 0);\n" - "time_duration d3(0, 0, 1);\n" - "unused(&d1, &d2, &d3);\n") + "time_duration d3(0, 0, 1);", + + "&d1, &d2, &d3") + + BoostProfile() + + Check("d1", "01:00:00", "boost::posix_time::time_duration") + Check("d2", "00:01:00", "boost::posix_time::time_duration") + Check("d3", "00:00:01", "boost::posix_time::time_duration"); @@ -6168,14 +6395,18 @@ void tst_Dumpers::dumper_data() QTest::newRow("BoostBimap") << Data("#include <boost/bimap.hpp>\n", + "typedef boost::bimap<int, int> B;\n" "B b;\n" "b.left.insert(B::left_value_type(1, 2));\n" "B::left_const_iterator it = b.left.begin();\n" "int l = it->first;\n" - "int r = it->second;\n" - "unused(&l, &r);\n") + "int r = it->second;\n", + + "&l, &r") + + BoostProfile() + + Check("b", "<1 items>", TypeDef("boost::bimaps::bimap<int,int,boost::mpl::na," "boost::mpl::na,boost::mpl::na>", "B")); @@ -6187,11 +6418,15 @@ void tst_Dumpers::dumper_data() "using namespace boost;\n" "using namespace gregorian;\n" "using namespace posix_time;\n", + "ptime p1(date(2002, 1, 10), time_duration(1, 0, 0));\n" "ptime p2(date(2002, 1, 10), time_duration(0, 0, 0));\n" - "ptime p3(date(1970, 1, 1), time_duration(0, 0, 0));\n" - "unused(&p1, &p2, &p3);\n") + "ptime p3(date(1970, 1, 1), time_duration(0, 0, 0));", + + "&p1, &p2, &p3") + + BoostProfile() + + Check("p1", "Thu Jan 10 01:00:00 2002", "boost::posix_time::ptime") + Check("p2", "Thu Jan 10 00:00:00 2002", "boost::posix_time::ptime") + Check("p3", "Thu Jan 1 00:00:00 1970", "boost::posix_time::ptime"); @@ -6225,7 +6460,9 @@ void tst_Dumpers::dumper_data() "boost::unordered_set<std::string> s2;\n" "s2.insert(\"abc\");\n" - "s2.insert(\"def\");\n") + "s2.insert(\"def\");", + + "&s1, &s2") + BoostProfile() @@ -6252,7 +6489,9 @@ void tst_Dumpers::dumper_data() "boost::variant<int, double> id2 = double(2);\n" "boost::variant<int, std::string> is1 = int(1);\n" - "boost::variant<int, std::string> is2 = std::string(\"sss\");\n") + "boost::variant<int, std::string> is2 = std::string(\"sss\");", + + "&ch1, &ch2, &if1, &if2, &id1, &id2, &is1, &is2") + BoostProfile() @@ -6272,27 +6511,31 @@ void tst_Dumpers::dumper_data() QTest::newRow("Eigen") << Data("#ifdef HAS_EIGEN\n" - "#include <Eigen/Core>\n" - "#endif\n", - "#ifdef HAS_EIGEN\n" - "using namespace Eigen;\n" - "Vector3d zero = Vector3d::Zero();\n" - "Matrix3d constant = Matrix3d::Constant(5);\n" + "#include <Eigen/Core>\n" + "#endif\n", + + "#ifdef HAS_EIGEN\n" + "using namespace Eigen;\n" + "Vector3d zero = Vector3d::Zero();\n" + "Matrix3d constant = Matrix3d::Constant(5);\n" + + "MatrixXd dynamicMatrix(5, 2);\n" + "dynamicMatrix << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;\n" - "MatrixXd dynamicMatrix(5, 2);\n" - "dynamicMatrix << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;\n" + "Matrix<double, 2, 5, ColMajor> colMajorMatrix;\n" + "colMajorMatrix << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;\n" - "Matrix<double, 2, 5, ColMajor> colMajorMatrix;\n" - "colMajorMatrix << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;\n" + "Matrix<double, 2, 5, RowMajor> rowMajorMatrix;\n" + "rowMajorMatrix << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;\n" - "Matrix<double, 2, 5, RowMajor> rowMajorMatrix;\n" - "rowMajorMatrix << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;\n" + "VectorXd vector(3);\n" + "vector << 1, 2, 3;\n" + "#else\n" + "int zero, dynamicMatrix, constant, colMajorMatrix, rowMajorMatrix, vector;\n" + "skipall = true;\n" + "#endif\n", - "VectorXd vector(3);\n" - "vector << 1, 2, 3;\n" - "#else\n" - "skipall = true;\n" - "#endif\n") + "&zero, &dynamicMatrix, &constant, &colMajorMatrix, &rowMajorMatrix, &vector") + EigenProfile() @@ -6323,9 +6566,13 @@ void tst_Dumpers::dumper_data() // https://bugreports.qt.io/browse/QTCREATORBUG-3611 QTest::newRow("Bug3611") << Data("", + "typedef unsigned char byte;\n" "byte f = '2';\n" - "int *x = (int*)&f;\n") + "int *x = (int*)&f;", + + "&f, &x") + + Check("f", "50", TypeDef("unsigned char", "byte")); @@ -6336,6 +6583,7 @@ void tst_Dumpers::dumper_data() " int id;\n" " double dvalue;\n" "};", + "QMap<int, CustomStruct> map;\n" "CustomStruct cs1;\n" "cs1.id = 1;\n" @@ -6344,8 +6592,12 @@ void tst_Dumpers::dumper_data() "cs2.id = -1;\n" "map.insert(cs1.id, cs1);\n" "map.insert(cs2.id, cs2);\n" - "QMap<int, CustomStruct>::iterator it = map.begin();\n") + "QMap<int, CustomStruct>::iterator it = map.begin();", + + "&map, &cs1, &cs2, &it") + + CoreProfile() + + Check("map", "<2 items>", "@QMap<int, CustomStruct>") + Check("map.0.key", "-1", "int") + CheckType("map.0.value", "CustomStruct") @@ -6391,9 +6643,14 @@ void tst_Dumpers::dumper_data() " BREAK;\n" " unused(&url);\n" "}\n", - " QUrl url(QString(\"http://127.0.0.1/\"));\n" - " helper(url, qtversion);\n") + + " QUrl url(QString(\"http://127.0.0.1/\"));\n" + " helper(url, qtversion);", + + "&url") + + NetworkProfile() + + Check("raw", "<0 items>", "@QList<@QByteArray>") + CheckType("request", "@QNetworkRequest") + Check("url", "\"http://127.0.0.1/\"", "@QUrl &") % NoCdbEngine @@ -6406,14 +6663,17 @@ void tst_Dumpers::dumper_data() "struct S2 : S1 { };\n" "typedef struct S3 { int m1; int m2; } S3;\n" "struct S4 : S3 { };\n", + "S2 s2;\n" "s2.m1 = 5;\n" "S4 s4;\n" "s4.m1 = 5;\n" "S1 a1[10];\n" "typedef S1 Array[10];\n" - "Array a2;\n" - "unused(&s2, &s4, &a1, &a2);\n") + "Array a2;", + + "&s2, &s4, &a1, &a2") + + CheckType("a1", "S1 [10]") + CheckType("a2", TypeDef("S1 [10]", "Array")) + CheckType("s2", "S2") @@ -6429,9 +6689,13 @@ void tst_Dumpers::dumper_data() // https://bugreports.qt.io/browse/QTCREATORBUG-6465 QTest::newRow("Bug6465") << Data("", + "typedef char Foo[20];\n" "Foo foo = \"foo\";\n" - "char bar[20] = \"baz\";\n") + "char bar[20] = \"baz\";", + + "&foo, &bar") + + CheckType("bar", "char[20]"); @@ -6446,7 +6710,9 @@ void tst_Dumpers::dumper_data() "};\n", "MyFile file(\"/tmp/tt\");\n" - "file.setObjectName(\"A file\");\n") + "file.setObjectName(\"A file\");", + + "&file") + CoreProfile() + QtVersion(0x50000) @@ -6519,8 +6785,10 @@ void tst_Dumpers::dumper_data() " int b;\n" "};\n", "Derived d;\n" - "Base *b = &d;\n" - "unused(&d, &b);\n") + "Base *b = &d;\n", + + "&d, &b") + + Check("b.@1.a", "a", "21", "int") + Check("b.b", "b", "42", "int"); @@ -6550,9 +6818,10 @@ void tst_Dumpers::dumper_data() "Derived d;\n" "Container c(&d); // c.b2 has wrong address\n" - "unused(&c);\n" - "Base2 *b2 = &d; // This has the right address\n" - "unused(&b2);\n") + "Base2 *b2 = &d; // This has the right address\n", + + "&d, &b2, &c") + + Check("c.b2.@1.foo", "42", "int") + Check("c.b2.@2.bar", "43", "int") + Check("c.b2.baz", "84", "int") @@ -6585,11 +6854,16 @@ void tst_Dumpers::dumper_data() " BREAK;\n" " unused(obj);\n" "}\n", + "Circle *circle = new Circle(1.5, -2.5, 3.0);\n" "Object *obj = circle;\n" "helper(circle);\n" - "helper(obj);\n") + "helper(obj);", + + "&obj, &circle") + + NoCdbEngine + + CheckType("obj", "Circle"); @@ -6601,6 +6875,7 @@ void tst_Dumpers::dumper_data() "#include <string>\n" "using namespace std;\n" "typedef map<string, list<string> > map_t;\n", + "map_t m;\n" "m[\"one\"].push_back(\"a\");\n" "m[\"one\"].push_back(\"b\");\n" @@ -6608,7 +6883,10 @@ void tst_Dumpers::dumper_data() "m[\"two\"].push_back(\"1\");\n" "m[\"two\"].push_back(\"2\");\n" "m[\"two\"].push_back(\"3\");\n" - "map_t::const_iterator it = m.begin();\n") + "map_t::const_iterator it = m.begin();", + + "&m, &it") + + Check("m", "<2 items>", TypeDef("std::map<std::string, std::list<std::string>>","map_t")) + Check("m.0.first", "\"one\"", "std::string") + Check("m.0.second", "<3 items>", "std::list<std::string>") @@ -6629,6 +6907,7 @@ void tst_Dumpers::dumper_data() + CheckSet({{"it.second", "<3 items>", "std::list<std::string>"}, {"it.0.second", "<3 items>", "std::list<std::string>"}}); + QTest::newRow("Varargs") << Data("#include <stdarg.h>\n" "void test(const char *format, ...)\n" @@ -6639,9 +6918,13 @@ void tst_Dumpers::dumper_data() " double f = va_arg(arg, double);\n" " va_end(arg);\n" " BREAK;\n" - " unused(&i, &f);\n" + " unused(&i, &f, &arg);\n" "}\n", - "test(\"abc\", 1, 2.0);\n") + + "test(\"abc\", 1, 2.0);", + + "") + + Check("format", "\"abc\"", "char *") + Check("i", "1", "int") + Check("f", FloatValue("2"), "double"); @@ -6670,22 +6953,28 @@ void tst_Dumpers::dumper_data() "struct C : virtual A { int c = 3; double cc = 3; };\n" "struct D : virtual B, virtual C { int d = 4; };\n"; + QTest::newRow("Inheritance") << Data(inheritanceData, + "Combined c;\n" "c.S1::a = 42;\n" "c.S2::a = 43;\n" "c.S1::v = 44;\n" - "c.S2::v = 45;\n" - "unused(&c.S2::v);\n" + "c.S2::v = 45;\n\n" + "TT tt;\n" "tt.T1::v = 44;\n" "tt.T2::v = 45;\n" - "unused(&tt.T2::v);\n" - "D dd; unused(&dd);\n" - "D *dp = new D; unused(&dp);\n" - "D &dr = dd; unused(&dr);\n") + "D dd;\n\n" + + "D *dp = new D;\n" + "D &dr = dd;", + + "&c.S2::v, &tt.T2::v, &dp, &dr") + + Cxx11Profile() + + Check("c.c", "1", "int") + CheckSet({{"c.@1.@2.a", "42", "int"}, // LLDB vs GDB vs .. {"c.@1.@1.a", "42", "int"}}) @@ -6723,7 +7012,7 @@ void tst_Dumpers::dumper_data() QTest::newRow("Gdb13393") << Data( - "struct Base {\n" + "\nstruct Base {\n" " Base() : a(1) {}\n" " virtual ~Base() {} // Enforce type to have RTTI\n" " int a;\n" @@ -6738,11 +7027,11 @@ void tst_Dumpers::dumper_data() " const Base *ptrConst;\n" " Base &ref;\n" " const Base &refConst;\n" - " S(Derived &d)\n" - " : ptr(&d), ptrConst(&d), ref(d), refConst(d)\n" - " {}\n" - " };\n" - , + " S(Derived &d)\n" + " : ptr(&d), ptrConst(&d), ref(d), refConst(d)\n" + " {}\n" + "};\n", + "Derived d;\n" "S s(d);\n" "Base *ptr = &d;\n" @@ -6754,8 +7043,9 @@ void tst_Dumpers::dumper_data() "boost::shared_ptr<Base> sharedPtr(new Derived());\n" "#else\n" "int sharedPtr = 1;\n" - "#endif\n" - "unused(&ptrConst, &ref, &refConst, &ptrToPtr, &sharedPtr, &s);\n") + "#endif\n", + + "&d, &s, &ptrConst, &ref, &refConst, &ptrToPtr, &sharedPtr") + GdbEngine + GdbVersion(70500) @@ -6793,11 +7083,14 @@ void tst_Dumpers::dumper_data() // http://sourceware.org/ml/gdb-patches/2011-12/msg00420.html QTest::newRow("Gdb10586") << Data("", + "struct Test {\n" " struct { int a; float b; };\n" " struct { int c; float d; };\n" - "} v = {{1, 2}, {3, 4}};\n" - "unused(&v);\n") + "} v = {{1, 2}, {3, 4}};\n", + + "&v") + + Check("v", "", "Test") % NoCdbEngine + Check("v", "", TypePattern("main::.*::Test")) % CdbEngine //+ Check("v.a", "1", "int") % GdbVersion(0, 70699) @@ -6808,10 +7101,12 @@ void tst_Dumpers::dumper_data() QTest::newRow("Gdb10586eclipse") << Data("", + "struct { int x; struct { int a; }; struct { int b; }; } " " v = {1, {2}, {3}};\n" - "struct S { int x, y; } n = {10, 20};\n" - "unused(&v, &n);\n") + "struct S { int x, y; } n = {10, 20};\n", + + "&v, &n") + Check("v", "", "{...}") % GdbEngine + Check("v", "", TypePattern(".*anonymous .*")) % LldbEngine @@ -6833,13 +7128,16 @@ void tst_Dumpers::dumper_data() QTest::newRow("StdInt") << Data("#include <stdint.h>\n", + "uint8_t u8 = 64;\n" "int8_t s8 = 65;\n" "uint16_t u16 = 66;\n" "int16_t s16 = 67;\n" "uint32_t u32 = 68;\n" - "int32_t s32 = 69;\n" - "unused(&u8, &s8, &u16, &s16, &u32, &s32);\n") + "int32_t s32 = 69;\n", + + "&u8, &s8, &u16, &s16, &u32, &s32") + + Check("u8", "64", TypeDef("unsigned char", "uint8_t")) + Check("s8", "65", TypeDef("char", "int8_t")) + Check("u16", "66", TypeDef("unsigned short", "uint16_t")) @@ -6847,10 +7145,12 @@ void tst_Dumpers::dumper_data() + Check("u32", "68", TypeDef("unsigned int", "uint32_t")) + Check("s32", "69", TypeDef("int", "int32_t")); + QTest::newRow("QPolygon") << Data("#include <QGraphicsScene>\n" "#include <QGraphicsPolygonItem>\n" "#include <QApplication>\n", + "QApplication app(argc, argv);\n" "QGraphicsScene sc;\n" "QPolygonF pol;\n" @@ -6859,12 +7159,16 @@ void tst_Dumpers::dumper_data() "pol.append(QPointF(3, 3));\n" "pol.append(QPointF(2, 4));\n" "pol.append(QPointF(1, 4));\n" - "QGraphicsPolygonItem *p = sc.addPolygon(pol);\n" - "unused(&app, &p);\n") + "QGraphicsPolygonItem *p = sc.addPolygon(pol);", + + "&app, &p") + + GuiProfile() + + Check("pol", "<5 items>", "@QPolygonF") + Check("p", "<5 items>", "@QGraphicsPolygonItem"); + QTest::newRow("QJson") << Data("#include <QString>\n" "#if QT_VERSION >= 0x050000\n" @@ -6873,6 +7177,7 @@ void tst_Dumpers::dumper_data() "#include <QJsonValue>\n" "#include <QVariantMap>\n" "#endif\n", + "#if QT_VERSION >= 0x050000\n" "QJsonObject ob = QJsonObject::fromVariantMap({\n" " {\"a\", 1},\n" @@ -6905,14 +7210,17 @@ void tst_Dumpers::dumper_data() " c.append(QJsonValue(-qint64(1u << i) + 1));\n" " c.append(QJsonValue(-qint64(1u << i)));\n" " c.append(QJsonValue(-qint64(1u << i) - 1));\n" - "}\n" - "\n" + "}" "unused(&ob,&b,&a);\n" - "#endif\n") + "#endif\n", + + "") + + Cxx11Profile() + CoreProfile() + QtVersion(0x50000) + MsvcVersion(1900) + + Check("a", "<6 items>", "@QJsonArray") + Check("a.0", "[0]", "1", "QJsonValue (Number)") + Check("a.1", "[1]", "\"asd\"", "QJsonValue (String)") @@ -6953,11 +7261,13 @@ void tst_Dumpers::dumper_data() + Check("ob.3", "\"d\"", "<1 items>", "QJsonValue (Object)") + Check("ob.4", "\"s\"", "\"ssss\"", "QJsonValue (String)"); - QTest::newRow("QV4") + + QTest::newRow("Q&qstring_literal_temp,V4") << Data("#include <private/qv4value_p.h>\n" "#include <private/qjsvalue_p.h>\n" "#include <QCoreApplication>\n" "#include <QJSEngine>\n", + "QCoreApplication app(argc, argv);\n" "QJSEngine eng;\n\n" "//QV4::Value q0; unused(&q0); // Uninitialized data.\n\n" @@ -6965,29 +7275,33 @@ void tst_Dumpers::dumper_data() "//q1.setInt_32(1);\n\n" "QV4::Value q2; unused(&q2);\n" "q2.setDouble(2.5);\n\n" - "QJSValue v10; unused(&v10);\n" - "QJSValue v11 = QJSValue(true); unused(&v11);\n" - "QJSValue v12 = QJSValue(1); unused(&v12);\n" - "QJSValue v13 = QJSValue(2.5); unused(&v13);\n" - "QJSValue v14 = QJSValue(QLatin1String(\"latin1\")); unused(&v14);\n" - "QJSValue v15 = QJSValue(QString(\"utf16\")); unused(&v15);\n" - "QJSValue v16 = QJSValue(bool(true)); unused(&v16);\n" - "QJSValue v17 = eng.newArray(100); unused(&v17);\n" - "QJSValue v18 = eng.newObject(); unused(&v18);\n\n" + "QJSValue v10;\n" + "QJSValue v11 = QJSValue(true);\n" + "QJSValue v12 = QJSValue(1);\n" + "QJSValue v13 = QJSValue(2.5);\n" + "QJSValue v14 = QJSValue(QLatin1String(\"latin1\"));\n" + "QJSValue v15 = QJSValue(QString(\"utf16\"));\n" + "QJSValue v16 = QJSValue(bool(true));\n" + "QJSValue v17 = eng.newArray(100);\n" + "QJSValue v18 = eng.newObject();\n\n" "v18.setProperty(\"PropA\", 1);\n" "v18.setProperty(\"PropB\", 2.5);\n" "v18.setProperty(\"PropC\", v10);\n\n" - "QV4::Value s11, *p11 = QJSValuePrivate::valueForData(&v11, &s11); unused(&p11);\n" - "QV4::Value s12, *p12 = QJSValuePrivate::valueForData(&v12, &s12); unused(&p12);\n" - "QV4::Value s13, *p13 = QJSValuePrivate::valueForData(&v13, &s13); unused(&p13);\n" - "QV4::Value s14, *p14 = QJSValuePrivate::valueForData(&v14, &s14); unused(&p14);\n" - "QV4::Value s15, *p15 = QJSValuePrivate::valueForData(&v15, &s15); unused(&p15);\n" - "QV4::Value s16, *p16 = QJSValuePrivate::valueForData(&v16, &s16); unused(&p16);\n" - "QV4::Value s17, *p17 = QJSValuePrivate::valueForData(&v17, &s17); unused(&p17);\n" - "QV4::Value s18, *p18 = QJSValuePrivate::valueForData(&v18, &s18); unused(&p18);\n" - ) + "QV4::Value s11, *p11 = QJSValuePrivate::valueForData(&v11, &s11);\n" + "QV4::Value s12, *p12 = QJSValuePrivate::valueForData(&v12, &s12);\n" + "QV4::Value s13, *p13 = QJSValuePrivate::valueForData(&v13, &s13);\n" + "QV4::Value s14, *p14 = QJSValuePrivate::valueForData(&v14, &s14);\n" + "QV4::Value s15, *p15 = QJSValuePrivate::valueForData(&v15, &s15);\n" + "QV4::Value s16, *p16 = QJSValuePrivate::valueForData(&v16, &s16);\n" + "QV4::Value s17, *p17 = QJSValuePrivate::valueForData(&v17, &s17);\n" + "QV4::Value s18, *p18 = QJSValuePrivate::valueForData(&v18, &s18);\n", + + "&v10, &v11, &v12, &v13, &v14, &v15, &v16, &v17, &v18, " + "&p11, &p12, &p13, &p14, &p15, &p16, &p17, &p18") + + QmlPrivateProfile() + QtVersion(0x50000) + + Check("q2", FloatValue("2.5"), "@QV4::Value (double)") //+ Check("v10", "(null)", "@QJSValue (null)") # Works in GUI. Why? + Check("v11", "true", "@QJSValue (bool)") @@ -7001,22 +7315,33 @@ void tst_Dumpers::dumper_data() QTest::newRow("QStandardItem") << Data("#include <QStandardItemModel>", + "QStandardItemModel m;\n" "QStandardItem *root = m.invisibleRootItem();\n" "for (int i = 0; i < 4; ++i) {\n" " QStandardItem *item = new QStandardItem(QString(\"item %1\").arg(i));\n" " item->setData(123);\n" " root->appendRow(item);\n" - "}\n") + "}", + + "&root, &m") + + GuiProfile() + + Check("root.[children].0.[values].0.role", "Qt::DisplayRole (0)", "@Qt::ItemDataRole") + Check("root.[children].0.[values].0.value", "\"item 0\"", "@QVariant (QString)"); QTest::newRow("Internal1") + << Data("struct QtcDumperTest_FieldAccessByIndex { int d[3] = { 10, 11, 12 }; };\n", - "QtcDumperTest_FieldAccessByIndex d; unused(&d);\n") + + "QtcDumperTest_FieldAccessByIndex d;", + + "&d") + + MsvcVersion(1900) + + Check("d", "12", "QtcDumperTest_FieldAccessByIndex"); @@ -7025,8 +7350,12 @@ void tst_Dumpers::dumper_data() "struct Foo { int bar = 15; E e = V1; };\n" "struct QtcDumperTest_PointerArray {\n" " Foo *foos = new Foo[10];\n" - "};\n\n", - "QtcDumperTest_PointerArray tc; unused(&tc);\n") + "};", + + "QtcDumperTest_PointerArray tc;", + + "&tc") + + Check("tc.0.bar", "15", "int") + Check("tc.0.e", "V1 (0)", "E") + Check("tc.1.bar", "15", "int") @@ -7059,8 +7388,12 @@ void tst_Dumpers::dumper_data() "\n" " Storage<details::extent_type<Extent>> storage_;\n" "};\n", + "int v[4] = { 1, 2, 4, 8 }; \n" - "Span<int, -1> s(v, 4); unused(&s); \n") + "Span<int, -1> s(v, 4);", + + "&s") + + Check("s.storage_.@1.size_", "4", "int"); @@ -7101,11 +7434,16 @@ void tst_Dumpers::dumper_data() "{\n" " int baz = 84;\n" "};\n\n", - "Derived d1, d2; unused(&d1, &d2);\n" - "QtcDumperTest_List<Derived> list; unused(&list);\n" + + "Derived d1, d2;\n" + "QtcDumperTest_List<Derived> list;\n" "list.insert(&d1);\n" - "list.insert(&d2);\n") + "list.insert(&d2);", + + "&d1, &d2, &list") + + Cxx11Profile() + + Check("d1.@1.foo", "42", "int") + Check("d1.baz", "84", "int") + Check("d2.@1.foo", "42", "int") @@ -7113,6 +7451,7 @@ void tst_Dumpers::dumper_data() //+ Check("list.1.baz", "15", "int") ; + QTest::newRow("BufArray") << Data("#include <new>\n" "static int c = 0;\n" @@ -7129,8 +7468,13 @@ void tst_Dumpers::dumper_data() " }\n" " ~QtcDumperTest_BufArray() { delete[] buffer; }\n" "};\n\n", - "QtcDumperTest_BufArray<Foo> arr; unused(&arr);\n") + + "QtcDumperTest_BufArray<Foo> arr;", + + "&arr") + + Cxx11Profile() + + Check("arr.0.bar", "0", "int") + Check("arr.0.baz", "1", "int") + Check("arr.1.bar", "2", "int") @@ -7152,32 +7496,46 @@ void tst_Dumpers::dumper_data() " strcpy(first, \"first\");\n" " }\n" " ~QtcDumperTest_String() { delete[] first; }\n" - "};\n\n", - "QtcDumperTest_String str; unused(&str);\n") + "};", + + "QtcDumperTest_String str;", + + "&str") + + Cxx11Profile() + + Check("str", "first, second, third", "QtcDumperTest_String"); QTest::newRow("UndefinedStaticMembers") << Data("struct Foo { int a = 15; static int b; }; \n", - "Foo f; unused(&f);\n") + + "Foo f;", + + "&f") + + Check("f.a", "15", "int") + Check("f.b", "<optimized out>", "") % NoCdbEngine + Check("f.b", "", "<Value unavailable error>") % CdbEngine; + QTest::newRow("LongDouble") << Data("", "long double a = 1;\n" "long double b = -2;\n" "long double c = 0;\n" - "long double d = 0.5;\n") + "long double d = 0.5;", + + "&a, &b, &c, &d") + + Check("a", FloatValue("1"), TypeDef("double", "long double")) + Check("b", FloatValue("-2"), TypeDef("double", "long double")) + Check("c", FloatValue("0"), TypeDef("double", "long double")) + Check("d", FloatValue("0.5"), TypeDef("double", "long double")); + QTest::newRow("WatchList") - << Data("", "") + << Data("", "", "") + Watcher("watch.1", "42;43") + Check("watch.1", "42;43", "<2 items>", "") + Check("watch.1.0", "42", "42", "int") @@ -7189,11 +7547,16 @@ void tst_Dumpers::dumper_data() // We don't seem to have such in the public interface. << Data("#include <private/qlocale_p.h>\n" "#include <private/qflagpointer_p.h>\n", - "QLocaleData d; unused(&d);\n" - "QFlagPointer<int> p; unused(&p);\n") + + "QLocaleData d;\n" + "QFlagPointer<int> p;", + + "&d, &p") + + CorePrivateProfile() + QmlPrivateProfile() + QtVersion(0x50800) + + Check("d.Log10_2_100000", "30103", "int") + Check("p.FlagBit", "<optimized out>", "") % NoCdbEngine + Check("p.FlagBit", "", "<Value unavailable error>", "") % CdbEngine; @@ -7204,6 +7567,7 @@ void tst_Dumpers::dumper_data() << Data("#include <CoreFoundation/CoreFoundation.h>\n" "#include <string>\n" "#import <Foundation/Foundation.h>\n", + "std::string stdString = \"A std::string\"; (void)stdString;\n\n" "std::string &stdStringReference = stdString; (void)stdStringReference;\n\n" "CFStringRef cfStringRef = CFSTR(\"A cfstringref\"); (void)cfStringRef;\n\n" @@ -7216,8 +7580,12 @@ void tst_Dumpers::dumper_data() "CFStringRef& cfStringRefReference = cfStringRef; (void)cfStringRefReference;\n" "NSString *&aNSStringReference = aNSString; (void)aNSStringReference;\n" "NSURL *&nsUrlReference = nsUrl; (void)nsUrlReference;\n" - "CFURLRef &urlReference = url; (void)urlReference;\n") + "CFURLRef &urlReference = url; (void)urlReference;\n", + + "") + + CoreFoundationProfile() + + Check("stdString", "\"A std::string\"", "std::string") + Check("stdStringReference", "\"A std::string\"", "std::string &") + Check("cfStringRef", "\"A cfstringref\"", "CFStringRef") @@ -7233,19 +7601,26 @@ void tst_Dumpers::dumper_data() ; #endif + QTest::newRow("ArrayOfFunctionPointers") << Data("typedef int (*FP)(int *); \n" "int func(int *param) { unused(param); return 0; } \n", - "FP fps[5]; fps[0] = func; fps[0](0); unused(&fps);\n") + + "FP fps[5]; fps[0] = func; fps[0](0);", + + "&fps") + + RequiredMessage("Searching for type int (*)(int *) across all target " "modules, this could be very slow") + LldbEngine; + QTest::newRow("Sql") << Data("#include <QSqlField>\n" "#include <QSqlDatabase>\n" "#include <QSqlQuery>\n" "#include <QSqlRecord>\n", + "QSqlDatabase db = QSqlDatabase::addDatabase(\"QSQLITE\");\n" "db.setDatabaseName(\":memory:\");\n" "Q_ASSERT(db.open());\n" @@ -7259,9 +7634,12 @@ void tst_Dumpers::dumper_data() "QSqlRecord rec = query.record();\n" "QSqlField f1 = rec.field(0);\n" "QSqlField f2 = rec.field(1);\n" - "QSqlField f3 = rec.field(2);\n" - "unused(&f1, &f2, &f3);\n") + "QSqlField f3 = rec.field(2);", + + "&f1, &f2, &f3") + + SqlProfile() + + Check("f1", "1", "@QSqlField (qlonglong)") + Check("f2", "\"qt-logo.png\"", "@QSqlField (QString)") + Check("f3", "(invalid)", "@QSqlField (invalid)"); diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index db1b11c6c49..6e03a0735b2 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -155,7 +155,7 @@ def selectBuildConfig(wantedKit, configName, afterSwitchTo=ViewConstants.EDIT): switchViewTo(ViewConstants.PROJECTS) if any((switchToBuildOrRunSettingsFor(wantedKit, ProjectSettings.BUILD), selectFromCombo(":scrollArea.Edit build configuration:_QComboBox", configName))): - progressBarWait(30000) + waitForProjectParsing(5000, 30000, 0) if afterSwitchTo: if ViewConstants.FIRST_AVAILABLE <= afterSwitchTo <= ViewConstants.LAST_AVAILABLE: switchViewTo(afterSwitchTo) diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 4ad7889cb7e..7ea25299e52 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -321,15 +321,13 @@ def createNewQmlExtension(workingDir, targets=[Targets.DESKTOP_5_6_1_DEFAULT]): if workingDir == None: workingDir = tempDir() __createProjectSetNameAndPath__(workingDir) - __chooseTargets__(targets, available) - nextButton = waitForObject(":Next_QPushButton") - clickButton(nextButton) - nameLineEd = waitForObject("{buddy={type='QLabel' text='Object class-name:' unnamed='1' visible='1'} " - "type='QLineEdit' unnamed='1' visible='1'}") + nameLineEd = waitForObject("{name='ObjectName' type='Utils::FancyLineEdit' visible='1'}") replaceEditorContent(nameLineEd, "TestItem") - uriLineEd = waitForObject("{buddy={type='QLabel' text='URI:' unnamed='1' visible='1'} " - "type='QLineEdit' unnamed='1' visible='1'}") + uriLineEd = waitForObject("{name='Uri' type='Utils::FancyLineEdit' visible='1'}") replaceEditorContent(uriLineEd, "org.qt-project.test.qmlcomponents") + nextButton = waitForObject(":Next_QPushButton") + clickButton(nextButton) + __chooseTargets__(targets, available) clickButton(nextButton) __createProjectHandleLastPage__() @@ -515,7 +513,7 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False): supports = text[text.find('Supported Platforms'):].split(":")[1].strip().split(" ") result = set() if 'Desktop' in supports: - if (version == None or version < "5.0"): + if (version == None or version < "5.0") and not templateName.startswith("Qt Quick 2"): result.add(Targets.DESKTOP_4_8_7_DEFAULT) if platform.system() in ("Linux", "Darwin"): result.add(Targets.EMBEDDED_LINUX) @@ -673,11 +671,15 @@ def addCPlusPlusFile(name, template, projectName, forceOverwrite=False, addToVCS clickButton("{text='%s' type='QPushButton' unnamed='1' visible='1' window=%s}" % (buttonToClick, overwriteDialog)) -# if one of the parameters is set to 0 or below the respective parsing won't be waited for -def waitForProjectParsing(projectParsingTimeout=10000, codemodelParsingTimeout=10000): - if projectParsingTimeout > 0: - runButton = findObject(':*Qt Creator.Run_Core::Internal::FancyToolButton') - # Wait for parsing to complete - waitFor("runButton.enabled", projectParsingTimeout) +# if one of the parameters is set to 0 the function will not wait in this step +# beginParsingTimeout milliseconds to wait for parsing to begin +# projectParsingTimeout milliseconds to wait for project parsing +# codemodelParsingTimeout milliseconds to wait for C++ parsing +def waitForProjectParsing(beginParsingTimeout=0, projectParsingTimeout=10000, + codemodelParsingTimeout=10000): + runButton = findObject(':*Qt Creator.Run_Core::Internal::FancyToolButton') + waitFor("not runButton.enabled", beginParsingTimeout) + # Wait for parsing to complete + waitFor("runButton.enabled", projectParsingTimeout) if codemodelParsingTimeout > 0: progressBarWait(codemodelParsingTimeout) diff --git a/tests/system/suite_WELP/tst_WELP01/test.py b/tests/system/suite_WELP/tst_WELP01/test.py index d20c5d1d912..75264583aa7 100755 --- a/tests/system/suite_WELP/tst_WELP01/test.py +++ b/tests/system/suite_WELP/tst_WELP01/test.py @@ -92,7 +92,7 @@ def main(): # select Projects and roughly check this switchToSubMode('Projects') - for button in ['New Project', 'Open Project']: + for button in ['New', 'Open']: wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton(button) if test.verify(all((wsButtonFrame, wsButtonLabel)), "Verified whether '%s' button is shown." % button): diff --git a/tests/system/suite_editors/tst_generic_highlighter/test.py b/tests/system/suite_editors/tst_generic_highlighter/test.py index 1a389090fe7..05951f26719 100644 --- a/tests/system/suite_editors/tst_generic_highlighter/test.py +++ b/tests/system/suite_editors/tst_generic_highlighter/test.py @@ -123,10 +123,10 @@ def addHighlighterDefinition(*languages): "text='Generic Highlighter'}") clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Generic Highlighter") - clickButton("{text='Update Definitions' type='QPushButton' name='updateDefinitions' visible='1'}") + clickButton("{text='Download Definitions' type='QPushButton' name='downloadDefinitions' visible='1'}") updateStatus = "{name='updateStatus' type='QLabel' visible='1'}" waitFor("object.exists(updateStatus)", 5000) - if waitFor('str(findObject(updateStatus).text) == "Update finished"', 5000): + if waitFor('str(findObject(updateStatus).text) == "Download finished"', 5000): test.verify(os.path.exists(syntaxDirectory), "Directory for syntax highlighter files exists.") xmlFiles = glob.glob(os.path.join(syntaxDirectory, "*.xml")) @@ -157,8 +157,8 @@ def displayHintForHighlighterDefinition(fileName, patterns, lPatterns, added, ad return False def main(): - miss = ("A highlight definition was not found for this file. Would you like to update " - "highlight definition files?") + miss = ("A highlight definition was not found for this file. Would you like to download " + "additional highlight definition files?") startQC() if not startedWithoutPluginError(): return diff --git a/tests/system/suite_editors/tst_qml_editor/test.py b/tests/system/suite_editors/tst_qml_editor/test.py index c8e5a66a010..633e9fcbdc1 100644 --- a/tests/system/suite_editors/tst_qml_editor/test.py +++ b/tests/system/suite_editors/tst_qml_editor/test.py @@ -129,7 +129,7 @@ def testHovering(): {'text':'<table><tr><td valign=middle><p>Rectangle</p><hr/><p>\n<p>Paints a filled rectangle with an ' 'optional border </p></p></td><td> <img src=":/utils/tooltip/images/f1.png"></td></tr></table>'} ] - alternativeValues = [{"text":"FocusScope"}, {"text":"Rectangle"}] + alternativeValues = [{"text":"<p>FocusScope</p>"}, {"text":"<p>Rectangle</p>"}] verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues) test.log("Testing hovering properties") openDocument(focusDocumentPath % "focus\\.qml") @@ -152,11 +152,12 @@ def testHovering(): 'These define the transitions to be applied to the item whenever it changes its state.' '</p></p></td><td> <img src=":/utils/tooltip/images/f1.png"></td></tr></table>'} ] - alternativeValues = [{"text":"boolean"}, {"text":"string"}, {"text":"State"}, {"text":"Transition"}] + alternativeValues = [{"text":"<p>boolean</p>"}, {"text":"<p>string</p>"}, + {"text":"<p>State</p>"}, {"text":"<p>Transition</p>"}] if JIRA.isBugStillOpen(20020): expectedValues[0] = {'text':'<table><tr><td valign=middle>Rectangle</td><td> ' '<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'} - alternativeValues[0] = {"text":"Rectangle"} + alternativeValues[0] = {"text":"<p>Rectangle</p>"} verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues) test.log("Testing hovering expressions") openDocument(focusDocumentPath % "focus\\.qml") @@ -173,5 +174,5 @@ def testHovering(): additionalKeyPresses = ["<Left>", "<Left>", "<Left>", "<Left>"] expectedTypes = ["ColorTip", "TextTip"] expectedValues = ["#D1DBBD", {"text":'<table><tr><td valign=middle>number</td><td> <img src=":/utils/tooltip/images/f1.png"></td></tr></table>'}] - alternativeValues = ["#D6DBBD", None] + alternativeValues = ["#D6DBBD", {"text":"<p>number</p>"}] verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues) 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 69d1c4de4d7..3fdce9645be 100644 --- a/tests/system/suite_general/tst_create_proj_wizard/test.py +++ b/tests/system/suite_general/tst_create_proj_wizard/test.py @@ -62,8 +62,7 @@ def main(): template = template.replace(".", "\\.") # skip non-configurable if template not in ["Qt Quick UI Prototype", "Auto Test Project", # FIXME - "Qt for Python - Empty", "Qt for Python - Window", - "Qt Quick 2 Extension Plugin"]: + "Qt for Python - Empty", "Qt for Python - Window"]: availableProjectTypes.append({category:template}) safeClickButton("Cancel") for current in availableProjectTypes: @@ -82,7 +81,7 @@ def main(): # are there more Quick combinations - then recreate this project if counter < len(qtVersionsForQuick) - 1: displayedPlatforms = __createProject__(category, template) - elif template in ("Qt Widgets Application", "C++ Library"): + elif template in ("Qt Widgets Application", "Qt Quick 2 Extension Plugin", "C++ Library"): def skipDetails(_): clickButton(waitForObject(":Next_QPushButton")) handleBuildSystemVerifyKits(category, template, kits, diff --git a/tests/system/suite_general/tst_rename_file/test.py b/tests/system/suite_general/tst_rename_file/test.py index cb5d434fe15..f2ac949549a 100644 --- a/tests/system/suite_general/tst_rename_file/test.py +++ b/tests/system/suite_general/tst_rename_file/test.py @@ -110,6 +110,10 @@ def renameFile(projectDir, proFile, branch, oldname, newname): "Only the filename without the extension is selected?") replaceEditorContent(replaceEdit, newname) type(replaceEdit, "<Return>") + if oldname == "adding.qrc": + clickButton(waitForObject("{text='No' type='QPushButton' unnamed='1' visible='1' " + "window={type='QMessageBox' unnamed='1' visible='1' " + " windowTitle='Rename More Files?'}}")) test.verify(waitFor("os.path.exists(newFilePath)", 1000), "Verify that file with new name exists: %s" % newFilePath) test.compare(readFile(newFilePath), oldFileText, |