diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index d57ece196a4..a72eb318ef1 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -330,6 +330,17 @@ jobs: message(FATAL_ERROR "Failed to install dependencies") endif() endif() + find_package(Python3 REQUIRED COMPONENTS Interpreter) + # hack to replace 32-bit python found by this script with 64-bit one + # required for linking qtcreatorcdbext + string(REPLACE "x86" "x64" Python3_EXECUTABLE "${Python3_EXECUTABLE}") + execute_process( + COMMAND ${Python3_EXECUTABLE} -m pip install --user beautifulsoup4 lxml + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Failed to install python dependencies") + endif() - name: Build shell: cmake -P {0} @@ -387,6 +398,9 @@ jobs: set(ELFUTILS_OPTION) endif() + find_package(Python3 REQUIRED COMPONENTS Interpreter) + string(REPLACE "x86" "x64" Python3_EXECUTABLE "${Python3_EXECUTABLE}") + execute_process( COMMAND python -u @@ -396,6 +410,7 @@ jobs: --build build --qt-path "${{ steps.qt.outputs.qt_dir }}" --llvm-path "${{ steps.libclang.outputs.libclang_dir }}" + --python3 "${Python3_EXECUTABLE}" --with-tests ${CDB_OPTION} ${ELFUTILS_OPTION} diff --git a/CMakeLists.txt b/CMakeLists.txt index 80ad5f44fd4..dc4b66829ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,7 @@ find_package(Qt5 COMPONENTS Designer DesignerComponents Help SerialPort Svg Tool find_package(Threads) find_package(Clang QUIET) +find_package(KF5SyntaxHighlighting QUIET) function (set_if_target var target) if (TARGET "${target}") diff --git a/README.md b/README.md index 88e3afa568f..86e9b1eb787 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ https://doc.qt.io/qtcreator/creator-overview.html The standalone binary packages support the following platforms: * Windows 7 or later -* (K)Ubuntu Linux 16.04 (64-bit) or later +* (K)Ubuntu Linux 18.04 (64-bit) or later * macOS 10.13 or later ## Contributing @@ -38,203 +38,112 @@ Prerequisites: * Qt 5.14.0 or later * Qt WebEngine module for QtWebEngine based help viewer * On Windows: - * ActiveState Active Perl * MinGW with GCC 7 or Visual Studio 2017 or later - * jom * Python 3.5 or later (optional, needed for the python enabled debug helper) + * Debugging Tools for Windows (optional, for MSVC debugging support with CDB) * On Mac OS X: latest Xcode * On Linux: GCC 7 or later -* LLVM/Clang 8.0.0 or later (optional, needed for the Clang Code Model, Clang Tools, ClangFormat, - Clang PCH Manager and Clang Refactoring plugins, see the section - "Get LLVM/Clang for the Clang Code Model". The LLVM C++ API provides no compatibility garantee, - so if later versions don't compile we don't support that version.) -* CMake (for manual builds of LLVM/Clang, and Qt Creator itself) -* Ninja (optional, recommended for building with CMake) -* Qbs 1.7.x (optional, sources also contain Qbs itself) +* LLVM/Clang 10 or later (optional, LLVM/Clang 11 is recommended. + See the section "Getting LLVM/Clang for the Clang Code Model". + The ClangFormat, ClangPchManager and ClangRefactoring use the LLVM C++ API. + Since the LLVM C++ API provides no compatibility guarantee, + if later versions don't compile we don't support that version.) +* CMake +* Ninja (recommended) The installed toolchains have to match the one Qt was compiled with. -You can build Qt Creator with +### Linux and macOS - # Optional, needed for the Clang Code Model if llvm-config is not in PATH: - export LLVM_INSTALL_DIR=/path/to/llvm (or "set" on Windows) - # Optional, disable Clang Refactoring - export QTC_DISABLE_CLANG_REFACTORING=1 - # Optional, needed to let the QbsProjectManager plugin use system Qbs: - export QBS_INSTALL_DIR=/path/to/qbs - # Optional, needed for the Python enabled dumper on Windows - set PYTHON_INSTALL_DIR=C:\path\to\python - # Optional, needed to use system KSyntaxHighlighting: - set KSYNTAXHIGHLIGHTING_LIB_DIR to folder holding the KSyntaxHighlighting library - # if automatic deducing of include folder fails set KSYNTAXHIGHLIGHTING_INCLUDE_DIR as well - # both variables can also be passed as qmake variables +These instructions assume that Ninja is installed and in the `PATH`, Qt Creator +sources are located at `/path/to/qtcreator_sources`, Qt is installed in +`/path/to/Qt`, and LLVM is installed in `/path/to/llvm`. - cd $SOURCE_DIRECTORY - qmake -r - make (or mingw32-make or nmake or jom, depending on your platform) +Note that if you install Qt via the online installer, the path to Qt must +include the version number and compiler ABI. The path to the online installer +content is not enough. -Installation ("make install") is not needed. It is however possible, using +See "Getting LLVM/Clang for the Clang Code Model" for instructions on how to +get LLVM. - make install INSTALL_ROOT=$INSTALL_DIRECTORY + mkdir qtcreator_build + cd qtcreator_build -## Compiling Qt and Qt Creator on Windows + cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/path/to/Qt;/path/to/llvm" /path/to/qtcreator_sources + cmake --build . -This section provides step by step instructions for compiling the latest -versions of Qt and Qt Creator on Windows. Alternatively, to avoid having to -compile Qt yourself, you can use one of the versions of Qt shipped with the Qt -SDK (release builds of Qt using MinGW and Visual C++ 2017 or later). -For detailed information on the supported compilers, see - . +### Windows - 1. Decide which compiler to use: MinGW or Microsoft Visual Studio. If you - plan to contribute to Qt Creator, you should compile your changes with - both compilers. +These instructions assume that Ninja is installed and in the `PATH`, Qt Creator +sources are located at `\path\to\qtcreator_sources`, Qt is installed in +`\path\to\Qt`, and LLVM is installed in `\path\to\llvm`. - 2. Install Git for Windows from . If you plan to - use the MinGW compiler suite, do not choose to put git in the - default path of Windows command prompts. For more information, see - step 9. +Note that if you install Qt via the online installer, the path to Qt must +include the version number and compiler ABI. The path to the online installer +content is not enough. - 3. Create a working directory under which to check out Qt and Qt Creator, - for example, `c:\work`. If you plan to use MinGW and Microsoft Visual - Studio simultaneously or mix different Qt versions, we recommend - creating a directory structure which reflects that. For example: - `C:\work\qt5.14.0-vs17, C:\work\qt5.14.0-mingw`. +See "Getting LLVM/Clang for the Clang Code Model" for instructions on how to +get LLVM. - 4. Download and install Perl from - and check that perl.exe is added to the path. Run `perl -v` to verify - that the version displayed is 5.10 or later. Note that git ships - an outdated version 5.8 which cannot be used for Qt. +Decide which compiler to use: MinGW or Microsoft Visual Studio. - 5. In the working directory, check out the respective branch of Qt from - (we recommend the highest released version). +MinGW is available via the Qt online installer, for other options see +. Run the commands below in a shell prompt that has +`\bin` in the `PATH`. - 6. Check out Qt Creator (master branch or latest version, see - ). - You should now have the directories qt and creator under your working - directory. +For Microsoft Visual C++ you can use the "Build Tools for Visual Studio". Also +install the "Debugging Tools for Windows" from the Windows SDK installer. We +strongly recommend using the 64-bit version and 64-bit compilers on 64-bit +systems. Open the `x64 Native Tools Command Prompt for VS ` from the +start menu items that were created for Visual Studio, and run the commands +below in it. - 7. Install a compiler: - - For a MinGW toolchain for Qt, see . + md qtcreator_build + cd qtcreator_build - - For Microsoft Visual C++, install the Windows SDK and the "Debugging - Tools for Windows" from the SDK image. We strongly recommend using the - 64-bit version and 64-bit compilers on 64-bit systems. + cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/path/to/Qt;/path/to/llvm" \path\to\qtcreator_sources + cmake --build . - For the Visual C++ compilers, it is recommended to use the tool 'jom'. - It is a replacement for nmake that utilizes all CPU cores and thus - speeds up compilation significantly. Download it from - - and add the executable to the path. +Qt Creator can be registered as a post-mortem debugger. This can be done in the +options page or by running the tool qtcdebugger with administrative privileges +passing the command line options -register/unregister, respectively. +Alternatively, the required registry entries - 8. For convenience, we recommend creating shell prompts with the correct - environment. This can be done by creating a .bat-file - (such as, `\qtvars.bat`) that contains the environment - variable settings. - A `.bat`-file for MinGW looks like: + HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug + HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug - set PATH=\[qtbase\]bin;\bin;\creator\bin;%PATH% - set QMAKESPEC=win32-g++ +can be modified using the registry editor regedt32 to contain - For the Visual C++ compilers, call the `.bat` file that sets up the - environment for the compiler (provided by the Windows SDK or the - compiler): + qtcreator_build\bin\qtcdebugger %ld %ld - CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 - set PATH=\[qtbase\]bin;\creator\bin;%PATH% - set QMAKESPEC=win32-msvc2013 - - You can create desktop links to the `.bat` files using the working - directory and specifying - - %SystemRoot%\system32\cmd.exe /E:ON /V:ON /k \qtvars.bat - - 9. When using MinGW, open the shell prompt and enter: - - sh.exe - - That should result in a `sh is not recognized as internal or external - command...` error. If a `sh.exe` is found, the compile process will fail. - You have to remove it from the path. - - 10. To make use of the Clang Code Model: - - * Install LLVM/Clang - see the section "Get LLVM/Clang for the Clang - Code Model". - * Set the environment variable LLVM_INSTALL_DIR to the LLVM/Clang - installation directory if llvm-config is not in PATH. - * Before you launch Qt Creator you may prepend the PATH with - the location of libclang.dll/.so that you want to be used. - See more info in the section "Prebuilt LLVM/Clang packages". - - 11. You are now ready to configure and build Qt and Qt Creator. - Please see for - recommended configure-options for Qt 5. - To use MinGW, open the the shell prompt and enter: - - cd - configure && mingw32-make -s - cd ..\creator - qmake && mingw32-make -s - - To use the Visual C++ compilers, enter: - - cd - configure && jom - cd ..\creator - qmake && jom - - 12. To launch Qt Creator, enter: - qtcreator - - 13. To test the Clang-based code model, verify that backend process - bin\clangbackend.exe - launches (displaying its usage). - - The library libclang.dll needs to be copied to the bin directory if - Clang cannot be found in the path. - - 14. When using Visual C++ with the "Debugging Tools for Windows" installed, - the extension library `qtcreatorcdbext.dll` to be loaded into the - Windows console debugger (`cdb.exe`) should have been built under - `lib\qtcreatorcdbext32` or `lib\qtcreatorcdbext64`. - When using a 32 bit-build of Qt Creator with the 64 bit version of the - "Debugging Tools for Windows" the library should also be built with - a 64 bit compiler (rebuild `src\libs\qtcreatorcdbext` using a 64 bit - compiler). - - If you are building 32 bit and running on a 64 bit - Windows, you can obtain the 64 bit versions of the extension library - and the binary `win64interrupt.exe`, which is required for - debugging from the repository - . - - 15. Qt Creator can be registered as a post-mortem debugger. This - can be done in the options page or by running the tool qtcdebugger - with administrative privileges passing the command line options - -register/unregister, respectively. Alternatively, - the required registry entries - - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug - HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug - - can be modified using the registry editor regedt32 to contain - - \qt-creator\bin\qtcdebugger %ld %ld - - When using a self-built version of Qt Creator as post-mortem debugger, it needs to be - able to find all dependent Qt-libraries and plugins when being launched by the - system. The easiest way to provide them for Qt 5 is to run the tool windeployqt: - - windeployqt -quick -qmldir share\qtcreator\welcomescreen -qmldir src\plugins\qmlprofiler bin\qtcreator.exe lib\qtcreator lib\qtcreator\plugins +When using a self-built version of Qt Creator as post-mortem debugger, it needs +to be able to find all dependent Qt-libraries and plugins when being launched +by the system. The easiest way to do this is to create a self-contained Qt +Creator by installing it and installing its dependencies. See "Options" below +for details. Note that unlike on Unix, you cannot overwrite executables that are running. -Thus, if you want to work on Qt Creator using Qt Creator, you need a -separate build of it. We recommend using a separate, release-built version -of Qt and Qt Creator to work on a debug-built version of Qt and Qt Creator -or using shadow builds. +Thus, if you want to work on Qt Creator using Qt Creator, you need a separate +installation of it. We recommend using a separate, release-built version of Qt +Creator to work on a debug-built version of Qt Creator. -## Get LLVM/Clang for the Clang Code Model +### Options + +If you do not have Ninja installed and in the `PATH`, remove `-G Ninja` from +the first `cmake` call. If you want to build in release mode, change the build +type to `-DCMAKE_BUILD_TYPE=Release`. You can also build with release +optimizations but debug information with `-DCMAKE_BUILD_TYPE=RelWithDebInfo`. + +Installation is not needed. It is however possible, using + + cmake --install . --prefix /path/to/qtcreator_install + +To create a self-contained Qt Creator installation, including all dependencies +like Qt and LLVM, additionally run + + cmake --install . --prefix /path/to/qtcreator_install --component Dependencies + +## Getting LLVM/Clang for the Clang Code Model The Clang Code Model depends on the LLVM/Clang libraries. The currently supported LLVM/Clang version is 8.0. @@ -266,7 +175,7 @@ http://llvm.org/docs/GettingStarted.html#git-mirror: 1. Clone LLVM/Clang and checkout a suitable branch - git clone -b release_100-based --recursive https://code.qt.io/clang/llvm-project.git + git clone -b release_110-based --recursive https://code.qt.io/clang/llvm-project.git 2. Build and install LLVM/Clang @@ -304,34 +213,6 @@ While the plugin builds without it, it will be disabled on start with an error m Note that the plugin is disabled by default. -### Building Qt Creator with CMake - -Qt Creator can also be built with CMake. The main Qt Creator dependencies, Qt and LLVM/Clang, both -offer CMake find packages, which reduce the steps of configuring Qt Creator to a minimum. - - Configure and build Qt Creator: - - mkdir build - cd build - - For Linux/macOS: - - cmake \ - -G Ninja \ - -D CMAKE_BUILD_TYPE=Release \ - -D CMAKE_PREFIX_PATH=~/Qt/5.14.2/gcc_64;~/llvm \ - ../qt-creator - cmake --build . - - For Windows: - - cmake ^ - -G Ninja ^ - -D CMAKE_BUILD_TYPE=Release ^ - -D CMAKE_PREFIX_PATH=c:\Qt\5.14.2\msvc2017_64;c:\llvm ^ - ..\qt-creator - cmake --build . - ## Third-party Components Qt Creator includes the following third-party components, diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index dbad94e64b8..36720bddaf6 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -300,7 +300,7 @@ endfunction(add_qtc_library) function(add_qtc_plugin target_name) cmake_parse_arguments(_arg - "EXPERIMENTAL;SKIP_DEBUG_CMAKE_FILE_CHECK;SKIP_INSTALL;INTERNAL_ONLY;SKIP_TRANSLATION;EXPORT" + "SKIP_DEBUG_CMAKE_FILE_CHECK;SKIP_INSTALL;INTERNAL_ONLY;SKIP_TRANSLATION;EXPORT" "VERSION;COMPAT_VERSION;PLUGIN_JSON_IN;PLUGIN_PATH;PLUGIN_NAME;OUTPUT_NAME;BUILD_DEFAULT" "CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PLUGIN_DEPENDS;PLUGIN_RECOMMENDS;PROPERTIES" ${ARGN} @@ -377,10 +377,7 @@ function(add_qtc_plugin target_name) " { \"Name\" : \"${i}\", \"Version\" : \"${_v}\" }" ) endforeach(i) - string(REPLACE "} {" "},\n {" - _arg_DEPENDENCY_STRING "${_arg_DEPENDENCY_STRING}" - ) - foreach(i IN LISTS ${_arg_RECOMMENDS}) + foreach(i IN LISTS _arg_PLUGIN_RECOMMENDS) if (i MATCHES "^QtCreator::") set(_v ${IDE_VERSION}) string(REPLACE "QtCreator::" "" i ${i}) @@ -391,10 +388,11 @@ function(add_qtc_plugin target_name) " { \"Name\" : \"${i}\", \"Version\" : \"${_v}\", \"Type\" : \"optional\" }" ) endforeach(i) + + string(REPLACE "} {" "},\n {" + _arg_DEPENDENCY_STRING "${_arg_DEPENDENCY_STRING}" + ) string(APPEND _arg_DEPENDENCY_STRING "\n ]") - if (_arg_EXPERIMENTAL) - string(APPEND _arg_DEPENDENCY_STRING ",\n \"Experimental\" : true") - endif() set(IDE_PLUGIN_DEPENDENCY_STRING ${_arg_DEPENDENCY_STRING}) diff --git a/dist/changes-4.14.0.md b/dist/changes-4.14.0.md index bc71160425e..7dd06282574 100644 --- a/dist/changes-4.14.0.md +++ b/dist/changes-4.14.0.md @@ -15,6 +15,7 @@ General * Added option for asking for confirmation before closing (QTCREATORBUG-7637) * Improved visibility of controls in dark themes (QTCREATORBUG-23505) +* Fixed lines disappearing in output panes (QTCREATORBUG-24556) Help ---- @@ -105,12 +106,14 @@ Projects * Added option to unselect multiple configuration variables simultaneously (QTCREATORBUG-22659) +* Improved kit detection when importing build (QTCREATORBUG-25069) * Fixed missing run of CMake when saving `CMakeLists.txt` files in subdirectories * Fixed that changing build directory to existing build ran CMake with initial arguments * Fixed that configuration changes were lost when done before triggering a first build (QTCREATORBUG-24936) +* Fixed `QML Debugging and Profiling` ### Meson @@ -185,9 +188,13 @@ Platforms * Fixed persistence of signing settings (QTCREATORBUG-24586) +### Remote Linux + +* Fixed password prompt missing with SSH (QTCREATORBUG-24979) + ### MCU -* Improved creation of kits (QTCREATORBUG-24354) +* Improved creation of kits (QTCREATORBUG-24354, QTCREATORBUG-25052, QTCREATORBUG-25053) Credits for these changes go to: -------------------------------- diff --git a/doc/config/macros.qdocconf b/doc/config/macros.qdocconf index 0d9e14ffa0a..22c0c182ccf 100644 --- a/doc/config/macros.qdocconf +++ b/doc/config/macros.qdocconf @@ -21,6 +21,7 @@ macro.QA = "Qt Assistant" macro.QB = "Qt Bridge" macro.QBPS = "Qt Bridge for Adobe Photoshop" macro.QBSK = "Qt Bridge for Sketch" +macro.QBF = "Qt Bridge for Figma" macro.QC = "$IDE_DISPLAY_NAME" macro.QCE = "$IDE_DISPLAY_NAME Enterprise" macro.QD = "Qt Designer" diff --git a/doc/qtcreator/images/qtcreator-mcu-options.png b/doc/qtcreator/images/qtcreator-mcu-options.png index 4dab2f9a2ab..a5c6a4a8f1e 100644 Binary files a/doc/qtcreator/images/qtcreator-mcu-options.png and b/doc/qtcreator/images/qtcreator-mcu-options.png differ diff --git a/doc/qtcreator/src/howto/creator-telemetry.qdoc b/doc/qtcreator/src/howto/creator-telemetry.qdoc index bfb26b0b478..761fdd65d10 100644 --- a/doc/qtcreator/src/howto/creator-telemetry.qdoc +++ b/doc/qtcreator/src/howto/creator-telemetry.qdoc @@ -49,7 +49,7 @@ {Enable Usage Statistics} in the splash screen that appears when you first launch \QDS. If the splash screen does not appear, you can enable the telemetry plugin by selecting \uicontrol Help > \uicontrol {About Plugins} > - \uicontrol Utilities > \uicontrol UsageStatistics. + \uicontrol Utilities > \uicontrol UsageStatistic. \image studio-usage-statistics.png "Enabling Usage Statistics" \endif diff --git a/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc b/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc index e5c80b861e9..ff5b2d8c37d 100644 --- a/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc +++ b/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc @@ -98,14 +98,16 @@ \list \li For STM32 targets: \list - \li The \uicontrol {GNU ARM Embedded Toolchain} path. + \li The \uicontrol {GNU ARM Embedded Toolchain} or + \uicontrol {IAR ARM Compiler} path. \li The \uicontrol {STM32CubeProgrammer} install path. \li The \uicontrol {MCU SDK} for the chosen target. \li The \uicontrol {FreeRTOS Sources} for the chosen target. \endlist \li For NXP targets: \list - \li The \uicontrol {GNU ARM Embedded Toolchain} path. + \li The \uicontrol {GNU ARM Embedded Toolchain} or + \uicontrol {IAR ARM Compiler} path. \li The \uicontrol {MCUXpresso IDE} install path. \li The \uicontrol {MCU SDK} for the chosen target. \li The \uicontrol {FreeRTOS Sources} for the chosen target. @@ -116,11 +118,16 @@ \li The \uicontrol {Renesas Graphics Library} path. \endlist \endlist - \li Select \uicontrol{Create Kit} to create a kit. If you have - an older kit for the selected target, remove it first using - \uicontrol{Remove Kit}. + \li Select the + \uicontrol {Automatically create kits for all available targets on start} + option to create kits automatically. + \note You could also use \uicontrol {Create Kit} or + \uicontrol{Remove Kit} to manually create or remove kits for the chosen + target. \li Select \uicontrol Apply to save the settings. \endlist + \note You must restart \QC if you chose to create kits automatically + for all the available targets. \section2 Adding MCU Devices @@ -148,9 +155,10 @@ \note This optional step is not necessary if you have already set up the MCU SDK as outlined in \l{Specifying MCU Settings}. - \QC automatically adds kits for building applications and running them - on the specified MCU boards when you select \uicontrol Apply in the - \uicontrol MCU tab after configuring the MCU tool chain. + \QC automatically adds kits for all the available targets, if + the + \uicontrol {Automatically create kits for all available targets on start} + option is enabled under the \uicontrol MCU settings tab. \image qtcreator-mcu-kit.png "MCU kits" diff --git a/doc/qtcreator/src/overview/creator-acknowledgements.qdoc b/doc/qtcreator/src/overview/creator-acknowledgements.qdoc index dcb9352fbc6..9d3c1ce74c2 100644 --- a/doc/qtcreator/src/overview/creator-acknowledgements.qdoc +++ b/doc/qtcreator/src/overview/creator-acknowledgements.qdoc @@ -31,11 +31,7 @@ /*! \page creator-acknowledgements.html - \if defined(qtdesignstudio) - \previouspage studio-terms.html - \else \previouspage technical-support.html - \endif \title Acknowledgements diff --git a/doc/qtcreator/src/overview/creator-only/creator-desktop-platforms.qdoc b/doc/qtcreator/src/overview/creator-only/creator-desktop-platforms.qdoc index 769b1b9d760..00ad408e575 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-desktop-platforms.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-desktop-platforms.qdoc @@ -43,7 +43,7 @@ \section1 Linux - (K)Ubuntu Linux 16.04 (64-bit) or later is supported. + (K)Ubuntu Linux 18.04 (64-bit) or later is supported. To build Qt applications using \QC on Linux, you usually need the following: diff --git a/doc/qtcreator/src/overview/creator-only/creator-tech-support.qdoc b/doc/qtcreator/src/overview/creator-tech-support.qdoc similarity index 84% rename from doc/qtcreator/src/overview/creator-only/creator-tech-support.qdoc rename to doc/qtcreator/src/overview/creator-tech-support.qdoc index 90c9c8959de..4e3ad72f850 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-tech-support.qdoc +++ b/doc/qtcreator/src/overview/creator-tech-support.qdoc @@ -30,8 +30,12 @@ // ********************************************************************** /*! - \previouspage creator-glossary.html \page technical-support.html + \if defined(qtdesignstudio) + \previouspage studio-terms.html + \else + \previouspage creator-glossary.html + \endif \nextpage creator-acknowledgements.html \title Technical Support @@ -46,11 +50,13 @@ \li Where to Go \row - \li View examples of what you can do with Qt - \li \l{https://doc.qt.io/qt/all-examples.html}{List of Qt Examples} + \li View examples of what you can do with Qt Quick + \li \l{Qt Quick Examples and Tutorials} - \l{https://doc.qt.io/qt/qtquick-codesamples.html} - {List of Qt Quick Examples} + \if defined(qtcreator) + \row + \li View examples of what you can do with Qt + \li \l{List of Qt Examples} \row \li Develop Qt applications for desktop and \l{glossary-device}{devices} @@ -60,15 +66,22 @@ \li Participate in Qt development \li \l{https://wiki.qt.io/Qt_Contribution_Guidelines} {Qt Contribution Guidelines} + \endif \row \li Find extensions for Qt, such as \QC plugins, development tools, and Qt modules \li \l{https://marketplace.qt.io/}{Qt Marketplace} + \if defined(qtcreator) \row \li Find free Qt-based applications \li \l{https://github.com/topics/qt}{Qt Apps on GitHub} + \else + \row + \li Find free QML and Qt Quick applications + \li \l{https://github.com/topics/qml}{QML Apps on GitHub} + \endif \row \li Develop with a commercial Qt license and support - diff --git a/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc b/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc index 2593803024b..41a9593ec67 100644 --- a/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc +++ b/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc @@ -50,10 +50,10 @@ \QC generates a QML file, \e main.qml, and opens it in \uicontrol {Text Editor}. The wizard template uses the \l Window type, which does not support adding states. Because we want to use states in - this example, we first replace the Window type with a \l Rectangle type. - We must also remove the line that sets the \c title property, which the - Rectangle type does not have. If you change the value of the - \uicontrol Type property in the \uicontrol Properties view, \QC offers + this example, we first replace the Window type with a \l {basic-rectangle} + {Rectangle} type. We must also remove the line that sets the \c title + property, which the Rectangle type does not have. If you change the value of + the \uicontrol Type property in the \uicontrol Properties view, \QC offers to automatically remove the \c title property. \section1 Creating the Main View diff --git a/doc/qtcreator/src/qtquick/library/qtquick-controls.qdoc b/doc/qtcreator/src/qtquick/library/qtquick-controls.qdoc index 2e61f1161a4..27a7fb08de3 100644 --- a/doc/qtcreator/src/qtquick/library/qtquick-controls.qdoc +++ b/doc/qtcreator/src/qtquick/library/qtquick-controls.qdoc @@ -70,11 +70,11 @@ A mouse area receives events within a defined area. One quick way to define this area is to \l{Setting Anchors and Margins}{anchor} the mouse area to - its parent's area. If the parent is a \l Rectangle (or any component that - is derived from an \l Item), the mouse area will fill the area defined by - the parent's dimensions. Alternatively, you can define an area smaller or - larger than the parent. Several controls,such as buttons, contain a mouse - area. + its parent's area. If the parent is a \l {basic-rectangle}{Rectangle} (or + any component that is derived from an \l {basic-item}{Item}), the mouse area + will fill the area defined by the parent's dimensions. Alternatively, you + can define an area smaller or larger than the parent. Several controls,such + as \l {Button}{buttons}, contain a mouse area. A mouse area emits \l{Connecting Objects to Signals}{signals} in response to different mouse events: @@ -478,6 +478,7 @@ \uicontrol Count field. Select the current page in the \uicontrol Current field. + \target progress-bar-control \section2 Progress Bar \image qtquickcontrols2-progressbar.gif "Progress bar" @@ -518,6 +519,7 @@ \image qtquick-designer-selector-types.png "Selector types" + \target slider-control \section2 Slider and Dial \image qtquickcontrols2-slider.gif "Slider" diff --git a/doc/qtcreator/src/qtquick/library/qtquick-images.qdoc b/doc/qtcreator/src/qtquick/library/qtquick-images.qdoc index 500763bc22c..2e0feaf638c 100644 --- a/doc/qtcreator/src/qtquick/library/qtquick-images.qdoc +++ b/doc/qtcreator/src/qtquick/library/qtquick-images.qdoc @@ -30,7 +30,7 @@ \title Images - The \l Image type is used for adding images to the UI in several supported + The Image type is used for adding images to the UI in several supported formats, including bitmap formats, such as PNG and JPEG, and vector graphics formats, such as SVG. You must add the images to your project in the \uicontrol Assets tab of \uicontrol Library to be able to use them in @@ -40,20 +40,20 @@ When you drag and drop an image file from the \uicontrol Assets tab of \uicontrol Library to \uicontrol Navigator or \uicontrol {Form Editor}, - \QC automatically creates a component of the \l Image type for you with + \QC automatically creates a component of the Image type for you with the path to the image file set as the value of the \uicontrol Source field in \uicontrol Properties. To load images from a URL using a supported URL scheme, specify the URL in the \uicontrol Source field. - You can use the \l [QML]{BorderImage}{Border Image} type to display - an image, such as a PNG file, as a border and a background. For more + You can use the \l {Border Image} type to display an image, + such as a PNG file, as a border and a background. For more information about using border images to create buttons, see \l {Creating Scalable Buttons and Borders}. If you need to display animated images, such as GIFs, use the - \l {AnimatedImage}{Animated Image} type. + \l {Animated Image} type. \section1 Image Size @@ -145,7 +145,7 @@ \section1 Border Image - The Border Image type extends the features of the \l Image type. It is used + The Border Image type extends the features of the Image type. It is used to create borders out of images by scaling or tiling parts of each image. A source image is broken into 9 regions that are scaled or tiled individually. The corner regions are not scaled at all, while the horizontal and vertical @@ -172,7 +172,7 @@ \section1 Animated Image - The Animated Image type extends the features of the \l Image type, providing + The Animated Image type extends the features of the Image type, providing a way to play animations stored as images containing a series of frames, such as those stored in GIF files. diff --git a/doc/qtcreator/src/qtquick/library/qtquick-shapes.qdoc b/doc/qtcreator/src/qtquick/library/qtquick-shapes.qdoc index bce7dce955d..c66d6d56f23 100644 --- a/doc/qtcreator/src/qtquick/library/qtquick-shapes.qdoc +++ b/doc/qtcreator/src/qtquick/library/qtquick-shapes.qdoc @@ -64,6 +64,7 @@ in more detail. You can modify the values of the properties in the \uicontrol Properties view. + \target basic-rectangle \section1 Rectangle The basic \l [QtQuick] {Rectangle} QML type is used for drawing shapes @@ -96,6 +97,7 @@ to improve the appearance of your shape. \if defined(qtdesignstudio) + \target studio-rectangle \section2 Studio Rectangle If you want to modify each corner of the rectangle independently diff --git a/doc/qtcreator/src/qtquick/library/qtquick-text.qdoc b/doc/qtcreator/src/qtquick/library/qtquick-text.qdoc index fb7e0726fe6..63b612ad300 100644 --- a/doc/qtcreator/src/qtquick/library/qtquick-text.qdoc +++ b/doc/qtcreator/src/qtquick/library/qtquick-text.qdoc @@ -179,6 +179,7 @@ {transformation} of the text. Using rotation or scaling in combination with native rendering leads to poor and sometimes pixelated results. + \target text-edit \section1 Text Input You can use the \uicontrol {Text Edit} and \uicontrol {Text Input} types to diff --git a/doc/qtcreator/src/qtquick/qtquick-buttons.qdoc b/doc/qtcreator/src/qtquick/qtquick-buttons.qdoc index 288a80ec58d..f61aeee27d3 100644 --- a/doc/qtcreator/src/qtquick/qtquick-buttons.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-buttons.qdoc @@ -122,8 +122,8 @@ to assign them useful IDs, change their appearance, and set the button text for each button instance, for example. - To create a graphical button that scales beautifully without using vector - graphics, use the \l [QML]{BorderImage}{Border Image} type. For more + To create a graphical button that scales beautifully without using + vector graphics, use the \l {Border Image} type. For more information, see \l{Creating Scalable Buttons and Borders}. */ @@ -135,8 +135,8 @@ \title Creating Scalable Buttons and Borders - You can use the \l [QML]{BorderImage}{Border Image} type to display an - image, such as a PNG file, as a border and a background. + You can use the \l {Border Image} type to display an image, such as a + PNG file, as a border and a background. Use two border images and suitable graphics to change the appearance of a button when it is clicked. You can use use \l{Adding States}{states} @@ -145,13 +145,14 @@ change the appearance of the button depending on other mouse events, such as hovered. - Add a \l {Mouse Area} type that covers the whole area and - reacts to mouse events. - + Use a \l Text type to add button text. You can use states also to change the button text color and font size. For example, you can scale the button text up or down. - \image qmldesigner-borderimage-type.png "Button type in Form Editor and States" + Add a \l {Mouse Area} type that covers the whole area and + reacts to mouse events. + + \image qmldesigner-borderimage-type.png "Button type in Form Editor and States" \section1 Creating the Button Type diff --git a/doc/qtcreator/src/qtquick/qtquick-properties.qdoc b/doc/qtcreator/src/qtquick/qtquick-properties.qdoc index 38e05fa4619..f6b8d2153df 100644 --- a/doc/qtcreator/src/qtquick/qtquick-properties.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-properties.qdoc @@ -257,6 +257,7 @@ You can add other languages later by editing the project file. \endif + \target basic-item \section1 Specifying Basic Item Properties All QML types share a set of properties that you can specify in @@ -491,7 +492,7 @@ You can double-click objects on the canvas to edit their text, color, or source properties inline. Because you can specify several of these - properties for some QML types, such as \l [QML]{TextEdit}{Text Edit}, + properties for some QML types, such as \l {text-edit}{Text Edit}, you can also right-click objects to open the inline editors from a context-menu. diff --git a/doc/qtcreator/src/qtquick/qtquick-timeline.qdoc b/doc/qtcreator/src/qtquick/qtquick-timeline.qdoc index 01450455aa3..dca62b7fc98 100644 --- a/doc/qtcreator/src/qtquick/qtquick-timeline.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-timeline.qdoc @@ -337,9 +337,9 @@ \section1 Rotating Items To animate components that rotate around a central point, you can use the - \l Item QML type as a parent for the rotating component. Then create a - timeline for the Item and set the rotation property for the start and end - keyframes. + \l {basic-item}{Item} QML type as a parent for the rotating component. Then + create a timeline for the Item and set the rotation property for the start + and end keyframes. \if defined(qtdesignstudio) \section1 Animating Shapes diff --git a/doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc b/doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc index be781e11dcb..de00b1e0edd 100644 --- a/doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc @@ -56,7 +56,7 @@ \section1 Previewing Images The Qt Quick Toolbar for images allows you to edit the properties of - \l [QML]{BorderImage}{Border Image} and \l [QML]{Image} items. + \l {Border Image} and \l {Images}{Image} items. You can scale and tile the images, replace them with other images, preview them, and change the image margins. @@ -97,8 +97,8 @@ \section1 Editing Rectangles The Qt Quick Toolbar for rectangles allows you to edit the properties of - \l [QML]{Rectangle} items. You can change the fill and border colors and add - gradients. + \l {basic-rectangle}{Rectangle} items. You can change the fill and border + colors and add gradients. \image qml-toolbar-rectangle.png "Qt Quick Toolbar for rectangles" diff --git a/doc/qtdesignstudio/examples/doc/loginui1.qdoc b/doc/qtdesignstudio/examples/doc/loginui1.qdoc index c7f2a7517e3..4ca8aa35445 100644 --- a/doc/qtdesignstudio/examples/doc/loginui1.qdoc +++ b/doc/qtdesignstudio/examples/doc/loginui1.qdoc @@ -78,8 +78,8 @@ \image loginui1-project.png "Log In UI project in the Design mode" - The UI is built using a \l Rectangle QML type that forms the background and - a \l Text type that displays some text. + The UI is built using a \l{basic-rectangle}{Rectangle} QML type that forms + the background and a \l Text type that displays some text. \note The visibility of views depends on the selected workspace, so your \QDS might look somewhat different from the above image. @@ -130,9 +130,9 @@ \section1 Creating the Main Page - You will now change the values of the properties of the \l Rectangle - component to add a gradient to the UI background and those of the - \l Text component to set the title text in a larger strong font. In + You will now change the values of the properties of the \l{basic-rectangle} + {Rectangle} component to add a gradient to the UI background and those of + the \l Text component to set the title text in a larger strong font. In addition, you will import an image as an asset and add it to the page. To be able to use an image in the UI, you must add it to your project @@ -184,7 +184,7 @@ \li Drag and drop the Qt logo from the \uicontrol Assets tab of \uicontrol Library to the top-left corner of the rectangle. \image loginui1-library-assets.png "Library view Assets tab" - \QDS automatically creates a component of the \l Image type + \QDS automatically creates a component of the \l{Images}{Image} type for you with the path to the image file set as the value of the \uicontrol Source field in \uicontrol Properties. \image loginui1-image-properties.png "Image properties" @@ -219,10 +219,10 @@ types, and they will be listed under \uicontrol {My QML Components}. This section is only visible if you have created custom QML components. - The \l [QtQuick] {Rectangle}, \l Text, and \l Image types used in this tutorial are - based on the \l Item type. It is the base type for all visual elements, - with implementation of basic functions and properties, such as type - name, ID, position, size, and visibility. + The \l {basic-rectangle}{Rectangle}, \l Text, and \l {Images}{Image} types + used in this tutorial are based on the \l Item type. It is the base type for + all visual elements, with implementation of basic functions and properties, + such as type name, ID, position, size, and visibility. For more information, see \l{Use Case - Visual Elements In QML}. For descriptions of all QML types, see \l{All QML Types} in the Qt reference @@ -230,15 +230,15 @@ \section3 Regtangle Properties - The basic \l [QtQuick] {Rectangle} QML type is used for drawing shapes + The basic \l {basic-rectangle}{Rectangle} QML type is used for drawing shapes with four sides and four corners. You can fill rectangles either with a solid fill color or a gradient. You can specify the border color separately. By setting the value of the radius property, you can create shapes with rounded corners. - If you want to specify the radius of each corner separately, you can - use the \l Rectangle type from the Qt Quick Studio Components module - instead of the basic rectangle type. It is available in the + If you want to specify the radius of each corner separately, you can use the + \l{studio-rectangle}{Rectangle} type from the Qt Quick Studio Components + module instead of the basic rectangle type. It is available in the \uicontrol {Studio Components} tab of \uicontrol Library. \section3 Text Properties @@ -257,14 +257,14 @@ \section3 Image Properties - The \l Image type is used for adding images to the UI in several supported - formats, including bitmap formats such as PNG and JPEG and vector graphics - formats such as SVG. You must add the images to your project in the + The \l {Images}{Image} type is used for adding images to the UI in several + supported formats, including bitmap formats such as PNG and JPEG and vector + graphics formats such as SVG. You must add the images to your project in the \uicontrol Assets tab of \uicontrol Library to be able to use them in designs. - If you need to display animated images, use the \l {AnimatedImage} - {Animated Image} type, also available in the \uicontrol {Qt Quick - Basic} + If you need to display animated images, use the \l {Animated Image} type, + also available in the \uicontrol {Qt Quick - Basic} tab of \uicontrol Library. \section1 Creating a Push Button @@ -300,7 +300,7 @@ \section2 Learn Qt Quick - Qt Quick Controls - The \e {Custom Button} wizard template creates a \l [Qt Quick Controls 2] {Button} + The \e {Custom Button} wizard template creates a \l {Button} QML type that belongs to the \l {Qt Quick Controls 2} module. It is a push-button control that can be pushed or clicked by the user. Buttons are normally used to perform an action or to answer a question. The Button diff --git a/doc/qtdesignstudio/examples/doc/progressbar.qdoc b/doc/qtdesignstudio/examples/doc/progressbar.qdoc index 0dfb333e41f..62e6184159b 100644 --- a/doc/qtdesignstudio/examples/doc/progressbar.qdoc +++ b/doc/qtdesignstudio/examples/doc/progressbar.qdoc @@ -42,7 +42,7 @@ In this example, we use two overlapping rectangles and a text label to create the progress bar. For another example of a progress bar, see the - \l [QtQuickControls2] {ProgressBar} in Qt Quick Controls. + \l {progress-bar-control}{Progress Bar} type in Qt Quick Controls. In the Design mode, we drag and drop a \uicontrol Rectangle from the \uicontrol Library to the \uicontrol {Form Editor} and modify its size @@ -71,7 +71,7 @@ change for the animation. For more information about creating and positioning components, see - \l {Creating Components}. + \l {Creating Components} and \l {Positioning Items}. \section1 Animating Progress Bar Elements diff --git a/doc/qtdesignstudio/examples/doc/sidemenu.qdoc b/doc/qtdesignstudio/examples/doc/sidemenu.qdoc index da4fe61e485..acc13538b81 100644 --- a/doc/qtdesignstudio/examples/doc/sidemenu.qdoc +++ b/doc/qtdesignstudio/examples/doc/sidemenu.qdoc @@ -38,7 +38,7 @@ when users hover the cursor over them or select them. Each button opens an image file. The side menu can be used to apply - \l {Qt Graphical Effects}{graphical effects}, such as hue, saturation, + \l {2D Effects}{graphical effects}, such as hue, saturation, and blur, to the images. \section1 Creating Reusable Buttons @@ -124,10 +124,10 @@ We can now continue to create a side menu that slides open when users click the burger menu. In the \uicontrol {Form Editor}, we use the - \l Text and \l Slider components to create separate submenus for each - set of effects we want to apply to the images. We use a background image - for the menu background and a BurgerMenu custom QML type for the burger - menu icon. + \l Text and \l {slider-control}{Slider} components to create separate + submenus for each set of effects we want to apply to the images. We use + a background image for the menu background and a BurgerMenu custom QML + type for the burger menu icon. \image sidemenu-ui.png "SliderMenu type" @@ -210,12 +210,13 @@ \section1 Applying Effects - We nest the effects in an effects stack and bind them to the \l Slider type - instances. The effects apply to all the images in the example application, - not just the currently open one. + We nest the effects in an effects stack and bind them to the + \l {slider-control}{Slider} type instances. The effects apply + to all the images in the example application, not just the + currently open one. We use property bindings to connect the controls in the slider menu to - \l {Qt Graphical Effects}{graphical effects}. To have access to the + \l {2D Effects}{graphical effects}. To have access to the properties from all the slider type instances, we export them as aliases in \e SliderMenu.ui.qml. We select \uicontrol {Export Property as Alias} in the \uicontrol Settings menu of the \uicontrol Value property in @@ -226,10 +227,10 @@ \image sidemenu-effects-stack.png "Effects stack in the Navigator" - We use the \l Image type as the last item in the stack to display images - that we apply the effects to. We export the image source property as an - alias to be able to switch the image inside the stack. + We use the \l {Images}{Image} type as the last item in the stack to display + images that we apply the effects to. We export the image source property as + an alias to be able to switch the image inside the stack. - For more information about the available Qt graphical effects, see + For more information about the available graphical effects, see \l {2D Effects}. */ diff --git a/doc/qtdesignstudio/images/qt-figma-bridge.png b/doc/qtdesignstudio/images/qt-figma-bridge.png new file mode 100644 index 00000000000..28fec5253d9 Binary files /dev/null and b/doc/qtdesignstudio/images/qt-figma-bridge.png differ diff --git a/doc/qtdesignstudio/images/studio-figma-export.png b/doc/qtdesignstudio/images/studio-figma-export.png new file mode 100644 index 00000000000..4924b0b1de3 Binary files /dev/null and b/doc/qtdesignstudio/images/studio-figma-export.png differ diff --git a/doc/qtdesignstudio/src/qtbridge/qtbridge-figma-overview.qdoc b/doc/qtdesignstudio/src/qtbridge/qtbridge-figma-overview.qdoc new file mode 100644 index 00000000000..3c71da8eb9e --- /dev/null +++ b/doc/qtdesignstudio/src/qtbridge/qtbridge-figma-overview.qdoc @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2020 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. +** +****************************************************************************/ + +// Note: The \page value is hard-coded as a link in Qt Bridge for Figma. + +/*! + \previouspage qtbridge-sketch-using.html + \page figmaqtbridge.html + \nextpage qtbridge-figma-setup.html + + \title Exporting Designs from Figma + + You can use \QBF to export designs from Figma to \e {.metadata} + format that you can \l{Importing 2D Assets}{import} to projects in \QDS. + + \image studio-figma-export.png + + The following topics describe setting up and using \QBF: + + \list + + \li \l{Setting Up Qt Bridge for Figma} + + You must install Figma and the \QBF export tool before you can use + the tool to export designs. + + \li \l{Using Qt Bridge for Figma} + + To get the best results when you use \QBF to export designs from + Figma, you should follow the guidelines for working with Figma and + organizing your assets. + \endlist +*/ diff --git a/doc/qtdesignstudio/src/qtbridge/qtbridge-figma-setup.qdoc b/doc/qtdesignstudio/src/qtbridge/qtbridge-figma-setup.qdoc new file mode 100644 index 00000000000..c2d00f2727b --- /dev/null +++ b/doc/qtdesignstudio/src/qtbridge/qtbridge-figma-setup.qdoc @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Bridge 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 figmaqtbridge.html + \page qtbridge-figma-setup.html + \nextpage qtbridge-figma-using.html + + \title Setting Up \QBF + + \QBF is delivered with \QDS as a developer plugin that you can install to + the Desktop version of Figma. To install the plugin, open the Plugin Manager + of Figma and press the plus button to create a new plugin. Then choose the + \e Manifest.json file that comes with \QDS. + + You can launch the Figma plugin from \uicontrol Plugins > + \uicontrol Development > \uicontrol {\QBF} in Figma. +*/ diff --git a/doc/qtdesignstudio/src/qtbridge/qtbridge-figma-using.qdoc b/doc/qtdesignstudio/src/qtbridge/qtbridge-figma-using.qdoc new file mode 100644 index 00000000000..b905e08dadc --- /dev/null +++ b/doc/qtdesignstudio/src/qtbridge/qtbridge-figma-using.qdoc @@ -0,0 +1,130 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Bridge 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 qtbridge-figma-setup.html + \page qtbridge-figma-using.html + \nextpage exporting-3d-assets.html + + \title Using \QBF + + \section1 Organizing Assets + + To get the best results when you use \QBF to export designs from Figma + to \QDS, follow these guidelines when working with Figma: + + \list + \li Use pages for different purposes, such as \e sketching for trying + out ideas, \e components for creating UI components, \e assets for + images that you use in the components, and \e screens for building + the UI screens using components and assets. + \li Arrange each page into frames. When you are happy with a design, + move it from the sketching page to the components page and use it + in screens. When you export your assets, you can skip all frames + that you don't want to be part of the final UI, to avoid cluttering + the \QDS project. The QML code generated in \QDS corresponds to the + structure of your Figma document. + \li \QBF supports \e {Figma components}. Each Figma component + is exported as a \e {QML component}, and each Figma component + instance is generated as a respective QML component instance + in the generated QML. + \li Create components in Figma and export them to \QDS before you + start making instances of them. In \QDS, add functionality to the + components, such as button states and then bring them back to Figma + as assets. If you use functional QML components in Figma, you will + find it easier to merge new iterations of the design to \QDS and + continue to build the screens there. + \li Use descriptive and unique ids to avoid duplicate QML ids after + exporting assets and \l{Importing 2D Assets}{importing} them to + \QDS. + \endlist + + To use the fonts that you use in Figma also in \QDS, you need to import + them to \QDS as assets. \QDS deploys them to devices when you preview the + UI. For more information, see \l{Using Custom Fonts}. + + \section2 Using Frames + + The relationships between frames and layers are preserved when you export + designs from Figma and import them into \QDS. + + A frame can only be exported as a component or skipped. A component will + be imported as a separate QML file that contains all the artwork on the + frame, except layers that are set to be skipped or exported as child + items. The child items can contain graphical assets or text. + + \section1 Exporting Assets + + \image qt-figma-bridge.png + + To export your design using \QBF: + + \list 1 + \li \QBF automatically proposes identifiers for all groups and layers + that you can change in the \uicontrol {QML ID} field. Use unique and + descriptive ids to avoid duplicate QML ids when the layer and the + respective artwork is imported into \QDS. + \li In the \uicontrol {Export As} field, select the export type for the + group or layer: + \list + \li \uicontrol Child exports each asset of the selected group + or layer a separate PNG file, with references + to the images in the component file. + \li \uicontrol Merged merges the selected groups and layers into + the parent frame or group as one item. + \li \uicontrol Skipped completely skips the selected layer. + \endlist + \li In the \uicontrol {QML type} field, specify the QML type or + \l {Shapes}{Qt Quick Studio Component} to morph this + layer into. The component that is generated during import will be + of this type. For example, if you drew a rectangle, you can export + it as a \l Rectangle component. + You can provide the import statement of the module where the QML + type is defined in the \uicontrol {QML Imports} field. + \li In the \uicontrol {QML imports} field, enter + additional import statements to have them added to the generated QML + file. For example, to use Qt Quick Controls 2.3, you need the + import statement \c {QtQuick.Controls 2.3} and to use Qt Quick + Studio Components 1.0, you need the import statement + \c {QtQuick.Studio.Components 1.0}. You can also import a module as + an alias. + \li In the \uicontrol {QML properties} field, specify properties for the + QML type. You can add and modify properties in \QDS. + \li Select the \uicontrol Alias check box to export the item generated + from this layer as an alias in the parent component. + \li Select the \uicontrol Clip check box to enable + clipping in the type generated from the layer. The generated type + will clip its own painting, as well as the painting of its children, + to its bounding rectangle. + \li Select the \uicontrol Visible check box to determine the visibility + of the layer. + \li Select \uicontrol {Export assets and metadata} to export your design. + \li When the exporting is done, select \uicontrol OK. + \endlist + + \QBF exports everything into a single archive. Before importing the project + into \QDS, you have to manually extract the archive. Then you can import the + \e .metainfo into a project in \QDS, as described in \l{Importing Designs}. +*/ diff --git a/doc/qtdesignstudio/src/qtbridge/qtbridge-overview.qdoc b/doc/qtdesignstudio/src/qtbridge/qtbridge-overview.qdoc index 27fd037067d..8bc50df787c 100644 --- a/doc/qtdesignstudio/src/qtbridge/qtbridge-overview.qdoc +++ b/doc/qtdesignstudio/src/qtbridge/qtbridge-overview.qdoc @@ -64,6 +64,11 @@ You can use the \QBSK export tool in Sketch to convert designs into metadata that you can import into projects in \QDS. + \li \l{Exporting Designs from Figma} + + You can use the \QBF export tool in Figma to convert designs into + metadata that you can import into projects in \QDS. + \li \l{Exporting 3D Assets} You can import files you created using 3D graphics applications and diff --git a/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-using.qdoc b/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-using.qdoc index 37aaa8f780c..c4069f0152d 100644 --- a/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-using.qdoc +++ b/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-using.qdoc @@ -26,7 +26,7 @@ /*! \previouspage qtbridge-sketch-setup.html \page qtbridge-sketch-using.html - \nextpage exporting-3d-assets.html + \nextpage figmaqtbridge.html \title Using \QBSK @@ -194,7 +194,7 @@ \l {Shapes}{Qt Quick Studio Component} to morph this layer into. The component that is generated during import will be of this type. For example, if you drew a rectangle, you can export - it as a \l Rectangle component. + it as a \l {basic-rectangle}{Rectangle} component. You can provide the import statement of the module where the QML type is defined in the \uicontrol {QML Imports} field. \li Select the \uicontrol {Render Text} check box to render the text diff --git a/doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc b/doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc index 789d0defb42..94005e1be72 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc +++ b/doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc @@ -27,11 +27,9 @@ \section2 Creating Custom Controls - You can use project wizard templates to create a starting point for a custom - \l [QtQuickControls2] {Button}, \l [QtQuickControls2] {Pane}, - \l [QtQuickControls2] {StackLayout}{Stacked Layout}, - \l [QtQuickControls2] {SwipeView}{Swipe View}, or - \l [QtQuickControls2] {Switch}. + You can use project wizard templates to create a starting point for + a custom \l Button, \l [QtQuickControls2] {Pane}, \l {Stack Layout}, + \l [QtQuickControls2] {SwipeView}{Swipe View}, or \l Switch. \list 1 \li Select \uicontrol File > \uicontrol {New File or Project} > diff --git a/doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc index 0eca243f587..83e587fb16d 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc @@ -138,29 +138,31 @@ \li \uicontrol {Flow Item} and \uicontrol {Flow View} generate types that you can use to design the application flow. \li \uicontrol {Qt Quick File} generates a QML type with one - of the following types as the root item: \l Item, - \l Rectangle, \l Image, \l BorderImage, \l Flickable, - \l Row, \l Column, \l Flow, or \l Grid. + of the following basic types or \l{Using Positioners} + {positioners} as the root item: \l {basic-item}{Item}, + \l {basic-rectangle}{Rectangle}, \l {Images}{Image}, + \l {Border Image}, \l Flickable, Row, Column, Flow, or Grid. \li \uicontrol {Qt Quick UI File} generates a UI form with one of the above types as the root item. - \li \uicontrol {Qt Quick Views} generates a \l GridView or a - \l ListView. + \li \uicontrol {Qt Quick Views} generates a Grid View or a + List View. For more information, see \l{List and Grid Views}. + \endlist \li \uicontrol {Qt Quick Controls} \list - \li \l [Qt Quick Controls 2] {Button}{Custom Button} creates a - push button with a text label. - \li \l [Qt Quick Controls 2] {Switch}{Custom Switch} creates a - switch with on and off states. + \li \l {Button}{Custom Button} creates a push button with a text + label. + \li \l {Switch}{Custom Switch} creates a switch with on and off + states. \li \l [Qt Quick Controls 2] {Pane} provides a background that matches the UI style and theme. - \li \l [Qt Quick Controls 2] { StackView} provides a stack-based + \li \l [Qt Quick Controls 2] {StackView} provides a stack-based navigation model. \li \l [Qt Quick Controls 2] {SwipeView} enables users to navigate pages by swiping sideways. \endlist - \li \uicontrol ListModel adds a \l{ListModel}{list model} to the - project. + \li \uicontrol ListModel adds a \l{Editing List Models}{list model} to + the project. \li \uicontrol {JavaScript File} generates files that you can use to write the application logic. This is useful for testing the application before the developers implement the application logic diff --git a/doc/qtdesignstudio/src/qtdesignstudio-terms.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-terms.qdoc index 7c6ee4cf0d4..b9795c5cce2 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-terms.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-terms.qdoc @@ -26,7 +26,7 @@ /*! \page studio-terms.html \previouspage studio-faq.html - \nextpage creator-acknowledgements.html + \nextpage technical-support.html \title Concepts and Terms diff --git a/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc index 1dd1cd472a4..e247aebb56c 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc @@ -44,6 +44,11 @@ \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 \li \l{Exporting from Blender} \li \l{Exporting from Maya} \li \l{Exporting from Qt 3D Studio} @@ -190,6 +195,7 @@ \li \l{Frequently Asked Questions} \li \l{Concepts and Terms} \endlist + \li \l{Technical Support} \li \l{Acknowledgements} \endlist */ diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/exporting-3d/exporting-3d-assets.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/exporting-3d/exporting-3d-assets.qdoc index e5008124d9f..36fe041e22c 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/exporting-3d/exporting-3d-assets.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/exporting-3d/exporting-3d-assets.qdoc @@ -29,7 +29,7 @@ /*! \page exporting-3d-assets.html \if defined(qtdesignstudio) - \previouspage qtbridge-sketch-using.html + \previouspage qtbridge-figma-using.html \else \previouspage studio-3d.html \endif diff --git a/scripts/build.py b/scripts/build.py index c4b2e36cc7e..1aa491f1bc1 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -132,6 +132,7 @@ def build_qtcreator(args, paths): if args.python3: cmake_args += ['-DPYTHON_EXECUTABLE=' + args.python3] + cmake_args += ['-DPython3_EXECUTABLE=' + args.python3] if args.module_paths: module_paths = [common.to_posix_path(os.path.abspath(fp)) for fp in args.module_paths] diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index 14a963cd386..04cbb3d952d 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -1636,10 +1636,16 @@ class DumperBase(): # a Q_OBJECT SMO has a non-null superdata (unless it's QObject itself), # a Q_GADGET SMO has a null superdata (hopefully) if result and not isQObjectProper: - superdata = self.extractPointer(result) - if superdata == 0: - # This looks like a Q_GADGET - return 0 + if self.qtVersion() >= 0x60000 and self.isWindowsTarget(): + (direct, indirect) = self.split('pp', result) + # since Qt 6 there is an additional indirect super data getter on windows + if direct == 0 and indirect == 0: + # This looks like a Q_GADGET + return 0 + else: + if self.extractPointer(result) == 0: + # This looks like a Q_GADGET + return 0 return result @@ -1849,7 +1855,11 @@ class DumperBase(): def extractDataPtr(someMetaObjectPtr): # dataPtr = metaObjectPtr['d']['data'] - return self.extractPointer(someMetaObjectPtr + 2 * ptrSize) + if self.qtVersion() >= 0x60000 and self.isWindowsTarget(): + offset = 3 + else: + offset = 2 + return self.extractPointer(someMetaObjectPtr + offset * ptrSize) isQMetaObject = origType == 'QMetaObject' isQObject = origType == 'QObject' @@ -3159,10 +3169,13 @@ class DumperBase(): for i in range(fieldSize): data = data << 8 if self.dumper.isBigEndian: - byte = ldata[i] + lbyte = ldata[i] else: - byte = ldata[fieldOffset + fieldSize - 1 - i] - data += ord(byte) + lbyte = ldata[fieldOffset + fieldSize - 1 - i] + if sys.version_info[0] >= 3: + data += lbyte + else: + data += ord(lbyte) data = data >> fieldBitpos data = data & ((1 << fieldBitsize) - 1) val.lvalue = data diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index 2b9078db218..1a61068aaa5 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -219,16 +219,14 @@ class Dumper(DumperBase): if code == lldb.eTypeClassEnumeration: intval = nativeValue.GetValueAsSigned() - if hasattr(nativeType, 'get_enum_members_array'): - for enumMember in nativeType.get_enum_members_array(): - # Even when asking for signed we get unsigned with LLDB 3.8. - diff = enumMember.GetValueAsSigned() - intval - mask = (1 << nativeType.GetByteSize() * 8) - 1 - if diff & mask == 0: - path = nativeType.GetName().split('::') - path[-1] = enumMember.GetName() - val.ldisplay = '%s (%d)' % ('::'.join(path), intval) - val.ldisplay = '%d' % intval + display = str(nativeValue).split(' = ') + if len(display) == 2: + verbose = display[1] + if '|' in verbose and not verbose.startswith('('): + verbose = '(' + verbose + ')' + else: + verbose = intval + val.ldisplay = '%s (%d)' % (verbose, intval) elif code in (lldb.eTypeClassComplexInteger, lldb.eTypeClassComplexFloat): val.ldisplay = str(nativeValue.GetValue()) #elif code == lldb.eTypeClassArray: @@ -421,7 +419,8 @@ class Dumper(DumperBase): if hasattr(nativeTargetType, 'GetCanonicalType'): nativeTargetType = nativeTargetType.GetCanonicalType() targetType = self.fromNativeType(nativeTargetType) - return self.createTypedefedType(targetType, nativeType.GetName()) + return self.createTypedefedType(targetType, nativeType.GetName(), + self.nativeTypeId(nativeType)) nativeType = nativeType.GetUnqualifiedType() typeName = self.typeName(nativeType) @@ -471,6 +470,8 @@ class Dumper(DumperBase): tdata.code = TypeCode.Integral elif typeName == 'void': tdata.code = TypeCode.Void + elif typeName == 'wchar_t': + tdata.code = TypeCode.Integral else: self.warn('UNKNOWN TYPE KEY: %s: %s' % (typeName, code)) elif code == lldb.eTypeClassEnumeration: @@ -551,6 +552,11 @@ class Dumper(DumperBase): return nativeType.GetName() def nativeTypeId(self, nativeType): + if nativeType and (nativeType.GetTypeClass() == lldb.eTypeClassTypedef): + nativeTargetType = nativeType.GetUnqualifiedType() + if hasattr(nativeTargetType, 'GetCanonicalType'): + nativeTargetType = nativeTargetType.GetCanonicalType() + return '%s{%s}' % (nativeType.name, nativeTargetType.name) name = self.typeName(nativeType) if name is None or len(name) == 0: c = '0' diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp index f95f69cb84f..ee1bacbc2ee 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp @@ -225,12 +225,13 @@ bool Qt5NodeInstanceServer::initRhi(RenderViewData &viewData) viewData.texture = nullptr; } }; - if (viewData.bufferDirty) { + if (viewData.bufferDirty) cleanRhiResources(); - viewData.bufferDirty = false; - } - const QSize size = viewData.window->size(); + QSize size = viewData.window->size(); + if (size.isNull()) + size = QSize(2, 2); // Zero size buffer creation will fail, so make it some size always + viewData.texture = viewData.rhi->newTexture(QRhiTexture::RGBA8, size, 1, QRhiTexture::RenderTarget | QRhiTexture::UsedAsTransferSource); if (!viewData.texture->create()) { @@ -259,6 +260,8 @@ bool Qt5NodeInstanceServer::initRhi(RenderViewData &viewData) // redirect Qt Quick rendering into our texture viewData.window->setRenderTarget(QQuickRenderTarget::fromRhiRenderTarget(viewData.texTarget)); + + viewData.bufferDirty = false; #else Q_UNUSED(viewData) #endif diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComponentButton.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComponentButton.qml index 601f4afc057..92082b5058f 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComponentButton.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComponentButton.qml @@ -36,7 +36,8 @@ Column { Label { text: qsTr("This item is an instance of a Component") anchors.horizontalCenter: parent.horizontalCenter - width: 220 + width: 300 + horizontalAlignment: Text.AlignHCenter } StudioControls.AbstractButton { diff --git a/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt index 6e134b6489c..b0de6b947c5 100644 --- a/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt @@ -30,5 +30,9 @@ add_executable(%{ProjectName} target_link_libraries(%{ProjectName} Qt${QT_VERSION_MAJOR}::Core) @if %{HasTranslation} -qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) +if(COMMAND qt_create_translation) + qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) +else() + qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) +endif() @endif diff --git a/share/qtcreator/templates/wizards/projects/cpplibrary/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/cpplibrary/CMakeLists.txt index 612f4297776..f84cf90b29a 100644 --- a/share/qtcreator/templates/wizards/projects/cpplibrary/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/cpplibrary/CMakeLists.txt @@ -46,5 +46,9 @@ target_compile_definitions(%{ProjectName} PRIVATE %{LibraryDefine}) @endif @if %{HasTranslation} -qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) +if(COMMAND qt_create_translation) + qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) +else() + qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) +endif() @endif diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt index 34f57b36b85..c77aacfcf2b 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt @@ -46,6 +46,10 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) qt_add_executable(%{ProjectName} ${PROJECT_SOURCES} ) +@if %{HasTranslation} + + qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) +@endif else() if(ANDROID) add_library(%{ProjectName} SHARED @@ -56,13 +60,13 @@ else() ${PROJECT_SOURCES} ) endif() +@if %{HasTranslation} + + qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) +@endif endif() target_compile_definitions(%{ProjectName} PRIVATE $<$,$>:QT_QML_DEBUG>) target_link_libraries(%{ProjectName} PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick) -@if %{HasTranslation} - -qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) -@endif diff --git a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt index bd016285173..9f247d55223 100644 --- a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt @@ -50,6 +50,10 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) qt_add_executable(%{ProjectName} ${PROJECT_SOURCES} ) +@if %{HasTranslation} + + qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) +@endif else() if(ANDROID) add_library(%{ProjectName} SHARED @@ -60,10 +64,10 @@ else() ${PROJECT_SOURCES} ) endif() +@if %{HasTranslation} + + qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) +@endif endif() target_link_libraries(%{ProjectName} PRIVATE Qt${QT_VERSION_MAJOR}::Widgets) -@if %{HasTranslation} - -qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) -@endif diff --git a/src/libs/3rdparty/syntax-highlighting/CMakeLists.txt b/src/libs/3rdparty/syntax-highlighting/CMakeLists.txt index 8c37bf1731a..062ae058c31 100644 --- a/src/libs/3rdparty/syntax-highlighting/CMakeLists.txt +++ b/src/libs/3rdparty/syntax-highlighting/CMakeLists.txt @@ -1,4 +1,11 @@ +if(TARGET KF5::SyntaxHighlighting) + set(HIGHLIGHTING_BUILD_DEFAULT OFF) +else() + set(HIGHLIGHTING_BUILD_DEFAULT ON) +endif() + add_qtc_library(KSyntaxHighlighting SHARED + BUILD_DEFAULT ${HIGHLIGHTING_BUILD_DEFAULT} INCLUDES autogenerated/ PUBLIC_INCLUDES src/lib diff --git a/src/libs/qtcreatorcdbext/CMakeLists.txt b/src/libs/qtcreatorcdbext/CMakeLists.txt index 45d55474aad..41769a2984c 100644 --- a/src/libs/qtcreatorcdbext/CMakeLists.txt +++ b/src/libs/qtcreatorcdbext/CMakeLists.txt @@ -58,7 +58,11 @@ if (_library_enabled) foreach(lib IN LISTS PYTHON_LIBRARIES) if (lib MATCHES ${PythonRegex}) - set(PythonZipFileName "python${CMAKE_MATCH_4}.zip") + if (CMAKE_BUILD_TYPE STREQUAL "Debug") + set(PythonZipFileName "python${CMAKE_MATCH_4}_d.zip") + else() + set(PythonZipFileName "python${CMAKE_MATCH_4}.zip") + endif() set(PythonDll "${CMAKE_MATCH_1}/${CMAKE_MATCH_3}${CMAKE_SHARED_LIBRARY_SUFFIX}") set(PythonExe "${CMAKE_MATCH_1}/python${CMAKE_EXECUTABLE_SUFFIX}") diff --git a/src/libs/utils/synchronousprocess.cpp b/src/libs/utils/synchronousprocess.cpp index 81a29d14d2a..0845e4b8034 100644 --- a/src/libs/utils/synchronousprocess.cpp +++ b/src/libs/utils/synchronousprocess.cpp @@ -475,9 +475,6 @@ SynchronousProcessResponse SynchronousProcess::run(const CommandLine &cmd, d->clearForRun(); - // On Windows, start failure is triggered immediately if the - // executable cannot be found in the path. Do not start the - // event loop in that case. d->m_binary = cmd.executable(); // using QProcess::start() and passing program, args and OpenMode results in a different // quoting of arguments than using QProcess::setArguments() beforehand and calling start() @@ -485,29 +482,21 @@ SynchronousProcessResponse SynchronousProcess::run(const CommandLine &cmd, d->m_process.setProgram(cmd.executable().toString()); d->m_process.setArguments(cmd.splitArguments()); connect(&d->m_process, &QProcess::started, this, [this, writeData] { - if (!writeData.isEmpty()) { - int pos = 0; - int sz = writeData.size(); - do { - d->m_process.waitForBytesWritten(); - auto res = d->m_process.write(writeData.constData() + pos, sz - pos); - if (res > 0) pos += res; - } while (pos < sz); - d->m_process.waitForBytesWritten(); - } + d->m_process.write(writeData); d->m_process.closeWriteChannel(); }); d->m_process.start(writeData.isEmpty() ? QIODevice::ReadOnly : QIODevice::ReadWrite); + // On Windows, start failure is triggered immediately if the + // executable cannot be found in the path. Do not start the + // event loop in that case. if (!d->m_startFailure) { d->m_timer.start(); if (isGuiThread()) QApplication::setOverrideCursor(Qt::WaitCursor); d->m_eventLoop.exec(QEventLoop::ExcludeUserInputEvents); - if (d->m_result.result == SynchronousProcessResponse::Finished || d->m_result.result == SynchronousProcessResponse::FinishedError) { - processStdOut(false); - processStdErr(false); - } + processStdOut(false); + processStdErr(false); d->m_result.rawStdOut = d->m_stdOut.rawData; d->m_result.rawStdErr = d->m_stdErr.rawData; @@ -529,9 +518,6 @@ SynchronousProcessResponse SynchronousProcess::runBlocking(const CommandLine &cm d->clearForRun(); - // On Windows, start failure is triggered immediately if the - // executable cannot be found in the path. Do not start the - // event loop in that case. d->m_binary = cmd.executable(); d->m_process.start(cmd.executable().toString(), cmd.splitArguments(), QIODevice::ReadOnly); if (!d->m_process.waitForStarted(d->m_maxHangTimerCount * 1000) @@ -540,11 +526,11 @@ SynchronousProcessResponse SynchronousProcess::runBlocking(const CommandLine &cm return d->m_result; } d->m_process.closeWriteChannel(); - if (d->m_process.waitForFinished(d->m_maxHangTimerCount * 1000)) { + if (!d->m_process.waitForFinished(d->m_maxHangTimerCount * 1000)) { if (d->m_process.state() == QProcess::Running) { d->m_result.result = SynchronousProcessResponse::Hang; d->m_process.terminate(); - if (d->m_process.waitForFinished(1000) && d->m_process.state() == QProcess::Running) { + if (!d->m_process.waitForFinished(1000) && d->m_process.state() == QProcess::Running) { d->m_process.kill(); d->m_process.waitForFinished(1000); } diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 86fd7096f2c..871f999b43e 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -26,7 +26,6 @@ add_subdirectory(help) add_subdirectory(resourceeditor) add_subdirectory(tasklist) add_subdirectory(nim) -add_subdirectory(incredibuild) add_subdirectory(conan) # Level 4: (only depends on Level 3 and below) @@ -45,9 +44,7 @@ add_subdirectory(beautifier) add_subdirectory(clangformat) add_subdirectory(clangrefactoring) add_subdirectory(clearcase) -add_subdirectory(cmakeprojectmanager) add_subdirectory(cvs) -add_subdirectory(debugger) add_subdirectory(designer) add_subdirectory(fakevim) add_subdirectory(genericprojectmanager) @@ -65,6 +62,10 @@ add_subdirectory(languageclient) add_subdirectory(studiowelcome) # Level 6: +add_subdirectory(cmakeprojectmanager) +add_subdirectory(debugger) + +# Level 7: add_subdirectory(android) add_subdirectory(autotest) add_subdirectory(autotoolsprojectmanager) @@ -72,6 +73,7 @@ add_subdirectory(baremetal) add_subdirectory(clangcodemodel) add_subdirectory(clangtools) add_subdirectory(cppcheck) +add_subdirectory(incredibuild) add_subdirectory(ios) add_subdirectory(python) add_subdirectory(qmljseditor) @@ -84,7 +86,7 @@ add_subdirectory(perfprofiler) add_subdirectory(qbsprojectmanager) add_subdirectory(ctfvisualizer) -# Level 7: +# Level 8: add_subdirectory(boot2qt) unset(qmldesigner_builddir) if (WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index a17323bdc70..a57e9e851a0 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -1020,7 +1020,7 @@ FilePath AndroidConfig::defaultSdkPath() // Set default path of SDK as used by Android Studio if (Utils::HostOsInfo::isMacHost()) { return Utils::FilePath::fromString( - QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/Android/sdk"); + QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/Library/Android/sdk"); } if (Utils::HostOsInfo::isWindowsHost()) { diff --git a/src/plugins/android/androidsdkdownloader.cpp b/src/plugins/android/androidsdkdownloader.cpp index 9e0a87a0185..b4ccb6412aa 100644 --- a/src/plugins/android/androidsdkdownloader.cpp +++ b/src/plugins/android/androidsdkdownloader.cpp @@ -118,14 +118,13 @@ bool AndroidSdkDownloader::extractSdk(const QString &jdkPath, const QString &sdk } } - QProcess *jarExtractProc = new QProcess(); - jarExtractProc->setWorkingDirectory(sdkExtractPath); + QProcess jarExtractProc; + jarExtractProc.setWorkingDirectory(sdkExtractPath); QString jarCmdPath(jdkPath + "/bin/jar"); - jarExtractProc->start(jarCmdPath, {"xf", m_sdkFilename}); - jarExtractProc->waitForFinished(); - jarExtractProc->close(); + jarExtractProc.start(jarCmdPath, {"xf", m_sdkFilename}); + jarExtractProc.waitForFinished(); - return jarExtractProc->exitCode() ? false : true; + return jarExtractProc.exitCode() ? false : true; } bool AndroidSdkDownloader::verifyFileIntegrity() diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp index 916df2cd886..123d1aee73a 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp @@ -324,7 +324,7 @@ bool CMakeProjectImporter::matchKit(void *directoryData, const Kit *k) const if (!Utils::contains(allLanguages, [&tcd](const Id& language) {return language == tcd.language;})) continue; ToolChain *tc = ToolChainKitAspect::toolChain(k, tcd.language); - if (!tc || tc->compilerCommand() != tcd.compilerPath) + if (!tc || tc->compilerCommand().canonicalPath() != tcd.compilerPath.canonicalPath()) return false; } diff --git a/src/plugins/debugger/shared/backtrace.cpp b/src/plugins/debugger/shared/backtrace.cpp index 74e69b31437..bbd121504fc 100644 --- a/src/plugins/debugger/shared/backtrace.cpp +++ b/src/plugins/debugger/shared/backtrace.cpp @@ -55,12 +55,10 @@ void dumpBacktrace(int maxdepth) for (int i = 0; i < qMin(size, maxdepth); i++) proc.write("0x" + QByteArray::number(quintptr(bt[i]), 16) + '\n'); proc.closeWriteChannel(); + proc.waitForFinished(); QByteArray out = proc.readAllStandardOutput(); qDebug() << QCoreApplication::arguments().at(0); qDebug() << out; - proc.waitForFinished(); - out = proc.readAllStandardOutput(); - qDebug() << out; #endif } diff --git a/src/plugins/incredibuild/CMakeLists.txt b/src/plugins/incredibuild/CMakeLists.txt index ab8f43e7208..96da8c52304 100644 --- a/src/plugins/incredibuild/CMakeLists.txt +++ b/src/plugins/incredibuild/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_plugin(IncrediBuild PLUGIN_DEPENDS Core ProjectExplorer - PLUGIN_RECOMMENDS QmakeProjectManager CmakeProjectManager + PLUGIN_RECOMMENDS QmakeProjectManager CMakeProjectManager SOURCES buildconsolebuildstep.cpp buildconsolebuildstep.h diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp index 396c11cdf5e..deef6c148a0 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp @@ -210,7 +210,9 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view) auto frameAll = [this, zoomOut]() { if (m_graphicsView) { QRectF bounds; - if (QmlItemNode(m_formEditorView->rootModelNode()).isFlowView()) { + + QmlItemNode qmlItemNode(m_formEditorView->rootModelNode()); + if (qmlItemNode.isFlowView()) { for (QGraphicsItem *item : m_formEditorView->scene()->items()) { if (auto *fitem = FormEditorItem::fromQGraphicsItem(item)) { if (!fitem->qmlItemNode().modelNode().isRootNode() @@ -219,8 +221,9 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view) } } } else { - bounds = m_graphicsView->rootItemRect(); + bounds = qmlItemNode.instanceBoundingRect(); } + m_graphicsView->frame(bounds); zoomOut(); } diff --git a/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp b/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp index 832c72c1916..941cd2e7d42 100644 --- a/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp +++ b/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp @@ -122,8 +122,8 @@ void ImportManagerView::removeImport(const Import &import) void ImportManagerView::addImport(const Import &import) { if (import.isLibraryImport() - && (import.toImportString().startsWith("QtQuick") - || import.toImportString().startsWith("SimulinkConnector"))) { + && (import.url().startsWith("QtQuick") + || import.url().startsWith("SimulinkConnector"))) { QmlDesignerPlugin::emitUsageStatistics(Constants::EVENT_IMPORT_ADDED + import.toImportString()); } diff --git a/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.cpp b/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.cpp index 57b66a7f800..a8c1ecd5fee 100644 --- a/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.cpp +++ b/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.cpp @@ -101,7 +101,7 @@ void InteractiveConnectionManager::dispatchCommand(const QVariant &command, Conn void InteractiveConnectionManager::puppetTimeout(Connection &connection) { - if (connection.socket && connection.socket->waitForReadyRead(10)) { + if (connection.timer && connection.socket && connection.socket->waitForReadyRead(10)) { connection.timer->stop(); connection.timer->start(); return; @@ -112,8 +112,10 @@ void InteractiveConnectionManager::puppetTimeout(Connection &connection) void InteractiveConnectionManager::puppetAlive(Connection &connection) { - connection.timer->stop(); - connection.timer->start(); + if (connection.timer) { + connection.timer->stop(); + connection.timer->start(); + } } } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp index 3e3c6379b10..a28c946101e 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp @@ -101,6 +101,7 @@ #include #include #include +#include enum { debug = false @@ -464,6 +465,8 @@ void NodeInstanceView::propertiesAboutToBeRemoved(const QList& resetVerticalAnchors(property.parentModelNode()); } else if (name == "anchors.baseline") { resetVerticalAnchors(property.parentModelNode()); + } else if (name == "shader" && property.parentModelNode().isSubclassOf("QtQuick3D.Shader")) { + m_resetTimer.start(); } } @@ -512,6 +515,13 @@ void NodeInstanceView::variantPropertiesChanged(const QList& pr QTC_ASSERT(m_nodeInstanceServer, return); updatePosition(propertyList); m_nodeInstanceServer->changePropertyValues(createChangeValueCommand(propertyList)); + + for (const auto &property : propertyList) { + if (property.name() == "shader" && property.parentModelNode().isSubclassOf("QtQuick3D.Shader")) { + m_resetTimer.start(); + break; + } + } } /*! Notifies the view that the property parent of the model node \a node has diff --git a/src/plugins/texteditor/CMakeLists.txt b/src/plugins/texteditor/CMakeLists.txt index ab8d806f080..93d773ddb5e 100644 --- a/src/plugins/texteditor/CMakeLists.txt +++ b/src/plugins/texteditor/CMakeLists.txt @@ -1,6 +1,12 @@ +if(TARGET KSyntaxHighlighting) + set(KSYNTAXHIGHLIGHTING_TARGET KSyntaxHighlighting) +else() + set(KSYNTAXHIGHLIGHTING_TARGET KF5::SyntaxHighlighting) +endif() + add_qtc_plugin(TextEditor DEPENDS Qt5::Concurrent Qt5::Network Qt5::PrintSupport Qt5::Xml - PUBLIC_DEPENDS KSyntaxHighlighting + PUBLIC_DEPENDS ${KSYNTAXHIGHLIGHTING_TARGET} PLUGIN_DEPENDS Core SOURCES autocompleter.cpp autocompleter.h diff --git a/src/shared/CMakeLists.txt b/src/shared/CMakeLists.txt index 4d702e889d1..cbf076479f0 100644 --- a/src/shared/CMakeLists.txt +++ b/src/shared/CMakeLists.txt @@ -32,9 +32,11 @@ if (ENABLE_BUILD_QBS) set(QBS_LIBEXEC_INSTALL_DIR "${IDE_LIBEXEC_PATH}" CACHE STRING "" FORCE) set(QBS_PLUGINS_INSTALL_BASE "${IDE_PLUGIN_PATH}" CACHE STRING "" FORCE) set(QBS_RESOURCES_INSTALL_BASE "${IDE_DATA_PATH}/qbs" CACHE STRING "" FORCE) + set(QBS_DOC_INSTALL_DIR "${IDE_DOC_PATH}" CACHE STRING "" FORCE) set(QBS_HEADERS_INSTALL_DIR "${IDE_DATA_PATH}/qbs/include/qbs" CACHE STRING "" FORCE) - set(INSTALL_PUBLIC_HEADERS OFF) + set(INSTALL_PUBLIC_HEADERS OFF CACHE BOOL "") set(WITH_TESTS OFF) + set(QBS_INSTALL_QCH_DOCS ${WITH_DOCS} CACHE BOOL "") add_subdirectory(qbs) endif() diff --git a/src/shared/qbs b/src/shared/qbs index baa18b3537f..a3bd766f74b 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit baa18b3537f7471b7fec7a4ddcbce628386de0b4 +Subproject commit a3bd766f74ba6f95d1a1d5c1fffea3edd3946091 diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt index 88f4e3b20b7..6e5d03b0e47 100644 --- a/tests/auto/CMakeLists.txt +++ b/tests/auto/CMakeLists.txt @@ -22,4 +22,4 @@ add_subdirectory(toolchaincache) add_subdirectory(tracing) add_subdirectory(treeviewfind) add_subdirectory(utils) -# add_subdirectory(valgrind) +add_subdirectory(valgrind) diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index afb0ec58779..cfe7870ff48 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -333,10 +333,6 @@ struct Value expectedValue.replace('@', context.nameSpace); if (isPattern) { - expectedValue.replace("(", "!"); - expectedValue.replace(")", "!"); - actualValue.replace("(", "!"); - actualValue.replace(")", "!"); const QString anchoredPattern = QRegularExpression::anchoredPattern(expectedValue); //QWARN(qPrintable("MATCH EXP: " + expectedValue + " ACT: " + actualValue)); //QWARN(QRegularExpression(anchoredPattern).match(actualValue).hasMatch() ? "OK" : "NOT OK"); @@ -374,6 +370,8 @@ struct ValuePattern : Value ValuePattern(const QString &ba) : Value(ba) { isPattern = true; } }; +const ValuePattern AnyValue{".*"}; + struct Pointer : Value { Pointer() { hasPtrSuffix = true; } @@ -644,18 +642,6 @@ struct CheckSet : public Check QList checks; }; -struct CheckType : public Check -{ - CheckType(const QByteArray &iname, const Name &name, - const Type &type) - : Check(QString::fromUtf8(iname), name, noValue, type) - {} - - CheckType(const QByteArray &iname, const Type &type) - : Check(QString::fromUtf8(iname), noValue, type) - {} -}; - const QtVersion Qt4 = QtVersion(0, 0x4ffff); const QtVersion Qt5 = QtVersion(0x50000, 0x5ffff); const QtVersion Qt6 = QtVersion(0x60000, 0x6ffff); @@ -1813,7 +1799,8 @@ void tst_Dumpers::dumper() "sc sys.path.insert(1, '" + dumperDir + "')\n" "sc from lldbbridge import *\n" // "sc print(dir())\n" - "sc Tester('" + t->buildPath.toLatin1() + "/doit', {'fancy':1,'forcens':1," + "sc Tester('" + t->buildPath.toLatin1() + "/doit', {" + dumperOptions + + "'fancy':1,'forcens':1," "'autoderef':1,'dyntype':1,'passexceptions':1," "'testing':1,'qobjectnames':1," "'expanded':[" + expandedq + "]})\n" @@ -2057,7 +2044,7 @@ void tst_Dumpers::dumper() pos1 = fullOutput.indexOf("bridgemessage={msg=", pos2 + 1); if (pos1 == -1) break; - pos1 += 21; + pos1 += 20; pos2 = fullOutput.indexOf("\"}", pos1 + 1); if (pos2 == -1) break; @@ -2218,14 +2205,14 @@ void tst_Dumpers::dumper_data() + Check("ba1.12", "[12]", "1", "char") + Check("ba1.13", "[13]", "2", "char") - + CheckType("ba2", "@QByteArray") + + Check("ba2", AnyValue, "@QByteArray") + Check("s", Value('"' + QString(100, QChar('x')) + '"'), "@QString") + Check("ss", Value('"' + QString(100, QChar('c')) + '"'), "std::string") + Check("buf1", Value("\"" + QString(1, QChar(0xee)) + "\""), "@QByteArray") + Check("buf2", Value("\"" + QString(1, QChar(0xee)) + "\""), "@QByteArray") + Check("buf3", "\"\\ee\"", "@QByteArray") - + CheckType("str1", "char *") + + Check("str1", AnyValue, "char *") + Check("ba4", "\"Hell\"", "@QByteArray") + Check("ba5", "\"ello\"", "@QByteArray"); @@ -2283,18 +2270,18 @@ void tst_Dumpers::dumper_data() + Check("d1", "Tue Jan 1 1980", "@QDate") + Check("d1.(ISO)", "\"1980-01-01\"", "@QString") % NeedsInferiorCall + Check("d1.toString", "\"Tue Jan 1 1980\"", "@QString") % NeedsInferiorCall - + CheckType("d1.(Locale)", "@QString") % NeedsInferiorCall + + Check("d1.(Locale)", AnyValue, "@QString") % NeedsInferiorCall % QtVersion(0, 0x5ffff) // Gone in Qt6 - + CheckType("d1.(SystemLocale)", "@QString") % NeedsInferiorCall + + Check("d1.(SystemLocale)", AnyValue, "@QString") % NeedsInferiorCall % QtVersion(0, 0x5ffff) // Gone in Qt6 + Check("t0", "(invalid)", "@QTime") + Check("t1", "13:15:32", "@QTime") + Check("t1.(ISO)", "\"13:15:32\"", "@QString") % NeedsInferiorCall + Check("t1.toString", "\"13:15:32\"", "@QString") % NeedsInferiorCall - + CheckType("t1.(Locale)", "@QString") % NeedsInferiorCall + + Check("t1.(Locale)", AnyValue, "@QString") % NeedsInferiorCall % QtVersion(0, 0x5ffff) // Gone in Qt6 - + CheckType("t1.(SystemLocale)", "@QString") % NeedsInferiorCall + + Check("t1.(SystemLocale)", AnyValue, "@QString") % NeedsInferiorCall % QtVersion(0, 0x5ffff) // Gone in Qt6 + Check("dt0", "(invalid)", "@QDateTime") @@ -2302,9 +2289,9 @@ void tst_Dumpers::dumper_data() + Check("dt1", Value5("Tue Jan 1 13:15:32 1980 GMT"), "@QDateTime") + Check("dt1.(ISO)", "\"1980-01-01T13:15:32Z\"", "@QString") % NeedsInferiorCall - + CheckType("dt1.(Locale)", "@QString") % NeedsInferiorCall + + Check("dt1.(Locale)", AnyValue, "@QString") % NeedsInferiorCall % QtVersion(0, 0x5ffff) // Gone in Qt6 - + CheckType("dt1.(SystemLocale)", "@QString") % NeedsInferiorCall + + Check("dt1.(SystemLocale)", AnyValue, "@QString") % NeedsInferiorCall % QtVersion(0, 0x5ffff) // Gone in Qt6 + Check("dt1.toString", Value4("\"Tue Jan 1 13:15:32 1980\""), "@QString") % NeedsInferiorCall @@ -2473,17 +2460,17 @@ void tst_Dumpers::dumper_data() + Check("h6", "<1 items>", "@QHash<@QString, Foo>") + Check("h6.0.key", "\"22.0\"", "@QString") - + CheckType("h6.0.value", "Foo") + + Check("h6.0.value", AnyValue, "Foo") + Check("h6.0.value.a", "22", "int") + CoreProfile() + Check("h7", "<3 items>", "@QHash<@QString, @QPointer<@QObject>>") + Check("h7.0.key", Value4("\"Hallo\""), "@QString") + Check("h7.0.key", Value5("\"Welt\""), "@QString") - + CheckType("h7.0.value", "@QPointer<@QObject>") - //+ CheckType("h7.0.value.o", "@QObject") + + Check("h7.0.value", AnyValue, "@QPointer<@QObject>") + //+ Check("h7.0.value.o", AnyValue, "@QObject") + Check("h7.2.key", "\".\"", "@QString") - + CheckType("h7.2.value", "@QPointer<@QObject>") + + Check("h7.2.value", AnyValue, "@QPointer<@QObject>") + Check("h8", "<3 items>", TypeDef("@QHash", "Hash")) + Check5("h8.0", "[0] 22", FloatValue("22"), "") @@ -2549,7 +2536,7 @@ void tst_Dumpers::dumper_data() + GuiProfile() + Check("im", "(200x200)", "@QImage") - + CheckType("pain", "@QPainter") + + Check("pain", AnyValue, "@QPainter") + Check("pm", "(200x200)", "@QPixmap"); @@ -2601,10 +2588,10 @@ void tst_Dumpers::dumper_data() + Check("l2.1", "[1]", "104", "unsigned int") + Check("l3", "<3 items>", "@QLinkedList") - + CheckType("l3.0", "[0]", "Foo") + + Check("l3.0", "[0]", AnyValue, "Foo") + Check("l3.0.a", "1", "int") + Check("l3.1", "[1]", "0x0", "Foo *") - + CheckType("l3.2", "[2]", "Foo") + + Check("l3.2", "[2]", AnyValue, "Foo") + Check("l3.2.a", "3", "int") + Check("l4", "<2 items>", TypeDef("@QLinkedList", @@ -2614,9 +2601,9 @@ void tst_Dumpers::dumper_data() + Check("l5", "<2 items>", "@QLinkedList") - + CheckType("l5.0", "[0]", "Foo") + + Check("l5.0", "[0]", AnyValue, "Foo") + Check("l5.0.a", "1", "int") - + CheckType("l5.1", "[1]", "Foo") + + Check("l5.1", "[1]", AnyValue, "Foo") + Check("l5.1.a", "2", "int") + Check("l6", "<2 items>", "@QLinkedList") @@ -2715,8 +2702,8 @@ void tst_Dumpers::dumper_data() + Check("l4.0", "[0]", "\"1\"", "@QString") + Check("l5", "<3 items>", "@QList") - + CheckType("l5.0", "[0]", "int") - + CheckType("l5.1", "[1]", "int") + + Check("l5.0", "[0]", AnyValue, "int") + + Check("l5.1", "[1]", AnyValue, "int") + Check("l5.2", "[2]", "0x0", "int*") @@ -2748,7 +2735,7 @@ void tst_Dumpers::dumper_data() + Check("l12", "<0 items>", "@QList") + Check("l13", "<4 items>", "@QList") - + CheckType("l13.0", "[0]", "std::string") + + Check("l13.0", "[0]", AnyValue, "std::string") + Check("l13.3", "[3]" ,"\"dd\"", "std::string"); @@ -2802,8 +2789,8 @@ void tst_Dumpers::dumper_data() + CoreProfile() + NoCdbEngine - + CheckType("loc", "@QLocale") - + CheckType("m", "@QLocale::MeasurementSystem") + + Check("loc", AnyValue, "@QLocale") + + Check("m", AnyValue, "@QLocale::MeasurementSystem") + Check("loc1", "\"en_US\"", "@QLocale") % NeedsInferiorCall + Check("loc1.country", "@QLocale::UnitedStates (225)", "@QLocale::Country") % Qt5 + Check("loc1.language", "@QLocale::English (31)", "@QLocale::Language") % Qt5 @@ -2816,7 +2803,7 @@ void tst_Dumpers::dumper_data() + Check("loc1.groupSeparator", "44", "@QChar") % Qt5 // , + Check("loc1.negativeSign", "45", "@QChar") % Qt5 // - + Check("loc1.positiveSign", "43", "@QChar") % Qt5 // + - + Check("m1", ValuePattern(".*Imperial.*System (1)"), + + Check("m1", ValuePattern(".*Imperial.*System \\(1\\)"), TypePattern(".*MeasurementSystem")) % Qt5; @@ -3913,7 +3900,7 @@ void tst_Dumpers::dumper_data() + Check("s6", "\"Pointer String Test\"", "@QString") + Check("s7", QString::fromLatin1("\"a%1a\"").arg(oUmlaut), "@QString") % Qt5 - + CheckType("w", "w", "wchar_t *") + + Check("w", "w", AnyValue, "wchar_t *") + Check("s8", "\"el\"", "@QStringRef") % Qt5 + Check("s9", "(null)", "@QStringRef") % Qt5 @@ -3969,7 +3956,7 @@ void tst_Dumpers::dumper_data() + GuiProfile() - + CheckType("doc", "@QTextDocument") + + Check("doc", AnyValue, "@QTextDocument") + Check("tc", "4", "@QTextCursor") + Check("pos", "4", "int") + Check("anc", "1", "int"); @@ -4012,7 +3999,7 @@ void tst_Dumpers::dumper_data() + CoreProfile() - + CheckType("this", "Thread") + + Check("this", AnyValue, "Thread") + Check("this.@1", "[@QThread]", "\"This is thread #3\"", "@QThread"); //+ Check("this.@1.@1", "[@QObject]", "\"This is thread #3\"", "@QObject"); @@ -4052,7 +4039,7 @@ void tst_Dumpers::dumper_data() + Check("v0", "(invalid)", "@QVariant (invalid)") //+ Check("v1", "\"Some string\"", "@QVariant (QString)") - + CheckType("v1", "@QVariant (QString)") + + Check("v1", AnyValue, "@QVariant (QString)") + Check("my", "<2 items>", TypePattern("@QMap|@QMap>|MyType")) + CheckPairish("my.0.key", "1", "unsigned int") @@ -4061,7 +4048,7 @@ void tst_Dumpers::dumper_data() + CheckPairish("my.1.key", "3", "unsigned int") + CheckPairish("my.1.value", "<1 items>", TypePattern("@QList<@QString>|@QStringList")) + CheckPairish("my.1.value.0", "[0]", "\"World\"", "@QString") - //+ CheckType("v2", "@QVariant (MyType)") + //+ Check("v2", AnyValue, "@QVariant (MyType)") + CheckPairish("v2.data.0.key", "1", "unsigned int") % NeedsInferiorCall + CheckPairish("v2.data.0.value", "<1 items>", "@QStringList") % NeedsInferiorCall + CheckPairish("v2.data.0.value.0", "[0]", "\"Hello\"", "@QString") % NeedsInferiorCall @@ -4226,7 +4213,7 @@ void tst_Dumpers::dumper_data() + Check("var26", "(0.0, 0.0)", "@QVariant (QPointF)") + Check("var27", "\"\"", "@QVariant (QRegExp)") % Qt5 + Check("var28", "<0 items>", "@QVariant (QVariantHash)") - + CheckType("var31", "@QVariant (void *)") + + Check("var31", AnyValue, "@QVariant (void *)") + Check("var32", "32", "@QVariant (long)") + Check("var33", "33", "@QVariant (short)") + Check("var34", "34", "@QVariant (char)") @@ -4322,8 +4309,8 @@ void tst_Dumpers::dumper_data() + Check("vl0", "<0 items>", TypeDef("@QList<@QVariant>", "@QVariantList")) + Check("vl1", "<6 items>", TypeDef("@QList<@QVariant>", "@QVariantList")) - + CheckType("vl1.0", "[0]", "@QVariant (int)") - + CheckType("vl1.2", "[2]", "@QVariant (QString)") + + Check("vl1.0", "[0]", AnyValue, "@QVariant (int)") + + Check("vl1.2", "[2]", AnyValue, "@QVariant (QString)") + Check("v", "<1 items>", "@QVariant (QVariantList)") + Check("v.0", "[0]", "\"one\"", "@QVariant (QString)"); @@ -4437,17 +4424,17 @@ void tst_Dumpers::dumper_data() + Check("v3.1.a", "2", "int") + Check("v4", "<3 items>", TypePattern("@QList|@QVector")) - + CheckType("v4.0", "[0]", "Foo") + + Check("v4.0", "[0]", AnyValue, "Foo") + Check("v4.0.a", "1", "int") + Check("v4.1", "[1]", "0x0", "Foo *") - + CheckType("v4.2", "[2]", "Foo") + + Check("v4.2", "[2]", AnyValue, "Foo") + Check("v4.2.a", "5", "int") + Check("v5", "<2 items>", TypePattern("@QList|@QVector")) + Check("v5.0", "[0]", "1", "bool") + Check("v5.1", "[1]", "0", "bool") - + CheckType("pv", TypePattern("@QList<@QList>|@QVector<@QList>")) + + Check("pv", AnyValue, TypePattern("(@QList|@QVector)<@QList>")) + Check("pv.0", "[0]", "<1 items>", "@QList") + Check("pv.0.0", "[0]", "1", "int") + Check("pv.1", "[1]", "<2 items>", "@QList") @@ -4513,17 +4500,17 @@ void tst_Dumpers::dumper_data() + Check("v3.1.a", "2", "int") + Check("v4", "<3 items>", "@QVarLengthArray") - + CheckType("v4.0", "[0]", "Foo") + + Check("v4.0", "[0]", AnyValue, "Foo") + Check("v4.0.a", "1", "int") + Check("v4.1", "[1]", "0x0", "Foo *") - + CheckType("v4.2", "[2]", "Foo") + + Check("v4.2", "[2]", AnyValue, "Foo") + Check("v4.2.a", "5", "int") + Check("v5", "<2 items>", "@QVarLengthArray") + Check("v5.0", "[0]", "1", "bool") + Check("v5.1", "[1]", "0", "bool") - + CheckType("pv", "@QVarLengthArray<@QList, 256>") + + Check("pv", AnyValue, "@QVarLengthArray<@QList, 256>") + Check("pv.0", "[0]", "<1 items>", "@QList") + Check("pv.0.0", "[0]", "1", "int") + Check("pv.1", "[1]", "<2 items>", "@QList") @@ -4628,7 +4615,7 @@ void tst_Dumpers::dumper_data() + GdbEngine + Check("x", "(null)", "std::function") - + Check("y", ValuePattern(".* "), "std::function"); + + Check("y", ValuePattern(".* "), "std::function"); QTest::newRow("StdDeque") @@ -5695,9 +5682,9 @@ void tst_Dumpers::dumper_data() // "MyBar bar;\n" // "MyAnon anon;\n" // "baz::MyBaz baz;\n" -// + CheckType("anon namespc::nested::(anonymous namespace)::MyAnon"); +// + Check("anon namespc::nested::(anonymous namespace)::MyAnon", AnyValue); // + Check("bar", "namespc::nested::MyBar"); -// + CheckType("baz namespc::nested::(anonymous namespace)::baz::MyBaz"); +// + Check("baz namespc::nested::(anonymous namespace)::baz::MyBaz", AnyValue); // + Check("foo", "namespc::nested::MyFoo"); // // Continue"); // // step into the doit() functions @@ -5765,15 +5752,15 @@ void tst_Dumpers::dumper_data() "&s, &t, &w, &ch, &wch") - + CheckType("s", "char [5]") + + Check("s", AnyValue, "char [5]") + Check("s.0", "[0]", "97", "char") - + CheckType("t", "char [6]") + + Check("t", AnyValue, "char [6]") + Check("t.0", "[0]", "97", "char") - + CheckType("w", "wchar_t [4]") - + Check("ch.0", "[0]", "97", TypeDef("char", "CHAR")) - + CheckType("ch", TypeDef("char [5]", "CHAR [5]")) - + Check("wch.0", "[0]", "97", TypeDef("wchar_t", "WCHAR")) - + CheckType("wch", TypeDef("wchar_t[4]", "WCHAR [4]")); + + Check("w", AnyValue, "wchar_t [4]") + + Check("ch.0", "[0]", "97", TypePattern("char|CHAR")) + + Check("ch", AnyValue, TypePattern("(char|CHAR)\\[5\\]")) + + Check("wch.0", "[0]", "97", TypePattern("wchar_t|WCHAR")) + + Check("wch", AnyValue, TypePattern("(wchar_t|WCHAR)\\[4\\]")); QTest::newRow("CharPointers") @@ -5792,11 +5779,11 @@ void tst_Dumpers::dumper_data() + Check("str1", "\"abc\"", "char *") + Check("str2", "\"abc\"", TypeDef("char *", "gchar *")) + Check("str2.0", "[0]", "97", TypeDef("char", "gchar")) // 97: ASCII 'a' - + CheckType("u", "unsigned char *") - + CheckType("uu", "unsigned char [3]") - + CheckType("s", "char *") - + CheckType("t", "char *") - + CheckType("w", "wchar_t *"); + + Check("u", AnyValue, "unsigned char *") + + Check("uu", AnyValue, "unsigned char [3]") + + Check("s", AnyValue, "char *") + + Check("t", AnyValue, "char *") + + Check("w", AnyValue, "wchar_t *"); // All: Select UTF-8 in "Change Format for Type" in L&W context menu"); // Windows: Select UTF-16 in "Change Format for Type" in L&W context menu"); @@ -5915,7 +5902,7 @@ void tst_Dumpers::dumper_data() "Flags fone = one;\n" "Flags fthree = (Flags)(one|two);\n" "Flags fmixed = (Flags)(two|8);\n" - "Flags fbad = (Flags)(24);", + "Flags fbad = (Flags)(8);", "&fone, &fthree, &fmixed, &fbad") @@ -5923,8 +5910,10 @@ void tst_Dumpers::dumper_data() + Check("fone", "one (1)", "Flags") + Check("fthree", "(one | two) (3)", "Flags") - + Check("fmixed", "(two | unknown: 8) (10)", "Flags") - + Check("fbad", "(unknown: 24) (24)", "Flags"); + // There are optional 'unknown:' prefixes and possibly hex + // displays for the unknown flags. + + Check("fmixed", ValuePattern("\\(two \\| .*8\\) \\(10\\)"), "Flags") + + Check("fbad", ValuePattern(".*8.* \\(.*8\\)"), "Flags"); QTest::newRow("EnumInClass") @@ -5943,9 +5932,11 @@ void tst_Dumpers::dumper_data() + NoCdbEngine - + Check("e.e1", "(E::b1 | E::c1) (3)", "E::Enum1") - + Check("e.e2", "(E::b2 | E::c2) (3)", "E::Enum2") - + Check("e.e3", "(E::b3 | E::c3) (3)", "E::Enum3"); + // GDB prefixes with E::, LLDB not. + + Check("e.e1", ValuePattern("\\((E::)?b1 \\| (E::)?c1\\) \\(3\\)"), "E::Enum1") + + Check("e.e2", ValuePattern("\\((E::)?b2 \\| (E::)?c2\\) \\(3\\)"), "E::Enum2") + + Check("e.e3", ValuePattern("\\((E::)?b3 \\| (E::)?c3\\) \\(3\\)"), "E::Enum3") +; QTest::newRow("QSizePolicy") @@ -6033,19 +6024,19 @@ void tst_Dumpers::dumper_data() "&a1, &a2, &a3") + CoreProfile() - + CheckType("a1", "@QString [20]") + + Check("a1", AnyValue, "@QString [20]") + Check("a1.0", "[0]", "\"a\"", "@QString") + Check("a1.3", "[3]", "\"d\"", "@QString") + Check("a1.4", "[4]", "\"\"", "@QString") + Check("a1.19", "[19]", "\"\"", "@QString") - + CheckType("a2", "@QByteArray [20]") + + Check("a2", AnyValue, "@QByteArray [20]") + Check("a2.0", "[0]", "\"a\"", "@QByteArray") + Check("a2.3", "[3]", "\"d\"", "@QByteArray") + Check("a2.4", "[4]", "\"\"", "@QByteArray") + Check("a2.19", "[19]", "\"\"", "@QByteArray") - + CheckType("a3", "Foo [10]") + + Check("a3", AnyValue, "Foo [10]") + Check("a3.0", "[0]", "", "Foo") + Check("a3.9", "[9]", "", "Foo"); @@ -6266,8 +6257,8 @@ void tst_Dumpers::dumper_data() "U u;", "&u") + Check("u", "", "U") - + CheckType("u.a", "int") - + CheckType("u.b", "int"); + + Check("u.a", AnyValue, "int") + + Check("u.b", AnyValue, "int"); // QTest::newRow("TypeFormats") // << Data( @@ -6283,9 +6274,9 @@ void tst_Dumpers::dumper_data() // " u = QString::fromUcs4((uint *)w);\n" // "else\n" // " u = QString::fromUtf16((ushort *)w);\n" -// + CheckType("s char *"); +// + Check("s char *", AnyValue); // + Check("u "" QString"); -// + CheckType("w wchar_t *"); +// + Check("w wchar_t *", AnyValue); QTest::newRow("PointerTypedef") @@ -6378,8 +6369,8 @@ void tst_Dumpers::dumper_data() + NoCdbEngine // The Cdb has no information about references - + CheckType("b1", "DerivedClass") // autoderef - + CheckType("b2", "DerivedClass &"); + + Check("b1", AnyValue, "DerivedClass") // autoderef + + Check("b2", AnyValue, "DerivedClass &"); /* @@ -6395,9 +6386,9 @@ void tst_Dumpers::dumper_data() "}\n" "unused(&bigv[10]);\n") + Check("N", "10000", "int") - + CheckType("bigv", "@QDateTime [10000]") - + CheckType("bigv.0", "[0]", "@QDateTime") - + CheckType("bigv.9999", "[9999]", "@QDateTime"); + + Check("bigv", AnyValue, "@QDateTime [10000]") + + Check("bigv.0", AnyValue, "[0]", "@QDateTime") + + Check("bigv.9999", AnyValue, "[9999]", "@QDateTime"); */ QTest::newRow("LongEvaluation2") @@ -6413,7 +6404,7 @@ void tst_Dumpers::dumper_data() + BigArrayProfile() + Check("N", "1000", "int") - + CheckType("bigv", "int [1000]") + + Check("bigv", AnyValue, "int [1000]") + Check("bigv.0", "[0]", "0", "int") + Check("bigv.999", "[999]", "999", "int"); @@ -6448,8 +6439,8 @@ void tst_Dumpers::dumper_data() "&x, &f, &m, &a1, &a2") - + CheckType("f", TypeDef("", "func_t")) - + CheckType("m", TypeDef("int*", "member_t")); + + Check("f", AnyValue, TypeDef("", "func_t")) + + Check("m", AnyValue, TypeDef("int*", "member_t")); QTest::newRow("PassByReference") @@ -6468,7 +6459,7 @@ void tst_Dumpers::dumper_data() + CoreProfile() + NoCdbEngine // The Cdb has no information about references - + CheckType("f", "Foo &") + + Check("f", AnyValue, "Foo &") + Check("f.a", "12", "int"); @@ -6576,10 +6567,10 @@ void tst_Dumpers::dumper_data() + Cxx11Profile() + GdbVersion(80200) - + Check("i", "1", "int &&") % NoCdbEngine - + Check("i", "1", "int") % CdbEngine - + CheckType("s", "S &&") % NoCdbEngine - + CheckType("s", "S") % CdbEngine + // GDB has &&, LLDB & or &&, CDB nothing, possibly also depending + // on compiler. Just check the base type is there. + + Check("i", "1", TypePattern("int &?&?")) + + Check("s", AnyValue, TypePattern("S &?&?")) + Check("s.a", "32", "int"); @@ -6602,9 +6593,9 @@ void tst_Dumpers::dumper_data() + Profile("QMAKE_CXXFLAGS += -msse2") - + CheckType("sseA", "__m128") + + Check("sseA", AnyValue, "__m128") + Check("sseA.2", "[2]", FloatValue("4"), "float") - + CheckType("sseB", "__m128"); + + Check("sseB", AnyValue, "__m128"); QTest::newRow("BoostOptional") @@ -6906,8 +6897,8 @@ void tst_Dumpers::dumper_data() + Check("map", "<2 items>", "@QMap") + CheckPairish("map.0.key", "-1", "int") - + CheckType("map.0.value", "CustomStruct") % Qt5 - + CheckType("map.0.second", "CustomStruct") % Qt6 + + Check("map.0.value", AnyValue, "CustomStruct") % Qt5 + + Check("map.0.second", AnyValue, "CustomStruct") % Qt6 + CheckPairish("map.0.value.dval", FloatValue("3.14"), "double") + CheckPairish("map.0.value.id", "-1", "int"); @@ -6959,7 +6950,7 @@ void tst_Dumpers::dumper_data() + NetworkProfile() + Check("raw", "<0 items>", "@QList<@QByteArray>") - + CheckType("request", "@QNetworkRequest") + + Check("request", AnyValue, "@QNetworkRequest") + Check("url", "\"http://127.0.0.1/\"", "@QUrl &") % NoCdbEngine + Check("url", "\"http://127.0.0.1/\"", "@QUrl") % CdbEngine; @@ -6981,16 +6972,16 @@ void tst_Dumpers::dumper_data() "&s2, &s4, &a1, &a2") - + CheckType("a1", "S1 [10]") - + CheckType("a2", TypeDef("S1 [10]", "Array")) - + CheckType("s2", "S2") - + CheckType("s2.@1", "[S1]", "S1") + + Check("a1", AnyValue, "S1 [10]") + + Check("a2", AnyValue, TypeDef("S1 [10]", "Array")) + + Check("s2", AnyValue, "S2") + + Check("s2.@1", "[S1]", AnyValue, "S1") + Check("s2.@1.m1", "5", "int") - + CheckType("s2.@1.m2", "int") - + CheckType("s4", "S4") - + CheckType("s4.@1", "[S3]", "S3") + + Check("s2.@1.m2", AnyValue, "int") + + Check("s4", AnyValue, "S4") + + Check("s4.@1", "[S3]", AnyValue, "S3") + Check("s4.@1.m1", "5", "int") - + CheckType("s4.@1.m2", "int"); + + Check("s4.@1.m2", AnyValue, "int"); // https://bugreports.qt.io/browse/QTCREATORBUG-6465 @@ -7003,7 +6994,7 @@ void tst_Dumpers::dumper_data() "&foo, &bar") - + CheckType("bar", "char[20]"); + + Check("bar", AnyValue, "char[20]"); #ifndef Q_OS_WIN @@ -7171,7 +7162,7 @@ void tst_Dumpers::dumper_data() + NoCdbEngine - + CheckType("obj", "Circle"); + + Check("obj", AnyValue, "Circle"); @@ -7205,7 +7196,7 @@ void tst_Dumpers::dumper_data() + Check("m.1.second.0", "[0]", "\"1\"", "std::string") + Check("m.1.second.1", "[1]", "\"2\"", "std::string") + Check("m.1.second.2", "[2]", "\"3\"", "std::string") - + CheckType("it", TypeDef("std::_Tree_const_iterator>>>>", "std::map >::const_iterator")) @@ -7368,13 +7359,13 @@ void tst_Dumpers::dumper_data() + Check("ptrConst.@1", "[Base]", "", "Base") + Check("ptrConst.b", "2", "int") + Check("ptrToPtr", "", "Derived") - //+ CheckType("ptrToPtr.[vptr]", " ") + //+ Check("ptrToPtr.[vptr]", AnyValue, " ") + Check("ptrToPtr.@1.a", "1", "int") + Check("ref", "", "Derived &") - //+ CheckType("ref.[vptr]", "") + //+ Check("ref.[vptr]", AnyValue, "") + Check("ref.@1.a", "1", "int") + Check("refConst", "", "Derived &") - //+ CheckType("refConst.[vptr]", "") + //+ Check("refConst.[vptr]", AnyValue, "") + Check("refConst.@1.a", "1", "int") + Check("s", "", "S") + Check("s.ptr", "", "Derived") @@ -7972,7 +7963,7 @@ void tst_Dumpers::dumper_data() "&f") + Check("f.a", "15", "int") - + Check("f.b", "", "") % NoCdbEngine + + Check("f.b", "", "") % GdbEngine + Check("f.b", "", "") % CdbEngine; @@ -8015,7 +8006,7 @@ void tst_Dumpers::dumper_data() + QtVersion(0x50800, 0x5ffff) // Both test cases are gone in Qt6 + Check("d.Log10_2_100000", "30103", "int") - + Check("p.FlagBit", "", "") % NoCdbEngine + + Check("p.FlagBit", "", "") % GdbEngine + Check("p.FlagBit", "", "", "") % CdbEngine; #endif diff --git a/tests/auto/valgrind/CMakeLists.txt b/tests/auto/valgrind/CMakeLists.txt new file mode 100644 index 00000000000..4091dd61268 --- /dev/null +++ b/tests/auto/valgrind/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(callgrind) +# add_subdirectory(memcheck) diff --git a/tests/auto/valgrind/callgrind/CMakeLists.txt b/tests/auto/valgrind/callgrind/CMakeLists.txt new file mode 100644 index 00000000000..70a5671caad --- /dev/null +++ b/tests/auto/valgrind/callgrind/CMakeLists.txt @@ -0,0 +1,38 @@ +add_qtc_test(tst_callgrindparsertests + DEPENDS Utils QtcSsh Core ProjectExplorer Debugger Qt5::Core Qt5::Network + DEFINES + PARSERTESTS_DATA_DIR="${CMAKE_CURRENT_LIST_DIR}/data" + CALLGRINDPARSERTESTS + INCLUDES "${PROJECT_SOURCE_DIR}/src/plugins" + SOURCES callgrindparsertests.cpp callgrindparsertests.h +) + +extend_qtc_test(tst_callgrindparsertests + SOURCES_PREFIX "${PROJECT_SOURCE_DIR}/src/plugins/valgrind/" + SOURCES + callgrind/callgrindcallmodel.h callgrind/callgrindcallmodel.cpp + callgrind/callgrindcontroller.h callgrind/callgrindcontroller.cpp + callgrind/callgrindcostitem.h callgrind/callgrindcostitem.cpp + callgrind/callgrindcycledetection.h callgrind/callgrindcycledetection.cpp + callgrind/callgrinddatamodel.h callgrind/callgrinddatamodel.cpp + callgrind/callgrindfunction.h callgrind/callgrindfunction_p.h callgrind/callgrindfunction.cpp + callgrind/callgrindfunctioncall.h callgrind/callgrindfunctioncall.cpp + callgrind/callgrindfunctioncycle.h callgrind/callgrindfunctioncycle.cpp + callgrind/callgrindparsedata.h callgrind/callgrindparsedata.cpp + callgrind/callgrindparser.h callgrind/callgrindparser.cpp + callgrind/callgrindproxymodel.h callgrind/callgrindproxymodel.cpp + callgrind/callgrindstackbrowser.h callgrind/callgrindstackbrowser.cpp + valgrindrunner.h valgrindrunner.cpp + xmlprotocol/announcethread.h xmlprotocol/announcethread.cpp + xmlprotocol/error.h xmlprotocol/error.cpp + xmlprotocol/errorlistmodel.h xmlprotocol/errorlistmodel.cpp + xmlprotocol/frame.h xmlprotocol/frame.cpp + xmlprotocol/modelhelpers.h xmlprotocol/modelhelpers.cpp + xmlprotocol/parser.h xmlprotocol/parser.cpp + xmlprotocol/stack.h xmlprotocol/stack.cpp + xmlprotocol/stackmodel.h xmlprotocol/stackmodel.cpp + xmlprotocol/status.h xmlprotocol/status.cpp + xmlprotocol/suppression.h xmlprotocol/suppression.cpp + xmlprotocol/threadedparser.h xmlprotocol/threadedparser.cpp +) +# skipping modeltest (does not compile due to missing widget handler)