Merge remote-tracking branch 'origin/4.15'

Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp

Change-Id: I403b236c40d73a61ae22304e289e9d4374366395
This commit is contained in:
Eike Ziller
2021-04-06 15:17:40 +02:00
221 changed files with 4167 additions and 3192 deletions

View File

@@ -9,7 +9,7 @@ env:
CMAKE_VERSION: 3.18.3
NINJA_VERSION: 1.10.1
BUILD_TYPE: Release
CCACHE_VERSION: 3.7.7
CCACHE_VERSION: 4.2.1
QT_MIRRORS: download.qt.io;mirrors.ocf.berkeley.edu/qt;ftp.fau.de/qtproject;mirror.bit.edu.cn/qtproject
jobs:
@@ -485,6 +485,19 @@ jobs:
message(FATAL_ERROR "Build failed")
endif()
- name: ccache statistics
shell: cmake -P {0}
run: |
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}" ccache_basedir)
set(ENV{CCACHE_BASEDIR} "${ccache_basedir}")
set(ENV{CCACHE_DIR} "${ccache_basedir}/.ccache")
set(ENV{CCACHE_SLOPPINESS} "pch_defines,time_macros")
set(ENV{CCACHE_COMPRESS} "true")
set(ENV{CCACHE_COMPRESSLEVEL} "6")
set(ENV{CCACHE_MAXSIZE} "800M")
if ("${{ matrix.config.cxx }}" STREQUAL "cl")
set(ENV{CCACHE_MAXSIZE} "1200M")
endif()
execute_process(COMMAND ccache -s)
- name: Run tests

View File

@@ -162,7 +162,7 @@ install(
qtcreator.pri
qtcreatordata.pri
qtcreator_ide_branding.pri
DESTINATION include
DESTINATION ${IDE_HEADER_INSTALL_PATH}
COMPONENT Devel EXCLUDE_FROM_ALL
)
install(
@@ -171,7 +171,7 @@ install(
src/qtcreatorplugin.pri
src/qtcreatortool.pri
src/rpath.pri
DESTINATION include/src
DESTINATION ${IDE_HEADER_INSTALL_PATH}/src
COMPONENT Devel EXCLUDE_FROM_ALL
)

View File

@@ -49,6 +49,14 @@ find_path(CRASHPAD_LIB_DIR
"${CMAKE_PREFIX_PATH}"
)
find_path(CRASHPAD_GEN_DIR
NAMES build/chromeos_buildflags.h
PATH_SUFFIXES gen
HINTS
"${CRASHPAD_BIN_DIR}"
"${CMAKE_PREFIX_PATH}"
)
if(APPLE)
find_path(CRASHPAD_OBJ_DIR
NAMES mig_output.child_portServer.o
@@ -58,13 +66,6 @@ if(APPLE)
"${CRASHPAD_LIB_DIR}/out/Default"
"${CMAKE_PREFIX_PATH}"
)
find_path(CRASHPAD_GEN_DIR
NAMES build/chromeos_buildflags.h
PATH_SUFFIXES gen
HINTS
"${CRASHPAD_BIN_DIR}"
"${CMAKE_PREFIX_PATH}"
)
set(CRASHPAD_APPLE_VARS CRASHPAD_OBJ_DIR CRASHPAD_GEN_DIR)
find_library(FWbsm bsm)
find_library(FWAppKit AppKit)
@@ -81,7 +82,8 @@ if(Crashpad_FOUND)
add_library(Crashpad::Crashpad UNKNOWN IMPORTED)
target_include_directories(Crashpad::Crashpad INTERFACE
"${CRASHPAD_INCLUDE_DIR}"
"${CRASHPAD_INCLUDE_DIR}/third_party/mini_chromium/mini_chromium")
"${CRASHPAD_INCLUDE_DIR}/third_party/mini_chromium/mini_chromium"
"${CRASHPAD_GEN_DIR}")
if(WIN32)
target_link_libraries(Crashpad::Crashpad INTERFACE
"${CRASHPAD_LIB_DIR}/third_party/mini_chromium/mini_chromium/base/base.lib"
@@ -106,7 +108,6 @@ if(Crashpad_FOUND)
${FWbsm} ${FWAppKit} ${FWIOKit} ${FWSecurity})
set_target_properties(Crashpad::Crashpad PROPERTIES
IMPORTED_LOCATION "${CRASHPAD_LIB_DIR}/client/libclient.a")
target_include_directories(Crashpad::Crashpad INTERFACE "${CRASHPAD_GEN_DIR}")
elseif(UNIX)
# TODO: Crashpad is not well supported on linux currently
target_link_libraries(Crashpad::Crashpad INTERFACE

View File

@@ -18,6 +18,9 @@ set(IDE_DATA_PATH "${_IDE_DATA_PATH}") # The IDE data path (rel
set(IDE_DOC_PATH "${_IDE_DOC_PATH}") # The IDE documentation path (relative to CMAKE_INSTALL_PREFIX).
set(IDE_BIN_PATH "${_IDE_BIN_PATH}") # The IDE bin path (relative to CMAKE_INSTALL_PREFIX).
set(IDE_HEADER_INSTALL_PATH "${_IDE_HEADER_INSTALL_PATH}")
set(IDE_CMAKE_INSTALL_PATH "${_IDE_CMAKE_INSTALL_PATH}")
file(RELATIVE_PATH RELATIVE_PLUGIN_PATH "/${IDE_BIN_PATH}" "/${IDE_PLUGIN_PATH}")
file(RELATIVE_PATH RELATIVE_LIBEXEC_PATH "/${IDE_BIN_PATH}" "/${IDE_LIBEXEC_PATH}")
file(RELATIVE_PATH RELATIVE_DATA_PATH "/${IDE_BIN_PATH}" "/${IDE_DATA_PATH}")
@@ -93,6 +96,14 @@ function(qtc_output_binary_dir varName)
endif()
endfunction()
function(qtc_source_dir varName)
if (QTC_MERGE_BINARY_DIR)
set(${varName} ${QtCreator_SOURCE_DIR} PARENT_SCOPE)
else()
set(${varName} ${PROJECT_SOURCE_DIR} PARENT_SCOPE)
endif()
endfunction()
function(add_qtc_library name)
cmake_parse_arguments(_arg "STATIC;OBJECT;SKIP_TRANSLATION;ALLOW_ASCII_CASTS;UNVERSIONED;FEATURE_INFO"
"DESTINATION;COMPONENT;SOURCES_PREFIX;BUILD_DEFAULT"
@@ -208,7 +219,7 @@ function(add_qtc_library name)
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
PUBLIC
"$<BUILD_INTERFACE:${public_build_interface_dir}>"
"$<INSTALL_INTERFACE:include/${include_dir_relative_path}>"
"$<INSTALL_INTERFACE:${IDE_HEADER_INSTALL_PATH}/${include_dir_relative_path}>"
)
endif()
@@ -463,7 +474,7 @@ function(add_qtc_plugin target_name)
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
PUBLIC
"$<BUILD_INTERFACE:${public_build_interface_dir}>"
"$<INSTALL_INTERFACE:include/${include_dir_relative_path}>"
"$<INSTALL_INTERFACE:${IDE_HEADER_INSTALL_PATH}/${include_dir_relative_path}>"
)
set(plugin_dir "${IDE_PLUGIN_PATH}")
@@ -531,18 +542,18 @@ function(add_qtc_plugin target_name)
# export of external plugins
install(EXPORT ${export}
FILE ${export}Targets.cmake
DESTINATION lib/cmake/${export}
DESTINATION ${IDE_CMAKE_INSTALL_PATH}/${export}
COMPONENT Devel EXCLUDE_FROM_ALL
NAMESPACE QtCreator::
)
include(CMakePackageConfigHelpers)
configure_package_config_file(${_THIS_MODULE_BASE_DIR}/Config.cmake.in
"${CMAKE_BINARY_DIR}/cmake/${export}Config.cmake"
INSTALL_DESTINATION lib/cmake/${export}
INSTALL_DESTINATION ${IDE_CMAKE_INSTALL_PATH}/${export}
)
install(
FILES ${CMAKE_BINARY_DIR}/cmake/${export}Config.cmake
DESTINATION lib/cmake/${export}
DESTINATION ${IDE_CMAKE_INSTALL_PATH}/${export}
COMPONENT Devel EXCLUDE_FROM_ALL
)
export(EXPORT ${export}
@@ -971,12 +982,13 @@ function(qtc_add_public_header header)
set(header "${CMAKE_CURRENT_SOURCE_DIR}/${header}")
endif()
qtc_source_dir(qtcreator_source_dir)
get_filename_component(source_dir ${header} DIRECTORY)
file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} ${source_dir})
file(RELATIVE_PATH include_dir_relative_path ${qtcreator_source_dir} ${source_dir})
install(
FILES ${header}
DESTINATION "include/${include_dir_relative_path}"
DESTINATION "${IDE_HEADER_INSTALL_PATH}/${include_dir_relative_path}"
COMPONENT Devel EXCLUDE_FROM_ALL
)
endfunction()

View File

@@ -1,6 +1,8 @@
if (CMAKE_VERSION VERSION_LESS 3.16)
if (CMAKE_VERSION VERSION_LESS 3.18)
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_VERSION VERSION_LESS 3.16)
set(BUILD_WITH_PCH OFF)
endif()
endif()
include(FeatureSummary)
@@ -35,7 +37,7 @@ if (APPLE)
set(_IDE_APP_PATH ".")
set(_IDE_APP_TARGET "${IDE_DISPLAY_NAME}")
set(_IDE_OUTPUT_PATH "${_IDE_APP_PATH}/${_IDE_APP_TARGET}.app/Contents")
set(_IDE_OUTPUT_PATH "${_IDE_APP_TARGET}.app/Contents")
set(_IDE_LIBRARY_BASE_PATH "Frameworks")
set(_IDE_LIBRARY_PATH "${_IDE_OUTPUT_PATH}/${_IDE_LIBRARY_BASE_PATH}")
@@ -44,6 +46,9 @@ if (APPLE)
set(_IDE_DATA_PATH "${_IDE_OUTPUT_PATH}/Resources")
set(_IDE_DOC_PATH "${_IDE_OUTPUT_PATH}/Resources/doc")
set(_IDE_BIN_PATH "${_IDE_OUTPUT_PATH}/MacOS")
set(_IDE_HEADER_INSTALL_PATH "${_IDE_DATA_PATH}/Headers/qtcreator")
set(_IDE_CMAKE_INSTALL_PATH "${_IDE_DATA_PATH}/lib/cmake")
elseif(WIN32)
set(_IDE_APP_PATH "bin")
set(_IDE_APP_TARGET "${IDE_ID}")
@@ -55,6 +60,9 @@ elseif(WIN32)
set(_IDE_DATA_PATH "share/qtcreator")
set(_IDE_DOC_PATH "share/doc/qtcreator")
set(_IDE_BIN_PATH "bin")
set(_IDE_HEADER_INSTALL_PATH "include/qtcreator")
set(_IDE_CMAKE_INSTALL_PATH "lib/cmake")
else ()
include(GNUInstallDirs)
set(_IDE_APP_PATH "${CMAKE_INSTALL_BINDIR}")
@@ -67,6 +75,9 @@ else ()
set(_IDE_DATA_PATH "${CMAKE_INSTALL_DATAROOTDIR}/qtcreator")
set(_IDE_DOC_PATH "${CMAKE_INSTALL_DATAROOTDIR}/doc/qtcreator")
set(_IDE_BIN_PATH "${CMAKE_INSTALL_BINDIR}")
set(_IDE_HEADER_INSTALL_PATH "include/qtcreator")
set(_IDE_CMAKE_INSTALL_PATH "lib/cmake")
endif ()
file(RELATIVE_PATH _PLUGIN_TO_LIB "/${_IDE_PLUGIN_PATH}" "/${_IDE_LIBRARY_PATH}")
@@ -190,7 +201,7 @@ function(set_public_includes target includes)
file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} ${inc_dir})
target_include_directories(${target} PUBLIC
$<BUILD_INTERFACE:${inc_dir}>
$<INSTALL_INTERFACE:include/${include_dir_relative_path}>
$<INSTALL_INTERFACE:${_IDE_HEADER_INSTALL_PATH}/${include_dir_relative_path}>
)
endforeach()
endfunction()

View File

@@ -219,7 +219,10 @@ function(qtc_docs_dir varName)
set(${varName} "${QtCreator_SOURCE_DIR}/doc" PARENT_SCOPE)
elseif(QtCreatorDocumentation_LIST_DIR MATCHES /lib/cmake/QtCreator$)
# Dev package
set(${varName} "${QtCreatorDocumentation_LIST_DIR}/../../../doc" PARENT_SCOPE)
file(RELATIVE_PATH relative_header_path "/${IDE_CMAKE_INSTALL_PATH}/QtCreator" "/${IDE_HEADER_INSTALL_PATH}")
set(${varName}
"${QtCreatorDocumentation_LIST_DIR}/${relative_header_path}/doc"
PARENT_SCOPE)
else()
message(FATAL_ERROR "Could not find qtc_docs_dir")
endif()

View File

@@ -53,7 +53,7 @@ if(WITH_ONLINE_DOCS)
endif()
install(DIRECTORY config
DESTINATION doc
DESTINATION ${IDE_HEADER_INSTALL_PATH}/doc
COMPONENT Devel
EXCLUDE_FROM_ALL
)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -51,6 +51,10 @@
for such a Qt version, the minimum required Android version on devices
is 5.0 (API level 21). For more information, see \l{Qt for Android}.
To enable helpful code editing features for Java, such as code completion,
highlighting, function tooltips, and navigating in code, specify settings
for a \l{Specifying Java Language Server Settings}{Java language server}.
The Android Debug Bridge (adb) command line tool is integrated to \QC to
enable you to deploy applications to connected Android devices, to run
them, and to read their logs. It includes a client and server that run on

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -23,30 +23,34 @@
**
****************************************************************************/
// **********************************************************************
// NOTE: the sections are not ordered by their logical order to avoid
// reshuffling the file each time the index order changes (i.e., often).
// Run the fixnavi.pl script to adjust the links to the index order.
// **********************************************************************
/*!
//! [cmake build configuration]
\previouspage creator-build-settings.html
\page creator-build-settings-cmake.html
\nextpage creator-build-settings-qmake.html
\section2 CMake Build Configuration
\title CMake Build Configuration
Configuring medium-sized to large CMake projects in \QC can be a
challenge due to the number of options that you need to pass to
CMake to configure the project correctly. \QC creates an initial
configuration for you based on the kit settings and displays it in
the \uicontrol {Initial CMake parameters} field.
CMake to configure the project correctly. To make this easier,
\QC creates an initial configuration for you based on the kit
settings and displays it in the \uicontrol {Initial CMake parameters}
field and in a table that lists the parameter names and values.
\image qtcreator-cmake-build-settings.png
\image qtcreator-cmake-build-settings-initial.png "CMake build settings"
Parameter names are listed in the \uicontrol Key column. Names with a
common prefix (up to the first underscore character) are grouped under
the prefix.
\section1 Modifying Initial Parameters
In the \uicontrol Value column, you can view and edit the actual values
of the parameters that are passed to CMake. Parameter names are listed
in the \uicontrol Key column. Names with a common prefix (up to the first
underscore character) are grouped under the prefix. To view all parameters,
select the \uicontrol Advanced check box.
of the parameters that are passed to CMake.
\image qtcreator-cmake-build-settings.png "CMake parameters"
To view all parameters, select the \uicontrol Advanced check box.
To add parameters, select \uicontrol Add, and then select the type of
the parameter that you are adding: \uicontrol Boolean, \uicontrol String,
@@ -58,6 +62,9 @@
\uicontrol {Force to directory}, or \uicontrol {Force to string}
in the context menu.
To copy the name or value of the selected parameter to the clipboard,
select \uicontrol Copy in the context menu.
To modify the value of a parameter, double-click it, or select it,
and then select \uicontrol Edit.
@@ -69,6 +76,9 @@
To reset all the changes that you made, select \uicontrol Reset.
To modify the environment variable values for the CMake build environment,
select \uicontrol {Batch Edit}. For more information, see \l{Batch Editing}.
To save the changes, select \uicontrol {Apply Configuration Changes}.
Keep in mind that a configuration change might trigger a follow-up
configuration change.
@@ -78,37 +88,37 @@
that if you remove the build directory, all the custom parameters that are
not part of the initial CMake parameters are also removed.
To reconfigure a project after making changes to the initial parameters,
To reconfigure a project using the modified parameters,
select \uicontrol Build > \uicontrol {Clear CMake Configuration}, which
removes the CMakeCache.txt file. This enables you to do a full rebuild.
//! [cmake build configuration]
\section1 Re-configuring with Initial Parameters
To reset CMake parameters to the initial ones, select
\uicontrol {Re-configure with Initial Parameters}.
//! [cmake build steps]
To be asked before \QC resets the changes, select \uicontrol Tools >
\uicontrol Options > \uicontrol {Build & Run} > \uicontrol CMake >
\uicontrol {Ask before re-configuring with initial parameters}.
\section2 CMake Build Steps
\image qtcreator-build-run-options-cmake.png "CMake Build & Run options"
\section1 CMake Build Steps
\QC builds CMake projects by running \c {cmake . --build}, which then runs
the CMake generator specified in the project configuration: \c make,
\c mingw32-make, \c nmake, or \c ninja, for example. The CMake generator
produces project files for \QC.
produces project files for \QC. Multi-config generators are also supported.
You can add arguments to pass to CMake and the generator and targets for
the build command in \uicontrol {Build Steps}.
\image qtcreator-cmake-build-steps.png
\image qtcreator-cmake-build-steps.png "CMake build steps"
\note While the other CMake generators are installed together with Qt,
you usually need to install Ninja yourself. For more information, see
\l {Using Ninja as a CMake Generator}.
you usually need to install Ninja yourself.
//! [cmake build steps]
//! [cmake ninja]
\section2 Using Ninja as a CMake Generator
\section1 Using Ninja as a CMake Generator
To use \l {https://ninja-build.org/}{Ninja} with CMake, you must install it
and select it as the CMake generator in the build and run kit:
@@ -132,12 +142,18 @@
\uicontrol Build > \uicontrol {Rebuild Project}. This cleans up the
build directory and performs a new build.
//! [cmake ninja]
\section1 Using CMake with Conan
\QC can automatically set up the \l {Setting Up Conan}
{Conan package manager} for use with CMake.
//! [cmake clean steps]
Select \uicontrol Tools > \uicontrol Options > \uicontrol {Build & Run} >
\uicontrol CMake > \uicontrol {Package manager auto setup} to set the
value of the \c CMAKE_PROJECT_INCLUDE_BEFORE variable to the path to a
CMake script that installs dependencies from a \c conanfile.txt,
\c conanfile.py, or \c vcpkg.json file in the project source directory.
\section2 CMake Clean Steps
\section1 CMake Clean Steps
When building with CMake, you can add arguments to pass to CMake and the
generator and targets for the clean command in \uicontrol {Clean Steps}.
@@ -146,6 +162,4 @@
The build errors and warnings are parsed and displayed in the
\uicontrol Issues output pane.
//! [cmake clean steps]
*/

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -57,6 +57,14 @@
a \c CMakeLists.txt configuration file in a project. Project information is
also automatically refreshed when you build the project.
The \uicontrol {File System} section in the sidebar \uicontrol Projects view
displays information from the file system. \QC cannot determine whether the
files are part of the project. For example, header files that \QC finds in
the project directories but that are not mentioned in the CMakeLists.txt
files are listed here.
\image qtcreator-projects-view-cmake.png "File System section in Projects view"
\section1 Adding CMake Tools
\QC requires CMake's \l{https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html}
@@ -160,7 +168,7 @@
\list
\li \l {Opening Projects}
\li \l {Specifying Build Settings}
\li \l {CMake Build Configuration}
\li \l {Specifying Run Settings}
\li \l {Deploying CMake Projects to Generic Remote Linux Devices}
\endlist

View File

@@ -24,8 +24,17 @@
****************************************************************************/
/*!
//! [conan build steps]
\section1 Specifying Build Settings for Conan
\previouspage creator-build-settings-incredibuild.html
\page creator-build-settings-conan.html
\nextpage creator-run-settings.html
\title Conan Build Configuration
You can specify build steps for Conan.
For more information about configuring Conan, see \l{Setting Up Conan}.
\section1 Conan Build Steps
To configure a project to be built using the Conan package manager, select
\uicontrol {Add Build Step} > \uicontrol {Run Conan Install}.
@@ -38,7 +47,4 @@
The \uicontrol {Conan install} field displays the effective
build command. You can add arguments for the command in the
\uicontrol {Additional arguments} field.
For more information about configuring Conan, see \l{Setting Up Conan}.
//! [conan build steps]
*/

View File

@@ -62,5 +62,5 @@
{conanfile.txt} file that specifies the needed libraries and packages.
Then, you must edit the build settings of the project to specify the
location of the file and the contents of the Conan install command.
For more information, see \l {Specifying Build Settings for Conan}.
For more information, see \l {Conan Build Steps}.
*/

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -64,7 +64,10 @@
\list 1
\li Debugging is enabled by default for Qt 5.0, or later.
\li If you use qmake as the build system, make sure that
debugging is enabled in the \uicontrol {Build Settings},
\uicontrol {QML debugging and profiling} field, either
explicitly for the project or globally by default.
\image qtcreator-projectpane.png "qmake general build settings pane"

View File

@@ -55,9 +55,9 @@
\note You can also select \uicontrol Edit > \uicontrol {Find/Replace} >
\uicontrol {Advanced Find} > \uicontrol {C++ Symbols} to search for
classes, functions, enums, and declarations either from files listed as
part of the project or from all files that are used by the code, such as
include files.
classes, functions, enums, and declarations (including type aliases) either
from files listed as part of the project or from all files that are used by
the code, such as include files.
\image qtcreator-search-cpp-symbols.png
\endif

View File

@@ -113,8 +113,9 @@
\li Locating bookmarks (\c {b}).
For more information, see \l{Using Bookmarks}.
\li Locating class (\c {c}), enum, and function (\c {m}) definitions in
your project or anywhere referenced from your project (\c {:})
\li Locating class (\c {c}), enum, function (\c {m}), and type alias
definitions in your project or anywhere referenced from your
project (\c {:})
\endif
\li Locating QML methods (\c {m})

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -78,17 +78,33 @@
\section1 Specifying Settings for Language Clients
To use a language server:
You can add a generic generic stdIO language server for Python, for example.
For \l{Connecting Android Devices}{Android development}, you can add a Java
language server.
\section2 Adding Language Servers
To view a list of language servers, select \uicontrol Tools >
\uicontrol Options > \uicontrol {Language Client} (or
\uicontrol {Qt Creator} > \uicontrol Preferences >
\uicontrol {Language Client} > on \macos).
\image qtcreator-language-client-options.png "Language client options page"
To enable a language server, select the check box next to the language
server name and specify settings for the server.
To remove language servers from the list, select \uicontrol Delete.
\section2 Specifying Generic Settings
To add a generic language server:
\list 1
\li Select \uicontrol Tools > \uicontrol Options >
\uicontrol {Language Client} (or \uicontrol {Qt Creator} >
\uicontrol Preferences > \uicontrol {Language Client} > on
\macos) to view a list of language servers.
\image qtcreator-language-client-options.png "Language client options page"
\li Select the check box next to the language server name to enable the
language server.
\li Select \uicontrol Add to add language servers.
\uicontrol {Language Client} > \uicontrol Add >
\uicontrol {New Generic StdIO Language Server}
to add a generic language server.
\li In the \uicontrol Name field, enter a name for the language server.
Select the \inlineimage replace.png
(\uicontrol {Variables}) button to use a variable for the server
@@ -102,9 +118,8 @@
with a matching MIME type is opened. The
\uicontrol {General Messages} \l{Viewing Output}{output pane}
displays information about the connection to the language server.
\li In the \uicontrol Capabilities field, you can see the features
that are supported by the language server. Only some of them are
implemented by \QC.
\li In the \uicontrol Initialization field, you can add language server
specific JSON attributes to pass to an \c initialize request.
\li In the \uicontrol Executable field, enter the path to the language
server executable.
\li In the \uicontrol Arguments field, enter any required command line
@@ -112,7 +127,23 @@
arguments.
\endlist
To remove language servers from the list, select \uicontrol Delete.
\section2 Specifying Java Language Server Settings
To add a Java language server:
\list 1
\li Select \uicontrol Tools > \uicontrol Options >
\uicontrol {Language Client} > \uicontrol Add >
\uicontrol {New Java Language Server} to add a Java language server.
\image qtcreator-language-client-options-java.png "Java language server options"
\li In the \uicontrol Name field, enter a name for the language server.
Select the \inlineimage replace.png
(\uicontrol {Variables}) button to use a variable for the server
name. For more information, see \l{Using Qt Creator Variables}.
\li In the \uicontrol Java field, enter the path to the Java executable.
\li In the \uicontrol {Java Language Server} field, enter the path to
the Java language server \c .jar file.
\endlist
\section1 Supported Locator Filters
@@ -129,8 +160,8 @@
\section1 Reporting Issues
The language service client has been mostly tested with Python.
If problems arise when you try it or some other language, please select
The language service client has been mostly tested with Python and Java.
If problems arise when you try them or some other language, please select
\uicontrol Help > \uicontrol {Report Bug} to report them in the
\l{https://bugreports.qt.io/}{Qt Project Bug Tracker}. The reports
should include \QC console output with the environment

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -23,9 +23,18 @@
**
****************************************************************************/
/*!
//! [incredibuild build steps]
\previouspage creator-build-settings-meson.html
\page creator-build-settings-incredibuild.html
\nextpage creator-build-settings-conan.html
\section2 IncrediBuild Build Steps
\title IncrediBuild Build Configuration
You can specify build steps and clean steps for IncrediBuild.
For more information about configuring IncrediBuild, see
\l{Setting Up IncrediBuild}.
\section1 IncrediBuild Build Steps
To use IncrediBuild, select \uicontrol {Add Build Step} >
\uicontrol {IncrediBuild for Linux} or
@@ -53,7 +62,7 @@
The distribution control settings to specify depend on whether you are using
Linux or Windows.
\section3 Distribution Control Settings on Linux
\section2 Distribution Control Settings on Linux
\image qtcreator-incredibuild-build-steps-linux.png
@@ -66,7 +75,7 @@
\li \uicontrol {Alternate tasks preference}
\endlist
\section3 Distribution Control Settings on Windows
\section2 Distribution Control Settings on Windows
\image qtcreator-incredibuild-build-steps-windows.png
@@ -86,8 +95,8 @@
\li \uicontrol {Maximum CPUs to utilize in the build} specifies the
maximum amount of remote cores to use in the build. Overrides the
corresponding global setting.
\li \uicontrol {Newest allowed Helper machine OS} and
\uicontrol {Oldest allowed Helper machine OS} specify the newest and
\li \uicontrol {Newest allowed helper machine OS} and
\uicontrol {Oldest allowed helper machine OS} specify the newest and
oldest operating system installed on a Helper machine to be allowed
to participate as a Helper in the build.
\li \uicontrol {Build title} specifies a custom header line which will
@@ -100,12 +109,12 @@
\c{.ib_mon} file is added to the end of the build output.
\li \uicontrol {Suppress STDOUT} does not write anything to the standard
output.
\li \uicontrol {Output log file} writes build output to a file.
\li \uicontrol {Show commands in output} shows the command-line used by
\li \uicontrol {Output Log file} writes build output to a file.
\li \uicontrol {Show Commands in output} shows the command-line used by
IncrediBuild to build the file.
\li \uicontrol {Show agents in output} shows the Agent used to build
\li \uicontrol {Show Agents in output} shows the Agent used to build
each file.
\li \uicontrol {Show time in output} shows the start and finish time for
\li \uicontrol {Show Time in output} shows the start and finish time for
each file built.
\li \uicontrol {Hide IncrediBuild Header in output} suppresses the
IncrediBuild header in the build output.
@@ -113,31 +122,26 @@
internal Incredibuild logging level for this build. Does not affect
output or any user accessible logging. Used mainly to troubleshoot
issues with the help of IncrediBuild support.
\li \uicontrol {Set an environment variable} sets or overrides
\li \uicontrol {Set an Environment Variable} sets or overrides
environment variables for the context of the build.
\li \uicontrol {Stop on errors} stops the execution as soon as an error
is encountered. This is the default behavior in Visual Studio
builds, but not for Make and Build tools or Dev Tools builds.
\li \uicontrol {Additional arguments} are concatenated to the final
\li \uicontrol {Additional Arguments} are concatenated to the final
buildconsole command line.
\li \uicontrol {Open Build Monitor} opens an IncrediBuild Build Monitor
that graphically displays the build's progress once the build
starts.
\endlist
//! [incredibuild build steps]
//! [incredibuild clean steps]
\section2 IncrediBuild Clean Steps
\section1 IncrediBuild Clean Steps
When building with IncrediBuild, you can add arguments and targets for the
clean command in \uicontrol {Clean Steps}.
clean command in \uicontrol {Clean Steps}. For more information, see
\l{Clean Steps}.
For more information about the settings, see \l{IncrediBuild Build Steps}.
The build errors and warnings are parsed and displayed in the
\uicontrol Issues output pane.
//! [incredibuild clean steps]
*/

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -23,9 +23,11 @@
**
****************************************************************************/
/*!
//! [meson build configuration]
\previouspage creator-build-settings-qbs.html
\page creator-build-settings-meson.html
\nextpage creator-build-settings-incredibuild.html
\section2 Meson Build Configuration
\title Meson Build Configuration
\image qtcreator-meson-build-settings.png
@@ -43,12 +45,7 @@
\note Any modified setting will remain in bold until \uicontrol
{Apply configuration changes} is selected.
//! [meson build configuration]
//! [meson build steps]
\section2 Meson Build Steps
\section1 Meson Build Steps
\QC builds Meson projects by running \c {ninja -v target}.
@@ -60,11 +57,7 @@
The build errors and warnings are parsed and displayed in the
\uicontrol Issues output pane.
//! [meson build steps]
//! [meson clean steps]
\section2 Meson Clean Steps
\section1 Meson Clean Steps
When building with Meson, you can add arguments and targets for the clean
command in \uicontrol {Clean Steps}.
@@ -74,5 +67,4 @@
The build errors and warnings are parsed and displayed in the
\uicontrol Issues output pane.
//! [meson clean steps]
*/

View File

@@ -111,7 +111,7 @@
\list
\li \l {Opening Projects}
\li \l {Specifying Build Settings}
\li \l {Meson Build Configuration}
\li \l {Specifying Run Settings}
\endlist
*/

View File

@@ -0,0 +1,121 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator 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 creator-build-settings-cmake.html
\page creator-build-settings-qmake.html
\nextpage creator-build-settings-qbs.html
\title qmake Build Configuration
\image qtcreator-projectpane.png "qmake build settings"
By default, \QC builds qmake projects in a separate directory from the
source directory, as \l{glossary-shadow-build} {shadow builds}. This
keeps the files generated for each \l{glossary-buildandrun-kit}
{build and run kit} separate. If you only build and run with a single
\l{glossary-buildandrun-kit}{kit}, you can deselect the
\uicontrol {Shadow build} checkbox. Select the build directory in the
\uicontrol {Build Directory} field.
To make in-source builds the default option for all projects, select
\uicontrol Tools > \uicontrol Options > \uicontrol {Build & Run} >
\uicontrol {Default Build Properties}, and enter a period (.) in the
\uicontrol {Default build directory} field.
In the \uicontrol {Tooltip in target selector} field, you can enter text
that is displayed as a tooltip when you hover the mouse over the build
configuration in the \l{Building for Multiple Platforms}{kit selector}.
You can create separate versions of project files to keep platform-dependent
code separate. You can use qmake \l{Adding Platform Specific Source Files}
{scopes} to select the file to process depending on which platform qmake is
run on.
If debug info is being generated, you can have it placed into separate
files, rather than embedded into the binary, by selecting
\uicontrol Enable in the \uicontrol {Separate debug info} field. For
more information, see \l{Using the Performance Analyzer}. To use default
settings, select \uicontrol {Leave at Default}.
In the \uicontrol {qmake system() behavior when parsing} field, you can
select whether processes are run via qmake's \c system() function or
ignored. Setting this option to \uicontrol Ignore might help if opening
or closing projects takes too long, but it might produce inexact parsing
results.
\section1 Global qmake Settings
To specify settings for all qmake builds, select \uicontrol Tools
> \uicontrol Options > \uicontrol {Build & Run} >
\uicontrol Qmake.
\image qtcreator-build-settings-qmake.png "qmake build and run options"
To set the default build properties, select \uicontrol Tools
> \uicontrol Options > \uicontrol {Build & Run} >
\uicontrol {Default Build Properties}.
\image qtcreator-build-settings-default.png "default build options"
\section1 Compiling QML
Since Qt 5.11, you can compile QML source code into the final binary. This
improves the startup time of the application and eliminates the need to
deploy QML files together with the application. For more information, see
\l{Ahead-of-Time Compilation}.
\QC project wizard templates create Qt Quick projects that can be compiled,
because they are set up to use the Qt Resource System. To compile QML code,
select \uicontrol Enable in the \uicontrol {Qt Quick Compiler} field. To
use default settings, select \uicontrol {Leave at Default}.
\note In earlier Qt versions, this was a commercial feature. For more
information, see \l{http://doc.qt.io/QtQuickCompiler/}{Qt Quick Compiler}.
\section1 qmake Build Steps
\QC builds qmake projects by running the \c make or \c nmake command from
the Qt version defined for the current build configuration.
\image qtcreator-build-steps.png "Build steps"
To override the shell command that \QC constructs by default, disable or
remove the build step and add a custom build step that specifies another
shell command.
By default, \QC uses all the CPU cores available to achieve maximum build
parallelization. On Linux and \macos, you can specify the number of parallel
jobs to use for building in the \uicontrol {Parallel jobs} field. Select the
\uicontrol {Override MAKEFLAGS} check box to override existing MAKEFLAGS
variables.
Select \uicontrol {Add Build Step} > \uicontrol {IncrediBuild for Linux} or
\uicontrol {IncrediBuild for Windows} to accelerate builds by using
\l{IncrediBuild Build Configuration}{IncrediBuild}.
Select \uicontrol {Add Build Step} > \uicontrol {Run Conan Install} to use
the \l{Conan Build Configuration}{Conan} package manager with qmake
*/

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -89,7 +89,7 @@
\list
\li \l {Opening Projects}
\li \l {Specifying Build Settings}
\li \l {Qbs Build Configuration}
\li \l {Specifying Run Settings}
\endlist
*/

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -24,11 +24,35 @@
****************************************************************************/
/*!
//! [qbs build steps]
\previouspage creator-build-settings-qmake.html
\page creator-build-settings-qbs.html
\nextpage creator-build-settings-meson.html
\section2 Qbs Build Steps
\title Qbs Build Configuration
\image creator-qbs-build-app.png
\image qtcreator-build-settings-qbs.png "Qbs build settings"
Qbs builds projects in the directory specified in the
\uicontrol {Build Directory} field.
In the \uicontrol {Tooltip in target selector} field, you can enter text
that is displayed as a tooltip when you hover the mouse over the build
configuration in the \l{Building for Multiple Platforms}{kit selector}.
You can enter a name for the build configuration in the
\uicontrol {Configuration name} field.
If debug info is being generated, you can have it placed into separate
files, rather than embedded into the binary, by selecting
\uicontrol Enable in the \uicontrol {Separate debug info} field. For
more information, see \l{Using the Performance Analyzer}. To use default
settings, select \uicontrol {Leave at Default}.
For more information about configuring Qbs, see \l{Setting Up Qbs}.
\section1 Qbs Build Steps
\image creator-qbs-build-app.png "Qbs build steps"
To specify build steps for Qbs:
@@ -95,16 +119,11 @@
The \uicontrol {Equivalent command line} field displays the build command
that is constructed based on the selected options.
//! [qbs build steps]
//! [qbs clean steps]
\section2 Qbs Clean Steps
\section1 Qbs Clean Steps
When building with Qbs, you can specify flags in \uicontrol {Clean Steps}:
\image creator-qbs-build-clean.png
\image creator-qbs-build-clean.png "Qbs clean steps"
\list
@@ -118,6 +137,4 @@
The \uicontrol {Equivalent command line} field displays the clean command
that is constructed based on the selected options.
//! [qbs clean steps]
*/

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -32,7 +32,7 @@
/*!
\previouspage creator-debuggers.html
\page creator-build-settings.html
\nextpage creator-run-settings.html
\nextpage creator-build-settings-cmake.html
\title Specifying Build Settings
@@ -57,6 +57,8 @@
\section1 Managing Build Configurations
\image qtcreator-build-configurations.png "Build Settings"
You specify build settings in the \uicontrol Projects mode.
To add a new build configuration, click \uicontrol Add and select the type of
configuration you would like to add. The options you have depend on the
@@ -75,55 +77,20 @@
\uicontrol {Edit build configuration} field.
The available build settings depend on the build system that you selected
for the project.
for the project:
\section2 Compiling QML
\list
\li \l{CMake Build Configuration}{CMake}
\li \l{qmake Build Configuration}{qmake}
\li \l{Qbs Build Configuration}{Qbs}
\li \l{Meson Build Configuration}{Meson}
\li \l{IncrediBuild Build Configuration}{IncrediBuild}
\endlist
Since Qt 5.11, you can compile QML source code into the final binary. This
improves the startup time of the application and eliminates the need to
deploy QML files together with the application. For more information, see
\l{Ahead-of-Time Compilation}.
This topic describes the build settings at a general level.
\QC project wizard templates create Qt Quick projects that can be compiled,
because they are set up to use the Qt Resource System. To compile Qt Quick
code, select \uicontrol Enable in the \uicontrol {Qt Quick Compiler}
field. To use default settings, select \uicontrol {Leave at Default}.
\note In earlier Qt versions, this was a commercial feature. For more
information, see \l{http://doc.qt.io/QtQuickCompiler/}{Qt Quick Compiler}.
\section2 qmake Build Configuration
\image qtcreator-projectpane.png "qmake general build settings pane"
By default, \QC builds projects in a separate directory from the source
directory, as \l{glossary-shadow-build} {shadow builds}. This keeps the
files generated for each \l{glossary-buildandrun-kit}{build and run kit} separate.
If you only build and run with a single \l{glossary-buildandrun-kit}{kit},
you can deselect the \uicontrol {Shadow build}
checkbox.
To make in-source builds the default option for all projects, select
\uicontrol Tools > \uicontrol Options > \uicontrol {Build & Run} >
\uicontrol {Default Build Properties}, and enter a period (.) in the
\uicontrol {Default build directory} field.
You can create separate versions of project files to keep platform-dependent
code separate. You can use qmake \l{Adding Platform Specific Source Files}
{scopes} to select the file to process depending on which platform qmake is
run on.
To generate debug symbols also for applications compiled in release mode,
select \uicontrol Enable in the \uicontrol {Separate debug info} field. For
more information, see \l{Using the Performance Analyzer}. To use default
settings, select \uicontrol {Leave at Default}.
To set the default build properties, select \uicontrol Tools
> \uicontrol Options > \uicontrol {Build & Run} >
\uicontrol {Default Build Properties}.
\include creator-projects-cmake-building.qdocinc cmake build configuration
\include creator-projects-meson-building.qdocinc meson build configuration
For more information about debugging Qt Quick projects, see
\l{Setting Up QML Debugging}.
\section1 Starting External Processes
@@ -133,11 +100,10 @@
an executable name and optional command line arguments.
The executable name is specified in the executable fields: \uicontrol qmake,
\uicontrol Make, \uicontrol Command, or \uicontrol Executable. It is either derived from the
project or specified manually. When you specify executables manually, you
can reference environment variables and \QC variables. However, no
quoting rules
apply.
\uicontrol Make, \uicontrol Command, or \uicontrol Executable. It is either
derived from the project or specified manually. When you specify executables
manually, you can reference environment variables and \QC variables.
However, no quoting rules apply.
You can specify command-line arguments in the arguments fields:
\uicontrol Arguments, \uicontrol {Additional arguments},
@@ -157,32 +123,21 @@
\section1 Build Steps
In \uicontrol{Build Steps} you can change the settings for the build system
selected for building the project: qmake, CMake, Meson, or Qbs. You can use
Incredibuild to accelerate the build process when using qmake or CMake.
\image qtcreator-cmake-build-steps.png "CMake build steps"
\section2 qmake Build Steps
In \uicontrol{Build Steps}, you can change the settings for the build system
selected for building the project:
\QC builds qmake projects by running the \c make or \c nmake command from
the Qt version defined for the current build configuration.
\list
\li \l{CMake Build Steps}{CMake}
\li \l{qmake Build Steps}{qmake}
\li \l{Qbs Build Steps}{Qbs}
\li \l{Meson Build Steps}{Meson}
\li \l{Conan Build Steps}{Conan}
\endlist
\image qtcreator-build-steps.png "Build steps"
To override the shell command that \QC constructs by default, disable or remove
the build step and add a custom build step that specifies another shell
command.
By default, \QC uses all the CPU cores available to achieve maximum build
parallelization. On Linux and \macos, you can specify the number of parallel
jobs to use for building in the \uicontrol {Parallel jobs} field. Select the
\uicontrol {Override MAKEFLAGS} check box to override existing MAKEFLAGS
variables.
\include creator-projects-cmake-building.qdocinc cmake build steps
\include creator-projects-settings-build-qbs.qdocinc qbs build steps
\include creator-projects-meson-building.qdocinc meson build steps
\include creator-projects-incredibuild-building.qdocinc incredibuild build steps
\include creator-projects-conan-building.qdocinc conan build steps
You can use \l{IncrediBuild Build Steps}{IncrediBuild} to accelerate the
build process when using qmake or CMake.
\section2 Adding Custom Build Steps
@@ -203,13 +158,21 @@
\section1 Clean Steps
You can use the cleaning process to remove intermediate files. This process
might help you to fix obscure issues during the process of building a
project.
\image qtcreator-clean-steps.png "Clean steps"
You can define the cleaning steps for your builds in the \uicontrol{Clean Steps}.
You can use the cleaning process to remove intermediate files. This process
might help you to fix obscure issues during the process of building a
project using:
\list
\li \l{CMake Clean Steps}{CMake}
\li qmake
\li \l{Qbs Clean Steps}{Qbs}
\li \l{Meson Clean Steps}{Meson}
\li \l{IncrediBuild Clean Steps}{IncrediBuild}
\endlist
You can define the clean steps for your builds in \uicontrol {Clean Steps}.
\list
@@ -225,10 +188,4 @@
(\uicontrol {Move Up}) and \inlineimage arrowdown.png
(\uicontrol {Move Down}).
\endlist
\include creator-projects-cmake-building.qdocinc cmake clean steps
\include creator-projects-settings-build-qbs.qdocinc qbs clean steps
\include creator-projects-meson-building.qdocinc meson clean steps
\include creator-projects-incredibuild-building.qdocinc incredibuild clean steps
*/

View File

@@ -175,6 +175,7 @@
with names beginning with the string \uicontrol CodeBlocks produce
all the necessary data for the \QC code model. \QC displays a
warning if you select a generator that is not supported.
For more information, see \l{Using Ninja as a CMake Generator}.
\li In the \uicontrol {CMake configuration} field, select
\uicontrol Change to edit the parameters of the CMake configuration
@@ -195,8 +196,6 @@
choose the kit to use. To set the selected kit as the default kit,
select \uicontrol {Make Default}.
\include creator-projects-cmake-building.qdocinc cmake ninja
\section1 Editing Qbs Profiles
To view the Qbs profile associated with the kit, select \uicontrol Tools >

View File

@@ -75,6 +75,14 @@
\li \l{Adding Compilers}
\li \l{Adding Debuggers}
\li \l{Specifying Build Settings}
\list
\li \l{Cmake Build Configuration}
\li \l{qmake Build Configuration}
\li \l{Qbs Build Configuration}
\li \l{Meson Build Configuration}
\li \l{IncrediBuild Build Configuration}
\li \l{Conan Build Configuration}
\endlist
\li \l{Specifying Run Settings}
\li \l{Specifying Editor Settings}
\li \l{Specifying Code Style Settings}

View File

@@ -236,7 +236,7 @@
\if defined(qtdesignstudio)
\row
\li \inlineimage icons/item-svg-16px.png
\li SvgPath
\li \l{SVG Path Item}
\li Studio Components
\li
\li An SVG path data string that is used to draw a path as a line.

View File

@@ -68,17 +68,18 @@
number of items in the model.
\if defined(qtdesignstudio)
\note You can also use the \l SvgPath Studio Component to specify an SVG
path data string that draws a path.
\note You can also use the \l {SVG Path Item} Studio Component to specify an
SVG path data string that draws a path.
\endif
//! [pathview]
//! [svgpath]
\section1 SvgPath
\section1 SVG Path Item
The Svg Path component uses an SVG path data string to draw a path as a line.
The \uicontrol {SVG Path Item} component uses an SVG path data string to
draw a path as a line.
The stroke property values that specify the appearance of the path are
described in \l{Strokes}.
@@ -89,10 +90,5 @@
string that specifies the path. For more information, see
\l{https://www.w3.org/TR/SVG/paths.html#PathData}{W3C SVG Path Data}.
\note Mixing SvgPath with other types of components is not always supported.
For example, when \l Shape is backed by \c GL_NV_path_rendering, a
\l ShapePath can contain one or more SvgPath elements, or one or more
components of other types, but not both.
//! [svgpath]
*/

View File

@@ -32,7 +32,7 @@
/*!
\page quick-components.html
\if defined(qtdesignstudio)
\previouspage studio-app-flows.html
\previouspage studio-flow-external-events.html
\else
\previouspage creator-using-qt-quick-designer.html
\endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -360,10 +360,11 @@
\li Press \key Enter or select \uicontrol OK to save the new value.
\li In the \uicontrol Radius field, enter 20 to give the button
rounded corners.
\li In the \uicontrol States view, select the \e down state and modify
the background and border color as above.
\li Select the text component in \uicontrol Navigator to display its
properties in \uicontrol Properties.
\li In the \uicontrol States view, select the \e normal state and modify
the background color as above.
\li Select the \e base state, and then select the text component
in \uicontrol Navigator to display its properties in
\uicontrol Properties.
\li In the \uicontrol {Text Color} field, select \uicontrol Actions >
\uicontrol Reset to reset the text color to the default color,
black.

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -57,6 +57,14 @@
as assets. If you use functional \QDS 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 \QBF does not support exporting changes in component instances.
If you make changes to component instances in Figma, you must
detach the instances before exporting them. Similarly, if your
Figma components contain nested components, Figma allows you to
hot swap the nested instance inside the component instance.
However, \QBF doesn't support this so you get the original
component unless you detach the component instance before
exporting it.
\li Use descriptive and unique IDs to avoid duplicate IDs after
exporting designs and importing them to \QDS.
\endlist
@@ -112,20 +120,28 @@
\li Determines how to export the group or layer:
\list
\li \uicontrol Child exports each asset of the selected group
or layer as 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 component.
or layer as a separate component file. Images are exported
as separate files nested in \l{Images}{Image} components.
You select the image file format in \uicontrol Settings >
\uicontrol {Asset settings}.
Figma rectangles are exported as \l{basic-rectangle}
{Rectangle} components. Figma vectors are exported as
\l{SVG Path Item} components from the \l{Shapes}
{Studio Components} module.
\li \uicontrol Merged merges the selected groups and layers
into one component.
\li \uicontrol Skipped completely skips the selected layer.
\endlist
\row
\li \uicontrol {Custom Component Type}
\li Determines the \l{Component Types}{component type} 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
\l{Learn More - Components}{import statement} of the component
set where the component is defined in the \uicontrol {Imports} field.
of this type. For example, if you drew a button, you can export
it as a \l Button component from the Qt Quick Controls module.
You can provide the import statement of the
\l{Adding and Removing Modules}{module} where the component
is defined in the \uicontrol {Imports} field.
\row
\li \uicontrol Properties
\li Sets values of properties for the component. You can add properties
@@ -133,13 +149,14 @@
\row
\li \uicontrol Imports
\li If you want to make additional components available in the component
file, you can enter the import statements of the component sets in
this field. For example, to use components of the Controls type from
version 2.3, you need the import statement \c {QtQuick.Controls 2.3}
and to use Studio Components from version 1.0, you need the import
statement \c {QtQuick.Studio.Components 1.0}. You can add components
from all the available component sets in \QDS later. You can also
import a component set as an \e alias.
file, you can enter the import statements of the modules that
contain the components in this field. For example, to use components
from version 2.3 of the Qt Quick Controls module, you need the
import statement \c {QtQuick.Controls 2.3} and to use version 1.0
Studio Components, you need the import statement
\c {QtQuick.Studio.Components 1.0}. You can add components from all
the available modules in \QDS later. You can also import a module as
an \e alias.
\row
\li \uicontrol Alias
\li Exports the component generated from this layer as an alias in the
@@ -160,9 +177,13 @@
You can export assets in the selected format (JPG, PNG, or SVG).
In addition, you can export shapes as components of the type SvgPathItem.
This might not work for layers that have particular effects applied to them.
In that case, the layers are exported as images.
By default, vectors are exported as \l{SVG Path Item} components from the
Studio Components module. This might not work for layers that have
particular effects applied to them. In that case, the layers are exported
as images.
Because MCUs only support simple images, disable the
\uicontrol {Export as shapes} check box when designing for MCUs.
\table
\header
@@ -173,10 +194,8 @@
\li Exports assets in the selected format (JPG, PNG, or SVG).
\row
\li \uicontrol {Export as shapes}
\li Exports shapes as components of the type SvgPathItem.
Because MCUs only support simple images, disable this
check box when designing for MCUs.
\li Exports vectors as components of the type \l{SVG Path Item} from the
Studio Components module.
\row
\li \uicontrol {Reset plugin data}
\li Resets all settings for all layers and groups (also in the

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -26,15 +26,15 @@
/*!
\page studio-app-flows.html
\previouspage quick-uis.html
\nextpage quick-components.html
\nextpage studio-flow-view.html
\title Designing Application Flows
You can design the application flow in the form of a \e {schematic diagram}
that shows all significant components of an application UI and their
You can design an application in the form of a \e {schematic diagram}
that shows all significant components of the application UI and their
interconnections by means of symbols. This results in an interactive
prototype that can be clicked through to simulate the user experience of
the application. The QML code is created in the background and can be used
the application. Code is created in the background and can be used
as the base of the production version of the application.
\image studio-flow-view.png "Application flow in Form Editor"
@@ -44,25 +44,63 @@
lines} that connect them, thus illustrating the possible user pathways
through the UI. You use \e {action areas} as starting points for transition
lines. You can attach effects to transition lines, such as fade or push,
to determine what users see when one screen changes into another.
to determine what users see when one flow item changes into another.
You can use \e {flow decisions} to set up alternative pathways between
screens in the UI. For example, if user input determines which screen
flow items in the UI. For example, if user input determines which flow item
should open next, you can test the different scenarios in the prototype
by having a dialog pop up, where you can select which screen to show next.
by having a dialog pop up where you can select which flow item to show next.
Especially on mobile and embedded platforms, the application might need to
react to external events from the platform, such as notifications or other
applications requiring the users' attention. You can use \e {flow wildcards}
to determine the priority of screens by whitelisting or blacklisting them.
to determine the priority of flow items by adding them to positive and
negative lists.
\section1 Creating Flows
To design application flows:
\image studio-flow-steps.png "Designing application flows"
\list 1
\li Use a project wizard template to add a \uicontrol {Flow View}
component, as described in \l{Adding Flow Views}.
\li Use a project wizard template to add a \uicontrol {Flow Item}
component for each screen in the UI, as described in
\l{Adding Flow Items}.
\li Use context menu commands to add action areas and transitions,
as described in \l{Adding Action Areas and Transitions}.
\li Use context menu commands to apply effects to transitions,
as described in \l{Applying Effects to Transitions}.
\li When you are ready for production, use the event list simulator
to replace transition lines with connections to real signals
from UI controls, as described in \l{Simulating Events}.
\li To set up alternative pathways between flow items, use
\uicontrol {Flow Decision} components from \l Library, as
described in \l{Simulating Conditions}.
\li Use \l{Adding States}{states} in flows to modify the appearance
of components on screens in response to user interaction, as
described in \l{Applying States in Flows}.
\li Use \uicontrol {Flow Wildcard} components from \uicontrol Library
to prioritize events from other applications and to stop some
screens from appearing on others, as described in
\l{Reacting to External Events}.
\endlist
*/
/*!
\page studio-flow-view.html
\previouspage studio-app-flows.html
\nextpage studio-flow-item.html
\title Adding Flow Views
You can add a flow view to an existing project or create a new project
for it, as described in \l {Creating Projects}. To create the flow
view, select \uicontrol File > \uicontrol {New File or Project} >
\uicontrol {Files and Classes} > \uicontrol {Qt Quick Files} >
\uicontrol {Flow View} and follow the instructions of the wizard.
for it, as described in \l {Creating Projects}.
To create the flow view, select \uicontrol File >
\uicontrol {New File or Project} > \uicontrol {Files and Classes} >
\uicontrol {Qt Quick Files} > \uicontrol {Flow View}
and follow the instructions of the wizard.
You only need to select the \uicontrol {Use event simulator} check box if
you want to add an event simulator to the flow view.
@@ -71,26 +109,89 @@
the items in the flow: action areas, transition lines, decisions, and
wildcards. You can change the global settings for all items by editing
flow view properties, or you can select an individual action area or
transition line and change the appearance of just that item, including
transition line and change the appearance of just that component, including
the color, line thickness, dotted or solid lines, and even the curve of
the connections. This enables you to add extra semantics to the design
the line. This enables you to add extra semantics to the design
of the flow diagram itself.
\section1 Adding Flow Items
You can \l{Adding Flow Items}{add flow items} to the flow view to design
the UI.
If you imported your screen designs from a design tool as individual
components (\e {.ui.qml} files), you can use them as content for flow
items. If you are building your UI from scratch in \QDS, you must first
add components to the flow items to create the screens as you would
any QML components. For more information, see \l {Creating Components}.
The flow items that you attach the components to are listed under
\uicontrol {My QML Components}.
\section1 Flow View Properties
You can specify basic properties for a \uicontrol {Flow View} component
in the \l {Type}{Component}, \l {2D Geometry}{Geometry}, and
\l Visibility groups.
\image studio-flow-view-properties.png "Flow View component properties"
To specify the \uicontrol {Flow Item} that is currently visible in the
flow view, set its index in the \uicontrol {Current index} field.
You can use the \l{Picking Colors}{color picker} to set colors for:
\list
\li Transition lines
\li Area outlines
\li Area fills
\li Block items
\endlist
You can set some additional global properties for drawing transition lines:
\image studio-flow-view-properties-transition.png "Flow View transition properties"
\list
\li In the \uicontrol {Type} field, select \uicontrol Bezier to draw
transition lines as bezier curves.
\li In the \uicontrol {Radius} field, specify the corner radius for
default curves.
\li In the \uicontrol {Bezier factor} field, specify the factor that
modifies the positions of the control points used for bezier curves.
\endlist
For more information about changing the appearance of a particular action
area or transition line, see \l{Flow Action Area Properties} and
\l{Flow Transition Properties}.
In the \uicontrol Layout tab, you can use \l{Setting Anchors and Margins}
{anchors} to position the component.
In the \uicontrol Advanced tab, you can manage the more
\l{Specifying Developer Properties}{advanced properties}
of components.
*/
/*!
\page studio-flow-item.html
\previouspage studio-flow-view.html
\nextpage studio-flow-action-area.html
\title Adding Flow Items
After you create a \l{Adding Flow Views}{Flow View} component, you can
use a project wizard template to add a \uicontrol {Flow Item} component
for each screen in the UI.
If you \l{Importing 2D Assets}{imported} your screen designs from a
design tool as individual \l{glossary-component}{components}
(\e {.ui.qml} files), you can use them as content for flow items.
The imported components are listed in \l Library > \uicontrol Components
> \uicontrol {My Components}.
If you are building your UI from scratch in \QDS, you must first add
components to the flow items to create the screens as you would any
components. For more information, see \l {Creating Components}. The
flow items that you attach the components to are listed under
\uicontrol {My Components}.
\image studio-flow-item.png "Custom Flow Item in Library"
\note You must use the wizard to create the flow items. After you create
a flow view, the \uicontrol {Flow View} section becomes visible in
\uicontrol Library. It contains a \uicontrol {Flow Item} type that you
can use to apply states to flow items, and that you should use solely for
that purpose.
\uicontrol Library. It contains a \uicontrol {Flow Item} component that
you can use to \l{Applying States in Flows}{apply states to flow items},
and that you should use solely for that purpose.
To add flow items:
@@ -101,136 +202,329 @@
to create flow items for each screen in the UI.
\li Add content to the flow item in one of the following ways:
\list
\li Drag and drop components to a flow item in
\uicontrol {Form Editor} or \uicontrol Navigator and
edit their properties in \uicontrol Properties.
\li Drag and drop components from \l Library to a flow
item in \l {Form Editor} or \l Navigator.
\li Drag a screen from \uicontrol Library >
\uicontrol {My QML Components} to a flow item in
\uicontrol {My Components} to a flow item in
\uicontrol {Form Editor} or \uicontrol Navigator.
\endlist
\li In \uicontrol Properties, edit the properties globally for all
flow items, action areas, or transition lines in the flow view.
\li In \l Properties, edit the properties of each flow item.
\endlist
To include another flow view into a flow view, select the \e {.ui.qml} file
that specifies the flow view in the \uicontrol {Loader source} field in
\uicontrol Properties.
You can now drag the flow items from \uicontrol Library >
\uicontrol {My QML Components} to the flow view in \uicontrol {Form Editor}
or \uicontrol Navigator. When you have all the screens in place, you can
add action areas to them to create transitions between them.
\uicontrol {My Components} to the flow view in \uicontrol {Form Editor}
or \uicontrol Navigator. When you have all the flow items in place, you can
\l{Adding Action Areas and Transitions}{add action areas} to them to create
transitions between them.
\section1 Adding Action Areas and Transitions
\section1 Flow Item Properties
You can specify basic properties for a \uicontrol {Flow Item} component
in the \l {Type}{Component}, \l {2D Geometry}{Geometry}, and
\l Visibility groups.
\image studio-flow-item-properties.png "Flow Item properties"
The \uicontrol {State change target} and \uicontrol {Target state}
properties are used to \l{Applying States in Flows}{apply states}
in flows.
To include another flow view into a flow view, select the UI file (.ui.qml)
that specifies the flow view in the \uicontrol {Loader source} field.
By default, transitions are drawn from action areas to the target flow item.
To draw the transitions from the edges of flow items instead, select the
\uicontrol {Join lines} check box.
In the \uicontrol Layout tab, you can use \l{Setting Anchors and Margins}
{anchors} to position the component.
In the \uicontrol Advanced tab, you can manage the more
\l{Specifying Developer Properties}{advanced properties} of components.
*/
/*!
\page studio-flow-action-area.html
\previouspage studio-flow-item.html
\nextpage studio-flow-effects.html
\title Adding Action Areas and Transitions
\e {Action areas} can act as clickable areas that initiate transitions
between screens or they can create connections to any signal from any
component in a flow item. For example, you could connect an action
to the \c onPressed signal of a button in your screen.
between flow items or they can \l{Connecting Components to Signals}
{create connections} to any signal from any component in a
\l{Adding Flow Items}{flow item}. For example, you could connect an
action to the \c onPressed signal of a button in your flow item to
determine what should happen when users press the button.
Typically, a screen can be connected to several other screens in the flow,
with two-way connections. To avoid clutter, you can set an action area as
\e {go back}, instead of adding explicit transition lines to and from
every potentially connected screen. When the \uicontrol {Go back} option is
enabled, the transition will always take the user back to the previous
screen.
\image studio-flow-action-area.png "Flow Action Area in Form Editor"
You can select the type of the mouse or touch input to use for triggering
events, such as click, double-click, flick, pinch, or press.
Typically, a flow item can be connected to several other flow items in the
flow with two-way connections. To avoid clutter, you can set an action area
as \e {go back} instead of adding explicit transition lines to and from
every potentially connected flow item. When the \uicontrol {Go back} option
is enabled, the transition will always take the user back to the previous
flow item.
You can specify the appearance of each action area or transition line,
including the color, line thickness, dotted or solid lines, and even
the curve of the transition lines. You can change some of these properties
globally, as instructed in \l{Flow View Properties}.
To create action areas:
\list 1
\li Right-click the flow item in \uicontrol {Form Editor} and select
\uicontrol {Flow} > \uicontrol {Create Flow Action} in the context
menu.
\li Drag the action area to the screen control that you want to connect
to the other screen. For example, to a button that opens another
screen when clicked.
\li Right-click the flow item in \l {Form Editor} and select
\uicontrol {Flow} > \uicontrol {Create Flow Action} in
the context menu.
\li Drag the action area to the UI control that you want to connect
to the other flow item. For example, to a button that opens another
flow item when clicked.
\li Double-click the action area and drag the transition line to the
flow item you want to connect to.
\li In \uicontrol Properties, modify the properties of the action area
\li In \l Properties, modify the properties of the action area
and transition line.
\endlist
To preview the flow, select the \inlineimage live_preview.png
(\uicontrol {Show Live Preview}) button on the \uicontrol {Form Editor}
toolbar or press \key {Alt+P}.
(\uicontrol {Show Live Preview}) button on the Design mode
\l{Summary of Main Toolbar Actions}{toolbar} or press \key {Alt+P}.
\section1 Applying Effects to Transitions
\section1 Common Properties
You can apply effects, such as fade, move, or push to transitions. A fade
effect makes the first screen appear to fade out, while the next screen
fades in. A move effect makes the second screen appear to move in over the
first screen, while the push effect appears to make a screen push out the
previous one. You can also design and use custom effects.
You can specify basic properties for \uicontrol {Flow Action Area}
and \uicontrol {Flow Transition} components in the \l {Type}{Component},
\l {2D Geometry}{Geometry}, and \l Visibility groups.
The transition direction determines the direction the new screen appears
You can use the \l{Picking Colors}{color picker} to set line and fill
color.
In the \uicontrol Layout tab, you can use \l{Setting Anchors and Margins}
{anchors} to position the component.
In the \uicontrol Advanced tab, you can manage the more
\l{Specifying Developer Properties}{advanced properties} of components.
\section1 Flow Action Area Properties
\image studio-flow-action-area-properties.png "Flow Action Area properties"
You can specify some additional properties for action areas:
\list
\li Select the \uicontrol {Go back} check box to specify that the
transition will always take the user back to the previous flow item.
\li In the \uicontrol {Event IDs} field, specify the IDs of the
events to connect to, such as mouse, touch or keyboard events.
\li In the \uicontrol {Action type} field, select the type of the
mouse or touch input to use for triggering events.
\li In the \uicontrol {Line width} field, set the width of the
action area outline.
\li Select the \uicontrol {Dashed line} check box to draw a dashed
action area outline.
\li Select the \uicontrol Enabled check box to enable interaction
with the action area during preview.
\endlist
\section1 Flow Transition Properties
You can specify some additional properties for transitions between
\l{Adding Flow Items}{flow items}:
\image studio-flow-transition-properties.png "Flow Transition properties"
\list
\li Select the \uicontrol Condition checkbox to activate the
transition. You can select \inlineimage icons/action-icon.png
to \l{Adding Bindings Between Properties}{bind} a condition
to the transition.
\li In the \uicontrol Question field, enter the text that will appear
next to the transition line. If the transition represents the
connection to a \uicontrol {Flow Decision} component, the
text will also be visible in the selection dialog that opens when
the \l{Simulating Conditions}{condition} is triggered.
\li In the \uicontrol {Event IDs} field, specify the IDs of the
events to connect to, such as mouse, touch or keyboard events.
\li In the \uicontrol From and \uicontrol To fields, select the
flow item where the transition starts and the one where it
ends.
\endlist
You can specify the following properties to change the appearance of
transition lines in \l{Form Editor}:
\image studio-flow-transition-line-properties.png "Flow Transition Line properties"
\list
\li In the \uicontrol {Line width} field, set the width of the
transition line.
\li In the \uicontrol {In-offset}, \uicontrol {Out-offset}, and
\uicontrol {Break-offset} fields, set the start or end point of a
transition line or a break to the specified offset. This enables
you to move them up and down or left and right.
\li Select the \uicontrol {Dashed line} check box to draw a dashed line.
\li In the \uicontrol Type field, select \uicontrol Bezier to draw
transition lines as bezier curves.
\li In the \uicontrol Radius field, specify the corner radius for
default curves.
\li In the \uicontrol {Bezier factor} field, specify the factor that
modifies the positions of the control points used for a bezier
curve.
\li In the \uicontrol {Label position} field, set the position of
the value of the \uicontrol Question field in respect to the
transition start point.
\li Select the \uicontrol {Label flip side} check box to move the
\uicontrol Question value to the opposite side of the transition
line.
\endlist
*/
/*!
\page studio-flow-effects.html
\previouspage studio-flow-action-area.html
\nextpage studio-flow-events.html
\title Applying Effects to Transitions
You can apply effects, such as fade, move, or push to
\l{Adding Action Areas and Transitions}{transitions} between
\l{Adding Flow Items}{flow items}. A fade effect makes the first
flow item appear to fade out, while the next flow item fades in.
A move effect makes the second flow item appear to move in over the
first flow item, while the push effect appears to make a flow item
push out the previous one. You can also design and use custom effects.
The transition direction determines the direction the new flow item appears
from: left, right, top, bottom. You can set the duration of the effect and
\l{Editing Easing Curves}{attach an easing curve} to the effect.
To add effects:
\list 1
\li Select a transition line in \uicontrol {Form Editor}.
\li Select a transition line in \l {Form Editor}.
\li In the context menu, select \uicontrol {Flow} >
\uicontrol {Assign Flow Effects}, and then select the effect
to apply.
\li In \uicontrol Properties, modify the properties of the effect.
\li In \l Properties, modify the properties of the effect.
\endlist
To edit effect properties, select a transition, and then select
To edit effect properties later, select a transition, and then select
\uicontrol {Flow} > \uicontrol {Select Effect} in the context menu.
\section1 Simulating Events
\section1 Flow Effect Properties
While transition lines are useful for prototyping, in production you need to
use the real signals from UI screens to control the flow of the application.
You can specify basic properties for a \uicontrol {Flow Effect}
component in the \l Type and \l ID fields.
\image studio-flow-effect-properties.png "Flow Effect properties"
You can set the duration and easing curve of all flow effects:
\list
\li In the \uicontrol Duration field, specify the duration of the
effect.
\li Select the \inlineimage curve_editor.png
button to open \uicontrol {Easing Curve Editor} for attaching an
\l{Editing Easing Curves}{easing curve} to the effect.
\endlist
For a move or push effect, you can set some additional properties:
\image studio-flow-effect-push-properties.png "Flow Push Effect properties"
\list
\li In the \uicontrol Direction field, specify the direction that
the target \uicontrol {Flow Item} appears from: left, right, top,
or bottom.
\li In the \uicontrol Scale field, set scaling for the effect.
\li In the \uicontrol {Incoming opacity} and
\uicontrol {Outgoing opacity} fields, specify the opacity of
the effect as a number between 0 and 1.
\li Select the \uicontrol Reveal check box to reveal the
\uicontrol {Flow Item} where the transition starts.
\endlist
*/
/*!
\page studio-flow-events.html
\previouspage studio-flow-effects.html
\nextpage studio-flow-conditions.html
\title Simulating Events
While \l{Adding Action Areas and Transitions}{transition lines}
are useful for prototyping, in production you need to use the real
\l{Connecting Components to Signals}{signals} from UI
\l{glossary-component}{components} to control the flow of the application.
For this purpose, you can use action areas in a more advanced way, by
having them listen to signals from screens or the controls in them and
by connecting these to the flow view. You can use keyboard shortcuts to
simulate these events when you preview the UI.
having them listen to signals from flow items or the controls in them and
by connecting these to the \l{Adding Flow Views}{flow view}. You can use
keyboard shortcuts to simulate these events when you preview the UI.
When you use the wizard to create a \uicontrol {Flow View} item, select the
\uicontrol {Use event simulator} check box to add an event simulator to the
flow view.
When you use the wizard to create a \uicontrol {Flow View} component, select
the \uicontrol {Use event simulator} check box to add an event simulator to
the flow view.
You can create an event list where you assign keyboard shortcuts to events,
and then use context-menu commands to attach the events to action areas or
transition lines.
\section1 Creating Event Lists
To create an event list:
\list 1
\li In \uicontrol Navigator, select the \uicontrol EventListSimulator
type, and then select the \uicontrol Active check box in
\uicontrol Properties to activate the event simulator.
\li Select the \inlineimage icons/edit.png
(\uicontrol {Show Event List}) button on the Design mode toolbar,
or press \key {Alt+E}.
\image studio-flow-event-list.png "Event List Dialog"
\li Select \inlineimage plus.png
(\uicontrol {Show Event List}) button on the Design mode
\l{Summary of Main Toolbar Actions}{toolbar}, or press \key {Alt+E}.
\li In the \uicontrol {Event List} dialog, select \inlineimage plus.png
to add a keyboard shortcut for triggering an event to the list.
\li In the \uicontrol Id field, enter an identifier for the event.
\image studio-flow-event-list.png "Event List dialog"
\li In the \uicontrol {Event ID} field, enter an identifier for the
event. You can search for existing events by entering search
criteria in the \uicontrol Filter field.
\li In the \uicontrol Description field, describe the keyboard shortcut.
\li In the \uicontrol Shortcut field, press the keyboard key that will
trigger the event, and then select \uicontrol R to record the
keyboard shortcut. The key identifier appears in the field.
\li In the \uicontrol Description field, describe the keyboard shortcut.
\endlist
You can now assign the events to the action areas in the flow to use the
keyboard shortcuts to trigger events when you preview the UI.
You can now assign the events to action areas and transitions.
\section1 Assigning Events to Actions
To assign events to actions:
\list 1
\li In \uicontrol Navigator, select an action area or transition line.
\li In the context menu, select \uicontrol {Flow} >
\uicontrol {Event List} > \uicontrol {Assign Events to Actions}.
\li Select an event in the list, and then select \uicontrol Accept.
\li In the context menu, select \uicontrol {Event List} >
\uicontrol {Assign Events to Actions}.
\image studio-flow-events-assign.png "Assign Events to Actions dialog"
\li In the \uicontrol ID field, select a transition or an action area
\inlineimage icons/flow-action-icon.png
. You can search for events by entering search criteria in the
\uicontrol Filter field.
\li To connect an event, select \uicontrol Connect next to an event in
the list. To release a connected event, select \uicontrol Release.
\li Press \key {Alt+P} to preview the UI.
\li Double-click events in the event list or use the keyboard shortcuts
to trigger events.
\li Select action areas in the preview, double-click events in the
event list, or use the keyboard shortcuts to trigger events.
\image studio-flow-decision-preview.png "Event list in preview"
\endlist
\section1 Simulating Conditions
If the event triggers a \l{Simulating Conditions}{flow decision}, you
can select the path to take to the next flow item.
*/
/*!
\page studio-flow-conditions.html
\previouspage studio-flow-events.html
\nextpage studio-flow-states.html
\title Simulating Conditions
Part of any complex UI is the conditional logic it uses to present its
state to users or to collect and process data from various sources. Data
@@ -238,88 +532,165 @@
buttons and controls, sensor readings from arrays of equipment, or general
values received from backend or service APIs.
The \uicontrol {Flow Decision} type simulates conditions by displaying a
The \uicontrol {Flow Decision} component simulates conditions by displaying a
list of options you can choose from when you preview the flow. This enables
you to prototype complex interactions before you have access to the physical
controls, backend, or sensor data that will be required for the production
version.
\image studio-flow-decision.png "Flow Decision in Form Editor"
To simulate conditions:
\list 1
\li Drag a \uicontrol {Flow Decision} QML type from \uicontrol Library
to a flow view in \uicontrol Navigator or \uicontrol {Form Editor}.
\li Select the screen where you want the application to start in
\li Drag a \uicontrol {Flow Decision} component from \l Library
to a \l{Adding Flow Views}{flow view} in \l Navigator or
\l {Form Editor}.
\li Select the flow item where you want the application to start in
\uicontrol Navigator or \uicontrol {Form Editor}, and then select
\uicontrol {Flow} > \uicontrol {Add Start} in the context menu.
\li Create an action area for the component that will trigger the
condition and connect it to the flow decision.
\li In \uicontrol Properties, \uicontrol Question field, enter the text
that will appear next to the transition line that represents the
connection to the flow decision type.
\uicontrol {Flow} > \uicontrol {Set Flow Start} in the context menu.
\li Create an \l{Adding Action Areas and Transitions}{action area} for
the component that will trigger the condition and connect it to the
flow decision.
\li Select the flow decision, and then select \uicontrol Connect in the
context menu to create connections to the screens that will open
context menu to create connections to the flow items that will open
depending on whether the condition is met.
\li In \uicontrol Properties, \uicontrol Title field, enter a title for
the selection dialog that opens when the condition is triggered.
\li Select a transition line and add a descriptive text in the
\uicontrol {Question} field to represent a choice in the selection
dialog.
\li In \uicontrol Properties, \uicontrol {Dialog title} field, enter a
title for the selection dialog that opens when the condition is
triggered.
\li Select a transition line in \uicontrol Navigator or
\uicontrol {Form Editor} and add a descriptive text in the
\uicontrol {Question} field in \uicontrol Properties to represent
a choice in the selection dialog.
\image studio-flow-transition-properties-question.png "Flow Transition properties"
\li Press \key {Alt+P} to preview the UI.
\li Select action areas in the preview, double-click events in the
event list, or use the keyboard shortcuts to trigger events.
\endlist
When you preview the UI, you can click the action areas to display a dialog
that you can use to select which condition is met and see the results.
Flow decisions are listed in a dialog where you can select which condition
is met to see the results.
\image studio-flow-decision.png
\image studio-flow-decision-preview.png "Selection dialog for flow decision"
\section1 Applying States in Flows
\section1 Flow Decision Properties
You can use \l{Adding States}{states} in flows to modify the appearance of
components on screens in response to user interaction, for example. For
this purpose, you use the \uicontrol {Flow Item} QML types availabe in
\uicontrol Library.
You can specify basic properties for a \uicontrol {Flow Decision}
component in the \l Type and \l ID fields.
\image studio-flow-decision-properties.png "Flow Decision properties"
In the \uicontrol {Dialog title} field, enter a title for the selection
dialog that opens when the condition is triggered.
You can specify the following properties to change the appearance of the
flow decision icon \inlineimage icons/flow-decision-icon.png
:
\list
\li Select the \uicontrol {Show label} check box to display the ID
of the \uicontrol {Flow Decision} component in \l {Form Editor}.
\li In the \uicontrol {Label position} field, select the corner of
the flow decision icon to place the label in.
\li In the \uicontrol Size field, specify the size of the flow
decision icon.
\li In the \uicontrol Radius field, specify the radius of the flow
decision icon corners.
\endlist
You can use the \l{Picking Colors}{color picker} to set the outline and
fill color of the flow decision icon.
*/
/*!
\page studio-flow-states.html
\previouspage studio-flow-conditions.html
\nextpage studio-flow-external-events.html
\title Applying States in Flows
You can use \l{Adding States}{states} in flows to modify the appearance
of \l{glossary-component}{components} in flow items in response to user
interaction, for example. For this purpose, you use the
\uicontrol {Flow Item} components available in \l Library.
\list 1
\li Select \uicontrol File > \uicontrol {New File or Project} >
\uicontrol {Files and Classes} > \uicontrol {Qt Quick Files} >
\uicontrol {Flow Item} to create a flow item.
\li In \uicontrol States, add states to the flow item.
\li Open the .ui.qml file that contains the flow view in
\uicontrol {Form Editor} and drag the flow item to the flow view
in \uicontrol Navigator or \uicontrol {Form Editor}.
\li Drag an empty \uicontrol {Flow Item} QML type from the
\uicontrol Library view \uicontrol {Flow View} tab to the
flow for each state that you added.
\li In \uicontrol Properties, in the \uicontrol {State change target}
\li In \l States, add states to the flow item.
\li Open the .ui.qml file that contains the \l{Adding Flow Views}
{flow view} in \l {Form Editor} and drag the flow item to the
flow view in \l Navigator or \l {Form Editor}.
\li Drag an empty \uicontrol {Flow Item} component from
\uicontrol Library > \uicontrol Components > \uicontrol {Flow View}
to the flow for each state that you added.
\li In \l Properties, in the \uicontrol {State change target}
field, select the flow item that you created using the wizard.
\image studio-flow-item-properties.png "Flow Item properties"
\li In the \uicontrol {Target state} field, select the state to
apply to the flow item.
\endlist
You can now add action areas and flow decisions to apply the different
states.
You can now add \l{Adding Action Areas and Transitions}{action areas} and
\l{Simulating Conditions}{flow decisions} to apply the different states.
*/
\section1 Reacting to External Events
/*!
\page studio-flow-external-events.html
\previouspage studio-flow-states.html
\nextpage quick-components.html
\title Reacting to External Events
On mobile and embedded platforms, applications are usually integrated into
the platform, and therefore screens might pop-up from anywhere or at any
the platform and therefore screens might pop-up from anywhere or at any
time, based on a conditional event. For example, push notifications
appear on mobile devices and incoming call screens on a car's HMI.
You can use the \uicontrol {Flow Wildcard} type to model this type of
screens in your flow, using real or simulated signals and conditions. You
can whitelist or blacklist wildcard events to prioritize them and stop some
screens from appearing on others. For example, you could block the incoming
call screen from appearing on a warning screen for the engine, if you
consider the warning more important.
You can use the \uicontrol {Flow Wildcard} component to model this type of
screens in your \l{Adding Flow Views}{flow view} using real or simulated
\l{Connecting Components to Signals}{signals} and \l{Simulating Conditions}
{conditions}. You can add \l{Adding Flow Items}{flow items} to a positive
list to prioritize them or to a negative list to stop some screens from
appearing on others. For example, you could block the incoming call screen
from appearing on a warning screen for the engine if you consider the
warning more important.
To use wildcards:
\list 1
\li Drag a \uicontrol {Flow Wildcard} QML type from \uicontrol Library
to a flow view in \uicontrol Navigator or \uicontrol {Form Editor}.
\li In \uicontrol Properties, add screens to the white and black list
for the screen.
\li Drag a \uicontrol {Flow Wildcard} component from \l Library
to an \l{Adding Action Areas and Transitions}{action area} in
\l Navigator or \l {Form Editor}.
\li In \l Properties, select flow items to add them to the
positive and negative list of the action area.
\endlist
\section1 Flow Wildcard Properties
You can specify basic properties for a \uicontrol {Flow Wildcard}
component in the \l Type and \l ID fields.
\image studio-flow-wildcard-properties.png "Flow Wildcard properties"
In the \uicontrol {Event IDs} field, specify the IDs of the events to
connect to, such as mouse, touch or keyboard events.
To give flow items high priority, select them in the
\uicontrol {Positive list} field. To block flow items,
select them in the \uicontrol {Negative list} field.
You can specify the following properties to change the appearance of the
wildcard icon \inlineimage icons/flow-wildcard-icon.png
:
\list
\li In the \uicontrol Size field, specify the size of the wildcard icon.
\li In the \uicontrol Radius field, specify the radius of the wildcard
icon corners.
\endlist
You can use the \l{Picking Colors}{color picker} to set the outline and
fill color of the wildcard icon.
*/

View File

@@ -27,27 +27,46 @@
\section2 Creating Custom Controls
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.
You can use project wizard templates to create stylable UI controls based
on the components in the Qt Quick Controls module:
\list
\li \l Button
\li \l {Check Box}
\li \l {Slider and Dial}{Dial}
\li \l {Slider and Dial}{Slider}
\li \l {Spin Box}
\li \l Switch
\li \l [QtQuickControls2] {Pane}
\li \l {Stack Layout}
\li \l [QtQuickControls2] {SwipeView}{Swipe View}
\endlist
You can edit the properties of the controls in all the preset
\l{Adding States}{states} to apply your own style to them.
\image studio-dial.png "A stylable Dial component"
To create stylable UI controls:
\list 1
\li Select \uicontrol File > \uicontrol {New File or Project} >
\uicontrol {Files and Classes} > \uicontrol {Qt Quick Controls}.
\li Select the control to create, and then select \uicontrol Choose.
\note Components are listed in the \uicontrol {My Components}
tab of the \uicontrol Library only if the filename begins
with a capital letter.
\li Edit component properties in the \uicontrol Properties view.
\note Components are listed in \l Library > \uicontrol Components >
\uicontrol {My Components} only if the filename begins with a
capital letter.
\li Edit component properties in the \l Properties view.
The available properties depend on the component type. You can
\l{Specifying Dynamic Properties}{add properties for components} in
the \uicontrol Properties tab of the \uicontrol {Connection View}.
\endlist
For an example of using the \uicontrol Button template to create a button,
see \l{Creating a Push Button} in the \l{Log In UI - Part 1} tutorial.
For an example of using the \uicontrol Button template to create a button
and styling it, see \l{Creating a Push Button} in the \l{Log In UI - Part 1}
tutorial.
//! [creating studio components]
*/

View File

@@ -147,10 +147,15 @@
List View. For more information, see \l{List and Grid Views}.
\endlist
\li \uicontrol {Qt Quick Controls}
\li \uicontrol {Qt Quick Controls} create stylable versions of the
components in the Qt Quick Controls module:
\list
\li \l {Button}{Custom Button} creates a push button with a text
label.
\li \l {Check Box}{Custom CheckBox} creates a check box.
\li \l {Slider and Dial}{Custom Dial} creates a dial.
\li \l {Slider and Dial}{Custom Slider} creates a slider.
\li \l {Spin Box}{Custom SpinBox} creates a spin box.
\li \l {Switch}{Custom Switch} creates a switch with on and off
states.
\li \l [Qt Quick Controls 2] {Pane} provides a background that
@@ -160,6 +165,7 @@
\li \l [Qt Quick Controls 2] {SwipeView} enables users to
navigate pages by swiping sideways.
\endlist
For more information, see \l{Creating Custom Controls}.
\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

View File

@@ -93,6 +93,16 @@
\li \l{Creating UIs}
\list
\li \l{Designing Application Flows}
\list
\li \l{Adding Flow Views}
\li \l{Adding Flow Items}
\li \l{Adding Action Areas and Transitions}
\li \l{Applying Effects to Transitions}
\li \l{Simulating Events}
\li \l{Simulating Conditions}
\li \l{Applying States in Flows}
\li \l{Reacting to External Events}
\endlist
\li \l{Creating Components}
\list
\li \l{Shapes}

View File

@@ -220,15 +220,13 @@
\section1 Applying Materials to Models
To apply materials to \l {Adding 3D Models}{models}:
To apply materials to models, you should first delete the default material,
and then drag-and-drop a new material from \l Library to a model component
in \l Navigator.
\list 1
\li Drag and drop a material component from \l Library to a model
component in \l Navigator.
\li Select the Model component.
\li In the \uicontrol Properties view, select the material for the model
in the \uicontrol Materials list.
\li Select the material component to edit the properties of the material
in the \uicontrol Properties view.
\endlist
You can apply the same material to another component as well. Again,
delete the default material first. You should then select the component and
go to the \uicontrol Properties view. Find the \uicontrol Materials property,
select the \inlineimage plus.png
icon, and choose the new material in the dropdown menu.
*/

View File

@@ -35,6 +35,16 @@
\QDS provides a set of pregenerated Qt Quick 3D materials that can be used
to create good-looking \l {Adding 3D Models}{models} quickly and easily.
To apply 3D materials to models, you should first delete the default material,
and then drag-and-drop a new material from \l Library to a model component
in \l Navigator.
You can apply the same material to another component as well. Again,
delete the default material first. You should then select the component and
go to the \uicontrol Properties view. Find the \uicontrol Materials property,
select the \inlineimage plus.png
icon, and choose the new material in the dropdown menu.
To apply a 3D material to a component, drag-and-drop a material from
\l Library > \uicontrol Components > \uicontrol QtQuick3D >
\uicontrol {Qt Quick 3D Materials} to a model component in \l Navigator.

View File

@@ -136,6 +136,4 @@
specify a new image to use in the \uicontrol Source field.
\image studio-qtquick-3d-texture-properties.png "Texture properties"
\endlist
*/

View File

@@ -95,6 +95,8 @@ def get_arguments():
action='store_true', default=False)
parser.add_argument('--with-tests', help='Enable building of tests',
action='store_true', default=False)
parser.add_argument('--with-pch', help='Enable building with PCH',
action='store_true', default=False)
parser.add_argument('--add-path', help='Prepends a CMAKE_PREFIX_PATH to the build',
action='append', dest='prefix_paths', default=[])
parser.add_argument('--add-module-path', help='Prepends a CMAKE_MODULE_PATH to the build',
@@ -139,6 +141,10 @@ def common_cmake_arguments(args):
if python_library:
cmake_args += ['-DPYTHON_LIBRARY=' + python_library[0],
'-DPYTHON_INCLUDE_DIR=' + os.path.join(args.python_path, 'include')]
pch_option = 'ON' if args.with_pch else 'OFF'
cmake_args += ['-DBUILD_WITH_PCH=' + pch_option]
return cmake_args
def build_qtcreator(args, paths):
@@ -170,9 +176,6 @@ def build_qtcreator(args, paths):
'-DBUILD_EXECUTABLE_WIN64INTERRUPT=OFF',
'-DBUILD_LIBRARY_QTCREATORCDBEXT=OFF']
# TODO this works around a CMake bug https://gitlab.kitware.com/cmake/cmake/issues/20119
cmake_args += ['-DBUILD_WITH_PCH=OFF']
ide_revision = common.get_commit_SHA(paths.src)
if ide_revision:
cmake_args += ['-DIDE_REVISION=ON',

View File

@@ -69,6 +69,14 @@ def build(args, paths):
if not os.path.exists(paths.result):
os.makedirs(paths.result)
prefix_paths = [os.path.abspath(fp) for fp in args.prefix_paths] + [paths.qt_creator, paths.qt]
if common.is_mac_platform():
# --qtc-path may be
# "/path/Qt Creator.app/Contents/Resources",
# "/path/Qt Creator.app", or
# "/path",
# so add some variants to the prefix path
prefix_paths += [os.path.join(paths.qt_creator, 'Contents', 'Resources'),
os.path.join(paths.qt_creator, 'Qt Creator.app', 'Contents', 'Resources')]
prefix_paths = [common.to_posix_path(fp) for fp in prefix_paths]
separate_debug_info_option = 'ON' if args.with_debug_info else 'OFF'
cmake_args = ['cmake',

View File

@@ -1,7 +1,15 @@
cmake_minimum_required(VERSION 3.10)
# Remove when sharing with others.
@if %{JS: Util.isDirectory('%{QtCreatorBuild}/Qt Creator.app/Contents/Resources')}
list(APPEND CMAKE_PREFIX_PATH "%{QtCreatorBuild}/Qt Creator.app/Contents/Resources")
@else
@if %{JS: Util.isDirectory('%{QtCreatorBuild}/Contents/Resources')}
list(APPEND CMAKE_PREFIX_PATH "%{QtCreatorBuild}/Contents/Resources")
@else
list(APPEND CMAKE_PREFIX_PATH "%{QtCreatorBuild}")
@endif
@endif
project(%{PluginName})

View File

@@ -7,9 +7,10 @@ Create a build directory and run
cmake -DCMAKE_PREFIX_PATH=<path_to_qtcreator> -DCMAKE_BUILD_TYPE=RelWithDebInfo <path_to_plugin_source>
cmake --build .
where `<path_to_qtcreator>` is the relative or absolute path to a Qt Creator build directory, or to
a combined binary and development package, and `<path_to_plugin_source>` is the relative or absolute
path to this plugin directory.
where `<path_to_qtcreator>` is the relative or absolute path to a Qt Creator build directory, or to a
combined binary and development package (Windows / Linux), or to the `Qt Creator.app/Contents/Resources/`
directory of a combined binary and development package (macOS), and `<path_to_plugin_source>` is the
relative or absolute path to this plugin directory.
## How to Run

View File

@@ -43,7 +43,8 @@ Product {
qbs.installSourceBase: project.ide_source_tree + "/src/share/3rdparty"
prefix: project.ide_source_tree + "/src/share/3rdparty/"
files: [
"fonts/**/*"
"fonts/**/*",
"package-manager/**/*",
]
}

View File

@@ -1,7 +1,7 @@
add_library(app_version INTERFACE)
target_include_directories(app_version
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
INTERFACE $<INSTALL_INTERFACE:include/src>)
INTERFACE $<INSTALL_INTERFACE:${IDE_HEADER_INSTALL_PATH}/src>)
install(TARGETS app_version EXPORT QtCreator)
add_subdirectory(libs)
@@ -16,20 +16,20 @@ install(
${PROJECT_SOURCE_DIR}/HACKING
${PROJECT_SOURCE_DIR}/LICENSE.GPL3-EXCEPT
${PROJECT_SOURCE_DIR}/README.md
DESTINATION ./
DESTINATION ${IDE_DATA_PATH}
COMPONENT Devel EXCLUDE_FROM_ALL
)
install(
DIRECTORY
${PROJECT_SOURCE_DIR}/scripts
DESTINATION ./
DESTINATION ${IDE_DATA_PATH}
COMPONENT Devel EXCLUDE_FROM_ALL
USE_SOURCE_PERMISSIONS
)
install(EXPORT QtCreator
DESTINATION "lib/cmake/QtCreator"
DESTINATION ${IDE_CMAKE_INSTALL_PATH}/QtCreator
COMPONENT Devel EXCLUDE_FROM_ALL
NAMESPACE QtCreator::
FILE QtCreatorTargets.cmake
@@ -106,6 +106,6 @@ install(
${PROJECT_SOURCE_DIR}/cmake/QtcSeparateDebugInfo.cmake
${PROJECT_SOURCE_DIR}/cmake/QtcSeparateDebugInfo.Info.plist.in
${CMAKE_BINARY_DIR}/cmake/QtCreatorConfig.cmake
DESTINATION lib/cmake/QtCreator
DESTINATION ${IDE_CMAKE_INSTALL_PATH}/QtCreator
COMPONENT Devel EXCLUDE_FROM_ALL
)

View File

@@ -2,7 +2,7 @@ configure_file(app_version.h.cmakein app_version.h ESCAPE_QUOTES)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/app_version.h
DESTINATION include/src/app
DESTINATION ${IDE_HEADER_INSTALL_PATH}/src/app
COMPONENT Devel EXCLUDE_FROM_ALL
)
@@ -89,5 +89,8 @@ extend_qtc_executable(qtcreator
DEPENDS Crashpad::Crashpad
)
if(BUILD_WITH_CRASHPAD)
install(FILES ${CRASHPAD_BIN_DIR}/crashpad_handler${CMAKE_EXECUTABLE_SUFFIX} DESTINATION "${IDE_LIBEXEC_PATH}")
install(
PROGRAMS ${CRASHPAD_BIN_DIR}/crashpad_handler${CMAKE_EXECUTABLE_SUFFIX}
DESTINATION "${IDE_LIBEXEC_PATH}"
)
endif()

View File

@@ -28,7 +28,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qlitehtml/src/CMakeLists.txt)
set(QLITEHTML_EXPORT QtCreator)
set(QLITEHTML_DEVEL_COMPONENT Devel)
set(QLITEHTML_DEVEL_EXCLUDE_FROM_ALL ON)
set(QLITEHTML_HEADER_PATH "include/src/lib/qlitehtml")
set(QLITEHTML_HEADER_PATH "${IDE_HEADER_INSTALL_PATH}/src/lib/qlitehtml")
add_subdirectory(qlitehtml/src)
endif()
if(TARGET qlitehtml)

View File

@@ -39,7 +39,8 @@ namespace ClangBackEnd {
template <typename StatementFactory>
class FilePathStorage
{
using ReadStatement = typename StatementFactory::ReadStatement;
template<int ResultCount>
using ReadStatement = typename StatementFactory::template ReadStatement<ResultCount>;
using WriteStatement = typename StatementFactory::WriteStatement;
using Database = typename StatementFactory::Database;
@@ -84,7 +85,7 @@ public:
Utils::optional<int> readDirectoryId(Utils::SmallStringView directoryPath)
{
ReadStatement &statement = m_statementFactory.selectDirectoryIdFromDirectoriesByDirectoryPath;
auto &statement = m_statementFactory.selectDirectoryIdFromDirectoriesByDirectoryPath;
return statement.template value<int>(directoryPath);
}
@@ -103,7 +104,7 @@ public:
try {
Sqlite::DeferredTransaction transaction{m_statementFactory.database};
ReadStatement &statement = m_statementFactory.selectDirectoryPathFromDirectoriesByDirectoryId;
auto &statement = m_statementFactory.selectDirectoryPathFromDirectoriesByDirectoryId;
auto optionalDirectoryPath = statement.template value<Utils::PathString>(directoryPathId);
@@ -123,9 +124,9 @@ public:
try {
Sqlite::DeferredTransaction transaction{m_statementFactory.database};
ReadStatement &statement = m_statementFactory.selectAllDirectories;
auto &statement = m_statementFactory.selectAllDirectories;
auto directories = statement.template values<Sources::Directory, 2>(256);
auto directories = statement.template values<Sources::Directory>(256);
transaction.commit();
@@ -164,7 +165,7 @@ public:
int writeSourceId(int directoryId, Utils::SmallStringView sourceName)
{
WriteStatement &statement = m_statementFactory.insertIntoSources;
auto &statement = m_statementFactory.insertIntoSources;
statement.write(directoryId, sourceName);
@@ -173,7 +174,7 @@ public:
Utils::optional<int> readSourceId(int directoryId, Utils::SmallStringView sourceName)
{
ReadStatement &statement = m_statementFactory.selectSourceIdFromSourcesByDirectoryIdAndSourceName;
auto &statement = m_statementFactory.selectSourceIdFromSourcesByDirectoryIdAndSourceName;
return statement.template value<int>(directoryId, sourceName);
}
@@ -183,9 +184,10 @@ public:
try {
Sqlite::DeferredTransaction transaction{m_statementFactory.database};
ReadStatement &statement = m_statementFactory.selectSourceNameAndDirectoryIdFromSourcesBySourceId;
auto &statement = m_statementFactory.selectSourceNameAndDirectoryIdFromSourcesBySourceId;
auto optionalSourceName = statement.template value<Sources::SourceNameAndDirectoryId, 2>(sourceId);
auto optionalSourceName = statement.template value<Sources::SourceNameAndDirectoryId>(
sourceId);
if (!optionalSourceName)
throw SourceNameIdDoesNotExists();
@@ -203,7 +205,7 @@ public:
try {
Sqlite::DeferredTransaction transaction{m_statementFactory.database};
ReadStatement &statement = m_statementFactory.selectDirectoryIdFromSourcesBySourceId;
auto &statement = m_statementFactory.selectDirectoryIdFromSourcesBySourceId;
auto optionalDirectoryId = statement.template value<int>(sourceId);
@@ -223,9 +225,9 @@ public:
try {
Sqlite::DeferredTransaction transaction{m_statementFactory.database};
ReadStatement &statement = m_statementFactory.selectAllSources;
auto &statement = m_statementFactory.selectAllSources;
auto sources = statement.template values<Sources::Source, 3>(8192);
auto sources = statement.template values<Sources::Source>(8192);
transaction.commit();

View File

@@ -35,8 +35,9 @@ class FilePathStorageSqliteStatementFactory
{
public:
using Database = DatabaseType;
using ReadStatement = typename DatabaseType::ReadStatement;
using WriteStatement = typename DatabaseType::WriteStatement;
template<int ResultCount>
using ReadStatement = typename Database::template ReadStatement<ResultCount>;
using WriteStatement = typename Database::WriteStatement;
FilePathStorageSqliteStatementFactory(Database &database)
: database(database)
@@ -45,32 +46,28 @@ public:
public:
Database &database;
ReadStatement selectDirectoryIdFromDirectoriesByDirectoryPath{
"SELECT directoryId FROM directories WHERE directoryPath = ?",
database
};
ReadStatement selectDirectoryPathFromDirectoriesByDirectoryId{
ReadStatement<1> selectDirectoryIdFromDirectoriesByDirectoryPath{
"SELECT directoryId FROM directories WHERE directoryPath = ?", database};
ReadStatement<1> selectDirectoryPathFromDirectoriesByDirectoryId{
"SELECT directoryPath FROM directories WHERE directoryId = ?", database};
ReadStatement selectAllDirectories{"SELECT directoryPath, directoryId FROM directories", database};
ReadStatement<2> selectAllDirectories{"SELECT directoryPath, directoryId FROM directories",
database};
WriteStatement insertIntoDirectories{
"INSERT INTO directories(directoryPath) VALUES (?)",
database
};
ReadStatement selectSourceIdFromSourcesByDirectoryIdAndSourceName{
"SELECT sourceId FROM sources WHERE directoryId = ? AND sourceName = ?",
database
};
ReadStatement selectSourceNameAndDirectoryIdFromSourcesBySourceId{
"SELECT sourceName, directoryId FROM sources WHERE sourceId = ?",
database
};
ReadStatement selectDirectoryIdFromSourcesBySourceId{
ReadStatement<1> selectSourceIdFromSourcesByDirectoryIdAndSourceName{
"SELECT sourceId FROM sources WHERE directoryId = ? AND sourceName = ?", database};
ReadStatement<2> selectSourceNameAndDirectoryIdFromSourcesBySourceId{
"SELECT sourceName, directoryId FROM sources WHERE sourceId = ?", database};
ReadStatement<1> selectDirectoryIdFromSourcesBySourceId{
"SELECT directoryId FROM sources WHERE sourceId = ?", database};
WriteStatement insertIntoSources{
"INSERT INTO sources(directoryId, sourceName) VALUES (?,?)",
database
};
ReadStatement selectAllSources{"SELECT sourceName, directoryId, sourceId FROM sources", database};
ReadStatement<3> selectAllSources{"SELECT sourceName, directoryId, sourceId FROM sources",
database};
};
} // namespace ClangBackEnd

View File

@@ -36,7 +36,8 @@ namespace ClangBackEnd {
template<typename Database = Sqlite::Database>
class ProjectPartsStorage final : public ProjectPartsStorageInterface
{
using ReadStatement = typename Database::ReadStatement;
template<int ResultCount>
using ReadStatement = typename Database::template ReadStatement<ResultCount>;
using WriteStatement = typename Database::WriteStatement;
public:
@@ -52,7 +53,7 @@ public:
try {
Sqlite::DeferredTransaction transaction{database};
auto values = fetchProjectPartsStatement.template values<ProjectPartContainer, 8>(4096);
auto values = fetchProjectPartsStatement.template values<ProjectPartContainer>(4096);
transaction.commit();
@@ -91,7 +92,7 @@ public:
Sqlite::DeferredTransaction transaction{database};
for (ProjectPartId projectPartId : projectPartIds) {
auto value = fetchProjectPartByIdStatement.template value<ProjectPartContainer, 8>(
auto value = fetchProjectPartByIdStatement.template value<ProjectPartContainer>(
projectPartId.projectPathId);
if (value) {
value->headerPathIds = fetchHeaders(projectPartId);
@@ -243,9 +244,9 @@ public:
try {
Sqlite::DeferredTransaction transaction{database};
ReadStatement &statement = getProjectPartArtefactsBySourceId;
auto &statement = getProjectPartArtefactsBySourceId;
auto value = statement.template value<ProjectPartArtefact, 8>(sourceId.filePathId);
auto value = statement.template value<ProjectPartArtefact>(sourceId.filePathId);
transaction.commit();
@@ -260,9 +261,9 @@ public:
try {
Sqlite::DeferredTransaction transaction{database};
ReadStatement &statement = getProjectPartArtefactsByProjectPartId;
auto &statement = getProjectPartArtefactsByProjectPartId;
auto value = statement.template value<ProjectPartArtefact, 8>(projectPartId.projectPathId);
auto value = statement.template value<ProjectPartArtefact>(projectPartId.projectPathId);
transaction.commit();
@@ -342,9 +343,9 @@ public:
try {
Sqlite::DeferredTransaction transaction{database};
ReadStatement &statement = fetchAllProjectPartNamesAndIdsStatement;
auto &statement = fetchAllProjectPartNamesAndIdsStatement;
auto values = statement.template values<Internal::ProjectPartNameId, 2>(256);
auto values = statement.template values<Internal::ProjectPartNameId>(256);
transaction.commit();
@@ -357,18 +358,18 @@ public:
public:
Sqlite::ImmediateNonThrowingDestructorTransaction transaction;
Database &database;
mutable ReadStatement fetchProjectPartIdStatement{
mutable ReadStatement<1> fetchProjectPartIdStatement{
"SELECT projectPartId FROM projectParts WHERE projectPartName = ?", database};
mutable WriteStatement insertProjectPartNameStatement{
"INSERT INTO projectParts(projectPartName) VALUES (?)", database};
mutable ReadStatement fetchProjectPartNameStatement{
mutable ReadStatement<1> fetchProjectPartNameStatement{
"SELECT projectPartName FROM projectParts WHERE projectPartId = ?", database};
mutable ReadStatement fetchProjectPartsStatement{
mutable ReadStatement<8> fetchProjectPartsStatement{
"SELECT toolChainArguments, compilerMacros, systemIncludeSearchPaths, "
"projectIncludeSearchPaths, projectPartId, language, languageVersion, languageExtension "
"FROM projectParts",
database};
mutable ReadStatement fetchProjectPartByIdStatement{
mutable ReadStatement<8> fetchProjectPartByIdStatement{
"SELECT toolChainArguments, compilerMacros, systemIncludeSearchPaths, "
"projectIncludeSearchPaths, projectPartId, language, languageVersion, languageExtension "
"FROM projectParts WHERE projectPartId = ?",
@@ -378,13 +379,13 @@ public:
"systemIncludeSearchPaths=?004, projectIncludeSearchPaths=?005, language=?006, "
"languageVersion=?007, languageExtension=?008 WHERE projectPartId = ?001",
database};
mutable ReadStatement getProjectPartArtefactsBySourceId{
mutable ReadStatement<8> getProjectPartArtefactsBySourceId{
"SELECT toolChainArguments, compilerMacros, systemIncludeSearchPaths, "
"projectIncludeSearchPaths, projectPartId, language, languageVersion, languageExtension "
"FROM projectParts WHERE projectPartId = (SELECT "
"projectPartId FROM projectPartsFiles WHERE sourceId = ?)",
database};
mutable ReadStatement getProjectPartArtefactsByProjectPartId{
mutable ReadStatement<8> getProjectPartArtefactsByProjectPartId{
"SELECT toolChainArguments, compilerMacros, systemIncludeSearchPaths, "
"projectIncludeSearchPaths, projectPartId, language, languageVersion, languageExtension "
"FROM projectParts WHERE projectPartId = ?",
@@ -397,17 +398,17 @@ public:
"INSERT INTO projectPartsHeaders(projectPartId, sourceId) VALUES (?,?)", database};
WriteStatement insertProjectPartsSourcesStatement{
"INSERT INTO projectPartsSources(projectPartId, sourceId) VALUES (?,?)", database};
mutable ReadStatement fetchProjectPartsHeadersByIdStatement{
mutable ReadStatement<1> fetchProjectPartsHeadersByIdStatement{
"SELECT sourceId FROM projectPartsHeaders WHERE projectPartId = ? ORDER BY sourceId",
database};
mutable ReadStatement fetchProjectPartsSourcesByIdStatement{
mutable ReadStatement<1> fetchProjectPartsSourcesByIdStatement{
"SELECT sourceId FROM projectPartsSources WHERE projectPartId = ? ORDER BY sourceId",
database};
mutable ReadStatement fetchProjectPrecompiledHeaderBuildTimeStatement{
mutable ReadStatement<1> fetchProjectPrecompiledHeaderBuildTimeStatement{
"SELECT projectPchBuildTime FROM precompiledHeaders WHERE projectPartId = ?", database};
WriteStatement resetDependentIndexingTimeStampsStatement{
"UPDATE fileStatuses SET indexingTimeStamp = NULL WHERE sourceId = ?", database};
mutable ReadStatement fetchAllProjectPartNamesAndIdsStatement{
mutable ReadStatement<2> fetchAllProjectPartNamesAndIdsStatement{
"SELECT projectPartName, projectPartId FROM projectParts", database};
};
} // namespace ClangBackEnd

View File

@@ -150,15 +150,20 @@ Utils::optional<LanguageClientValue<T>> JsonObject::optionalClientValue(const QS
template<typename T>
QList<T> JsonObject::array(const QString &key) const
{
return LanguageClientArray<T>(value(key)).toList();
const Utils::optional<QList<T>> &array = optionalArray<T>(key);
if (array.has_value())
return array.value();
qCDebug(conversionLog) << QString("Expected array under %1 in:").arg(key) << *this;
return {};
}
template<typename T>
Utils::optional<QList<T>> JsonObject::optionalArray(const QString &key) const
{
using Result = Utils::optional<QList<T>>;
return contains(key) ? Result(LanguageClientArray<T>(value(key)).toList())
: Result(Utils::nullopt);
const QJsonValue &jsonValue = value(key);
if (jsonValue.isUndefined())
return Utils::nullopt;
return Utils::transform<QList<T>>(jsonValue.toArray(), &fromJsonValue<T>);
}
template<typename T>

View File

@@ -30,15 +30,15 @@ add_qtc_library(Sqlite
sqliteexception.cpp sqliteexception.h
sqliteglobal.cpp sqliteglobal.h
sqliteindex.h
sqlitereadstatement.cpp sqlitereadstatement.h
sqlitereadwritestatement.cpp sqlitereadwritestatement.h
sqlitereadstatement.h
sqlitereadwritestatement.h
sqlitesessionchangeset.cpp sqlitesessionchangeset.h
sqlitesessions.cpp sqlitesessions.h
sqlitetable.h
sqlitetransaction.h
sqlitetransaction.h
sqlitevalue.h
sqlitewritestatement.cpp sqlitewritestatement.h
sqlitewritestatement.h
sqlstatementbuilder.cpp sqlstatementbuilder.h
sqlstatementbuilderexception.h
tableconstraints.h

View File

@@ -15,11 +15,8 @@ SOURCES += \
$$PWD/sqlitedatabasebackend.cpp \
$$PWD/sqliteexception.cpp \
$$PWD/sqliteglobal.cpp \
$$PWD/sqlitereadstatement.cpp \
$$PWD/sqlitereadwritestatement.cpp \
$$PWD/sqlitesessionchangeset.cpp \
$$PWD/sqlitesessions.cpp \
$$PWD/sqlitewritestatement.cpp \
$$PWD/sqlstatementbuilder.cpp \
$$PWD/utf8string.cpp \
$$PWD/utf8stringvector.cpp \

View File

@@ -10,12 +10,9 @@ SOURCES += \
sqlitedatabaseconnectionproxy.cpp \
sqliteexception.cpp \
sqliteglobal.cpp \
sqlitereadstatement.cpp \
sqlitereadwritestatement.cpp \
sqlitestatement.cpp \
sqlitetransaction.cpp \
sqliteworkerthread.cpp \
sqlitewritestatement.cpp \
sqlstatementbuilder.cpp \
utf8string.cpp \
utf8stringvector.cpp \

View File

@@ -687,7 +687,8 @@ StringType textForColumn(sqlite3_stmt *sqlStatment, int column)
BlobView blobForColumn(sqlite3_stmt *sqlStatment, int column)
{
const byte *blob = reinterpret_cast<const byte *>(sqlite3_column_blob(sqlStatment, column));
const std::byte *blob = reinterpret_cast<const std::byte *>(
sqlite3_column_blob(sqlStatment, column));
std::size_t size = std::size_t(sqlite3_column_bytes(sqlStatment, column));
return {blob, size};

View File

@@ -159,7 +159,7 @@ extern template SQLITE_EXPORT Utils::SmallStringView BaseStatement::fetchValue<U
extern template SQLITE_EXPORT Utils::SmallString BaseStatement::fetchValue<Utils::SmallString>(int column) const;
extern template SQLITE_EXPORT Utils::PathString BaseStatement::fetchValue<Utils::PathString>(int column) const;
template <typename BaseStatement>
template<typename BaseStatement, int ResultCount>
class StatementImplementation : public BaseStatement
{
@@ -173,9 +173,7 @@ public:
resetter.reset();
}
void bindValues()
{
}
void bindValues() {}
template<typename... ValueType>
void bindValues(const ValueType&... values)
@@ -192,18 +190,15 @@ public:
resetter.reset();
}
template <typename ResultType,
int ResultTypeCount = 1>
template<typename ResultType>
std::vector<ResultType> values(std::size_t reserveSize)
{
BaseStatement::checkColumnCount(ResultTypeCount);
Resetter resetter{*this};
std::vector<ResultType> resultValues;
resultValues.reserve(std::max(reserveSize, m_maximumResultCount));
while (BaseStatement::next())
emplaceBackValues<ResultTypeCount>(resultValues);
emplaceBackValues(resultValues);
setMaximumResultCount(resultValues.size());
@@ -212,11 +207,9 @@ public:
return resultValues;
}
template<typename ResultType, int ResultTypeCount = 1, typename... QueryTypes>
template<typename ResultType, typename... QueryTypes>
auto values(std::size_t reserveSize, const QueryTypes &...queryValues)
{
BaseStatement::checkColumnCount(ResultTypeCount);
Resetter resetter{*this};
std::vector<ResultType> resultValues;
resultValues.reserve(std::max(reserveSize, m_maximumResultCount));
@@ -224,7 +217,7 @@ public:
bindValues(queryValues...);
while (BaseStatement::next())
emplaceBackValues<ResultTypeCount>(resultValues);
emplaceBackValues(resultValues);
setMaximumResultCount(resultValues.size());
@@ -233,66 +226,16 @@ public:
return resultValues;
}
template<typename ResultType, int ResultTypeCount = 1, typename QueryElementType>
auto values(std::size_t reserveSize, const std::vector<QueryElementType> &queryValues)
{
BaseStatement::checkColumnCount(ResultTypeCount);
std::vector<ResultType> resultValues;
resultValues.reserve(std::max(reserveSize, m_maximumResultCount));
for (const QueryElementType &queryValue : queryValues) {
Resetter resetter{*this};
bindValues(queryValue);
while (BaseStatement::next())
emplaceBackValues<ResultTypeCount>(resultValues);
setMaximumResultCount(resultValues.size());
resetter.reset();
}
return resultValues;
}
template<typename ResultType, int ResultTypeCount = 1, typename... QueryElementTypes>
auto values(std::size_t reserveSize,
const std::vector<std::tuple<QueryElementTypes...>> &queryTuples)
{
BaseStatement::checkColumnCount(ResultTypeCount);
using Container = std::vector<ResultType>;
Container resultValues;
resultValues.reserve(std::max(reserveSize, m_maximumResultCount));
for (const auto &queryTuple : queryTuples) {
Resetter resetter{*this};
bindTupleValues(queryTuple);
while (BaseStatement::next())
emplaceBackValues<ResultTypeCount>(resultValues);
setMaximumResultCount(resultValues.size());
resetter.reset();
}
return resultValues;
}
template<typename ResultType, int ResultTypeCount = 1, typename... QueryTypes>
template<typename ResultType, typename... QueryTypes>
auto value(const QueryTypes &...queryValues)
{
BaseStatement::checkColumnCount(ResultTypeCount);
Resetter resetter{*this};
Utils::optional<ResultType> resultValue;
bindValues(queryValues...);
if (BaseStatement::next())
resultValue = assignValue<Utils::optional<ResultType>, ResultTypeCount>();
resultValue = assignValue<Utils::optional<ResultType>>();
resetter.reset();
@@ -311,17 +254,15 @@ public:
return statement.template fetchValue<Type>(0);
}
template<int ResultTypeCount = 1, typename Callable, typename... QueryTypes>
template<typename Callable, typename... QueryTypes>
void readCallback(Callable &&callable, const QueryTypes &...queryValues)
{
BaseStatement::checkColumnCount(ResultTypeCount);
Resetter resetter{*this};
bindValues(queryValues...);
while (BaseStatement::next()) {
auto control = callCallable<ResultTypeCount>(callable);
auto control = callCallable(callable);
if (control == CallbackControl::Abort)
break;
@@ -333,14 +274,12 @@ public:
template<int ResultTypeCount = 1, typename Container, typename... QueryTypes>
void readTo(Container &container, const QueryTypes &...queryValues)
{
BaseStatement::checkColumnCount(ResultTypeCount);
Resetter resetter{*this};
bindValues(queryValues...);
while (BaseStatement::next())
emplaceBackValues<ResultTypeCount>(container);
emplaceBackValues(container);
resetter.reset();
}
@@ -399,18 +338,21 @@ private:
int column;
};
template <typename ContainerType,
int... ColumnIndices>
constexpr int resultCount(int localResultCount) const
{
return ResultCount < 0 ? localResultCount : ResultCount;
}
template<typename ContainerType, int... ColumnIndices>
void emplaceBackValues(ContainerType &container, std::integer_sequence<int, ColumnIndices...>)
{
container.emplace_back(ValueGetter(*this, ColumnIndices)...);
}
template <int ResultTypeCount,
typename ContainerType>
template<typename ContainerType>
void emplaceBackValues(ContainerType &container)
{
emplaceBackValues(container, std::make_integer_sequence<int, ResultTypeCount>{});
emplaceBackValues(container, std::make_integer_sequence<int, ResultCount>{});
}
template <typename ResultOptionalType,
@@ -420,11 +362,10 @@ private:
return ResultOptionalType(Utils::in_place, ValueGetter(*this, ColumnIndices)...);
}
template <typename ResultOptionalType,
int ResultTypeCount>
template<typename ResultOptionalType>
ResultOptionalType assignValue()
{
return assignValue<ResultOptionalType>(std::make_integer_sequence<int, ResultTypeCount>{});
return assignValue<ResultOptionalType>(std::make_integer_sequence<int, ResultCount>{});
}
template<typename Callable, int... ColumnIndices>
@@ -433,10 +374,10 @@ private:
return std::invoke(callable, ValueGetter(*this, ColumnIndices)...);
}
template<int ResultTypeCount, typename Callable>
template<typename Callable>
CallbackControl callCallable(Callable &&callable)
{
return callCallable(callable, std::make_integer_sequence<int, ResultTypeCount>{});
return callCallable(callable, std::make_integer_sequence<int, ResultCount>{});
}
template<typename ValueType>
@@ -452,19 +393,6 @@ private:
bindValuesByIndex(index + 1, values...);
}
template <typename TupleType, std::size_t... ColumnIndices>
void bindTupleValuesElement(const TupleType &tuple, std::index_sequence<ColumnIndices...>)
{
bindValues(std::get<ColumnIndices>(tuple)...);
}
template <typename TupleType,
typename ColumnIndices = std::make_index_sequence<std::tuple_size<TupleType>::value>>
void bindTupleValues(const TupleType &element)
{
bindTupleValuesElement(element, ColumnIndices());
}
void setMaximumResultCount(std::size_t count)
{
m_maximumResultCount = std::max(m_maximumResultCount, count);

Some files were not shown because too many files have changed in this diff Show More