Merge remote-tracking branch 'origin/5.0'

Conflicts:
	src/plugins/clangtools/clangtoolssettings.cpp
	src/plugins/clangtools/executableinfo.cpp
	src/plugins/clangtools/executableinfo.h

Change-Id: Id8caf63e3e594792467d3447870086bd2d8f73b9
This commit is contained in:
Eike Ziller
2021-09-13 15:36:51 +02:00
98 changed files with 1321 additions and 445 deletions
+3
View File
@@ -58,6 +58,9 @@ if (Qt5_VERSION VERSION_LESS 6.0.0)
if (MSVC AND MSVC_VERSION GREATER_EQUAL 1910)
add_compile_options(/permissive- /Zc:__cplusplus)
endif()
else()
# Common intermediate directory for QML modules which are defined via qt_add_qml_module()
set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml_modules")
endif()
find_package(Qt5 COMPONENTS LinguistTools QUIET)
find_package(Qt5 COMPONENTS Designer DesignerComponents Help SerialPort Svg Tools QUIET)
+7
View File
@@ -12,3 +12,10 @@ set(IDE_BUNDLE_IDENTIFIER "org.qt-project.${IDE_ID}") # The macOS application bu
set(PROJECT_USER_FILE_EXTENSION .user)
set(IDE_DOC_FILE "qtcreator/qtcreator.qdocconf")
set(IDE_DOC_FILE_ONLINE "qtcreator/qtcreator-online.qdocconf")
# Absolute, or relative to <qtcreator>/src/app
# Should contain qtcreator.ico, qtcreator.xcassets
set(IDE_ICON_PATH "")
# Absolute, or relative to <qtcreator>/src/plugins/coreplugin
# Should contain images/logo/(16|24|32|48|64|128|256|512)/QtProject-qtcreator.png
set(IDE_LOGO_PATH "")
+1 -1
View File
@@ -7,7 +7,7 @@ instructions:
variableValue: "RelWithDebInfo"
- type: EnvironmentVariable
variableName: QTC_QT_BASE_URL
variableValue: "http://ci-files02-hki.intra.qt.io/packages/jenkins/archive/qt/6.2/6.2.0-beta3-released/"
variableValue: "http://ci-files02-hki.intra.qt.io/packages/jenkins/archive/qt/6.2/6.2.0-beta4-released/"
- type: EnvironmentVariable
variableName: QTC_QT_MODULES
variableValue: "qt5compat qtbase qtdeclarative qtimageformats qtquick3d qtquickcontrols2 qtquicktimeline qtserialport qtshadertools qtsvg qttools qttranslations"
+121
View File
@@ -0,0 +1,121 @@
Qt Creator 5.0.1
================
Qt Creator version 5.0.1 contains bug fixes.
The most important changes are listed in this document. For a complete list of
changes, see the Git log for the Qt Creator sources that you can check out from
the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline origin/v5.0.0..v5.0.1
General
-------
* Fixed saving of MIME type settings
Editing
-------
### QML
* Fixed freeze with imports that don't specify minor version
(QTCREATORBUG-26178, QTCREATORBUG-26216)
### Language Client
* Fixed working directory for servers that are started per project
(QTCREATORBUG-26115)
* Fixed sorting of completion items (QTCREATORBUG-26114)
* Fixed that global environment setting was not used for language servers
Projects
--------
### CMake
* Improved handling of issues with `conan` (QTCREATORBUG-25818,
QTCREATORBUG-25891)
* Fixed endless configuration loop (QTCREATORBUG-26204, QTCREATORBUG-26207,
QTCREATORBUG-25346, QTCREATORBUG-25995, QTCREATORBUG-25183,
QTCREATORBUG-25512)
* Fixed crash with "Re-configure with Initial Parameters" (QTCREATORBUG-26220)
### Qbs
* Fixed code model with MSVC and C++20 (QTCREATORBUG-26089)
### qmake
* Fixed that `qmake` was run on every build on macOS (QTCREATORBUG-26212)
### Compilation Database
* Fixed crash when loading project (QTCREATORBUG-26126)
Debugging
---------
### GDB
* Fixed debugging of 32-bit MinGW application with 64-bit debugger
(QTCREATORBUG-26208)
Analyzer
--------
### Clang
* Fixed that Clazy was asked repeatedly for version and supported checks
(QTCREATORBUG-26237)
Test Integration
----------------
### Qt Quick
* Fixed unnecessary updates of QML code model
### CTest
* Fixed missing test output
Platforms
---------
### Windows
* Fixed issue with parsing MSVC warnings
### Android
* Fixed cleaning up of old auto-generated Android kits
* Fixed minimum SDK level for CMake projects (QTCREATORBUG-26127)
### Web Assembly
* Fixed detection of emscripten compilers (QTCREATORBUG-26199)
Credits for these changes go to:
--------------------------------
Alessandro Portale
Alp Öz
Artem Sokolovskii
Assam Boudjelthia
Christian Kandeler
Christian Stenger
Cristian Adam
David Schulz
Eike Ziller
Henning Gruendl
Ivan Komissarov
Jaroslaw Kobus
Johanna Vanhatapio
Laszlo Agocs
Leena Miettinen
Mahmoud Badri
Miikka Heikkinen
Orgad Shaneh
Thomas Hartmann
Tim Jenssen
@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -32,7 +32,7 @@
/*!
\page creator-coding.html
\if defined(qtdesignstudio)
\previouspage creator-keyboard-shortcuts.html
\previouspage studio-implementing-applications.html
\else
\previouspage creator-usability.html
\endif
@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -33,7 +33,7 @@
\page creator-editor-options-text.html
\previouspage creator-editor-options.html
\if defined(qtdesignstudio)
\nextpage studio-javascript.html
\nextpage studio-debugging.html
\else
\nextpage creator-editor-fakevim.html
\endif
@@ -32,8 +32,8 @@
/*!
\page creator-editor-external.html
\if defined(qtdesignstudio)
\previouspage creator-qml-performance-monitor.html
\nextpage creator-telemetry.html
\previouspage quick-converting-ui-projects.html
\nextpage studio-help.html
\else
\previouspage creator-keyboard-shortcuts.html
\nextpage creator-task-lists.html
+2 -2
View File
@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -26,7 +26,7 @@
/*!
\page creator-help.html
\if defined(qtdesignstudio)
\previouspage {Examples and Tutorials}
\previouspage studio-help.html
\nextpage studio-faq.html
\else
\previouspage creator-help-overview.html
@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -32,7 +32,7 @@
/*!
\page technical-support.html
\if defined(qtdesignstudio)
\previouspage studio-terms.html
\previouspage studio-platforms.html
\else
\previouspage creator-glossary.html
\endif
+2
View File
@@ -144,6 +144,8 @@
\li \l{Lights}
\li \l{Cameras}
\li \l{Scene Environment}
\li \l{Morph Target}
\li \l{Repeater3D}
\endlist
\li \l {Creating Component Instances}
\li \l {Creating Custom Components}
@@ -25,7 +25,7 @@
/*!
\page quick-component-instances.html
\previouspage studio-3d-scene-environment.html
\previouspage studio-3d-repeater-3d.html
\nextpage quick-components-creating.html
\title Creating Component Instances
@@ -82,6 +82,8 @@
\li \l {Lights}
\li \l {Cameras}
\li \l {Scene Environment}
\li \l {Morph Target}
\li \l {Repeater3D}
\endlist
When you import 3D scenes from files that you exported from 3D graphics
@@ -27,7 +27,7 @@
\page studio-optimized-3d-scenes.html
\previouspage qtquick-optimizing-designs.html
\if defined(qtdesignstudio)
\nextpage creator-coding.html
\nextpage studio-implementing-applications.html
\else
\nextpage qtquick-iso-icon-browser.html
\endif
@@ -82,6 +82,8 @@
\li \l{Lights}
\li \l{Cameras}
\li \l{Scene Environment}
\li \l{Morph Target}
\li \l{Repeater3D}
\endlist
For more information about creating your own components, see
@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -33,7 +33,7 @@
\page creator-qml-performance-monitor.html
\if defined(qtdesignstudio)
\previouspage creator-qml-debugging-example.html
\nextpage creator-editor-external.html
\nextpage studio-advanced.html
\else
\previouspage creator-analyze-mode.html
\nextpage creator-valgrind-overview.html
@@ -32,7 +32,7 @@
/*!
\page creator-quick-ui-forms.html
\if defined(qtdesignstudio)
\previouspage qtquick-annotations.html
\previouspage studio-advanced.html
\nextpage creator-telemetry.html
\else
\previouspage qtquick-annotations.html
+1 -1
View File
@@ -32,7 +32,7 @@
/*!
\page creator-vcs-git.html
\if defined(qtdesignstudio)
\previouspage studio-packaging.html
\previouspage studio-developer-topics.html
\nextpage quick-converting-ui-projects.html
\else
\previouspage creator-vcs-cvs.html
@@ -5,14 +5,14 @@
</div>
<div class="indexboxcont indexboxbar">
<ul>
<li><a href="studio-getting-started.html">Getting Started</a></li>
<li><a href="studio-projects-managing.html">Managing Projects</a></li>
<li><a href="quick-uis.html">Creating UIs</a></li>
<li><a href="qtquick-adding-dynamics.html">Adding Dynamics</a></li>
<li><a href="studio-3d.html">Editing 3D Scenes</a></li>
<li><a href="creator-live-preview.html">Previewing</a></li>
<li><a href="studio-advanced.html">Advanced Topics</a></li>
<li><a href="studio-help.html">Help</a></li>
<li><a href="qtdesignstudio-toc.html">All Topics</a></li>
<li><a href="studio-getting-started.html">Getting Started</a></li>
<li><a href="quick-uis.html">Wireframing</a></li>
<li><a href="qtquick-prototyping.html">Prototyping</a></li>
<li><a href="qtquick-motion-design.html">Motion Design</a></li>
<li><a href="studio-implementing-applications.html">Implementing Applications</a></li>
<li><a href="studio-advanced.html">Advanced Designer Topics</a></li>
<li><a href="studio-developer-topics.html">Developer Topics</a></li>
<li><a href="studio-help.html">Help</a></li>
</ul>
</div>
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

@@ -24,58 +24,27 @@
****************************************************************************/
/*!
\previouspage qt-design-viewer.html
\previouspage creator-qml-performance-monitor.html
\page studio-advanced.html
\nextpage studio-platforms.html
\nextpage creator-quick-ui-forms.html
\title Advanced Topics
\title Advanced Designer Topics
\QDS attempts to meet your needs, whether you have previous experience with
QML and coding or not. When you install \QDS, the default configuration
allows you to start designing and previewing UIs with very little effort.
However, you might want to use the \l{Text Editor} view sometimes to edit
your component files (.qml) or write some JavaScript to simulate application
logic and bring your UI to life. If you use JavaScript, you might also want
to debug and profile you UIs to find and fix problems in them.
You can also use special options to start \QC from the command line and use
it mainly from the keyboard.
\table
\row
\li \image front-advanced.png
\li Learn more about the UI files (.ui.qml), collecting data about
using \QDS, and about packaging applications for delivering
them to users or uploading them to app stores.
\endtable
\list
\li \l{UI Files}
Some of the wizards create projects that contain UI files
(.ui.qml). You should always edit UI files in \l{Form Editor}
Some of the wizard templates create projects that contain UI files.
You should always edit UI files in \l{Form Editor}
and \l Properties, to avoid breaking the code.
\li \l{Coding}
You can use the code editor in the \uicontrol {Text Editor} view or
in the Edit mode to modify QML code. The code editor understands
the QML language as code, not just as plain text. This enables it
to provide you with useful features, such as semantic highlighting,
checking code syntax, code completion, and refactoring actions.
\li \l{Debugging and Profiling}
\QDS comes with a JavaScript debugger. In the Debug mode, you
can inspect the state of your UI while debugging.
The memory and CPU power available on devices are limited and
you should use them carefully. The QML Profiler enables you to
profile Qt Quick UIs.
\endlist
\section1 Related Topics
\list
\li \l{Using External Tools}
You can use external tools directly from \QC. lupdate and lrelease,
QML utilities, the default text editor for your system, and the
\c sort tool are preconfigured for use. You can change their default
configurations and configure new tools.
\li \l{Managing Data Collection}
\if defined (qtcreator)
@@ -90,5 +59,11 @@
and transmitted to the backend storage. You can also modify
settings for collecting user feedback.
\endif
\li \l{Packaging Applications}
When you are ready to deliver your application to users or upload
it to app stores, you can use \QDS to create suitable packages that
contain all the necessary files, such as fonts, images, components,
and modules.
\endlist
*/
@@ -24,7 +24,7 @@
****************************************************************************/
/*!
\previouspage studio-simulink.html
\previouspage creator-editor-options-text.html
\page studio-debugging.html
\nextpage creator-debugging-qml.html
@@ -41,7 +41,7 @@
This section uses the \l{QML Advanced Tutorial}{Same Game} example
application to illustrate how to debug Qt Quick applications in the
Debug mode.
\uicontrol Debug mode.
\li \l{Profiling QML Applications}
You can use the QML Profiler to find causes for typical performance
@@ -0,0 +1,61 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio documentation.
**
** 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 Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
**
****************************************************************************/
/*!
\previouspage studio-packaging.html
\page studio-developer-topics.html
\nextpage creator-vcs-git.html
\title Developer Topics
\table
\row
\li \image front-projects.png
\li Learn more about using the Git version control system,
converting UI projects into applications, and using
external tools directly from \QDS.
\endtable
\list
\li \l{Using Git}
You can add the project files to the Git version control, so that
the developers can keep up with your changes. Store and edit only
project source files and configuration files. Do not store
generated files.
\li \l{Converting UI Projects to Applications}
\QDS projects are useful for creating UIs. To use them for
application development in \QC, you have to convert
them to Qt Quick Application projects that contain .pro,
.cpp, and .qrc files.
\li \l{Using External Tools}
You can use external tools directly from \QDS. Qt Linguist,
QML utilities, the default text editor for your system, and the
\c sort tool are preconfigured for use. You can change their default
configurations and configure new tools.
\endlist
*/
@@ -26,7 +26,7 @@
/*!
\previouspage creator-help.html
\page studio-faq.html
\nextpage studio-terms.html
\nextpage studio-platforms.html
\title Frequently Asked Questions
@@ -25,11 +25,18 @@
/*!
\page studio-help.html
\previouspage creator-telemetry.html
\nextpage {Examples and Tutorials}
\previouspage creator-editor-external.html
\nextpage creator-help.html
\title Help
\table
\row
\li \image front-help.png
\li Learn more about using the \uicontrol Help mode, frequently
asked questions, and supported platforms.
\endtable
\list
\li \l{Using the Help Mode}
@@ -38,15 +45,12 @@
and index functions to find particular topics in the helps, or
request context-sensitive help by pressing \key F1 in the Design
mode.
\li \l{Frequently Asked Questions}
Contains answers to some frequently asked questions about \QDS.
\li \l{Supported Platforms}
You can install and run \QC on several operating systems to design
You can install and run \QDS on several operating systems to design
UIs for multiple desktop, embedded, and mobile device platforms.
\endlist
*/
@@ -0,0 +1,65 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio documentation.
**
** 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 Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
**
****************************************************************************/
/*!
\previouspage studio-optimized-3d-scenes.html
\page studio-implementing-applications.html
\nextpage creator-coding.html
\title Implementing Applications
\table
\row
\li \image front-preview.png
\li \QDS attempts to meet your needs, whether you have previous
experience with QML and coding or not. When you install \QDS,
the default configuration allows you to start wireframing,
prototyping, and validating UIs with very little effort.
However, you might want to use the \l{Text Editor} view
sometimes to edit your component files (.qml). If you use
JavaScript, you might also want to debug and profile you
UIs to find and fix problems in them.
\endtable
\list
\li \l{Coding}
You can use the code editor in the \uicontrol {Text Editor} view or
in the \uicontrol Edit mode to modify QML code. The code editor
understands the QML language as code, not just as plain text. This
enables it to provide you with useful features, such as semantic
highlighting, checking code syntax, code completion, and refactoring
actions.
\li \l{Debugging and Profiling}
\QDS comes with a JavaScript debugger. In the \uicontrol Debug mode,
you can inspect the state of your UI while debugging.
The memory and CPU power available on devices are limited and
you should use them carefully. The QML Profiler enables you to
profile Qt Quick UIs.
\endlist
*/
@@ -26,7 +26,7 @@
/*!
\page studio-packaging.html
\previouspage creator-crashpad.html
\nextpage creator-vcs-git.html
\nextpage studio-developer-topics.html
\title Packaging Applications
@@ -24,9 +24,9 @@
****************************************************************************/
/*!
\previouspage studio-advanced.html
\previouspage studio-faq.html
\page studio-platforms.html
\nextpage creator-keyboard-shortcuts.html
\nextpage technical-support.html
\title Supported Platforms
+39 -31
View File
@@ -101,6 +101,8 @@
\li \l{Lights}
\li \l{Cameras}
\li \l{Scene Environment}
\li \l{Morph Target}
\li \l{Repeater3D}
\endlist
\li \l {Creating Component Instances}
\li \l {Creating Custom Components}
@@ -142,25 +144,24 @@
\li \l {Asset Creation with Other Tools}
\list
\li \l{Exporting from Design Tools}
\li \l{Exporting 2D Assets} (NEW)
\list
\li \l{Exporting Designs from Adobe Illustrator}
\li \l{Exporting Designs from Adobe Photoshop}
\list
\li \l{Setting Up Qt Bridge for Adobe Photoshop}
\li \l{Using Qt Bridge for Adobe Photoshop}
\endlist
\li \l{Exporting Designs from Sketch}
\list
\li \l{Setting Up Qt Bridge for Sketch}
\li \l{Using Qt Bridge for Sketch}
\endlist
\li \l{Exporting Designs from Figma}
\list
\li \l{Setting Up Qt Bridge for Figma}
\li \l{Using Qt Bridge for Figma}
\endlist
\endlist
\list
\li \l{Exporting Designs from Adobe Illustrator}
\li \l{Exporting Designs from Adobe Photoshop}
\list
\li \l{Setting Up Qt Bridge for Adobe Photoshop}
\li \l{Using Qt Bridge for Adobe Photoshop}
\endlist
\li \l{Exporting Designs from Sketch}
\list
\li \l{Setting Up Qt Bridge for Sketch}
\li \l{Using Qt Bridge for Sketch}
\endlist
\li \l{Exporting Designs from Figma}
\list
\li \l{Setting Up Qt Bridge for Figma}
\li \l{Using Qt Bridge for Figma}
\endlist
\endlist
\li \l {Exporting 3D Assets}
\list
\li \l{Exporting from Blender}
@@ -189,10 +190,12 @@
\li \l{Creating Optimized 3D Scenes}
\endlist
\endlist
\li \l{Implementing Applications} (NEW)
\li \l{Implementing Applications}
\list
\li Using Flows in Production (NEW)
\li \l{Coding}{Cross-Platform Development} (NEW)
\omit
\li Using Flows in Production
\endomit
\li \l{Coding}{Cross-Platform Development}
\list
\li \l{Writing Code}
\list
@@ -225,18 +228,23 @@
\list
\li \l{Debugging Qt Quick Projects}
\li \l{Debugging a Qt Quick Example Application}
\li \l{Profiling QML Applications}
\endlist
\li \l{Designer-Developer Workflow} (NEW)
\omit
\li \l{Designer-Developer Workflow}
\list
\li \l{Reusable Prototypes and Full UI Implementation} (NEW)
\li \l{Optimizing Specification and Implementation} (NEW)
\li \l{Parallel Development} (NEW)
\li \l{One Toolchain} (NEW)
\li \l{Reusable Prototypes and Full UI Implementation}
\li \l{Optimizing Specification and Implementation}
\li \l{Parallel Development}
\li \l{One Toolchain}
\endlist
\endomit
\endlist
\li \l{Advanced Topics}{Advanced Designer Topics} (NEW)
\li \l{Advanced Designer Topics}
\list
\li Extending Component Functionality (NEW)
\omit
\li Extending Component Functionality
\endomit
\li \l{UI Files}
\li \l{Managing Data Collection}
\list
@@ -244,9 +252,9 @@
\li \l {Collecting User Feedback}
\li \l {Reporting Crashes}
\endlist
\li {Packaging Applications}
\li \l {Packaging Applications}
\endlist
\li \l{Developer Topics} (NEW)
\li \l{Developer Topics}
\list
\li \l{Using Git}
\li \l{Converting UI Projects to Applications}
+6 -9
View File
@@ -85,22 +85,19 @@
\li \inlineimage front-projects.png
\li \inlineimage front-help.png
\row
\li \b {\l{Implementing Applications}} (NEW)
\li \b {\l{Implementing Applications}}
\list
\li Using Flows in Production (NEW)
\li \l{Coding}{Cross-Platform Development} (NEW)
\li \l{Coding}{Cross-Platform Development}
\li \l{Debugging and Profiling}
\li \l{Designer-Developer Workflow} (NEW)
\endlist
\li \b {\l{Advanced Topics}{Advanced Designer Topics}} (NEW)
\li \b {\l{Advanced Designer Topics}}
\list
\li Extending Component Functionality (NEW)
\li \l{UI Files}
\li \l {Managing Data Collection}
\endlist
\li \b {\l{Developer Topics}} (NEW)
\list
\li \l{Packaging Applications}
\endlist
\li \b {\l{Developer Topics}}
\list
\li \l{Using Git}
\li \l{Converting UI Projects to Applications}
\li \l{Using External Tools}
@@ -66,7 +66,8 @@
where missing trailing numbers indicate zeroes. The following attributes are
supported: position, scale, eulerRotation, quaternion, custom, and color.
For more information about instance tables, see the documentation for the
\l[Instancing]{FileInstancing} QML type.
\l{https://doc.qt.io/qt/qml-qtquick3d-fileinstancing.html}{FileInstancing}
QML type.
To use the \uicontrol Instancing component, drag-and-drop it from
\uicontrol Library to \uicontrol Scene in \uicontrol Navigator.
@@ -0,0 +1,78 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Design Studio.
**
** $QT_BEGIN_LICENSE:FDL$
** 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 Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\page studio-3d-morph-target.html
\previouspage studio-3d-scene-environment.html
\nextpage studio-3d-repeater-3d.html
\title Morph Target
The \uicontrol {Morph Target} component can be used to define morph targets
for vertex animation. Morph targets are the objects we bind to control
the morphing of a model. Usually, morphing is controlled by using
\l {Timeline}{timeline} animation or \l {Applying Animation}{property animation}.
The degree of morphing is controlled by defining the \uicontrol Weight
property of the \uicontrol {Morph Target} component.
The normal workflow is to use an external content creation tool to create
a mesh, which also contains morph targets, and import it to \QDS.
To add a morph target for a model in \QDS, drag-and-drop a
\uicontrol {Morph Target} component from \l Library > \uicontrol Components
> \uicontrol {Qt Quick 3D} > \uicontrol {Qt Quick 3D} to \uicontrol Scene in
\l Navigator. Then select the model in \uicontrol Navigator, and in
\l Properties > \uicontrol Model > \uicontrol {Morph Targets}, select the
name of the \uicontrol {Morph Target} component.
\section1 Morph Target Properties
To define attributes and weight for a \uicontrol {Morph Target}, select it
in \uicontrol Navigator and specify its properties in the
\uicontrol Properties view.
\image studio-3d-morph-target-properties.png "Morph Target Properties"
Use the \uicontrol Weight property to specify the weight of the
\uicontrol {Morph Target}. The value of \uicontrol Weight functions as the
multiplication factor used by the linear interpolation.
If the value is set to 1, the target is fully applied.
If the \uicontrol Weight property value is set to 0, it has no influence.
Use the \uicontrol Attributes property to specify a set of attributes for the
selected \uicontrol {Morph Target}. In order to animate vertex attributes
in morphing, the mesh must contain those target attributes and the
\uicontrol {Morph Target} must have the attributes enabled.
Click the dropdown menu to select one of the following attributes:
\list
\li \uicontrol Position animates the vertex positions.
\li \uicontrol Normal animates the normal vectors.
\li \uicontrol Tangent animates the tangent vectors.
\li \uicontrol Binormal animates the binormal vectors.
\endlist
*/
@@ -0,0 +1,95 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Design Studio.
**
** $QT_BEGIN_LICENSE:FDL$
** 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 Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\page studio-3d-repeater-3d.html
\previouspage studio-3d-morph-target.html
\nextpage quick-component-instances.html
\title Repeater3D
\note The \uicontrol Repeater3D component is released as a tech preview
feature in \QDS 2.2, and its functionality will be improved in future
releases.
The \uicontrol Repeater3D component is used to create a large number of
similar items. Like other view types, \uicontrol Repeater3D needs a model
and a delegate. For each entry in the model, the delegate is instantiated in
a context seeded with data from the model.
The model can be any of the supported \l{Lists and Other Data Models}
{data models}. Additionally, like delegates for other views, a delegate for
the \uicontrol Repeater3D can access its index within the repeater, as well
as the model data relevant to the delegate.
Add a \uicontrol Repeater3D component to your scene by drag-and-dropping it
from \uicontrol Library > \uicontrol Components > \uicontrol {Qt Quick 3D} >
\uicontrol {Qt Quick 3D} to \uicontrol Scene in \uicontrol Navigator.
\note \uicontrol Repeater3D owns all items it instantiates. Removing or
dynamically destroying an item created by \uicontrol Repeater3D results in
unpredictable behavior.
\note \uicontrol Repeater3D can only repeat objects derived from
\uicontrol Nodes.
For more information, see \l{https://doc.qt.io/qt/qml-qtquick3d-repeater3d.html}
{Repeater3D} in the \uicontrol {Qt Quick 3D} documentation.
\section1 Repeater 3D Properties
To define a model providing data for the repeater, select it in \l Navigator,
and then in \uicontrol Properties > \uicontrol Repeater, specify the
\uicontrol Model property. Currently, you can only use the \uicontrol Model
property in the \uicontrol Properties view to set a numeric model or to bind
to QML based models. You can use the \l {Working in Edit Mode}{Edit} mode or
\l {Text Editor} to define any of the supported data models as the value of
the \uicontrol Model property:
\list
\li A number that indicates the number of delegates to be created by
the repeater.
\li A model, such as a \uicontrol ListModel component, or a
QAbstractItemModel subclass.
\li A string list.
\li An object list.
\endlist
The type of model affects the properties that are exposed to the delegate.
The \uicontrol Delegate property specifies a template defining each object
instantiated by the repeater. Currently, the \uicontrol Delegate property
needs to be defined in code using the \uicontrol Edit mode or
\uicontrol {Text Editor}. Delegates are exposed to a read-only index
property that indicates the index of the delegate within the repeater. For
more information, see \l{https://doc.qt.io/qt/qml-qtquick3d-repeater3d.html#delegate-prop}
{Delegate} in the \uicontrol {Qt Quick 3D} documentation.
If the model is a model object, such as a ListModel, the delegate can access
all model roles as named properties, in the same way that delegates do for
view classes like \uicontrol ListView.
*/
@@ -28,7 +28,7 @@
/*!
\page studio-3d-scene-environment.html
\previouspage studio-3d-camera.html
\nextpage quick-component-instances.html
\nextpage studio-3d-morph-target.html
\title Scene Environment
-3
View File
@@ -73,9 +73,6 @@ def get_arguments():
parser.add_argument('--python-path',
help='Path to python libraries for use by cdbextension (Windows)')
parser.add_argument('--app-target', help='File name of the executable / app bundle',
default=('Qt Creator.app' if common.is_mac_platform()
else 'qtcreator'))
parser.add_argument('--python3', help='File path to python3 executable for generating translations',
default=default_python3())
@@ -149,6 +149,12 @@ ServerNodeInstance Qt5RenderNodeInstanceServer::findNodeInstanceForItem(QQuickIt
return ServerNodeInstance();
}
void Qt5RenderNodeInstanceServer::resizeCanvasToRootItem()
{
Qt5NodeInstanceServer::resizeCanvasToRootItem();
m_dirtyInstanceSet.insert(rootNodeInstance());
}
void Qt5RenderNodeInstanceServer::createScene(const CreateSceneCommand &command)
{
@@ -43,6 +43,7 @@ public:
protected:
void collectItemChangesAndSendChangeCommands() override;
ServerNodeInstance findNodeInstanceForItem(QQuickItem *item) const;
void resizeCanvasToRootItem() override;
private:
QSet<ServerNodeInstance> m_dirtyInstanceSet;
@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
@@ -27,7 +27,7 @@
Metadata {
id: metadataFile
defaultVersion: v18
defaultVersion: v19
VersionData {
id: v14
@@ -46,4 +46,10 @@ Metadata {
name: "QUL 1.8"
path: "qul-18.qml"
}
VersionData {
id: v19
name: "QUL 1.9"
path: "qul-19.qml"
}
}
+11 -6
View File
@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
@@ -80,11 +80,15 @@ VersionData {
}
QtQuick.Item {
bannedProperties: ["layer", "opacity", "gradient", "smooth", "antialiasing",
"border", "baselineOffset", "focus", "activeFocusOnTab",
bannedProperties: ["layer", "opacity", "smooth", "antialiasing",
"baselineOffset", "focus", "activeFocusOnTab",
"rotation", "scale", "transformOrigin"]
}
QtQuick.Rectangle {
bannedProperties: ["gradient", "border"]
}
QtQuick.Flickable {
bannedProperties: ["boundsBehavior", "boundsMovement", "flickDeceleration",
"flickableDirection", "leftMargin", "rightMargin", "bottomMargin", "topMargin",
@@ -113,7 +117,7 @@ VersionData {
allowChildren: false
allowedProperties: ["rotation", "scale", "transformOrigin"]
bannedProperties: ["elide", "lineHeight", "lineHeightMode", "wrapMode", "style",
"styleColor", "minimumPointSize", "minimumPixelSize", "styleColor",
"styleColor", "minimumPointSize", "minimumPixelSize",
"fontSizeMode", "renderType", "textFormat", "maximumLineCount"]
}
@@ -123,11 +127,12 @@ VersionData {
}
QtQuick.Column {
bannedProperties: ["layoutDirection"]
bannedProperties: ["bottomPadding", "leftPadding", "rightPadding", "topPadding"]
}
QtQuick.Row {
bannedProperties: ["layoutDirection"]
bannedProperties: ["bottomPadding", "leftPadding", "rightPadding", "topPadding",
"effectiveLayoutDirection", "layoutDirection"]
}
QtQuick.ListView {
+11 -6
View File
@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
@@ -82,11 +82,15 @@ VersionData {
}
QtQuick.Item {
bannedProperties: ["layer", "opacity", "gradient", "smooth", "antialiasing",
"border", "baselineOffset", "focus", "activeFocusOnTab",
bannedProperties: ["layer", "opacity", "smooth", "antialiasing",
"baselineOffset", "focus", "activeFocusOnTab",
"rotation", "scale", "transformOrigin"]
}
QtQuick.Rectangle {
bannedProperties: ["gradient", "border"]
}
QtQuick.Flickable {
bannedProperties: ["boundsBehavior", "boundsMovement", "flickDeceleration",
"flickableDirection", "leftMargin", "rightMargin", "bottomMargin", "topMargin",
@@ -115,7 +119,7 @@ VersionData {
allowChildren: false
allowedProperties: ["rotation", "scale", "transformOrigin"]
bannedProperties: ["elide", "lineHeight", "lineHeightMode", "wrapMode", "style",
"styleColor", "minimumPointSize", "minimumPixelSize", "styleColor",
"styleColor", "minimumPointSize", "minimumPixelSize",
"fontSizeMode", "renderType", "textFormat", "maximumLineCount"]
}
@@ -125,11 +129,12 @@ VersionData {
}
QtQuick.Column {
bannedProperties: ["layoutDirection"]
bannedProperties: ["bottomPadding", "leftPadding", "rightPadding", "topPadding"]
}
QtQuick.Row {
bannedProperties: ["layoutDirection"]
bannedProperties: ["bottomPadding", "leftPadding", "rightPadding", "topPadding",
"effectiveLayoutDirection", "layoutDirection"]
}
QtQuick.ListView {
+11 -6
View File
@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
@@ -83,11 +83,15 @@ VersionData {
}
QtQuick.Item {
bannedProperties: ["layer", "opacity", "gradient", "smooth", "antialiasing",
"border", "baselineOffset", "focus", "activeFocusOnTab",
bannedProperties: ["layer", "opacity", "smooth", "antialiasing",
"baselineOffset", "focus", "activeFocusOnTab",
"rotation", "scale", "transformOrigin"]
}
QtQuick.Rectangle {
bannedProperties: ["gradient", "border"]
}
QtQuick.Flickable {
bannedProperties: ["boundsBehavior", "boundsMovement", "flickDeceleration",
"flickableDirection", "leftMargin", "rightMargin", "bottomMargin", "topMargin",
@@ -116,7 +120,7 @@ VersionData {
allowChildren: false
allowedProperties: ["rotation", "scale", "transformOrigin"]
bannedProperties: ["elide", "lineHeight", "lineHeightMode", "wrapMode", "style",
"styleColor", "minimumPointSize", "minimumPixelSize", "styleColor",
"styleColor", "minimumPointSize", "minimumPixelSize",
"fontSizeMode", "renderType", "textFormat", "maximumLineCount"]
}
@@ -126,11 +130,12 @@ VersionData {
}
QtQuick.Column {
bannedProperties: ["layoutDirection"]
bannedProperties: ["bottomPadding", "leftPadding", "rightPadding", "topPadding"]
}
QtQuick.Row {
bannedProperties: ["layoutDirection"]
bannedProperties: ["bottomPadding", "leftPadding", "rightPadding", "topPadding",
"effectiveLayoutDirection", "layoutDirection"]
}
QtQuick.ListView {
@@ -0,0 +1,216 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
VersionData {
name: "QUL 1.9"
bannedItems: ["QtQuick.AnimatedImage",
"QtQuick.FocusScope",
"QtQuick.TextInput",
"QtQuick.TextEdit",
"QtQuick.Flow",
"QtQuick.Grid",
"QtQuick.GridView",
"QtQuick.PathView",
"QtQuick.Controls",
"QtQuick.Controls.BusyIndicator",
"QtQuick.Controls.ButtonGroup",
"QtQuick.Controls.CheckDelegate",
"QtQuick.Controls.Container",
"QtQuick.Controls.ComboBox",
"QtQuick.Controls.DelayButton",
"QtQuick.Controls.Frame",
"QtQuick.Controls.GroupBox",
"QtQuick.Controls.ItemDelegate",
"QtQuick.Controls.Label",
"QtQuick.Controls.Page",
"QtQuick.Controls.PageIndicator",
"QtQuick.Controls.Pane",
"QtQuick.Controls.RadioDelegate",
"QtQuick.Controls.RangeSlider",
"QtQuick.Controls.RoundButton",
"QtQuick.Controls.ScrollView",
"QtQuick.Controls.SpinBox",
"QtQuick.Controls.StackView",
"QtQuick.Controls.SwipeDelegate",
"QtQuick.Controls.SwitchDelegate",
"QtQuick.Controls.ToolBar",
"QtQuick.Controls.ToolButton",
"QtQuick.Controls.TabBar",
"QtQuick.Controls.TabButton",
"QtQuick.Controls.TextArea",
"QtQuick.Controls.TextField",
"QtQuick.Controls.ToolSeparator",
"QtQuick.Controls.Tumbler"]
allowedImports: ["QtQuick",
"QtQuick.Shapes",
"QtQuick.Controls",
"QtQuick.Timeline",
"QtQuickUltralite.Extras",
"QtQuickUltralite.Layers"]
bannedImports: ["FlowView"]
//ComplexProperty is not a type, it's just a way to handle bigger props
ComplexProperty {
prefix: "font"
bannedProperties: ["wordSpacing", "letterSpacing", "hintingPreference",
"kerning", "preferShaping", "capitalization",
"strikeout", "underline", "styleName"]
}
QtQuick.Item {
bannedProperties: ["layer", "opacity", "smooth", "antialiasing",
"baselineOffset", "focus", "activeFocusOnTab",
"rotation", "scale", "transformOrigin"]
}
QtQuick.Rectangle {
bannedProperties: ["gradient", "border"]
}
QtQuick.Flickable {
bannedProperties: ["boundsBehavior", "boundsMovement", "flickDeceleration",
"flickableDirection", "leftMargin", "rightMargin", "bottomMargin", "topMargin",
"originX", "originY", "pixelAligned", "pressDelay", "synchronousDrag"]
}
QtQuick.MouseArea {
bannedProperties: ["propagateComposedEvents", "preventStealing", "cursorShape",
"scrollGestureEnabled", "drag", "acceptedButtons", "hoverEnabled"]
}
QtQuick.Image {
allowChildren: false
allowedProperties: ["rotation", "scale", "transformOrigin"]
bannedProperties: ["mirror", "mipmap", "cache", "autoTransform", "asynchronous",
"sourceSize", "smooth"]
}
QtQuick.BorderImage {
bannedProperties: ["asynchronous", "cache", "currentFrame", "frameCount",
"horizontalTileMode", "mirror", "progress", "smooth", "sourceSize",
"status", "verticalTileMode"]
}
QtQuick.Text {
allowChildren: false
allowedProperties: ["rotation", "scale", "transformOrigin"]
bannedProperties: ["elide", "lineHeight", "lineHeightMode", "wrapMode", "style",
"styleColor", "minimumPointSize", "minimumPixelSize",
"fontSizeMode", "renderType", "textFormat", "maximumLineCount"]
}
//Padding is not an actual item, but rather set of properties in Text
Padding {
bannedProperties: ["bottomPadding", "topPadding", "leftPadding", "rightPadding"]
}
QtQuick.Column {
bannedProperties: ["bottomPadding", "leftPadding", "rightPadding", "topPadding"]
}
QtQuick.Row {
bannedProperties: ["bottomPadding", "leftPadding", "rightPadding", "topPadding",
"effectiveLayoutDirection", "layoutDirection"]
}
QtQuick.ListView {
bannedProperties: ["cacheBuffer", "highlightRangeMode", "highlightMoveDuration",
"highlightResizeDuration", "preferredHighlightBegin", "layoutDirection",
"preferredHighlightEnd", "highlightFollowsCurrentItem", "keyNavigationWraps",
"snapMode", "highlightMoveVelocity", "highlightResizeVelocity"]
}
QtQuick.Animation {
bannedProperties: ["paused"]
}
//Quick Controls2 Items and properties:
QtQuick.Controls.Control {
bannedProperties: ["focusPolicy", "hoverEnabled", "wheelEnabled"]
}
QtQuick.Controls.AbstractButton {
bannedProperties: ["display", "autoExclusive"]
}
QtQuick.Controls.ProgressBar {
bannedProperties: ["indeterminate"]
}
QtQuick.Controls.Slider {
bannedProperties: ["live", "snapMode", "touchDragThreshold"]
}
//Path and Shapes related:
QtQuick.Path {
bannedProperties: ["scale", "pathElements"]
}
QtQuick.PathArc {
bannedProperties: ["relativeX", "relativeY"]
}
QtQuick.PathLine {
bannedProperties: ["relativeX", "relativeY"]
}
QtQuick.PathMove {
bannedProperties: ["relativeX", "relativeY"]
}
QtQuick.PathQuad {
bannedProperties: ["relativeX", "relativeY",
"relativeControlX", "relativeControlY"]
}
QtQuick.PathCubic {
bannedProperties: ["relativeX", "relativeY",
"relativeControl1X", "relativeControl1Y",
"relativeControl2X", "relativeControl2Y"]
}
QtQuick.PathElement {
//nothing
}
QtQuick.PathSvg {
//nothing
}
QtQuick.Shapes.Shape {
bannedProperties: ["asynchronous", "containsMode", "data",
"renderType", "status", "vendorExtensionsEnabled"]
}
QtQuick.Shapes.ShapePath {
bannedProperties: ["dashOffset", "dashPattern",
"fillGradient", "strokeStyle"]
}
}
@@ -38,11 +38,9 @@ CONFIG -= app_bundle
CONFIG += thread
CONFIG -= qt
HEADERS += \\
%{TestCaseFileWithHeaderSuffix}
SOURCES += \\
%{MainCppName}
%{MainCppName} \
%{TestCaseFileGTestWithCppSuffix}
@endif
@if "%{TestFrameWork}" == "BoostTest"
TEMPLATE = app
@@ -60,7 +60,7 @@ CppApplication {
files: [
"%{MainCppName}",
"%{TestCaseFileWithHeaderSuffix}",
"%{TestCaseFileGTestWithCppSuffix}",
].concat(googleCommon.getGTestAll(qbs, googletestDir))
.concat(googleCommon.getGMockAll(qbs, googletestDir))
@endif
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.5)
project(%{TestCaseName} LANGUAGES CXX)
enable_testing()
@if "%{TestFrameWork}" == "QtTest"
@if "%{RequireGUI}" == "true"
find_package(QT NAMES Qt6 Qt5 COMPONENTS Gui Test REQUIRED)
@@ -19,7 +21,6 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
enable_testing()
add_executable(%{TestCaseName} %{TestCaseFileWithCppSuffix})
add_test(NAME %{TestCaseName} COMMAND %{TestCaseName})
@@ -43,7 +44,6 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
enable_testing()
# no need to copy around qml test files for shadow builds - just set the respective define
add_definitions(-DQUICK_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
@@ -57,6 +57,8 @@ target_link_libraries(%{TestCaseName} PRIVATE Qt${QT_VERSION_MAJOR}::QuickTest)
@if "%{TestFrameWork}" == "GTest"
@if "%{GTestCXX11}" == "true"
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(-DGTEST_LANGUAGE_CXX11)
@endif
@@ -92,7 +94,7 @@ endif ()
include_directories(${GTestIncludes})
add_executable(%{TestCaseName} %{MainCppName} %{TestCaseFileWithHeaderSuffix}
add_executable(%{TestCaseName} %{MainCppName} %{TestCaseFileGTestWithCppSuffix}
${GTestFiles})
add_test(NAME %{TestCaseName} COMMAND %{TestCaseName})
target_link_libraries(%{TestCaseName} PRIVATE Threads::Threads)
@@ -103,7 +105,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
enable_testing()
add_executable(%{TestCaseName} %{MainCppName})
add_test(NAME %{TestCaseName} COMMAND %{TestCaseName})
@@ -5,7 +5,6 @@ QUICK_TEST_MAIN(example)
@endif
@if "%{TestFrameWork}" == "GTest"
%{Cpp:LicenseTemplate}\
#include "%{TestCaseFileWithHeaderSuffix}"
#include <gtest/gtest.h>
@@ -1,10 +1,4 @@
%{Cpp:LicenseTemplate}\
@if '%{Cpp:PragmaOnce}'
#pragma once
@else
#ifndef %{GUARD}
#define %{GUARD}
@endif
#include <gtest/gtest.h>
#include <gmock/gmock-matchers.h>
@@ -17,6 +11,3 @@ TEST(%{TestSuiteName}, %{TestCaseName})
ASSERT_THAT(0, Eq(0));
}
@if ! '%{Cpp:PragmaOnce}'
#endif // %{GUARD}
@endif
@@ -33,8 +33,8 @@
"value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src') }"
},
{
"key": "TestCaseFileWithHeaderSuffix",
"value": "%{JS: 'tst_' + value('TestCaseName').toLowerCase() + '.' + Util.preferredSuffix('text/x-c++hdr') }"
"key": "TestCaseFileGTestWithCppSuffix",
"value": "%{JS: 'tst_' + value('TestCaseName').toLowerCase() + '.' + Util.preferredSuffix('text/x-c++src') }"
},
{
"key": "GUARD",
@@ -276,8 +276,8 @@
"openAsProject": true
},
{
"source": "files/tst_src.h",
"target": "%{TestCaseFileWithHeaderSuffix}",
"source": "files/tst_src_gt.cpp",
"target": "%{TestCaseFileGTestWithCppSuffix}",
"condition": "%{JS: value('TestFrameWork') == 'GTest'}",
"openInEditor": true
},
+6 -1
View File
@@ -1,5 +1,9 @@
configure_file(app_version.h.cmakein app_version.h ESCAPE_QUOTES)
if(NOT IS_ABSOLUTE "${IDE_ICON_PATH}")
set(IDE_ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${IDE_ICON_PATH}")
endif()
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/app_version.h
DESTINATION ${IDE_HEADER_INSTALL_PATH}/src/app
@@ -39,6 +43,7 @@ if (WIN32)
RC_VERSION=${RC_VERSION}
RC_VERSION_STRING=${RC_VERSION_STRING}
RC_COPYRIGHT=${RC_COPYRIGHT}
RC_ICON_PATH=${IDE_ICON_PATH}
)
target_sources(qtcreator PRIVATE qtcreator.rc)
@@ -57,7 +62,7 @@ if (APPLE)
COMMAND
xcrun actool --app-icon qtcreator --output-partial-info-plist "${CMAKE_CURRENT_BINARY_DIR}/qtcreator.Info.plist"
--platform macosx --minimum-deployment-target 10.7 --compile "${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/qtcreator.xcassets"
"${IDE_ICON_PATH}/qtcreator.xcassets"
> /dev/null
BYPRODUCTS qtcreator.Info.plist
VERBATIM
+2 -1
View File
@@ -30,7 +30,8 @@ win32 {
RC_APPLICATION_NAME=\"$$replace(APPLICATION_NAME, " ", "\\x20")\" \
RC_VERSION=$$replace(QTCREATOR_VERSION, "\\.", ","),0 \
RC_VERSION_STRING=\"$${QTCREATOR_DISPLAY_VERSION}\" \
RC_COPYRIGHT=\"$$replace(COPYRIGHT, " ", "\\x20")\"
RC_COPYRIGHT=\"$$replace(COPYRIGHT, " ", "\\x20")\" \
RC_ICON_PATH=.
RC_FILE = qtcreator.rc
} else:macx {
LIBS += -framework CoreFoundation
+2 -1
View File
@@ -70,7 +70,8 @@ QtcProduct {
cpp.defines: outer.concat(["RC_VERSION=" + qtc.qtcreator_version.replace(/\./g, ",") + ",0",
"RC_VERSION_STRING=" + qtc.qtcreator_display_version,
"RC_COPYRIGHT=2008-" + qtc.qtcreator_copyright_year
+ " The Qt Company Ltd".replace(/ /g, "\\x20")])
+ " The Qt Company Ltd".replace(/ /g, "\\x20"),
"RC_ICON_PATH=."])
files: "qtcreator.rc"
}
+3 -1
View File
@@ -3,7 +3,9 @@
#define STRINGIFY1(x) #x
#define STRINGIFY(x) STRINGIFY1(x)
IDI_ICON1 ICON DISCARDABLE "qtcreator.ico"
#define ICON_PATH STRINGIFY(RC_ICON_PATH/qtcreator.ico)
IDI_ICON1 ICON DISCARDABLE ICON_PATH
IDI_ICON2 ICON DISCARDABLE "winicons/c.ico"
IDI_ICON3 ICON DISCARDABLE "winicons/cpp.ico"
IDI_ICON4 ICON DISCARDABLE "winicons/h.ico"
+5 -3
View File
@@ -158,11 +158,13 @@ ObjectValue *Bind::bindObject(UiQualifiedId *qualifiedTypeNameId, UiObjectInitia
_rootObjectValue = objectValue;
_inlineComponents[_currentComponentName] = objectValue;
if (!_currentComponentName.isEmpty()) {
if (_currentComponentName.contains('.'))
if (_currentComponentName.contains('.')) {
parentComponentName = _currentComponentName.mid(0,_currentComponentName.lastIndexOf('.'));
else
nextRoot = _inlineComponents.value(parentComponentName);
} else {
parentComponentName = "";
nextRoot = _inlineComponents.value(parentComponentName);
nextRoot = _rootObjectValue;
}
// we add the inline component inside its parent
nextRoot->setMember(_currentComponentName.mid(_currentComponentName.lastIndexOf('.') + 1), objectValue);
_rootObjectValue->setClassName(_doc->componentName() + "." + _currentComponentName); // use :: instead of .?
+31 -13
View File
@@ -213,6 +213,29 @@ bool QmlJS::maybeModuleVersion(const QString &version) {
return version.isEmpty() || version == undefinedVersion || re.match(version).hasMatch();
}
const QStringList QmlJS::splitVersion(const QString &version)
{
// Successively removing minor and major version numbers.
QStringList result;
int versionEnd = version.length();
while (versionEnd > 0) {
result.append(version.left(versionEnd));
// remove numbers and then potential . at the end
const int oldVersionEnd = versionEnd;
while (versionEnd > 0 && version.at(versionEnd - 1).isDigit())
--versionEnd;
// handle e.g. -1, because an import "QtQuick 2" results in version "2.-1"
if (versionEnd > 0 && version.at(versionEnd - 1) == '-')
--versionEnd;
if (versionEnd > 0 && version.at(versionEnd - 1) == '.')
--versionEnd;
// bail out if we didn't proceed because version string contains invalid characters
if (versionEnd == oldVersionEnd)
break;
}
return result;
}
/*!
* \brief Get the path of a module
* \param name
@@ -242,24 +265,19 @@ QStringList QmlJS::modulePaths(const QString &name, const QString &version,
const QString sanitizedVersion = version == undefinedVersion ? QString() : version;
const QStringList parts = name.split('.', Qt::SkipEmptyParts);
auto mkpath = [] (const QStringList &xs) -> QString { return xs.join(QLatin1Char('/')); };
// Regular expression for building candidates by successively removing minor and major
// version numbers. It does not match the undefined version, so it has to be applied to the
// sanitized version.
const QRegularExpression re("\\.?\\d+$");
auto mkpath = [](const QStringList &xs) -> QString { return xs.join(QLatin1Char('/')); };
QStringList result;
QString candidate;
for (QString ver = sanitizedVersion; !ver.isEmpty(); ver.remove(re)) {
for (const QString &path: importPaths) {
for (const QString &versionPart : splitVersion(sanitizedVersion)) {
for (const QString &path : importPaths) {
for (int i = parts.count() - 1; i >= 0; --i) {
candidate = QDir::cleanPath(
QString::fromLatin1("%1/%2.%3/%4").arg(path,
mkpath(parts.mid(0, i + 1)),
ver,
mkpath(parts.mid(i + 1))));
candidate = QDir::cleanPath(QString::fromLatin1("%1/%2.%3/%4")
.arg(path,
mkpath(parts.mid(0, i + 1)),
versionPart,
mkpath(parts.mid(i + 1))));
if (QDir(candidate).exists())
result << candidate;
}
+1
View File
@@ -57,6 +57,7 @@ QMLJS_EXPORT DiagnosticMessage errorMessage(const SourceLocation &loc,
QMLJS_EXPORT bool maybeModuleVersion(const QString &version);
QMLJS_EXPORT const QStringList splitVersion(const QString &version);
QMLJS_EXPORT QStringList modulePaths(const QString &moduleImportName, const QString &version,
const QStringList &importPaths);
+2
View File
@@ -102,6 +102,8 @@ else() # < Qt 6.2
BATCHABLE
PREFIX
"/QtCreator/Tracing"
BASE
"qml"
FILES
qml/notes_qt6.vert
qml/notes_qt6.frag
+1 -1
View File
@@ -322,7 +322,7 @@ QWidget *AndroidBuildApkWidget::createAdvancedGroup()
auto vbox = new QVBoxLayout(group);
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(m_step->kit());
if (version && version->supportsMultipleQtAbis()) {
if (version && version->qtVersion() >= QtSupport::QtVersionNumber{5, 14}) {
auto buildAAB = new QCheckBox(tr("Build Android App Bundle (*.aab)"), group);
buildAAB->setChecked(m_step->buildAAB());
connect(buildAAB, &QAbstractButton::toggled, m_step, &AndroidBuildApkStep::setBuildAAB);
+1 -1
View File
@@ -134,7 +134,7 @@ bool AndroidDeployQtStep::init()
QTC_ASSERT(bc, return false);
auto androidBuildApkStep = bc->buildSteps()->firstOfType<AndroidBuildApkStep>();
int minTargetApi = AndroidManager::minimumSDK(target());
const int minTargetApi = AndroidManager::minimumSDK(target());
qCDebug(deployStepLog) << "Target architecture:" << m_androidABIs
<< "Min target API" << minTargetApi;
+9 -4
View File
@@ -141,7 +141,10 @@ int AndroidManager::minimumSDK(const Target *target)
QDomDocument doc;
if (!openXmlFile(doc, AndroidManager::manifestSourcePath(target)))
return minimumSDK(target->kit());
return parseMinSdk(doc.documentElement());
const int minSdkVersion = parseMinSdk(doc.documentElement());
if (minSdkVersion == 0)
return AndroidManager::defaultMinimumSDK(QtSupport::QtKitAspect::qtVersion(target->kit()));
return minSdkVersion;
}
/*!
@@ -150,17 +153,19 @@ int AndroidManager::minimumSDK(const Target *target)
*/
int AndroidManager::minimumSDK(const Kit *kit)
{
int minSDKVersion = -1;
int minSdkVersion = -1;
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(kit);
if (version && version->targetDeviceTypes().contains(Constants::ANDROID_DEVICE_TYPE)) {
FilePath stockManifestFilePath = FilePath::fromUserInput(
version->prefix().toString() + "/src/android/templates/AndroidManifest.xml");
QDomDocument doc;
if (openXmlFile(doc, stockManifestFilePath)) {
minSDKVersion = parseMinSdk(doc.documentElement());
minSdkVersion = parseMinSdk(doc.documentElement());
}
}
return minSDKVersion;
if (minSdkVersion == 0)
return AndroidManager::defaultMinimumSDK(version);
return minSdkVersion;
}
QString AndroidManager::buildTargetSDK(const Target *target)
+9 -1
View File
@@ -96,6 +96,7 @@ void TestTreeModel::setupParsingConnections()
synchronizeTestFrameworks(); // we might have project settings
m_parser->onStartupProjectChanged(project);
removeAllTestToolItems();
synchronizeTestTools();
m_checkStateCache = project ? AutotestPlugin::projectSettings(project)->checkStateCache()
: nullptr;
onBuildSystemTestsUpdated(); // we may have old results if project was open before switching
@@ -266,8 +267,14 @@ void TestTreeModel::onBuildSystemTestsUpdated()
m_checkStateCache->evolve(ITestBase::Tool);
ITestTool *testTool = TestFrameworkManager::testToolForBuildSystemId(bs->project()->id());
if (!testTool || !testTool->active())
if (!testTool)
return;
// FIXME
const TestProjectSettings *projectSettings = AutotestPlugin::projectSettings(bs->project());
if ((projectSettings->useGlobalSettings() && !testTool->active())
|| !projectSettings->activeTestTools().contains(testTool)) {
return;
}
ITestTreeItem *rootNode = testTool->rootNode();
QTC_ASSERT(rootNode, return);
@@ -281,6 +288,7 @@ void TestTreeModel::onBuildSystemTestsUpdated()
rootNode->appendChild(item);
}
revalidateCheckState(rootNode);
emit testTreeModelChanged();
}
const QList<TestTreeItem *> TestTreeModel::frameworkRootNodes() const
+10 -4
View File
@@ -739,7 +739,8 @@ public:
: q(q), settings(CppEditor::ClangdProjectSettings(project).settings()) {}
void findUsages(TextEditor::TextDocument *document, const QTextCursor &cursor,
const QString &searchTerm, const Utils::optional<QString> &replacement);
const QString &searchTerm, const Utils::optional<QString> &replacement,
bool categorize);
void handleFindUsagesResult(quint64 key, const QList<Location> &locations);
static void handleRenameRequest(const SearchResult *search,
const ReplacementData &replacementData,
@@ -988,7 +989,8 @@ void ClangdClient::findUsages(TextEditor::TextDocument *document, const QTextCur
const TextDocumentIdentifier docId(DocumentUri::fromFilePath(document->filePath()));
const TextDocumentPositionParams params(docId, Range(cursor).start());
SymbolInfoRequest symReq(params);
symReq.setResponseCallback([this, doc = QPointer(document), cursor, replacement]
const bool categorize = CppEditor::codeModelSettings()->categorizeFindReferences();
symReq.setResponseCallback([this, doc = QPointer(document), cursor, replacement, categorize]
(const SymbolInfoRequest::Response &response) {
if (!doc)
return;
@@ -1001,7 +1003,7 @@ void ClangdClient::findUsages(TextEditor::TextDocument *document, const QTextCur
const SymbolDetails &sd = list->first();
if (sd.name().isEmpty())
return;
d->findUsages(doc.data(), cursor, sd.name(), replacement);
d->findUsages(doc.data(), cursor, sd.name(), replacement, categorize);
});
sendContent(symReq);
}
@@ -1010,6 +1012,9 @@ void ClangdClient::handleDiagnostics(const PublishDiagnosticsParams &params)
{
const DocumentUri &uri = params.uri();
Client::handleDiagnostics(params);
const int docVersion = documentVersion(uri.toFilePath());
if (params.version().value_or(docVersion) != docVersion)
return;
for (const Diagnostic &diagnostic : params.diagnostics()) {
const ClangdDiagnostic clangdDiagnostic(diagnostic);
for (const CodeAction &action : clangdDiagnostic.codeActions().value_or(QList<CodeAction>{}))
@@ -1044,10 +1049,11 @@ CppEditor::ClangdSettings::Data ClangdClient::settingsData() const { return d->s
void ClangdClient::Private::findUsages(TextEditor::TextDocument *document,
const QTextCursor &cursor, const QString &searchTerm,
const Utils::optional<QString> &replacement)
const Utils::optional<QString> &replacement, bool categorize)
{
ReferencesData refData;
refData.key = nextJobId++;
refData.categorize = categorize;
if (replacement) {
ReplacementData replacementData;
replacementData.oldSymbolName = searchTerm;
@@ -225,7 +225,7 @@ QVersionNumber ClangToolsSettings::clangTidyVersion()
QVersionNumber ClangToolsSettings::clazyVersion()
{
return ClazyStandaloneInfo(Internal::clazyStandaloneExecutable()).version;
return ClazyStandaloneInfo::getInfo(Internal::clazyStandaloneExecutable()).version;
}
} // namespace Internal
+1 -1
View File
@@ -353,7 +353,7 @@ QString clazyDocUrl(const QString &check)
{
QVersionNumber version = ClangToolsSettings::clazyVersion();
if (!version.isNull())
version = QVersionNumber(version.majorVersion(), version.minorVersion(), 0);
version = QVersionNumber(version.majorVersion(), version.minorVersion());
const QString versionString = version.isNull() ? "master" : version.toString();
static const char urlTemplate[]
= "https://github.com/KDE/clazy/blob/%1/docs/checks/README-%2.md";
@@ -1140,7 +1140,7 @@ QString removeClangTidyCheck(const QString &checks, const QString &check)
QString removeClazyCheck(const QString &checks, const QString &check)
{
const ClazyStandaloneInfo clazyInfo(clazyStandaloneExecutable());
const ClazyStandaloneInfo clazyInfo = ClazyStandaloneInfo::getInfo(clazyStandaloneExecutable());
ClazyChecksTreeModel model(clazyInfo.supportedChecks);
model.enableChecks(checks.split(',', Qt::SkipEmptyParts));
const QModelIndex index = model.indexForName(check.mid(QString("clazy-").length()));
@@ -1190,7 +1190,8 @@ void disableChecks(const QList<Diagnostic> &diagnostics)
if (diag.name.startsWith("clazy-")) {
if (config.clazyMode() == ClangDiagnosticConfig::ClazyMode::UseDefaultChecks) {
config.setClazyMode(ClangDiagnosticConfig::ClazyMode::UseCustomChecks);
const ClazyStandaloneInfo clazyInfo(clazyStandaloneExecutable());
const ClazyStandaloneInfo clazyInfo
= ClazyStandaloneInfo::getInfo(clazyStandaloneExecutable());
config.setClazyChecks(clazyInfo.defaultChecks.join(','));
}
config.setClazyChecks(removeClazyCheck(config.clazyChecks(), diag.name));
+18
View File
@@ -163,6 +163,22 @@ ClangTidyInfo::ClangTidyInfo(const FilePath &executablePath)
, supportedChecks(queryClangTidyChecks(executablePath, "-checks=*"))
{}
ClazyStandaloneInfo ClazyStandaloneInfo::getInfo(const FilePath &executablePath)
{
const QDateTime timeStamp = executablePath.lastModified();
const auto it = cache.find(executablePath);
if (it == cache.end()) {
const ClazyStandaloneInfo info(executablePath);
cache.insert(executablePath, qMakePair(timeStamp, info));
return info;
}
if (it->first != timeStamp) {
it->first = timeStamp;
it->second = ClazyStandaloneInfo::getInfo(executablePath);
}
return it->second;
}
ClazyStandaloneInfo::ClazyStandaloneInfo(const FilePath &executablePath)
: defaultChecks(queryClangTidyChecks(executablePath, {})) // Yup, behaves as clang-tidy.
, supportedChecks(querySupportedClazyChecks(executablePath))
@@ -228,5 +244,7 @@ QPair<FilePath, QString> getClangIncludeDirAndVersion(const FilePath &clangToolP
return qMakePair(dynamicResourceDir + "/include", dynamicVersion);
}
QHash<Utils::FilePath, QPair<QDateTime, ClazyStandaloneInfo>> ClazyStandaloneInfo::cache;
} // namespace Internal
} // namespace ClangTools
+8 -1
View File
@@ -27,6 +27,8 @@
#include <utils/filepath.h>
#include <QDateTime>
#include <QHash>
#include <QPair>
#include <QStringList>
#include <QVector>
@@ -60,11 +62,16 @@ using ClazyChecks = QVector<ClazyCheck>;
class ClazyStandaloneInfo
{
public:
ClazyStandaloneInfo(const Utils::FilePath &executablePath);
static ClazyStandaloneInfo getInfo(const Utils::FilePath &executablePath);
QVersionNumber version;
QStringList defaultChecks;
ClazyChecks supportedChecks;
private:
ClazyStandaloneInfo(const Utils::FilePath &executablePath);
static QHash<Utils::FilePath, QPair<QDateTime, ClazyStandaloneInfo>> cache;
};
} // namespace Internal
+1 -1
View File
@@ -82,7 +82,7 @@ static CppEditor::ClangDiagnosticConfigsWidget *createEditWidget(
return new DiagnosticConfigsWidget(configs,
configToSelect,
ClangTidyInfo(clangTidyPath),
ClazyStandaloneInfo(clazyStandalonePath));
ClazyStandaloneInfo::getInfo(clazyStandalonePath));
}
void RunSettingsWidget::fromSettings(const RunSettings &s)
@@ -123,7 +123,14 @@ bool SymbolInformation::operator<(const SymbolInformation &other) const
return false;
}
int cmp = name().compare(other.name());
// The desired behavior here is to facilitate case insensitive
// sorting without generating false case sensitive equalities.
// Performance should be appropriate since in C++ there aren't
// many symbols that differ by case only.
int cmp = name().compare(other.name(), Qt::CaseInsensitive);
if (cmp == 0)
cmp = name().compare(other.name());
if (cmp < 0)
return true;
if (cmp > 0)
@@ -947,6 +947,9 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
auto sdkLocation = bs->data(Android::Constants::SdkLocation).value<FilePath>();
if (qt && qt->qtVersion() >= QtSupport::QtVersionNumber{6, 0, 0}) {
// Don't build apk under ALL target because Qt Creator will handle it
if (qt->qtVersion() >= QtSupport::QtVersionNumber{6, 1, 0})
initialArgs.append("-DQT_NO_GLOBAL_APK_TARGET_PART_OF_ALL:BOOL=ON");
initialArgs.append("-DQT_HOST_PATH:PATH=%{Qt:QT_HOST_PREFIX}");
initialArgs.append("-DANDROID_SDK_ROOT:PATH=" + sdkLocation.path());
} else {
@@ -955,33 +958,30 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
}
const IDevice::ConstPtr device = DeviceKitAspect::device(k);
if (device && device->osType() == Utils::OsTypeMac) {
if (isIos(k)) {
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
if (qt && qt->qtVersion().majorVersion >= 6) {
// TODO it would be better if we could set
// CMAKE_SYSTEM_NAME=iOS and CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=YES
// and build with "cmake --build . -- -arch <arch>" instead of setting the architecture
// and sysroot in the CMake configuration, but that currently doesn't work with Qt/CMake
// https://gitlab.kitware.com/cmake/cmake/-/issues/21276
const Id deviceType = DeviceTypeKitAspect::deviceTypeId(k);
// TODO the architectures are probably not correct with Apple Silicon in the mix...
const QString architecture = deviceType == Ios::Constants::IOS_DEVICE_TYPE
? QLatin1String("arm64")
: QLatin1String("x86_64");
const QString sysroot = deviceType == Ios::Constants::IOS_DEVICE_TYPE
? QLatin1String("iphoneos")
: QLatin1String("iphonesimulator");
initialArgs.append(CMAKE_QT6_TOOLCHAIN_FILE_ARG);
initialArgs.append("-DCMAKE_OSX_ARCHITECTURES:STRING=" + architecture);
initialArgs.append("-DCMAKE_OSX_SYSROOT:STRING=" + sysroot);
initialArgs.append("%{" + QLatin1String(DEVELOPMENT_TEAM_FLAG) + "}");
initialArgs.append("%{" + QLatin1String(PROVISIONING_PROFILE_FLAG) + "}");
}
} else {
// macOS
initialArgs.append("%{" + QLatin1String(CMAKE_OSX_ARCHITECTURES_FLAG) + "}");
if (isIos(k)) {
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
if (qt && qt->qtVersion().majorVersion >= 6) {
// TODO it would be better if we could set
// CMAKE_SYSTEM_NAME=iOS and CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=YES
// and build with "cmake --build . -- -arch <arch>" instead of setting the architecture
// and sysroot in the CMake configuration, but that currently doesn't work with Qt/CMake
// https://gitlab.kitware.com/cmake/cmake/-/issues/21276
const Id deviceType = DeviceTypeKitAspect::deviceTypeId(k);
// TODO the architectures are probably not correct with Apple Silicon in the mix...
const QString architecture = deviceType == Ios::Constants::IOS_DEVICE_TYPE
? QLatin1String("arm64")
: QLatin1String("x86_64");
const QString sysroot = deviceType == Ios::Constants::IOS_DEVICE_TYPE
? QLatin1String("iphoneos")
: QLatin1String("iphonesimulator");
initialArgs.append(CMAKE_QT6_TOOLCHAIN_FILE_ARG);
initialArgs.append("-DCMAKE_OSX_ARCHITECTURES:STRING=" + architecture);
initialArgs.append("-DCMAKE_OSX_SYSROOT:STRING=" + sysroot);
initialArgs.append("%{" + QLatin1String(DEVELOPMENT_TEAM_FLAG) + "}");
initialArgs.append("%{" + QLatin1String(PROVISIONING_PROFILE_FLAG) + "}");
}
} else if (device && device->osType() == Utils::OsTypeMac) {
initialArgs.append("%{" + QLatin1String(CMAKE_OSX_ARCHITECTURES_FLAG) + "}");
}
if (isWebAssembly(k) || isQnx(k)) {
@@ -1008,6 +1008,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
const auto qmlDebuggingAspect = addAspect<QtSupport::QmlDebuggingAspect>();
qmlDebuggingAspect->setKit(target->kit());
setIsMultiConfig(CMakeGeneratorKitAspect::isMultiConfigGenerator(target->kit()));
}
CMakeBuildConfiguration::~CMakeBuildConfiguration()
@@ -1332,14 +1333,16 @@ FilePath CMakeBuildConfiguration::sourceDirectory() const
QString CMakeBuildConfiguration::cmakeBuildType() const
{
if (!isMultiConfig()) {
auto configChanges = configurationChanges();
auto it = std::find_if(configChanges.begin(), configChanges.end(),
auto setBuildTypeFromConfig = [this](const CMakeConfig &config){
auto it = std::find_if(config.begin(), config.end(),
[](const CMakeConfigItem &item) { return item.key == "CMAKE_BUILD_TYPE";});
if (it != configChanges.end())
if (it != config.end())
const_cast<CMakeBuildConfiguration*>(this)
->setCMakeBuildType(QString::fromUtf8(it->value));
}
};
if (!isMultiConfig())
setBuildTypeFromConfig(configurationChanges());
QString cmakeBuildType = aspect<BuildTypeAspect>()->value();
@@ -1360,10 +1363,8 @@ QString CMakeBuildConfiguration::cmakeBuildType() const
config = CMakeConfig::fromArguments(initialCMakeArguments());
}
if (!config.isEmpty() && !isMultiConfig()) {
cmakeBuildType = config.stringValueOf("CMAKE_BUILD_TYPE");
const_cast<CMakeBuildConfiguration*>(this)->setCMakeBuildType(cmakeBuildType);
}
if (!config.isEmpty() && !isMultiConfig())
setBuildTypeFromConfig(config);
return cmakeBuildType;
}
+7 -2
View File
@@ -1,3 +1,8 @@
if (NOT IS_ABSOLUTE ${IDE_LOGO_PATH})
set(IDE_LOGO_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${IDE_LOGO_PATH}")
endif()
configure_file(core.qrc.cmakein core_cmake.qrc)
add_qtc_plugin(Core
DEPENDS Qt5::PrintSupport Qt5::Qml Qt5::Sql Qt5::Gui Qt5::GuiPrivate
PUBLIC_DEPENDS Aggregation ExtensionSystem Utils app_version
@@ -10,7 +15,7 @@ add_qtc_plugin(Core
actionmanager/commandsfile.cpp actionmanager/commandsfile.h
basefilewizard.cpp basefilewizard.h
basefilewizardfactory.cpp basefilewizardfactory.h
core.qrc
${CMAKE_CURRENT_BINARY_DIR}/core_cmake.qrc
core_global.h
coreconstants.h
coreicons.cpp coreicons.h
@@ -192,7 +197,7 @@ if ((NOT WIN32) AND (NOT APPLE))
# install logo
foreach(size 16 24 32 48 64 128 256 512)
install(
FILES images/logo/${size}/QtProject-qtcreator.png
FILES ${IDE_LOGO_PATH}/images/logo/${size}/QtProject-qtcreator.png
DESTINATION share/icons/hicolor/${size}x${size}/apps
)
endforeach()
+10
View File
@@ -0,0 +1,10 @@
<RCC>
<qresource prefix="/core">
<file alias="images/qtcreatorlogo-big.png">${IDE_LOGO_PATH}/images/logo/128/QtProject-qtcreator.png</file>
<file alias="images/qtcreatorlogo-big@2x.png">${IDE_LOGO_PATH}/images/logo/256/QtProject-qtcreator.png</file>
<file alias="images/settingscategory_core.png">${CMAKE_CURRENT_SOURCE_DIR}/images/settingscategory_core.png</file>
<file alias="images/settingscategory_core@2x.png">${CMAKE_CURRENT_SOURCE_DIR}/images/settingscategory_core@2x.png</file>
<file alias="images/settingscategory_design.png">${CMAKE_CURRENT_SOURCE_DIR}/images/settingscategory_design.png</file>
<file alias="images/settingscategory_design@2x.png">${CMAKE_CURRENT_SOURCE_DIR}/images/settingscategory_design@2x.png</file>
</qresource>
</RCC>
+1 -1
View File
@@ -49,7 +49,7 @@ public:
virtual QString currentFindString() const = 0;
virtual QString completedFindString() const = 0;
virtual void highlightAll(const QString &txt, FindFlags findFlags) {}
virtual void highlightAll(const QString &, FindFlags) {}
virtual Result findIncremental(const QString &txt, FindFlags findFlags) = 0;
virtual Result findStep(const QString &txt, FindFlags findFlags) = 0;
virtual void replace(const QString &before, const QString &after,
@@ -193,7 +193,7 @@ static QString defaultCommand()
static QString defaultArguments(Qt::CaseSensitivity sens = Qt::CaseInsensitive)
{
if (HostOsInfo::isMacHost())
return QString("\"kMDItemFSName = '*%{Query:Escaped}*'%1\"")
return QString("\"kMDItemFSName = '*%{Query:EscapedWithWildcards}*'%1\"")
.arg(sens == Qt::CaseInsensitive ? QString("c") : "");
if (HostOsInfo::isWindowsHost())
return QString("%1 -n 10000 %{Query:Escaped}")
@@ -206,6 +206,13 @@ const char kCommandKey[] = "command";
const char kArgumentsKey[] = "arguments";
const char kCaseSensitiveKey[] = "caseSensitive";
static QString escaped(const QString &query)
{
QString quoted = query;
quoted.replace('\\', "\\\\").replace('\'', "\\\'").replace('\"', "\\\"");
return quoted;
}
static MacroExpander *createMacroExpander(const QString &query)
{
MacroExpander *expander = new MacroExpander;
@@ -215,11 +222,14 @@ static MacroExpander *createMacroExpander(const QString &query)
expander->registerVariable("Query:Escaped",
SpotlightLocatorFilter::tr(
"Locator query string with quotes escaped with backslash."),
[query] { return escaped(query); });
expander->registerVariable("Query:EscapedWithWildcards",
SpotlightLocatorFilter::tr(
"Locator query string with quotes escaped with backslash and "
"spaces replaced with \"*\" wildcards."),
[query] {
QString quoted = query;
quoted.replace('\\', "\\\\")
.replace('\'', "\\\'")
.replace('\"', "\\\"");
QString quoted = escaped(query);
quoted.replace(' ', '*');
return quoted;
});
expander->registerVariable("Query:Regex",
+22 -11
View File
@@ -366,8 +366,11 @@ void GdbEngine::handleResponse(const QString &buff)
QString data = parser.readCString();
// On Windows, the contents seem to depend on the debugger
// version and/or OS version used.
if (data.startsWith("warning:"))
if (data.startsWith("warning:")) {
showMessage(data.mid(9), AppStuff); // Cut "warning: "
if (data.contains("is not compatible with target architecture"))
m_ignoreNextTrap = true;
}
m_pendingLogStreamOutput += data;
@@ -1270,11 +1273,12 @@ void GdbEngine::handleStop1(const GdbMi &data)
// The bandaid here has the problem that it breaks for 'next' over a
// statement that indirectly loads shared libraries
// 6.1.2010: Breaks interrupting inferiors, disabled:
// if (reason == "signal-received"
// && data.findChild("signal-name").data() == "SIGTRAP") {
// continueInferiorInternal();
// return;
// }
if (m_ignoreNextTrap && reason == "signal-received"
&& data["signal-name"].data() == "SIGTRAP") {
m_ignoreNextTrap = false;
continueInferiorInternal();
return;
}
// Jump over well-known frames.
static int stepCounter = 0;
@@ -4277,9 +4281,14 @@ void GdbEngine::debugLastCommand()
runCommand(m_lastDebuggableCommand);
}
bool GdbEngine::isLocalRunEngine() const
{
return !isCoreEngine() && !isLocalAttachEngine() && !isRemoteEngine();
}
bool GdbEngine::isPlainEngine() const
{
return !isCoreEngine() && !isLocalAttachEngine() && !isRemoteEngine() && !terminal();
return isLocalRunEngine() && !terminal();
}
bool GdbEngine::isCoreEngine() const
@@ -4300,7 +4309,7 @@ bool GdbEngine::isLocalAttachEngine() const
bool GdbEngine::isTermEngine() const
{
return !isCoreEngine() && !isLocalAttachEngine() && !isRemoteEngine() && terminal();
return isLocalRunEngine() && terminal();
}
bool GdbEngine::usesOutputCollector() const
@@ -4460,8 +4469,10 @@ void GdbEngine::setupInferior()
? QString("Going to attach to %1 (%2)").arg(attachedPID).arg(attachedMainThreadID)
: QString("Going to attach to %1").arg(attachedPID);
showMessage(msg, LogMisc);
handleInferiorPrepared();
const QString executable
= runParameters().inferior.command.executable().toFileInfo().absoluteFilePath();
runCommand({"-file-exec-and-symbols \"" + executable + '"',
CB(handleFileExecAndSymbols)});
} else if (isPlainEngine()) {
setEnvironmentVariables();
@@ -4710,7 +4721,7 @@ void GdbEngine::handleFileExecAndSymbols(const DebuggerResponse &response)
notifyInferiorSetupFailedHelper(msg);
}
} else if (isPlainEngine()) {
} else if (isLocalRunEngine()) {
if (response.resultClass == ResultDone) {
handleInferiorPrepared();
+2
View File
@@ -154,6 +154,7 @@ private: ////////// General Interface //////////
int m_nonDiscardableCount = 0;
bool m_rerunPending = false;
bool m_ignoreNextTrap = false;
////////// Gdb Output, State & Capability Handling //////////
@@ -381,6 +382,7 @@ private: ////////// General Interface //////////
void debugLastCommand() final;
DebuggerCommand m_lastDebuggableCommand;
bool isLocalRunEngine() const;
bool isPlainEngine() const;
bool isCoreEngine() const;
bool isRemoteEngine() const;
+1 -1
View File
@@ -1443,7 +1443,7 @@ void DockerDevice::runProcess(QtcProcess &process) const
}
if (process.processMode() == ProcessMode::Writer)
cmd.addArg("-i");
if (env.size() != 0 && hasLocalFileAccess()) {
if (env.size() != 0 && !hasLocalFileAccess()) {
process.unsetEnvironment();
// FIXME the below would be probably correct if the respective tools would use correct
// environment already, but most are using the host environment which usually makes
+2 -1
View File
@@ -721,6 +721,7 @@ void Client::documentContentsChanged(TextEditor::TextDocument *document,
m_openedDocument[document] = document->plainText();
}
++m_documentVersions[document->filePath()];
using namespace TextEditor;
for (BaseTextEditor *editor : BaseTextEditor::textEditorsForDocument(document)) {
TextEditorWidget *widget = editor->editorWidget();
@@ -1227,7 +1228,7 @@ void Client::sendPostponedDocumentUpdates()
const auto uri = DocumentUri::fromFilePath(filePath);
m_highlights[uri].clear();
VersionedTextDocumentIdentifier docId(uri);
docId.setVersion(++m_documentVersions[filePath]);
docId.setVersion(m_documentVersions[filePath]);
DidChangeTextDocumentParams params;
params.setTextDocument(docId);
params.setContentChanges(m_documentsToUpdate.take(document));
@@ -24,6 +24,7 @@
****************************************************************************/
#include "changestyleaction.h"
#include "designermcumanager.h"
#include <projectexplorer/project.h>
#include <projectexplorer/session.h>
@@ -142,6 +143,10 @@ QWidget *ChangeStyleWidgetAction::createWidget(QWidget *parent)
comboBox->setDisabled(true);
comboBox->setToolTip(tr(disbledTooltip));
comboBox->setCurrentIndex(0);
} else if (DesignerMcuManager::instance().isMCUProject()) {
comboBox->setDisabled(true);
//TODO: add tooltip regarding MCU limitations, however we are behind string freeze
comboBox->setEditText(style);
} else {
comboBox->setDisabled(false);
comboBox->setToolTip(tr(enabledTooltip));
@@ -92,7 +92,9 @@ static bool cleverColorCompare(const QVariant &value1, const QVariant &value2)
/* "red" is the same color as "#ff0000"
To simplify editing we convert all explicit color names in the hash format */
static void fixAmbigousColorNames(const QmlDesigner::ModelNode &modelNode, const QmlDesigner::PropertyName &name, QVariant *value)
static void fixAmbigousColorNames(const QmlDesigner::ModelNode &modelNode,
const QmlDesigner::PropertyName &name,
QVariant *value)
{
if (modelNode.isValid() && modelNode.metaInfo().isValid()
&& (modelNode.metaInfo().propertyTypeName(name) == "QColor"
@@ -104,7 +106,7 @@ static void fixAmbigousColorNames(const QmlDesigner::ModelNode &modelNode, const
color.setAlpha(alpha);
*value = color;
} else if (value->toString() != QStringLiteral("transparent")) {
*value = QColor(value->toString()).name();
*value = QColor(value->toString()).name(QColor::HexArgb);
}
}
}
+2
View File
@@ -106,6 +106,8 @@ else() # < Qt 6.2
BATCHABLE
PREFIX
"/QtCreator/QmlProfiler"
BASE
"qml"
FILES
qml/bindingloops_qt6.frag
qml/bindingloops_qt6.vert
+21 -11
View File
@@ -146,17 +146,27 @@ QmlProject::QmlProject(const Utils::FilePath &fileName)
QTimer::singleShot(0, this, lambda);
}
} else {
connect(this, &QmlProject::anyParsingFinished, this, [this](Target *target, bool success) {
if (target && success) {
const Utils::FilePath &folder = projectDirectory();
const Utils::FilePaths &uiFiles = files([&](const ProjectExplorer::Node *node) {
return node->filePath().completeSuffix() == "ui.qml"
&& node->filePath().parentDir() == folder;
});
if (!uiFiles.isEmpty())
Core::EditorManager::openEditor(uiFiles.first(), Utils::Id());
}
});
m_openFileConnection = connect(
this, &QmlProject::anyParsingFinished, this, [this](Target *target, bool success) {
if (m_openFileConnection)
disconnect(m_openFileConnection);
if (target && success) {
const Utils::FilePath &folder = projectDirectory();
const Utils::FilePaths &uiFiles = files([&](const ProjectExplorer::Node *node) {
return node->filePath().completeSuffix() == "ui.qml"
&& node->filePath().parentDir() == folder;
});
if (!uiFiles.isEmpty()) {
Utils::FilePath currentFile;
if (auto cd = Core::EditorManager::currentDocument())
currentFile = cd->filePath();
if (currentFile.isEmpty() || !isKnownFile(currentFile))
Core::EditorManager::openEditor(uiFiles.first(), Utils::Id());
}
}
});
}
}
+1 -1
View File
@@ -146,7 +146,7 @@ protected:
private:
ProjectExplorer::DeploymentKnowledge deploymentKnowledge() const override;
QMetaObject::Connection m_openFileConnection;
};
} // namespace QmlProjectManager
@@ -108,4 +108,15 @@ ListModel {
url: "https://download.qt.io/learning/examples/qtdesignstudio/effectdemo.zip"
showDownload: true
}
ListElement {
projectName: "cppdemoproject"
explicitQmlproject: "qml/qdsproject.qmlproject"
qmlFileName: "Screen01.ui.qml"
thumbnail: "images/cppdemo_thumbnail.png"
displayName: "C++ Demo Project"
url: "https://download.qt.io/learning/examples/qtdesignstudio/cppdemoproject.zip"
showDownload: true
}
}
@@ -96,19 +96,6 @@ Item {
}
onClicked: root.clicked()
Image {
id: downloadCloud
x: 210
y: 118
width: 60
height: 60
source: "images/downloadCloud.svg"
sourceSize.height: 60
sourceSize.width: 60
fillMode: Image.PreserveAspectFit
visible: false
}
}
}
@@ -206,6 +193,19 @@ Item {
font.pixelSize: 14
font.family: StudioFonts.titilliumWeb_regular
}
Image {
id: downloadCloud
x: 210
y: 118
width: 60
height: 60
source: "images/downloadCloud.svg"
sourceSize.height: 60
sourceSize.width: 60
fillMode: Image.PreserveAspectFit
visible: false
}
}
/*##^##
@@ -26,36 +26,6 @@
import QtQuick 2.0
ListModel {
ListElement {
displayName: "Learn to use Qt Design Studio (Part 1)"
thumbnail: "images/tutorial1.png"
url: "https://www.youtube.com/watch?v=aV6kFxH3Xws"
}
ListElement {
displayName: "Learn to use Qt Design Studio (Part 2)"
thumbnail: "images/tutorial2.png"
url: "https://www.youtube.com/watch?v=Z3uPoe-4UAw"
}
ListElement {
displayName: "Learn to use Qt Design Studio (Part 3)"
thumbnail: "images/tutorial3.png"
url: "https://www.youtube.com/watch?v=9AjvxoeqAKo"
}
ListElement {
displayName: "Learn to use Qt Design Studio (Part 4)"
thumbnail: "images/tutorial4.png"
url: "https://www.youtube.com/watch?v=8pJpdMwLaAg"
}
ListElement {
displayName: "Learn to use Qt Design Studio (Part 5)"
thumbnail: "images/tutorial5.png"
url: "https://www.youtube.com/watch?v=U91nAFReAoU"
}
ListElement {
displayName: "The Designer Tool Developers Love"
thumbnail: "images/webinar1.png"
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

@@ -61,7 +61,7 @@ Item {
ProjectsGrid {
model: ExamplesModel {}
onItemSelected: function(index, item) {
projectModel.openExample(item.projectName, item.qmlFileName, item.url)
projectModel.openExample(item.projectName, item.qmlFileName, item.url, item.explicitQmlproject)
}
}
}
@@ -187,7 +187,10 @@ public:
QDesktopServices::openUrl(QUrl("qthelp://org.qt-project.qtcreator/doc/index.html"));
}
Q_INVOKABLE void openExample(const QString &example, const QString &formFile, const QString &url)
Q_INVOKABLE void openExample(const QString &example,
const QString &formFile,
const QString &url,
const QString &explicitQmlproject)
{
if (!url.isEmpty()) {
ExampleCheckout *checkout = new ExampleCheckout;
@@ -195,12 +198,18 @@ public:
connect(checkout,
&ExampleCheckout::finishedSucessfully,
this,
[checkout, formFile, example]() {
const QString projectFile = checkout->extractionFolder() + "/" + example
+ "/" + example + ".qmlproject";
[checkout, formFile, example, explicitQmlproject]() {
const QString exampleFolder = checkout->extractionFolder() + "/" + example
+ "/";
QString projectFile = exampleFolder + example + ".qmlproject";
if (!explicitQmlproject.isEmpty())
projectFile = exampleFolder + explicitQmlproject;
ProjectExplorer::ProjectExplorerPlugin::openProjectWelcomePage(projectFile);
const QString qmlFile = checkout->extractionFolder() + "/" + example + "/"
const QString qmlFile = QFileInfo(projectFile).dir().absolutePath() + "/"
+ formFile;
Core::EditorManager::openEditor(qmlFile);
+2 -2
View File
@@ -109,7 +109,7 @@ QVersionNumber WebAssemblyEmSdk::version(const FilePath &sdkRoot)
return {};
const QString cacheKey = sdkRoot.toString();
if (!emSdkVersionCache()->contains(cacheKey)) {
Environment env;
Environment env = sdkRoot.deviceEnvironment();
WebAssemblyEmSdk::addToEnvironment(sdkRoot, env);
QLatin1String scriptFile{sdkRoot.osType() == OsType::OsTypeWindows ? "emcc.bat" : "emcc"};
FilePath script = sdkRoot.withNewPath(scriptFile).searchInDirectories(env.path());
@@ -189,7 +189,7 @@ EM_CACHE = C:/Users/user/dev/emsdk/upstream/emscripten\cache
EMSDK_NODE = C:\Users\user\dev\emsdk\node\12.18.1_64bit\bin\node.exe
EMSDK_PYTHON = C:\Users\user\dev\emsdk\python\3.7.4-pywin32_64bit\python.exe
JAVA_HOME = C:\Users\user\dev\emsdk\java\8.152_64bit
)" << int(OsTypeWindows) << 5 << "C:/Users/user/dev/emsdk" << "C:\\Users\\user\\dev\\emsdk\\.emscripten";
)" << int(OsTypeWindows) << 6 << "C:/Users/user/dev/emsdk" << "C:\\Users\\user\\dev\\emsdk\\.emscripten";
QTest::newRow("linux") << R"(
Adding directories to PATH:
+140 -116
View File
@@ -19,136 +19,160 @@ option(QT_CREATOR_SKIP_PACKAGE_MANAGER_SETUP "Skip Qt Creator's package manager
#
# conan
#
foreach(file conanfile.txt conanfile.py)
if (EXISTS "${CMAKE_SOURCE_DIR}/${file}")
set(conanfile_txt "${CMAKE_SOURCE_DIR}/${file}")
break()
endif()
endforeach()
if (conanfile_txt AND NOT QT_CREATOR_SKIP_CONAN_SETUP)
option(QT_CREATOR_SKIP_CONAN_SETUP "Skip Qt Creator's conan package manager auto-setup" OFF)
# Get conan from Qt SDK
set(qt_creator_ini "${CMAKE_CURRENT_LIST_DIR}/../QtProject/QtCreator.ini")
file(STRINGS ${qt_creator_ini} install_settings REGEX "^InstallSettings=.*$")
if (install_settings)
string(REPLACE "InstallSettings=" "" install_settings "${install_settings}")
set(qt_creator_ini "${install_settings}/QtProject/QtCreator.ini")
file(TO_CMAKE_PATH "${qt_creator_ini}" qt_creator_ini)
endif()
file(STRINGS ${qt_creator_ini} conan_executable REGEX "^ConanFilePath=.*$")
if (conan_executable)
string(REPLACE "ConanFilePath=" "" conan_executable "${conan_executable}")
file(TO_CMAKE_PATH "${conan_executable}" conan_executable)
get_filename_component(conan_path "${conan_executable}" DIRECTORY)
endif()
set(path_sepparator ":")
if (WIN32)
set(path_sepparator ";")
endif()
if (conan_path)
set(ENV{PATH} "${conan_path}${path_sepparator}$ENV{PATH}")
endif()
set(conanfile_timestamp_file "${CMAKE_BINARY_DIR}/conan-dependencies/conanfile.timestamp")
file(TIMESTAMP "${conanfile_txt}" conanfile_timestamp)
set(do_conan_installation ON)
if (EXISTS "${conanfile_timestamp_file}")
file(READ "${conanfile_timestamp_file}" old_conanfile_timestamp)
if ("${conanfile_timestamp}" STREQUAL "${old_conanfile_timestamp}")
set(do_conan_installation OFF)
macro(qtc_auto_setup_conan)
foreach(file conanfile.txt conanfile.py)
if (EXISTS "${CMAKE_SOURCE_DIR}/${file}")
set(conanfile_txt "${CMAKE_SOURCE_DIR}/${file}")
break()
endif()
endif()
endforeach()
if (do_conan_installation)
file(WRITE "${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake" "
set(CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\")
set(CMAKE_CXX_COMPILER \"${CMAKE_CXX_COMPILER}\")
")
if (CMAKE_TOOLCHAIN_FILE)
file(APPEND "${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake"
"include(\"${CMAKE_TOOLCHAIN_FILE}\")\n")
if (conanfile_txt AND NOT QT_CREATOR_SKIP_CONAN_SETUP)
option(QT_CREATOR_SKIP_CONAN_SETUP "Skip Qt Creator's conan package manager auto-setup" OFF)
# Get conan from Qt SDK
set(qt_creator_ini "${CMAKE_CURRENT_LIST_DIR}/../QtProject/QtCreator.ini")
file(STRINGS ${qt_creator_ini} install_settings REGEX "^InstallSettings=.*$")
if (install_settings)
string(REPLACE "InstallSettings=" "" install_settings "${install_settings}")
set(qt_creator_ini "${install_settings}/QtProject/QtCreator.ini")
file(TO_CMAKE_PATH "${qt_creator_ini}" qt_creator_ini)
endif()
file(WRITE "${CMAKE_BINARY_DIR}/conan-dependencies/CMakeLists.txt" "
cmake_minimum_required(VERSION 3.15)
project(conan-setup)
include(\"${CMAKE_CURRENT_LIST_DIR}/conan.cmake\")
conan_cmake_run(
CONANFILE \"${conanfile_txt}\"
INSTALL_FOLDER \"${CMAKE_BINARY_DIR}/conan-dependencies\"
GENERATORS cmake_paths json
BUILD missing
ENV CONAN_CMAKE_TOOLCHAIN_FILE=\"${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake\"
)")
execute_process(COMMAND ${CMAKE_COMMAND}
-S "${CMAKE_BINARY_DIR}/conan-dependencies/"
-B "${CMAKE_BINARY_DIR}/conan-dependencies/build"
-C "${CMAKE_BINARY_DIR}/qtcsettings.cmake"
-D "CMAKE_TOOLCHAIN_FILE=${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake"
-G ${CMAKE_GENERATOR}
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
RESULT_VARIABLE result
)
if (result EQUAL 0)
file(WRITE "${conanfile_timestamp_file}" "${conanfile_timestamp}")
file(STRINGS ${qt_creator_ini} conan_executable REGEX "^ConanFilePath=.*$")
if (conan_executable)
string(REPLACE "ConanFilePath=" "" conan_executable "${conan_executable}")
file(TO_CMAKE_PATH "${conan_executable}" conan_executable)
get_filename_component(conan_path "${conan_executable}" DIRECTORY)
endif()
endif()
include("${CMAKE_BINARY_DIR}/conan-dependencies/conan_paths.cmake")
endif()
unset(conanfile_txt)
set(path_sepparator ":")
if (WIN32)
set(path_sepparator ";")
endif()
if (conan_path)
set(ENV{PATH} "${conan_path}${path_sepparator}$ENV{PATH}")
endif()
find_program(conan_program conan)
if (NOT conan_program)
message(WARNING "Qt Creator: conan executable not found. "
"Package manager auto-setup will be skipped. "
"To disable this warning set QT_CREATOR_SKIP_CONAN_SETUP to ON.")
return()
endif()
set(conanfile_timestamp_file "${CMAKE_BINARY_DIR}/conan-dependencies/conanfile.timestamp")
file(TIMESTAMP "${conanfile_txt}" conanfile_timestamp)
set(do_conan_installation ON)
if (EXISTS "${conanfile_timestamp_file}")
file(READ "${conanfile_timestamp_file}" old_conanfile_timestamp)
if ("${conanfile_timestamp}" STREQUAL "${old_conanfile_timestamp}")
set(do_conan_installation OFF)
endif()
endif()
if (do_conan_installation)
message(STATUS "Qt Creator: conan package manager auto-setup. "
"Skip this step by setting QT_CREATOR_SKIP_CONAN_SETUP to ON.")
file(WRITE "${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake" "
set(CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\")
set(CMAKE_CXX_COMPILER \"${CMAKE_CXX_COMPILER}\")
")
if (CMAKE_TOOLCHAIN_FILE)
file(APPEND "${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake"
"include(\"${CMAKE_TOOLCHAIN_FILE}\")\n")
endif()
file(WRITE "${CMAKE_BINARY_DIR}/conan-dependencies/CMakeLists.txt" "
cmake_minimum_required(VERSION 3.15)
project(conan-setup)
include(\"${CMAKE_CURRENT_LIST_DIR}/conan.cmake\")
conan_cmake_run(
CONANFILE \"${conanfile_txt}\"
INSTALL_FOLDER \"${CMAKE_BINARY_DIR}/conan-dependencies\"
GENERATORS cmake_paths json
BUILD missing
ENV CONAN_CMAKE_TOOLCHAIN_FILE=\"${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake\"
)")
execute_process(COMMAND ${CMAKE_COMMAND}
-S "${CMAKE_BINARY_DIR}/conan-dependencies/"
-B "${CMAKE_BINARY_DIR}/conan-dependencies/build"
-C "${CMAKE_BINARY_DIR}/qtcsettings.cmake"
-D "CMAKE_TOOLCHAIN_FILE=${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake"
-G ${CMAKE_GENERATOR}
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
RESULT_VARIABLE result
)
if (result EQUAL 0)
file(WRITE "${conanfile_timestamp_file}" "${conanfile_timestamp}")
else()
message(WARNING "Qt Creator's conan package manager auto-setup failed. Consider setting "
"QT_CREATOR_SKIP_CONAN_SETUP to ON and reconfigure to skip this step.")
return()
endif()
endif()
include("${CMAKE_BINARY_DIR}/conan-dependencies/conan_paths.cmake")
endif()
unset(conanfile_txt)
endmacro()
qtc_auto_setup_conan()
#
# vcpkg
#
macro(qtc_auto_setup_vcpkg)
if (EXISTS "${CMAKE_SOURCE_DIR}/vcpkg.json" AND NOT QT_CREATOR_SKIP_VCPKG_SETUP)
option(QT_CREATOR_SKIP_VCPKG_SETUP "Skip Qt Creator's vcpkg package manager auto-setup" OFF)
if (EXISTS "${CMAKE_SOURCE_DIR}/vcpkg.json" AND NOT QT_CREATOR_SKIP_VCPKG_SETUP)
option(QT_CREATOR_SKIP_VCPKG_SETUP "Skip Qt Creator's vcpkg package manager auto-setup" OFF)
find_program(vcpkg_program vcpkg)
if (NOT vcpkg_program)
return()
endif()
get_filename_component(vpkg_root ${vcpkg_program} DIRECTORY)
if (NOT EXISTS "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake")
file(WRITE "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake" "
set(CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\")
set(CMAKE_CXX_COMPILER \"${CMAKE_CXX_COMPILER}\")
")
if (CMAKE_TOOLCHAIN_FILE AND NOT
CMAKE_TOOLCHAIN_FILE STREQUAL "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake")
file(APPEND "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake"
"include(\"${CMAKE_TOOLCHAIN_FILE}\")\n")
find_program(vcpkg_program vcpkg)
if (NOT vcpkg_program)
message(WARNING "Qt Creator: vcpkg executable not found. "
"Package manager auto-setup will be skipped. "
"To disable this warning set QT_CREATOR_SKIP_VCPKG_SETUP to ON.")
return()
endif()
get_filename_component(vpkg_root ${vcpkg_program} DIRECTORY)
if (VCPKG_TARGET_TRIPLET)
set(vcpkg_triplet ${VCPKG_TARGET_TRIPLET})
else()
if (WIN32)
set(vcpkg_triplet x64-mingw-static)
if (CMAKE_CXX_COMPILER MATCHES "cl.exe")
set(vcpkg_triplet x64-windows)
endif()
elseif(APPLE)
set(vcpkg_triplet x64-osx)
else()
set(vcpkg_triplet x64-linux)
if (NOT EXISTS "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake")
message(STATUS "Qt Creator: vcpkg package manager auto-setup. "
"Skip this step by setting QT_CREATOR_SKIP_VCPKG_SETUP to ON.")
file(WRITE "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake" "
set(CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\")
set(CMAKE_CXX_COMPILER \"${CMAKE_CXX_COMPILER}\")
")
if (CMAKE_TOOLCHAIN_FILE AND NOT
CMAKE_TOOLCHAIN_FILE STREQUAL "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake")
file(APPEND "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake"
"include(\"${CMAKE_TOOLCHAIN_FILE}\")\n")
endif()
if (VCPKG_TARGET_TRIPLET)
set(vcpkg_triplet ${VCPKG_TARGET_TRIPLET})
else()
if (WIN32)
set(vcpkg_triplet x64-mingw-static)
if (CMAKE_CXX_COMPILER MATCHES "cl.exe")
set(vcpkg_triplet x64-windows)
endif()
elseif(APPLE)
set(vcpkg_triplet x64-osx)
else()
set(vcpkg_triplet x64-linux)
endif()
endif()
file(APPEND "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake" "
set(VCPKG_TARGET_TRIPLET ${vcpkg_triplet})
include(\"${vpkg_root}/scripts/buildsystems/vcpkg.cmake\")
")
endif()
file(APPEND "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake" "
set(VCPKG_TARGET_TRIPLET ${vcpkg_triplet})
include(\"${vpkg_root}/scripts/buildsystems/vcpkg.cmake\")
")
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake" CACHE PATH "" FORCE)
endif()
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake" CACHE PATH "" FORCE)
endif()
endmacro()
qtc_auto_setup_vcpkg()
+2 -2
View File
@@ -177,9 +177,9 @@ bool AddValueOperation::appendListToMap(QVariantMap &map,
return false;
}
if (!data.canConvert<QVariantList>()) {
if (data.type() != QVariant::List) {
std::cerr << "Error: Data stored in " << std::quoted(key.toStdString())
<< " can not be converted into QVariantList." << std::endl;
<< " is not a QVariantList." << std::endl;
return false;
}
+1
View File
@@ -7,6 +7,7 @@ add_subdirectory(persistenttrie)
add_subdirectory(qmldesigner)
add_subdirectory(qmleditor)
add_subdirectory(qmljssimplereader)
add_subdirectory(qmljsutils)
add_subdirectory(qmlprojectmanager)
add_subdirectory(qrcparser)
add_subdirectory(reformatter)
+5
View File
@@ -0,0 +1,5 @@
add_qtc_test(tst_qmljstools
DEPENDS QmlJS
DEFINES
SOURCES tst_qmljsutils.cpp
)
@@ -0,0 +1,62 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#include <QtTest>
#include <QDebug>
#include <qmljs/qmljsutils.h>
class tst_QmlJSUtils: public QObject
{
Q_OBJECT
private slots:
void moduleVersionNumbers_data();
void moduleVersionNumbers();
};
void tst_QmlJSUtils::moduleVersionNumbers_data()
{
QTest::addColumn<QString>("version");
QTest::addColumn<QStringList>("result");
QTest::newRow("empty") << "" << QStringList();
QTest::newRow("full") << "2.15" << QStringList{"2.15", "2"};
QTest::newRow("single") << "2" << QStringList{"2"};
// result if "import QtQuick 2":
QTest::newRow("major") << "2.-1" << QStringList{"2.-1", "2"};
QTest::newRow("broken") << "2.+3" << QStringList{"2.+3", "2.+"};
}
void tst_QmlJSUtils::moduleVersionNumbers()
{
QFETCH(QString, version);
QFETCH(QStringList, result);
QCOMPARE(QmlJS::splitVersion(version), result);
}
QTEST_GUILESS_MAIN(tst_QmlJSUtils)
#include "tst_qmljsutils.moc"