Merge "Merge remote-tracking branch 'origin/4.14'"
@@ -107,10 +107,35 @@ endif()
|
||||
|
||||
add_subdirectory(doc)
|
||||
|
||||
# CMake will include in a cmake_install.cmake at the end the subdirectories
|
||||
# At this point all the previous install scripts have been included
|
||||
# Deployment is being done in cmake/CMakeLists.txt
|
||||
add_subdirectory(cmake)
|
||||
find_package(PythonInterp)
|
||||
if (NOT PYTHONINTERP_FOUND)
|
||||
message("No python interpreter found, skipping \"Dependencies\" install component.")
|
||||
else()
|
||||
get_target_property(_qmake_binary Qt5::qmake IMPORTED_LOCATION)
|
||||
set(_llvm_arg)
|
||||
if (LLVM_INSTALL_PREFIX)
|
||||
set(_llvm_arg "--llvm \"${LLVM_INSTALL_PREFIX}\"")
|
||||
endif()
|
||||
set(_elfutils_arg)
|
||||
if (ELFUTILS_INCLUDE_DIR)
|
||||
get_filename_component(_elfutils_path ${ELFUTILS_INCLUDE_DIR} DIRECTORY)
|
||||
set(_elfutils_arg "--elfutils \"${_elfutils_path}\"")
|
||||
endif()
|
||||
install(CODE "
|
||||
execute_process(COMMAND
|
||||
\"${PYTHON_EXECUTABLE}\"
|
||||
\"${CMAKE_CURRENT_LIST_DIR}/scripts/deployqt.py\"
|
||||
${_llvm_arg}
|
||||
${_elfutils_arg}
|
||||
\"\${CMAKE_INSTALL_PREFIX}/${IDE_APP_PATH}/${IDE_APP_TARGET}\"
|
||||
\"${_qmake_binary}\"
|
||||
COMMAND_ECHO STDOUT
|
||||
)
|
||||
"
|
||||
COMPONENT Dependencies
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
endif()
|
||||
|
||||
feature_summary(INCLUDE_QUIET_PACKAGES WHAT
|
||||
PACKAGES_FOUND PACKAGES_NOT_FOUND
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
# Deployment of Qt, Clang, C++ Runtime libraries is being done in this script.
|
||||
#
|
||||
# It should be included as a subdirectory as last because of CMake's
|
||||
# cmake_install.cmake script behviour of including subdirectories at the end
|
||||
# of the script, not respecting the order of install commands from CMakeLists.txt
|
||||
#
|
||||
# This way we are sure that all the binaries have been installed before.
|
||||
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16)
|
||||
get_target_property(moc_binary Qt5::moc IMPORTED_LOCATION)
|
||||
get_filename_component(moc_dir "${moc_binary}" DIRECTORY)
|
||||
get_filename_component(QT_BASE_DIR "${moc_dir}/../" ABSOLUTE)
|
||||
|
||||
if (MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(exclusion_mask PATTERN "*d.dll" EXCLUDE)
|
||||
endif()
|
||||
|
||||
foreach(plugin
|
||||
assetimporters designer iconengines imageformats platforminputcontexts
|
||||
platforms platformthemes printsupport qmltooling sqldrivers styles
|
||||
xcbglintegrations)
|
||||
if(NOT EXISTS "${QT_BASE_DIR}/plugins/${plugin}")
|
||||
continue()
|
||||
endif()
|
||||
install(
|
||||
DIRECTORY "${QT_BASE_DIR}/plugins/${plugin}"
|
||||
DESTINATION ${QT_DEST_PLUGIN_PATH}
|
||||
COMPONENT Dependencies
|
||||
EXCLUDE_FROM_ALL
|
||||
${exclusion_mask}
|
||||
)
|
||||
list(APPEND QT_PLUGIN_DIRECTORIES "${QT_DEST_PLUGIN_PATH}/${plugin}")
|
||||
endforeach()
|
||||
|
||||
install(
|
||||
DIRECTORY "${QT_BASE_DIR}/qml/"
|
||||
DESTINATION ${QT_DEST_QML_PATH}
|
||||
COMPONENT Dependencies
|
||||
EXCLUDE_FROM_ALL
|
||||
PATTERN "qml/*"
|
||||
${exclusion_mask}
|
||||
)
|
||||
|
||||
# QtCreator's "System Information..." needs qtdiag
|
||||
set(qtdiag_destination ${IDE_BIN_PATH})
|
||||
if (NOT APPLE AND NOT WIN32)
|
||||
set(qtdiag_destination ${IDE_LIBRARY_BASE_PATH}/Qt/bin)
|
||||
endif()
|
||||
install(PROGRAMS
|
||||
"${QT_BASE_DIR}/bin/qtdiag${CMAKE_EXECUTABLE_SUFFIX}"
|
||||
DESTINATION ${qtdiag_destination}
|
||||
COMPONENT Dependencies
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
# Analyze the binaries and install missing dependencies if they are
|
||||
# found the CMAKE_PREFIX_PATH e.g. Qt, Clang
|
||||
configure_file(InstallDependentSharedObjects.cmake.in InstallDependentSharedObjects.cmake @ONLY)
|
||||
install(
|
||||
SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/InstallDependentSharedObjects.cmake
|
||||
COMPONENT Dependencies
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP ON)
|
||||
include(InstallRequiredsystemLibraries)
|
||||
|
||||
# For Qt Creator
|
||||
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
|
||||
DESTINATION ${IDE_APP_PATH}
|
||||
COMPONENT Dependencies
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
# For qtcreatorcdbext
|
||||
set(ArchSuffix 32)
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(ArchSuffix 64)
|
||||
endif()
|
||||
|
||||
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
|
||||
DESTINATION lib/qtcreatorcdbext${ArchSuffix}
|
||||
COMPONENT Dependencies
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -12,3 +12,15 @@ if (TARGET clangTooling AND NOT CLANGTOOLING_LINK_CLANG_DYLIB)
|
||||
elseif (TARGET clang-cpp)
|
||||
set(CLANG_TOOLING_LIBS libclang clang-cpp)
|
||||
endif()
|
||||
|
||||
SET(QTC_CLANG_BUILDMODE_MATCH ON)
|
||||
if (WIN32 AND TARGET libclang)
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE} _type)
|
||||
get_target_property(_llvmConfigs libclang IMPORTED_CONFIGURATIONS)
|
||||
string(TOLOWER ${_llvmConfigs} _llvm_configs)
|
||||
list(FIND _llvm_configs ${_type} _build_type_found)
|
||||
if (_build_type_found LESS 0)
|
||||
set(QTC_CLANG_BUILDMODE_MATCH OFF)
|
||||
message("Build mode mismatch (debug vs release): limiting clangTooling")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
if (MINGW AND @CMAKE_CXX_COMPILER_ID@ MATCHES "Clang")
|
||||
set(CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL objdump)
|
||||
endif()
|
||||
if (WIN32)
|
||||
set(filter_regex PRE_EXCLUDE_REGEXES "api-ms-.*|ext-ms-.*")
|
||||
elseif (APPLE)
|
||||
set(filter_regex PRE_EXCLUDE_REGEXES "libiodbc.*|libpq.*")
|
||||
endif()
|
||||
|
||||
get_filename_component(install_prefix "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
|
||||
|
||||
# Get the dependencies of Qt's plugins
|
||||
set(qt_plugin_directories "@QT_PLUGIN_DIRECTORIES@")
|
||||
foreach(plugin IN LISTS qt_plugin_directories)
|
||||
file(GLOB plugin_files "${install_prefix}/${plugin}/*@CMAKE_SHARED_LIBRARY_SUFFIX@")
|
||||
list(APPEND qt_plugin_files "${plugin_files}")
|
||||
endforeach()
|
||||
|
||||
# Get the qml module dependencies
|
||||
file(GLOB_RECURSE qml_plugin_files "${install_prefix}/@QT_DEST_QML_PATH@/*/*@CMAKE_SHARED_LIBRARY_SUFFIX@")
|
||||
list(APPEND qt_plugin_files "${qml_plugin_files}")
|
||||
|
||||
set(installed_EXECUTABLES_NOT_PREFIXED "@__QTC_INSTALLED_EXECUTABLES@")
|
||||
set(installed_LIBRARIES_NOT_PREFIXED "@__QTC_INSTALLED_LIBRARIES@")
|
||||
set(installed_MODULES_NOT_PREFIXED "@__QTC_INSTALLED_PLUGINS@")
|
||||
|
||||
foreach(binary_type EXECUTABLES LIBRARIES MODULES)
|
||||
foreach(element IN LISTS installed_${binary_type}_NOT_PREFIXED)
|
||||
if (EXISTS "${install_prefix}/${element}")
|
||||
list(APPEND installed_${binary_type} "${install_prefix}/${element}")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
# Install first the dependencies, and continue to install the dependencies
|
||||
# of the installed dependencies e.g. libicu for libQt5Core on Linux.
|
||||
|
||||
list(LENGTH installed_LIBRARIES installed_libraries_size)
|
||||
unset(qt_plugins_installed)
|
||||
|
||||
while(installed_libraries_size GREATER 0)
|
||||
foreach(binary_type EXECUTABLES LIBRARIES MODULES)
|
||||
list(LENGTH installed_${binary_type} list_size)
|
||||
if (NOT list_size EQUAL 0)
|
||||
set(${binary_type}_TO_ANALYZE ${binary_type} "${installed_${binary_type}}")
|
||||
else()
|
||||
set(${binary_type}_TO_ANALYZE "")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
file(GET_RUNTIME_DEPENDENCIES
|
||||
UNRESOLVED_DEPENDENCIES_VAR unresolved_deps
|
||||
RESOLVED_DEPENDENCIES_VAR resolved_deps
|
||||
CONFLICTING_DEPENDENCIES_PREFIX conflicts
|
||||
${EXECUTABLES_TO_ANALYZE}
|
||||
${LIBRARIES_TO_ANALYZE}
|
||||
${MODULES_TO_ANALYZE}
|
||||
DIRECTORIES
|
||||
"${install_prefix}/@IDE_BIN_PATH@"
|
||||
"${install_prefix}/@IDE_PLUGIN_PATH@"
|
||||
"${install_prefix}/@IDE_LIBRARY_PATH@"
|
||||
"${install_prefix}/@IDE_LIBRARY_BASE_PATH@/Qt/lib"
|
||||
${filter_regex}
|
||||
)
|
||||
|
||||
# Clear for next step
|
||||
set(installed_EXECUTABLES "")
|
||||
set(installed_LIBRARIES "")
|
||||
set(installed_MODULES "")
|
||||
|
||||
if (NOT qt_plugins_installed)
|
||||
if (WIN32)
|
||||
# Needed by QmlDesigner, QmlProfiler, but they are not referenced directly.
|
||||
list(APPEND unresolved_deps libEGL.dll libGLESv2.dll)
|
||||
endif()
|
||||
|
||||
set(qt_plugins_installed TRUE)
|
||||
set(installed_MODULES "${qt_plugin_files}")
|
||||
endif()
|
||||
|
||||
list(REMOVE_DUPLICATES unresolved_deps)
|
||||
list(REMOVE_DUPLICATES resolved_deps)
|
||||
|
||||
file(TO_CMAKE_PATH "@CMAKE_PREFIX_PATH@" prefix_path)
|
||||
|
||||
# Add parent link directory paths. Needed for e.g. MinGW choco libstdc++-6.dll
|
||||
if (WIN32)
|
||||
foreach(path "@CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES@")
|
||||
get_filename_component(parent_path "${path}" DIRECTORY)
|
||||
list(APPEND prefix_path "${parent_path}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# On Linux the Qt libraries might exist in the system, and they are passed
|
||||
# as resolved, therefore scan the resolved dependencies too
|
||||
if (NOT WIN32 AND NOT APPLE)
|
||||
list(APPEND unresolved_deps "${resolved_deps}")
|
||||
endif()
|
||||
|
||||
foreach(so IN LISTS unresolved_deps)
|
||||
|
||||
# Skip the installed dependencies
|
||||
string(FIND "${so}" "${install_prefix}" found_prefix_path)
|
||||
if (NOT found_prefix_path EQUAL -1)
|
||||
continue()
|
||||
endif()
|
||||
|
||||
# On Linux get the name of the resolved Qt dependency, this would come from ldconfig
|
||||
# with the full path on the system
|
||||
if (NOT APPLE AND NOT WIN32)
|
||||
get_filename_component(so "${so}" NAME)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
string(REPLACE "@rpath/" "" so "${so}")
|
||||
get_filename_component(so_dir "${so}" DIRECTORY)
|
||||
endif()
|
||||
|
||||
message(STATUS "Dependency: ${so}")
|
||||
foreach(p IN LISTS prefix_path)
|
||||
if (WIN32)
|
||||
set(so_src "${p}/bin/${so}")
|
||||
set(so_dest "${install_prefix}/@IDE_BIN_PATH@")
|
||||
elseif(APPLE)
|
||||
set(so_src "${p}/lib/${so}")
|
||||
set(so_dest "${install_prefix}/@IDE_LIBRARY_PATH@/${so_dir}")
|
||||
else()
|
||||
set(so_src "${p}/lib/${so}")
|
||||
if (p STREQUAL "@QT_BASE_DIR@")
|
||||
set(so_dest "${install_prefix}/@IDE_LIBRARY_BASE_PATH@/Qt/lib")
|
||||
else()
|
||||
set(so_dest "${install_prefix}/@IDE_LIBRARY_PATH@")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "Looking at: ${so_src}")
|
||||
if (EXISTS "${so_src}")
|
||||
file(INSTALL "${so_src}" DESTINATION "${so_dest}" FOLLOW_SYMLINK_CHAIN)
|
||||
if (APPLE)
|
||||
get_filename_component(so "${so}" NAME)
|
||||
endif()
|
||||
list(APPEND installed_LIBRARIES "${so_dest}/${so}")
|
||||
break()
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
list(LENGTH installed_LIBRARIES installed_libraries_size)
|
||||
|
||||
endwhile()
|
||||
@@ -749,61 +749,6 @@ function(add_qtc_executable name)
|
||||
|
||||
update_cached_list(__QTC_INSTALLED_EXECUTABLES
|
||||
"${_DESTINATION}/${name}${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
|
||||
install(CODE "
|
||||
function(create_qt_conf location base_dir)
|
||||
get_filename_component(install_prefix \"\${CMAKE_INSTALL_PREFIX}\" ABSOLUTE)
|
||||
file(RELATIVE_PATH qt_conf_binaries
|
||||
\"\${install_prefix}/\${location}\"
|
||||
\"\${install_prefix}/\${base_dir}\"
|
||||
)
|
||||
if (NOT qt_conf_binaries)
|
||||
set(qt_conf_binaries .)
|
||||
endif()
|
||||
file(RELATIVE_PATH qt_conf_plugins
|
||||
\"\${install_prefix}/\${base_dir}\"
|
||||
\"\${install_prefix}/${QT_DEST_PLUGIN_PATH}\"
|
||||
)
|
||||
file(RELATIVE_PATH qt_conf_qml
|
||||
\"\${install_prefix}/\${base_dir}\"
|
||||
\"\${install_prefix}/${QT_DEST_QML_PATH}\"
|
||||
)
|
||||
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/\${location}/qt.conf\"
|
||||
\"[Paths]\n\"
|
||||
\"Plugins=\${qt_conf_plugins}\n\"
|
||||
\"Qml2Imports=\${qt_conf_qml}\n\"
|
||||
)
|
||||
# For Apple for Qt Creator do not add a Prefix
|
||||
if (NOT APPLE OR NOT qt_conf_binaries STREQUAL \"../\")
|
||||
file(APPEND \"\${CMAKE_INSTALL_PREFIX}/\${location}/qt.conf\"
|
||||
\"Prefix=\${qt_conf_binaries}\n\"
|
||||
)
|
||||
endif()
|
||||
if (WIN32 OR APPLE)
|
||||
file(RELATIVE_PATH qt_binaries
|
||||
\"\${install_prefix}/\${base_dir}\"
|
||||
\"\${install_prefix}/${IDE_BIN_PATH}\"
|
||||
)
|
||||
if (NOT qt_binaries)
|
||||
set(qt_binaries .)
|
||||
endif()
|
||||
file(APPEND \"\${CMAKE_INSTALL_PREFIX}/\${location}/qt.conf\"
|
||||
\"# Needed by QtCreator for qtdiag\n\"
|
||||
\"Binaries=\${qt_binaries}\n\")
|
||||
endif()
|
||||
endfunction()
|
||||
if(APPLE)
|
||||
create_qt_conf(\"${_EXECUTABLE_PATH}\" \"${IDE_DATA_PATH}/..\")
|
||||
elseif (WIN32)
|
||||
create_qt_conf(\"${_EXECUTABLE_PATH}\" \"${IDE_APP_PATH}\")
|
||||
else()
|
||||
create_qt_conf(\"${_EXECUTABLE_PATH}\" \"${IDE_LIBRARY_BASE_PATH}/Qt\")
|
||||
endif()
|
||||
"
|
||||
COMPONENT Dependencies
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
@@ -291,6 +291,14 @@ function(enable_pch target)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# static libs are maybe used by other projects, so they can not reuse same pch files
|
||||
if (MSVC)
|
||||
get_target_property(target_type "${target}" TYPE)
|
||||
if (target_type MATCHES "STATIC")
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Skip PCH for targets that do not have QT_NO_CAST_TO_ASCII
|
||||
get_target_property(target_defines "${target}" COMPILE_DEFINITIONS)
|
||||
if (NOT "QT_NO_CAST_TO_ASCII" IN_LIST target_defines)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
set(IDE_VERSION "4.13.83") # The IDE version.
|
||||
set(IDE_VERSION_COMPAT "4.13.83") # The IDE Compatibility version.
|
||||
set(IDE_VERSION_DISPLAY "4.14.0-beta2") # The IDE display version.
|
||||
set(IDE_VERSION "4.13.84") # The IDE version.
|
||||
set(IDE_VERSION_COMPAT "4.13.84") # The IDE Compatibility version.
|
||||
set(IDE_VERSION_DISPLAY "4.14.0-rc1") # The IDE display version.
|
||||
set(IDE_COPYRIGHT_YEAR "2020") # The IDE current copyright year.
|
||||
|
||||
set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation.
|
||||
|
||||
|
Before Width: | Height: | Size: 98 B |
|
Before Width: | Height: | Size: 108 B |
|
Before Width: | Height: | Size: 95 B |
|
Before Width: | Height: | Size: 97 B |
|
Before Width: | Height: | Size: 97 B |
|
Before Width: | Height: | Size: 99 B |
|
Before Width: | Height: | Size: 96 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 671 B |
|
Before Width: | Height: | Size: 273 B After Width: | Height: | Size: 573 B |
BIN
doc/qtcreator/images/icons/anchor-bottom.png
Normal file
|
After Width: | Height: | Size: 455 B |
BIN
doc/qtcreator/images/icons/anchor-center-horizontal.png
Normal file
|
After Width: | Height: | Size: 484 B |
BIN
doc/qtcreator/images/icons/anchor-center-vertical.png
Normal file
|
After Width: | Height: | Size: 494 B |
BIN
doc/qtcreator/images/icons/anchor-fill.png
Normal file
|
After Width: | Height: | Size: 496 B |
BIN
doc/qtcreator/images/icons/anchor-left.png
Normal file
|
After Width: | Height: | Size: 469 B |
BIN
doc/qtcreator/images/icons/anchor-right.png
Normal file
|
After Width: | Height: | Size: 488 B |
BIN
doc/qtcreator/images/icons/anchor-top.png
Normal file
|
After Width: | Height: | Size: 452 B |
|
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 592 B |
BIN
doc/qtcreator/images/icons/distribute-origin-none.png
Normal file
|
After Width: | Height: | Size: 515 B |
BIN
doc/qtcreator/images/icons/lockon.png
Normal file
|
After Width: | Height: | Size: 516 B |
BIN
doc/qtcreator/images/icons/rotation-cursor.png
Normal file
|
After Width: | Height: | Size: 525 B |
|
Before Width: | Height: | Size: 184 B |
BIN
doc/qtcreator/images/icons/visibilityon.png
Normal file
|
After Width: | Height: | Size: 609 B |
|
Before Width: | Height: | Size: 293 B |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 8.5 KiB |
BIN
doc/qtcreator/images/qmldesigner-implement-signal-handler.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
doc/qtcreator/images/qmldesigner-merge-with-template.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 6.5 KiB |
BIN
doc/qtcreator/images/qtquick-designer-navigator-arrange.gif
Normal file
|
After Width: | Height: | Size: 201 KiB |
BIN
doc/qtcreator/images/qtquick-designer-navigator-lock.gif
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
doc/qtcreator/images/qtquick-designer-options.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 8.4 KiB |
BIN
doc/qtcreator/images/qtquick-designer-scaling-items.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
doc/qtcreator/images/qtquick-states-binding-editor-not.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
91
doc/qtcreator/src/qtquick/creator-logical-operators.qdocinc
Normal file
@@ -0,0 +1,91 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
//! [logical operators]
|
||||
\section2 Summary of Logical Operators
|
||||
|
||||
You can use the following
|
||||
\l{https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators}
|
||||
{logical operators} in the expressions to combine several conditions in one
|
||||
expression:
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Operator
|
||||
\li Meaning
|
||||
\li Evaluates to \c true if
|
||||
\row
|
||||
\li !
|
||||
\li NOT
|
||||
\li The condition is not met.
|
||||
\row
|
||||
\li &&
|
||||
\li AND
|
||||
\li Both conditions are met.
|
||||
\row
|
||||
\li ||
|
||||
\li OR
|
||||
\li Either of the conditions is met.
|
||||
\row
|
||||
\li <
|
||||
\li Less than
|
||||
\li The left operand is less than the right operand.
|
||||
\row
|
||||
\li >
|
||||
\li Greater than
|
||||
\li The left operand is greater than the right operand.
|
||||
\row
|
||||
\li >=
|
||||
\li Greater than or equal
|
||||
\li The left operand is greater than or equal to the right operand.
|
||||
\row
|
||||
\li <=
|
||||
\li Less than or equal
|
||||
\li The left operand is less than or equal to the right operand.
|
||||
\row
|
||||
\li ==
|
||||
\li Equal
|
||||
\li The operands are equal.
|
||||
\row
|
||||
\li ===
|
||||
\li Strict equal
|
||||
\li The operands are equal and of the same type.
|
||||
\row
|
||||
\li !=
|
||||
\li Not equal
|
||||
\li The operands are not equal.
|
||||
\row
|
||||
\li !==
|
||||
\li Strict not equal
|
||||
\li The operands are of the same type but not equal, or are of
|
||||
different type.
|
||||
\endtable
|
||||
|
||||
In addition, you can use arithmetic operators to compare numbers before
|
||||
checks. However, we recommend that you create separate properties for this
|
||||
purpose whenever possible.
|
||||
//! [logical operators]
|
||||
*/
|
||||
@@ -94,7 +94,7 @@
|
||||
to reference the rectangle from other places.
|
||||
|
||||
\li Select the \uicontrol Layout tab, and then click
|
||||
the \inlineimage anchor-fill.png
|
||||
the \inlineimage icons/anchor-fill.png
|
||||
(\uicontrol {Fill to Parent}) button to anchor the rectangle
|
||||
to the item.
|
||||
|
||||
|
||||
@@ -119,8 +119,8 @@
|
||||
the white background.
|
||||
|
||||
\li Click \uicontrol {Layout}, and then click the
|
||||
\inlineimage anchor-top.png
|
||||
(\uicontrol Top) and \inlineimage anchor-left.png
|
||||
\inlineimage icons/anchor-top.png
|
||||
(\uicontrol Top) and \inlineimage icons/anchor-left.png
|
||||
(\uicontrol Left) anchor buttons to anchor the
|
||||
rectangle to the top left corner of the page.
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
\uicontrol Library to \e topLeftRect in \uicontrol Navigator.
|
||||
|
||||
\li Click \uicontrol {Layout}, and then click the
|
||||
\inlineimage anchor-fill.png
|
||||
\inlineimage icons/anchor-fill.png
|
||||
(\uicontrol {Fill to Parent}) button to anchor the mouse area to the
|
||||
rectangle.
|
||||
|
||||
@@ -151,9 +151,9 @@
|
||||
\li In the \uicontrol Id field, enter \e middleRightRect.
|
||||
|
||||
\li In \uicontrol {Layout}, select the
|
||||
\inlineimage anchor-vertical-center.png
|
||||
\inlineimage icons/anchor-center-vertical.png
|
||||
(\uicontrol {Vertical Center} anchor button and then the
|
||||
\inlineimage anchor-right.png
|
||||
\inlineimage icons/anchor-right.png
|
||||
(\uicontrol Right) anchor button to anchor the rectangle
|
||||
to the middle right margin of its parent.
|
||||
|
||||
@@ -169,8 +169,8 @@
|
||||
\li In the \uicontrol Id field, enter \e bottomLeftRect.
|
||||
|
||||
\li In \uicontrol {Layout}, select the
|
||||
\inlineimage anchor-bottom.png
|
||||
(\uicontrol Bottom) and \inlineimage anchor-left.png
|
||||
\inlineimage icons/anchor-bottom.png
|
||||
(\uicontrol Bottom) and \inlineimage icons/anchor-left.png
|
||||
(\uicontrol Left) anchor buttons to anchor the rectangle
|
||||
to the bottom left margin of its parent.
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
the rectangle to produce rounded corners for the button.
|
||||
|
||||
\li Select \uicontrol {Layout}, and then select the
|
||||
\inlineimage anchor-fill.png
|
||||
\inlineimage icons/anchor-fill.png
|
||||
(\uicontrol {Fill to Parent}) button to anchor the rectangle to
|
||||
the item.
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
\li In the \uicontrol Source field, select the image file for
|
||||
the border image. For example, inactive_button.png.
|
||||
\li In the \uicontrol {Layout} tab, select the
|
||||
\inlineimage anchor-fill.png
|
||||
\inlineimage icons/anchor-fill.png
|
||||
(\uicontrol {Fill to Parent}) button to always make the
|
||||
image the same size as its parent. This makes the button
|
||||
component scalable, because the image size is bound to the
|
||||
@@ -204,7 +204,7 @@
|
||||
for the button when it is clicked. For example,
|
||||
active_button.png.
|
||||
\li In the \uicontrol {Layout} tab, select the
|
||||
\inlineimage anchor-fill.png
|
||||
\inlineimage icons/anchor-fill.png
|
||||
(\uicontrol {Fill to Parent}) button.
|
||||
\endlist
|
||||
\li Select the text item to specify font size and color in
|
||||
@@ -216,9 +216,9 @@
|
||||
\li In \uicontrol Font group, \uicontrol Size field, enter the
|
||||
font size.
|
||||
\li In the \uicontrol {Layout} tab, select
|
||||
\inlineimage anchor-vertical-center.png
|
||||
\inlineimage icons/anchor-center-vertical.png
|
||||
(\uicontrol {Vertical Center}) and
|
||||
\inlineimage anchor-horizontal-center.png
|
||||
\inlineimage icons/anchor-center-horizontal.png
|
||||
(\uicontrol {Horizontal Center}) buttons to inherit the
|
||||
vertical and horizontal centering from the parent.
|
||||
This ensures that the button label is centered when the
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
//! [context-menu]
|
||||
\section1 Context Menu
|
||||
|
||||
The following table summarizes the \uicontrol Navigator and
|
||||
\uicontrol {Form Editor} context menu items and provides links
|
||||
to more information about them.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li To Learn About
|
||||
\li Go To
|
||||
\row
|
||||
\li Arrange
|
||||
\li \l{Arranging Items}
|
||||
\row
|
||||
\li Edit
|
||||
\li \l{Showing and Hiding Items}
|
||||
\row
|
||||
\li Anchors
|
||||
\li \l{Setting Anchors and Margins}
|
||||
\row
|
||||
\li Group
|
||||
\li \l Group
|
||||
\row
|
||||
\li Position
|
||||
\li \l{Using Positioners}
|
||||
\row
|
||||
\li Layout
|
||||
\li \l{Using Layouts}
|
||||
\row
|
||||
\li Stacked Container
|
||||
\li \l{Lists and Other Data Models}
|
||||
\row
|
||||
\li Timeline
|
||||
\li \l{Creating Timelines}
|
||||
\row
|
||||
\li Event List
|
||||
\li \l{Simulating Events}
|
||||
\row
|
||||
\li Edit Color
|
||||
\li \l{Editing Properties Inline}
|
||||
\row
|
||||
\li Edit Annotation
|
||||
\li \l{Annotating Designs}
|
||||
\row
|
||||
\li Merge File with Template
|
||||
\li \l{Merging Files with Templates}
|
||||
\row
|
||||
\li Move Component into Separate File
|
||||
\li \l{Moving Components into Separate Files}
|
||||
\row
|
||||
\li Add New Signal Handler
|
||||
\li \l{Adding Signal Handlers}
|
||||
\row
|
||||
\li Go to Implementation
|
||||
\li \l{Using Qt Quick UI Forms}
|
||||
\row
|
||||
\li Go into Component
|
||||
\li \l{Moving Within Components}
|
||||
\endtable
|
||||
//! [context-menu]
|
||||
*/
|
||||
@@ -246,6 +246,25 @@
|
||||
\include qtdesignstudio-components.qdocinc creating studio components
|
||||
\endif
|
||||
|
||||
\section1 Moving Components into Separate Files
|
||||
|
||||
An alternative way of creating reusable components is to move them into
|
||||
separate QML files. Right-click a component in the \uicontrol Navigator
|
||||
or \uicontrol {Form Editor} view and select
|
||||
\uicontrol {Move Component into Separate File} in the context menu.
|
||||
|
||||
\image qtcreator-move-component-into-separate-file.png
|
||||
|
||||
Give the new component a name and select whether properties are set for
|
||||
the new component or for the original one.
|
||||
|
||||
For an example of creating a reusable custom component, see
|
||||
\if defined(qtcreator)
|
||||
\l{Creating a Mobile Application}.
|
||||
\else
|
||||
\l{Progress Bar}.
|
||||
\endif
|
||||
|
||||
\section1 Moving Within Components
|
||||
|
||||
Components can consist of several other components. To view the component
|
||||
@@ -256,4 +275,17 @@
|
||||
component.
|
||||
|
||||
\image qmldesigner-breadcrumbs.png "Go into Component command"
|
||||
|
||||
\section1 Merging Files with Templates
|
||||
|
||||
You can merge the current QML file against an existing second QML file and
|
||||
using the second QML file in a way similar to using a CSS stylesheet.
|
||||
|
||||
To use this experimental feature, right-click a component in the
|
||||
\uicontrol Navigator or \uicontrol {Form Editor} view and select
|
||||
\uicontrol {Merge File with Template} in the context menu.
|
||||
|
||||
\image qmldesigner-merge-with-template.png "Merge with Template dialog"
|
||||
|
||||
In the \uicontrol Template field, select the file to use as a template.
|
||||
*/
|
||||
|
||||
@@ -71,4 +71,7 @@
|
||||
\uicontrol {Binding Editor}. For more information, see \l{Setting Bindings}.
|
||||
|
||||
\image qmldesigner-binding-editor.png "Binding Editor"
|
||||
|
||||
\include creator-logical-operators.qdocinc logical operators
|
||||
|
||||
*/
|
||||
|
||||
@@ -84,6 +84,25 @@
|
||||
in the context menu to specify the connection in
|
||||
\uicontrol {Connection Editor}.
|
||||
|
||||
\section1 Adding Signal Handlers
|
||||
|
||||
If a signal handler that you need is not listed in the
|
||||
\uicontrol {Signal Handler} column, you can add it:
|
||||
|
||||
\list 1
|
||||
\li Right-click a component in the \uicontrol Navigator or
|
||||
\uicontrol {Form Editor} view and select
|
||||
\uicontrol {Add New Signal Handler} in the context menu.
|
||||
\li In the \uicontrol Signal field, select the signal to handle.
|
||||
\image qmldesigner-implement-signal-handler.png "Implement Signal Handler dialog"
|
||||
\li Select the radio buttons to filter the list to only display
|
||||
frequently used signals or property changes.
|
||||
\li Select \uicontrol OK.
|
||||
\endlist
|
||||
|
||||
The added signal handler is automatically \l{Using Qt Quick UI Forms}
|
||||
{exported as a property}.
|
||||
|
||||
\if defined(qtdesignstudio)
|
||||
\section1 Adding Actions and Assignments
|
||||
|
||||
|
||||
@@ -30,16 +30,22 @@
|
||||
|
||||
\title Editing 2D Content
|
||||
|
||||
You design applications in the \uicontrol {Form Editor} by placing items
|
||||
into it.
|
||||
You design applications in the \uicontrol {Form Editor} view by placing
|
||||
2D components and assets into it.
|
||||
|
||||
When you select items in \uicontrol {Form Editor}, markers
|
||||
appear around their edges and in their corners. Depending on the shape of
|
||||
the cursor, you can move, resize, or rotate the item by dragging it.
|
||||
The following image shows the move cursor.
|
||||
|
||||
\image qmldesigner-form-editor.png "Form Editor view"
|
||||
|
||||
\section1 Resizing Items
|
||||
\section1 Resizing 2D Items
|
||||
|
||||
When you select items in the \uicontrol {Form Editor}, selection handles
|
||||
appear around their edges and in their corners. You can drag the selection
|
||||
handles to resize items.
|
||||
When the resize cursor is displayed, you can drag the selection handles
|
||||
to resize items.
|
||||
|
||||
\image qtquick-designer-scaling-items.png "Form Editor view"
|
||||
|
||||
\if defined(qtdesignstudio)
|
||||
To have the resizing done from the center of the selected item instead from
|
||||
@@ -53,12 +59,12 @@
|
||||
press \key Alt+Shift.
|
||||
\endif
|
||||
|
||||
\section1 Rotating Items
|
||||
\section1 Rotating 2D Items
|
||||
|
||||
You can use a rotation tool \inlineimage rotate_on.png
|
||||
in one of the corners of an item to freely rotate
|
||||
items around their origin in \uicontrol {Form Editor}.
|
||||
Drag clockwise or counter-clockwise to rotate the item.
|
||||
When the rotation cursor \inlineimage icons/rotation-cursor.png
|
||||
is displayed in one of the corners of an item, you can drag
|
||||
clockwise or counter-clockwise to freely rotate the item around
|
||||
its origin in \uicontrol {Form Editor}.
|
||||
|
||||
\image qtquick-designer-rotating-items.png "2D rotation tool"
|
||||
|
||||
@@ -73,11 +79,13 @@
|
||||
\section1 Snapping to Parent and Sibling Items
|
||||
|
||||
When you are working on a design, you can use snapping to align
|
||||
items in the \uicontrol {Form Editor}. Click the \inlineimage snapping.png
|
||||
items in \uicontrol {Form Editor}. Click the \inlineimage snapping.png
|
||||
button to have the items snap to their parent or sibling items. Snapping
|
||||
lines automatically appear to help you position the items.
|
||||
Click the \inlineimage snapping_and_anchoring.png
|
||||
button to anchor the item to the items that you snap to.
|
||||
Only one snapping button can be selected at the time. Selecting
|
||||
one snapping button automatically deselects the others.
|
||||
|
||||
Choose \uicontrol Tools > \uicontrol Options > \uicontrol {Qt Quick} >
|
||||
\uicontrol {Qt Quick Designer} to specify settings for snapping. In the
|
||||
@@ -86,6 +94,8 @@
|
||||
\uicontrol {Sibling item spacing} field, specify the distance in pixels between
|
||||
sibling items and the snapping lines.
|
||||
|
||||
\image qtquick-designer-options.png "Qt Quick Designer options"
|
||||
|
||||
The following image shows the snapping lines (1) when
|
||||
\uicontrol {Parent item padding} is set to 5 pixels.
|
||||
|
||||
@@ -93,7 +103,7 @@
|
||||
|
||||
\section1 Hiding Item Boundaries
|
||||
|
||||
The \uicontrol {Form Editor} displays the boundaries of items.
|
||||
\uicontrol {Form Editor} displays the boundaries of items.
|
||||
To hide them, select the \inlineimage boundingrect.png
|
||||
button.
|
||||
|
||||
@@ -109,7 +119,7 @@
|
||||
To experiment with different component sizes, enter values in the
|
||||
\uicontrol {Override Width} and \uicontrol {Override Height} fields (1) on
|
||||
the canvas toolbar. The changes are displayed in the \uicontrol {Form Editor}
|
||||
(2) and in the \uicontrol States view (3), but the property
|
||||
view (2) and in the \uicontrol States view (3), but the property
|
||||
values are not changed permanently in the QML file. You can permanently
|
||||
change the property values in the \uicontrol Properties view (4).
|
||||
|
||||
@@ -129,13 +139,14 @@
|
||||
\section1 Refreshing the Form Editor Contents
|
||||
|
||||
When you open QML files in the Design mode, the items in the file are drawn
|
||||
in the \uicontrol {Form Editor}. When you edit the item properties, the QML
|
||||
in \uicontrol {Form Editor}. When you edit the item properties, the QML
|
||||
file and the contents of the editor might get out of sync. For example, when
|
||||
you change the position of an item within a column or a row, the new
|
||||
position might not be displayed correctly in the \uicontrol {Form Editor}.
|
||||
position might not be displayed correctly in \uicontrol {Form Editor}.
|
||||
|
||||
To refresh the contents of the \uicontrol {Form Editor}, press \key R or
|
||||
To refresh the contents of \uicontrol {Form Editor}, press \key R or
|
||||
select the \inlineimage reset.png
|
||||
(\uicontrol {Reset View}) button.
|
||||
|
||||
\include qtquick-component-context-menu.qdocinc context-menu
|
||||
*/
|
||||
|
||||
@@ -45,9 +45,13 @@
|
||||
{devices}
|
||||
\endlist
|
||||
|
||||
You can use a Qt Creator wizard to create a Qt Quick application that is
|
||||
built using the qmake build system and then copy the source files from the
|
||||
Qt UI Quick project to the application project.
|
||||
For more information about integrating QML and C++, see
|
||||
\l{https://doc.qt.io/qt-5/qtqml-cppintegration-overview.html}
|
||||
{Overview - QML and C++ Integration}.
|
||||
|
||||
You can use a Qt Creator wizard template to create a Qt Quick application
|
||||
that is built using the qmake build system and then copy the source files
|
||||
from the Qt UI Quick project to the application project.
|
||||
|
||||
You can use the \c RESOURCES option in the project configuration file to
|
||||
automatically add all the QML files and related assets to a Qt resource
|
||||
@@ -62,6 +66,10 @@
|
||||
Then you can use the \l QQuickView class in the main C++ source file to
|
||||
show the main QML file when the application starts.
|
||||
|
||||
The \e {Qt Quick Designer Components} module is delivered with \QDS. If you
|
||||
use Studio Components or Effects in your project, you have to build the
|
||||
module and install it to your Qt to be able to build your project.
|
||||
|
||||
The \l{Qt Quick Timeline} module is delivered with \QDS and with Qt 5.14,
|
||||
and later. If you use a timeline in a \QDS project that you import to \QC,
|
||||
and your Qt is older than 5.14, you must build the Qt Quick Timeline module
|
||||
@@ -124,6 +132,30 @@
|
||||
call the QFontDatabase::addApplicationFont() function from the \e {main.cpp}
|
||||
file.
|
||||
|
||||
\section1 Adding Qt Quick Designer Components to Qt Installations
|
||||
|
||||
If you use Studio Components or Effects in your project, you have to
|
||||
check out and install the \e {Qt Quick Designer Components} module from
|
||||
\l{https://codereview.qt-project.org/admin/repos/qt-labs/qtquickdesigner-components}
|
||||
{Qt Code Review}.
|
||||
|
||||
For example:
|
||||
\badcode
|
||||
git clone "ssh://user@codereview.qt-project.org:29418/qt-labs/qtquickdesigner-components"
|
||||
\endcode
|
||||
|
||||
Then use qmake from your Qt installation to build the module and to add it
|
||||
to your Qt. Switch to the directory that contains the sources (usually,
|
||||
qtquickdesigner-components), and enter the following commands:
|
||||
|
||||
\badcode
|
||||
<path_to_qmake>\qmake -r
|
||||
make
|
||||
make install
|
||||
\endcode
|
||||
|
||||
On Windows, use the \c nmake and \c {nmake install} commands instead.
|
||||
|
||||
\section1 Adding Qt Quick Timeline Module to Qt Installations
|
||||
|
||||
\note You only need to do this if your Qt version is older than 5.14.
|
||||
@@ -137,15 +169,6 @@
|
||||
git clone ssh://user@codereview.qt-project.org:29418/qt/qtquicktimeline
|
||||
\endcode
|
||||
|
||||
Then use qmake from your Qt installation to build the module and to add it
|
||||
to your Qt. Switch to the directory that contains the sources (usually,
|
||||
\c qtquicktimeline), and enter the following commands:
|
||||
|
||||
\badcode
|
||||
<path_to_qmake>\qmake -r
|
||||
make
|
||||
make install
|
||||
\endcode
|
||||
|
||||
On Windows, use the \c nmake and \c {nmake install} commands instead.
|
||||
Then build the module and add it to your Qt as described in the previous
|
||||
section.
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -30,9 +30,14 @@
|
||||
// **********************************************************************
|
||||
|
||||
/*!
|
||||
\previouspage creator-quick-ui-forms.html
|
||||
\page creator-qml-modules-with-plugins.html
|
||||
\if defined(qtdesignstudio)
|
||||
\previouspage studio-simulink.html
|
||||
\nextpage studio-debugging.html
|
||||
\else
|
||||
\previouspage qtquick-iso-icon-browser.html
|
||||
\nextpage quick-converting-ui-projects.html
|
||||
\endif
|
||||
|
||||
\title Using QML Modules with Plugins
|
||||
|
||||
@@ -41,16 +46,23 @@
|
||||
the contained components, and therefore, the modules must provide extra type
|
||||
information for code completion and the semantic checks to work correctly.
|
||||
|
||||
To create a QML module and make it appear in the \uicontrol Library in
|
||||
To create a QML module and make it appear in the \uicontrol Library view in
|
||||
the Design mode:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Create custom QML controls and place all the \c .qml files in a
|
||||
directory dedicated to your module.
|
||||
directory dedicated to your module. For example:
|
||||
\c {imports\asset_imports}.
|
||||
|
||||
\li Create a \c qmldir file for your module and place it in the module
|
||||
directory. For more information, see
|
||||
\li For Qt Quick UI projects (.qmlproject), specify the path to
|
||||
the directory that contains the module in the .qmlproject file
|
||||
of the application where you want to use the module
|
||||
as a value of the \c importPaths variable. For example
|
||||
\c{importPaths: [ "imports", "asset_imports" ]}.
|
||||
|
||||
\li Create a \c qmldir file for your module and place it
|
||||
in the module directory. For more information, see
|
||||
\l {Module Definition qmldir Files}.
|
||||
|
||||
\li Create a \c qmltypes file, preferably using \c qmlplugindump.
|
||||
@@ -60,39 +72,45 @@
|
||||
|
||||
\li Create a \c .metainfo file for your module and place it in the
|
||||
\c designer directory. Meta information is needed to display the
|
||||
components in the \uicontrol {QML Types} tab in the \uicontrol
|
||||
components in the \uicontrol {QML Types} tab in \uicontrol
|
||||
Library. Use a metainfo file delivered with Qt, such as
|
||||
\c qtquickcontrols2.metainfo, as an example.
|
||||
|
||||
\li Import your module into a project using \c QML_IMPORT_PATH in the
|
||||
.pro file: \c {QML_IMPORT_PATH += path/to/module}.
|
||||
For more information, see \l {Importing QML Modules}.
|
||||
\if defined(qtcreator)
|
||||
\li Import the module into the project, as instructed in
|
||||
\l {Importing QML Modules}.
|
||||
|
||||
\li Make sure that the QML emulation layer used in the Design mode is built with
|
||||
the same Qt version as your QML modules. For more information, see
|
||||
\l {Running QML Modules in Design Mode}. You can also try
|
||||
skipping this step and take it later, if necessary.
|
||||
\else
|
||||
\li Build your module using the same Qt version and compiler as \QDS.
|
||||
For more information, see \l {Running QML Modules in Design Mode}.
|
||||
\endif
|
||||
|
||||
\endlist
|
||||
|
||||
Your module should now appear in the \uicontrol {QML Imports} tab in the
|
||||
Your module should now appear in the \uicontrol {QML Imports} tab in
|
||||
\uicontrol Library in the Design mode. Your components should appear in the
|
||||
\uicontrol {QML Types} tab if a valid \c .metainfo file is in place.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\section1 Registering QML Types
|
||||
|
||||
When you write a QML module or use QML from a C++ application, you typically
|
||||
register new types with the qmlRegisterType() function or expose some
|
||||
class instances with \l{QQmlContext::setContextProperty()}. The \QC C++
|
||||
code model now scans for these calls and
|
||||
tells the QML code model about them. This means that properties are
|
||||
displayed during code completion and the JavaScript code checker does not
|
||||
When you write a QML module or use QML from a C++ application, and the C++
|
||||
is a part of your qmake project, you typically register new types with the
|
||||
\c qmlRegisterType() function or expose some class instances with
|
||||
\l{QQmlContext::setContextProperty()}. The \QC C++ code model now scans for
|
||||
these calls and tells the QML code model about them. This means that properties
|
||||
are displayed during code completion and the JavaScript code checker does not
|
||||
complain about unknown types. However, this works only when the source code
|
||||
is available, and therefore, you must explicitly generate type information
|
||||
for QML modules with plugins before distributing them.
|
||||
|
||||
Classes registered with \c qmlRegisterType() can be used as backend objects
|
||||
in the Design mode. For more information, see \l {Adding Connections}.
|
||||
\endif
|
||||
|
||||
\section1 Generating qmltypes Files
|
||||
|
||||
@@ -122,9 +140,11 @@
|
||||
|
||||
You can safely ignore the debug output.
|
||||
|
||||
\if defined(qtcreator)
|
||||
For Qt 4.7.x, you can compile a version of the tool called \c qmldump from
|
||||
the sources in \c{<QtCreator>/share/qtcreator/qml/qmldump} if the Qt version
|
||||
contains private headers.
|
||||
\endif
|
||||
|
||||
\section2 Dumping Plugins Automatically
|
||||
|
||||
@@ -133,12 +153,14 @@
|
||||
However, this automatic dumping is a fallback mechanism with many points of
|
||||
failure and you cannot rely upon it.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\section1 Importing QML Modules
|
||||
|
||||
By default, \QC will look in the QML import path of Qt for QML modules.
|
||||
If your applications adds additional import paths that \QC should use,
|
||||
then you can specify those using \c{QML_IMPORT_PATH} in the \c{.pro} file of your
|
||||
application.
|
||||
|
||||
If you use qmake and your application adds additional import paths that
|
||||
\QC should use, specify them using \c{QML_IMPORT_PATH} in the \c{.pro}
|
||||
file of your application: \c {QML_IMPORT_PATH += path/to/module}.
|
||||
|
||||
If you use CMake, add the following command to the CMakeLists.txt file to
|
||||
set the QML import path:
|
||||
@@ -148,14 +170,16 @@
|
||||
\endcode
|
||||
|
||||
The import path affects all the targets built by the CMake project.
|
||||
\endif
|
||||
|
||||
\section1 Running QML Modules in Design Mode
|
||||
|
||||
A QML emulation layer (also called QML Puppet) is used in the Design mode to
|
||||
render and preview images and to collect data. To be able to render custom types
|
||||
correctly from QML modules, the emulation layer must be built with the same
|
||||
Qt version as the QML modules.
|
||||
Qt version and compiler as the QML modules.
|
||||
|
||||
\if defined(qtcreator)
|
||||
By default, a fallback emulation layer is provided by \QC and built with the same
|
||||
Qt version as \QC. Therefore, your QML modules will mostly not work out of
|
||||
the box.
|
||||
@@ -165,17 +189,27 @@
|
||||
\uicontrol Options > \uicontrol {Qt Quick} > \uicontrol {Qt Quick Designer} >
|
||||
\uicontrol {Use QML emulation layer which is built by the selected Qt} radio button.
|
||||
\QC builds the emulation layer when you select the Design mode.
|
||||
\else
|
||||
On Windows, select \uicontrol Help > \uicontrol {About Qt Design Studio} to
|
||||
check the Qt version and compiler that you need to use to build your plugin.
|
||||
For example: \c {Based on Qt 5.15.2 (MSVC 2019, 64 bit)}.
|
||||
|
||||
On macOS, select \uicontrol {Qt Design Studio} >
|
||||
\uicontrol {About Qt Design Studio} to see something like:
|
||||
\c {Based on Qt 5.15.2 (Clang 10.0 (Apple), 64 bit)}.
|
||||
\endif
|
||||
|
||||
|
||||
A plugin should behave differently depending on whether it is run by the
|
||||
emulation layer or an application. For example, animations should not be run
|
||||
in the Design mode. You can use the value of the QML_PUPPET_MODE
|
||||
in the Design mode. You can use the value of the \c QML_PUPPET_MODE
|
||||
environment variable to check whether the plugin is currently being run
|
||||
by an application or edited in the Design mode.
|
||||
|
||||
If you want to use a different module in the Design mode than in your actual
|
||||
application for example to mockup C++ items, then you can use \c{QML_DESIGNER_IMPORT_PATH}
|
||||
in the \c{.pro} file (for qmake projects), or declare and set the property
|
||||
qmlDesignerImportPaths in your product (for Qbs projects).
|
||||
\c qmlDesignerImportPaths in your product (for Qbs projects).
|
||||
Modules in the import paths defined in \c{QML_DESIGNER_IMPORT_PATH} will be
|
||||
used only in the Design mode.
|
||||
For an example, see \l {Qt Quick Controls - Contact List}.
|
||||
@@ -30,37 +30,38 @@
|
||||
|
||||
\title Managing Item Hierarchy
|
||||
|
||||
The \uicontrol Navigator displays the items in the current QML file and
|
||||
The \uicontrol Navigator view displays the items in the current QML file and
|
||||
their relationships. Items (1) are listed in a tree structure, below their
|
||||
parent (2).
|
||||
parent (2). You can preview items by hovering the mouse over them (3).
|
||||
|
||||
\image qmldesigner-navigator.png "Navigator"
|
||||
\image qmldesigner-navigator.png "Navigator with item preview"
|
||||
|
||||
You can select items in the \uicontrol Navigator to edit their properties
|
||||
in the \uicontrol Properties view. Items can access the properties of their
|
||||
parent item. To select items in the \uicontrol {Form Editor}, right-click
|
||||
an item, and select another type in the context menu.
|
||||
You can select items in the \uicontrol Navigator view to edit their
|
||||
properties in the \uicontrol Properties view. Items can access the
|
||||
properties of their parent item. To select items in the
|
||||
\uicontrol {Form Editor} view, right-click an item, and select another
|
||||
item in the \uicontrol Selection submenu.
|
||||
|
||||
Typically, child items are located within the parent item in the
|
||||
Typically, child items are located within the parent item in
|
||||
\uicontrol {Form Editor}. However, they do not necessarily have to
|
||||
fit inside the parent item. For example, you might want to make a
|
||||
mouse area larger than the rectangle or image beneath it (1).
|
||||
mouse area larger than the rectangle or image beneath it.
|
||||
|
||||
\image qmldesigner-element-size.png "Mouse area for a button"
|
||||
|
||||
When you copy an item, all its child items are also copied. When
|
||||
you remove an item, the child items are also removed.
|
||||
|
||||
Select context menu commands to reset item size, position, or anchors,
|
||||
and to edit items colors or the annotations attached to it. To change
|
||||
the source of an Image type, select \uicontrol {Change Source URL} in
|
||||
Select context menu commands to apply commands to items. The availability
|
||||
of the commands depends on the item type. For example, you can change
|
||||
the source of an Image type by selecting \uicontrol {Change Source URL} in
|
||||
the context menu.
|
||||
|
||||
\section1 Showing and Hiding Items
|
||||
|
||||
To show and hide items in the \uicontrol {Form Editor} when focusing on
|
||||
specific parts of the application, click \inlineimage eye_open.png
|
||||
in the \uicontrol Navigator.
|
||||
To show and hide items in \uicontrol {Form Editor} when focusing on
|
||||
specific parts of the application, click \inlineimage icons/visibilityon.png
|
||||
in \uicontrol Navigator.
|
||||
|
||||
To change the visibility of an item in the application code, select the
|
||||
\uicontrol Visibility check box in the \uicontrol Properties view or select
|
||||
@@ -72,32 +73,68 @@
|
||||
As all properties, visibility and opacity are inherited from the parent
|
||||
item. To hide or show child items, edit the properties of the parent item.
|
||||
|
||||
To hide invisible items in the \uicontrol Navigator, click
|
||||
To hide invisible items in \uicontrol Navigator, click
|
||||
\inlineimage filtericon.png
|
||||
(\uicontrol {Filter Tree}) and select \uicontrol {Show only visible items}.
|
||||
|
||||
\section1 Setting the Stacking Order
|
||||
\section1 Locking Items
|
||||
|
||||
The \c z property of an \l Item determines its position in relation to its
|
||||
sibling items in the type hierarchy. By default, items with a higher
|
||||
stacking value are drawn on top of siblings with a lower stacking value.
|
||||
Items with the same stacking value are drawn in the order they are listed,
|
||||
from the last item up.
|
||||
When designing complex applications, it is easy to accidentally modify
|
||||
the properties of an item in one of the \QC views in ways that lead to
|
||||
surprising results. For example, \uicontrol {Form Editor} can become
|
||||
crowded and other items can get in the way when you are trying to select
|
||||
or transform a particular item, so that you end up transforming more
|
||||
items than you wanted to.
|
||||
|
||||
To move an item to the front or back of all its siblings, right-click it in
|
||||
the \uicontrol Navigator or \uicontrol {Form Editor} and select
|
||||
\uicontrol {Stack (z)} > \uicontrol {To Front} or \uicontrol {To Back}.
|
||||
To raise or lower the stack value of an item, select \uicontrol Raise
|
||||
or \uicontrol Lower. To remove the \c z property, select
|
||||
\uicontrol {Reset z Property}.
|
||||
To lock items that you are not currently editing and their children,
|
||||
click \inlineimage icons/lockon.png
|
||||
in \uicontrol Navigator. Locked items cannot be handled in any \QC views.
|
||||
You can unlock the items when you want to edit them again.
|
||||
|
||||
You can also use a \uicontrol StackLayout item (Qt Quick Controls) to
|
||||
create a stacked view. For more information, see \l {Using Layouts}.
|
||||
\image qtquick-designer-navigator-lock.gif "Locking items in Navigator"
|
||||
|
||||
\section1 Switching Parent Items
|
||||
You cannot select locked items in \uicontrol {Form Editor} or
|
||||
\uicontrol {3D Editor} nor access their properties in
|
||||
\uicontrol Properties.
|
||||
|
||||
When you drag and drop instances of QML types to the
|
||||
\uicontrol {Form Editor}, the new item is added as a child of the item
|
||||
If you attempt to \l{Adding States}{remove a state} that changes the
|
||||
properties of a locked item, you are prompted to confirm the removal.
|
||||
|
||||
If you have \l{Editing Animation Curves}{added easing curves} to keyframe
|
||||
animations, you can lock and unlock them in the \uicontrol {Curve Editor}
|
||||
view. If you lock the items that contain the easing curves, the lock status
|
||||
is synchronized between \uicontrol Navigator and \uicontrol {Curve Editor}.
|
||||
|
||||
\section1 Arranging Items
|
||||
|
||||
You can view the order of items in a QML file in \uicontrol Navigator
|
||||
and \uicontrol {Text Editor}. The order of items in the file also
|
||||
determines the order in which they are drawn in \uicontrol {Form Editor}.
|
||||
By default, items that are located at the top of the file are listed at
|
||||
the bottom of the \uicontrol Navigator tree and behind overlapping items
|
||||
in \uicontrol {Form Editor}. To list the items in the order in which they
|
||||
appear in the file, as some other tools do, click \inlineimage filtericon.png
|
||||
(\uicontrol {Filter Tree}), and select \uicontrol {Reverse item order}.
|
||||
|
||||
To move an item to the top or bottom of the tree within its parent,
|
||||
right-click it in \uicontrol Navigator or \uicontrol {Form Editor}
|
||||
and select \uicontrol Arrange > \uicontrol {Bring to Front} or
|
||||
\uicontrol {Send to Back}. To move an item up or down, select
|
||||
\uicontrol {Bring Forward} or \uicontrol {Send Backward}.
|
||||
|
||||
To reverse the order of the selected items in \uicontrol Navigator and
|
||||
\uicontrol {Text Editor}, select \uicontrol Arrange > \uicontrol Reverse.
|
||||
|
||||
\image qtquick-designer-navigator-arrange.gif "Reversing item order"
|
||||
|
||||
You can also drag and drop the item to another position in the tree or use
|
||||
the arrow buttons to move the item in the tree. You can use the left and
|
||||
right arrow buttons to change the parent of the item.
|
||||
|
||||
\image qmldesigner-navigator-arrows.png "Navigator buttons"
|
||||
|
||||
When you drag and drop instances of QML types to \uicontrol {Form Editor},
|
||||
the new item is added as a child of the item
|
||||
beneath it. When you move the items, it is not possible to determine whether
|
||||
you want to adjust their position or attach them to a new parent item.
|
||||
Therefore, the parent item is not automatically changed. To change the
|
||||
@@ -105,9 +142,5 @@
|
||||
the item into a new position. The topmost item under the cursor becomes the
|
||||
new parent of the item.
|
||||
|
||||
You can change the parent of an item also in the \uicontrol Navigator.
|
||||
Drag and drop the item to another position in the tree or use the arrow
|
||||
buttons (1) to move the item in the tree.
|
||||
|
||||
\image qmldesigner-navigator-arrows.png "Navigator arrow buttons"
|
||||
\include qtquick-component-context-menu.qdocinc context-menu
|
||||
*/
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
\image qmldesigner-anchor-buttons.png "Anchor buttons"
|
||||
|
||||
For convenience, you can click the \inlineimage anchor-fill.png
|
||||
For convenience, you can click the \inlineimage icons/anchor-fill.png
|
||||
(\uicontrol {Fill to Parent}) toolbar button to apply fill anchors to an
|
||||
item and the \inlineimage qtcreator-anchors-reset-icon.png
|
||||
(\uicontrol {Reset Anchors}) button to reset the anchors to their saved
|
||||
@@ -205,7 +205,7 @@
|
||||
|
||||
You can set the space between objects in pixels. You can
|
||||
disable the distribution of spacing in pixels by clicking
|
||||
the \inlineimage qmldesigner-distribute-spacing-x.png
|
||||
the \inlineimage icons/distribute-origin-none.png
|
||||
button.
|
||||
|
||||
\section2 Using Positioners
|
||||
|
||||
@@ -303,14 +303,13 @@
|
||||
|
||||
The z position of an item determines its position in relation to its
|
||||
sibling items in the type hierarchy. You can set it in the \uicontrol Z
|
||||
field in the \uicontrol Advanced tab. However, you would typically set
|
||||
it in \uicontrol Navigator by \l{Setting the Stacking Order}
|
||||
{setting the stacking order} of items.
|
||||
field in the \uicontrol Advanced tab.
|
||||
|
||||
In the \uicontrol Size group, you can set the width and height of
|
||||
an item. You can also use selection handles to \l{Resizing Items}
|
||||
{resize items} in \uicontrol {Form Editor}. The values in the
|
||||
\uicontrol X and \uicontrol Y fields change accordingly.
|
||||
an item. You can also use the resize cursor to \l{Resizing 2D Items}
|
||||
{resize 2D items} in \uicontrol {Form Editor} or the scaling gizmo
|
||||
to \l{Scaling Items}{scale 3D items} in \uicontrol {3D Editor}. The
|
||||
values in the \uicontrol X and \uicontrol Y fields change accordingly.
|
||||
|
||||
The item size and position can also be managed automatically
|
||||
when \l{Using Layouts}{using layouts}.
|
||||
|
||||
@@ -83,6 +83,10 @@
|
||||
|
||||
\image qmldesigner-states.png "States and Properties views"
|
||||
|
||||
\note If you have \l{Locking Items}{locked an item} in \uicontrol Navigator,
|
||||
and you attempt to remove states where you change the values of its
|
||||
properties, you are prompted to confirm the removal.
|
||||
|
||||
\section1 Setting the Default State
|
||||
|
||||
To determine the startup state of the application,
|
||||
@@ -121,68 +125,7 @@
|
||||
\l{Completing Code}{code completion} feature lists the components and
|
||||
their properties you can use in the expressions.
|
||||
|
||||
\section2 Summary of Logical Operators
|
||||
|
||||
You can use the following
|
||||
\l{https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators}
|
||||
{logical operators} in the expressions to combine several conditions in one
|
||||
expression:
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Operator
|
||||
\li Meaning
|
||||
\li Evaluates to \c true if
|
||||
\row
|
||||
\li !
|
||||
\li NOT
|
||||
\li The condition is not met.
|
||||
\row
|
||||
\li &&
|
||||
\li AND
|
||||
\li Both conditions are met.
|
||||
\row
|
||||
\li ||
|
||||
\li OR
|
||||
\li Either of the conditions is met.
|
||||
\row
|
||||
\li <
|
||||
\li Less than
|
||||
\li The left operand is less than the right operand.
|
||||
\row
|
||||
\li >
|
||||
\li Greater than
|
||||
\li The left operand is greater than the right operand.
|
||||
\row
|
||||
\li >=
|
||||
\li Greater than or equal
|
||||
\li The left operand is greater than or equal to the right operand.
|
||||
\row
|
||||
\li <=
|
||||
\li Less than or equal
|
||||
\li The left operand is less than or equal to the right operand.
|
||||
\row
|
||||
\li ==
|
||||
\li Equal
|
||||
\li The operands are equal.
|
||||
\row
|
||||
\li ===
|
||||
\li Strict equal
|
||||
\li The operands are equal and of the same type.
|
||||
\row
|
||||
\li !=
|
||||
\li Not equal
|
||||
\li The operands are not equal.
|
||||
\row
|
||||
\li !==
|
||||
\li Strict not equal
|
||||
\li The operands are of the same type but not equal, or are of
|
||||
different type.
|
||||
\endtable
|
||||
|
||||
In addition, you can use arithmetic operators to compare numbers before
|
||||
checks. However, we recommend that you create separate properties for this
|
||||
purpose whenever possible.
|
||||
\include creator-logical-operators.qdocinc logical operators
|
||||
|
||||
\section2 Examples of when Conditions
|
||||
|
||||
@@ -193,6 +136,11 @@
|
||||
when: control.pressed
|
||||
\endcode
|
||||
|
||||
To apply a state when the button is not pressed, select the \uicontrol NOT
|
||||
check box.
|
||||
|
||||
\image qtquick-states-binding-editor-not.png "NOT check box in Binding Editor"
|
||||
|
||||
To apply a state when the button is not pressed, selected, nor hovered on,
|
||||
you could combine conditions, as follows:
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
timeline are \e linear, which means that they move from the beginning to
|
||||
the end at a constant speed. You can use the \uicontrol {Easing Curve Editor}
|
||||
to edit the easing curve between two keyframes. You can also use the more
|
||||
advanced \uicontrol {Animation Curve Editor} to edit the curves for the whole
|
||||
advanced \uicontrol {Curve Editor} to edit the curves for the whole
|
||||
animation.
|
||||
|
||||
\section2 Attaching Easing Curves to Keyframes
|
||||
@@ -284,7 +284,7 @@
|
||||
To customize easing curves:
|
||||
|
||||
\list 1
|
||||
\li In the \uicontrol {Easing Curve Editor}, select an easing curve in
|
||||
\li In \uicontrol {Easing Curve Editor}, select an easing curve in
|
||||
the \uicontrol Presets tab.
|
||||
\li Drag the curve handlers to modify the curve.
|
||||
\li Right-click in the editor, and select \uicontrol {Add Point} to add
|
||||
@@ -298,28 +298,30 @@
|
||||
\uicontrol Custom tab.
|
||||
\endlist
|
||||
|
||||
To paste easing curve definitions to the easing curve editor as text, select
|
||||
the \uicontrol Text tab.
|
||||
To paste easing curve definitions to \uicontrol {Easing Curve Editor} as
|
||||
text, select the \uicontrol Text tab.
|
||||
|
||||
\section1 Editing Animation Curves
|
||||
|
||||
In the animation curve editor, you can view and modify the whole animation
|
||||
curve. You
|
||||
can insert keyframes to the curve and drag them and the point handlers to
|
||||
modify the curve. You can modify the appearance of the curve in the style
|
||||
editor.
|
||||
In \uicontrol {Curve Editor}, you can view and modify the whole animation
|
||||
curve. You can insert keyframes to the curve and drag them and the point
|
||||
handlers to modify the curve. You can modify the appearance of the curve
|
||||
in the style editor.
|
||||
|
||||
You can also edit easing curves that you added with the easing curve editor.
|
||||
You can also edit easing curves that you added in
|
||||
\uicontrol {Easing Curve Editor}. If the item that
|
||||
contains the easing curves has been locked in
|
||||
\uicontrol Navigator, you can select \inlineimage icons/lockon.png
|
||||
to unlock it. You can also lock individual easing curves for editing.
|
||||
|
||||
\image studio-curve-editor.png "Animation Curve Editor"
|
||||
\image studio-curve-editor.png "Curve Editor"
|
||||
|
||||
To edit animation curves:
|
||||
|
||||
\list 1
|
||||
\li In the \uicontrol Timeline view, insert at least one keyframe.
|
||||
\li Select \inlineimage curveGraphIcon.png
|
||||
(\uicontrol {Animation Curve Editor}) on the toolbar or press \key C
|
||||
to open the animation curve editor.
|
||||
\li Select \uicontrol View > \uicontrol Views >
|
||||
\uicontrol {Curve Editor} to open the animation curve editor.
|
||||
\li Right-click in the animation curve editor, and select
|
||||
\uicontrol {Insert Keyframe} to add a keyframe.
|
||||
\li Select keyframes to display the easing curves attached to them.
|
||||
@@ -330,7 +332,7 @@
|
||||
list, and then select the pin icon.
|
||||
\endlist
|
||||
|
||||
Your changes are automatically saved when you close the editor.
|
||||
Your changes are automatically saved when you close the view.
|
||||
|
||||
\section1 Rotating Items
|
||||
|
||||
|
||||
@@ -72,12 +72,12 @@
|
||||
\li Open \e {Screen01.ui.qml} for editing in the
|
||||
\uicontrol {Form Editor} view.
|
||||
\li Select \e logo in \uicontrol Navigator.
|
||||
\li Select the \inlineimage anchor-top.png
|
||||
(\uicontrol Top) and \inlineimage anchor-left.png
|
||||
\li Select the \inlineimage icons/anchor-top.png
|
||||
(\uicontrol Top) and \inlineimage icons/anchor-left.png
|
||||
(\uicontrol Left) anchor buttons to anchor \e logo to the top left
|
||||
corner of its parent with 10-pixel margins.
|
||||
\li Select \e pageTitle in \uicontrol Navigator.
|
||||
\li Deselect the \inlineimage anchor-vertical-center.png
|
||||
\li Deselect the \inlineimage icons/anchor-center-vertical.png
|
||||
(\uicontrol {Vertical Center}) button to remove the
|
||||
anchor, and then select the \uicontrol Top button to anchor the
|
||||
title to the top of the page with a 70-pixel margin.
|
||||
@@ -167,12 +167,12 @@
|
||||
\li In \uicontrol Properties > \uicontrol Layout, select the
|
||||
\uicontrol Top button to anchor the top of the button column to
|
||||
the top of its parent with a 200-pixel margin.
|
||||
\li Select the \inlineimage anchor-horizontal-center.png
|
||||
\li Select the \inlineimage icons/anchor-center-horizontal.png
|
||||
(\uicontrol {Horizontal Center}) button to center the field
|
||||
column horizontally on the page.
|
||||
\li Select \e buttonColumn in \uicontrol Navigator.
|
||||
\li In \uicontrol Properties > \uicontrol Layout, select the
|
||||
\inlineimage anchor-bottom.png
|
||||
\inlineimage icons/anchor-bottom.png
|
||||
(\uicontrol Bottom) button to anchor the bottom of the button
|
||||
column to the bottom of its parent with a 50-pixel margin.
|
||||
\li Select the \uicontrol {Horizontal Center} button to center
|
||||
|
||||
@@ -92,8 +92,8 @@
|
||||
\li In the \uicontrol Text field, enter \e <.
|
||||
\li In the \uicontrol Font group, \uicontrol Size field, set the font
|
||||
size to \e 24 pixels.
|
||||
\li Under \uicontrol Layout, select the \inlineimage anchor-top.png
|
||||
(\uicontrol Top) and \inlineimage anchor-right.png
|
||||
\li Under \uicontrol Layout, select the \inlineimage icons/anchor-top.png
|
||||
(\uicontrol Top) and \inlineimage icons/anchor-right.png
|
||||
(\uicontrol Right) anchor buttons to anchor \e backButton to
|
||||
the top right corner of its parent with 20- and 10-pixel margins,
|
||||
respectively.
|
||||
|
||||
@@ -92,11 +92,11 @@
|
||||
\key Delete to delete it.
|
||||
\li Select \e usernameField in \uicontrol Navigator.
|
||||
\li In \uicontrol Properties > \uicontrol Layout, select the
|
||||
\inlineimage anchor-top.png
|
||||
\inlineimage icons/anchor-top.png
|
||||
(\uicontrol Top) button to anchor the top of the field to the top
|
||||
of its parent. \QDS will suggest an appropriate margin based on
|
||||
the current position of the field on the y axis, 200 pixels.
|
||||
\li Select the \inlineimage anchor-horizontal-center.png
|
||||
\li Select the \inlineimage icons/anchor-center-horizontal.png
|
||||
(\uicontrol {Horizontal Center}) button to anchor
|
||||
the horizontal center of the field to that of its parent.
|
||||
\li Select \e passwordField, and then select the \uicontrol Top
|
||||
|
||||
|
Before Width: | Height: | Size: 239 B |
BIN
doc/qtdesignstudio/images/icons/edit.png
Normal file
|
After Width: | Height: | Size: 586 B |
@@ -204,7 +204,7 @@
|
||||
\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 icon-event-list.png
|
||||
\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"
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
\li Windows 10
|
||||
\endlist
|
||||
|
||||
\note For a good user experience on Windows 10, we recommend the following
|
||||
minimum hardware and software: Intel Core i7 with 8GB of RAM and integrated
|
||||
Intel Graphics.
|
||||
|
||||
\section1 Design Tools
|
||||
|
||||
\QB is available for the following design tools:
|
||||
|
||||
@@ -52,5 +52,9 @@
|
||||
Use the Simulink connector to connect a Simulink Simulation Model to
|
||||
your UI. Simulink is a MATLAB-based graphical programming environment
|
||||
for modeling, simulating, and analyzing multi-domain dynamic systems.
|
||||
|
||||
\li \l{Using QML Modules with Plugins}
|
||||
|
||||
You can load C++ plugins for QML to simulate data.
|
||||
\endlist
|
||||
*/
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/*!
|
||||
\previouspage studio-javascript.html
|
||||
\page studio-simulink.html
|
||||
\nextpage studio-debugging.html
|
||||
\nextpage creator-qml-modules-with-plugins.html
|
||||
|
||||
\title Simulating Dynamic Systems
|
||||
|
||||
|
||||
@@ -170,6 +170,7 @@
|
||||
\li \l{Loading Placeholder Data}
|
||||
\li \l{Simulating Application Logic}
|
||||
\li \l{Simulating Dynamic Systems}
|
||||
\li \l{Using QML Modules with Plugins}
|
||||
\endlist
|
||||
\li \l{Debugging and Profiling}
|
||||
\list
|
||||
|
||||
@@ -38,7 +38,7 @@ function llvmConfig(hostOS, qtcFunctions)
|
||||
var llvmInstallDirFromEnv = Environment.getEnv("LLVM_INSTALL_DIR")
|
||||
var llvmConfigVariants = [
|
||||
// CLANG-UPGRADE-CHECK: Adapt once we require a new minimum version.
|
||||
"llvm-config", "llvm-config-8", "llvm-config-9", "llvm-config-10", "llvm-config-11", "llvm-config-12"
|
||||
"llvm-config", "llvm-config-11", "llvm-config-10", "llvm-config-9"
|
||||
];
|
||||
|
||||
// Prefer llvm-config* from LLVM_INSTALL_DIR
|
||||
|
||||
@@ -4,16 +4,16 @@ import qbs.FileInfo
|
||||
import "qtc.js" as HelperFunctions
|
||||
|
||||
Module {
|
||||
property string qtcreator_display_version: '4.14.0-beta2'
|
||||
property string qtcreator_display_version: '4.14.0-rc1'
|
||||
property string ide_version_major: '4'
|
||||
property string ide_version_minor: '13'
|
||||
property string ide_version_release: '83'
|
||||
property string ide_version_release: '84'
|
||||
property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.'
|
||||
+ ide_version_release
|
||||
|
||||
property string ide_compat_version_major: '4'
|
||||
property string ide_compat_version_minor: '13'
|
||||
property string ide_compat_version_release: '83'
|
||||
property string ide_compat_version_release: '84'
|
||||
property string qtcreator_compat_version: ide_compat_version_major + '.'
|
||||
+ ide_compat_version_minor + '.' + ide_compat_version_release
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
QTCREATOR_VERSION = 4.13.83
|
||||
QTCREATOR_COMPAT_VERSION = 4.13.83
|
||||
QTCREATOR_DISPLAY_VERSION = 4.14.0-beta2
|
||||
QTCREATOR_VERSION = 4.13.84
|
||||
QTCREATOR_COMPAT_VERSION = 4.13.84
|
||||
QTCREATOR_DISPLAY_VERSION = 4.14.0-rc1
|
||||
QTCREATOR_COPYRIGHT_YEAR = 2020
|
||||
|
||||
IDE_DISPLAY_NAME = Qt Creator
|
||||
|
||||
@@ -174,6 +174,9 @@ def build_qtcreator(args, paths):
|
||||
|
||||
common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, '--strip'],
|
||||
paths.build)
|
||||
common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install,
|
||||
'--component', 'Dependencies'],
|
||||
paths.build)
|
||||
common.check_print_call(['cmake', '--install', '.', '--prefix', paths.dev_install,
|
||||
'--component', 'Devel'],
|
||||
paths.build)
|
||||
@@ -215,32 +218,6 @@ def build_qtcreatorcdbext(args, paths):
|
||||
'--component', 'qtcreatorcdbext'],
|
||||
paths.build)
|
||||
|
||||
def deploy_qt(args, paths):
|
||||
if common.is_mac_platform():
|
||||
script = os.path.join(paths.src, 'scripts', 'deployqtHelper_mac.sh')
|
||||
app = os.path.join(paths.install, args.app_target)
|
||||
# TODO this is wrong if Qt is set up non-standard
|
||||
# TODO integrate deployqtHelper_mac.sh into deployqt.py, finally
|
||||
qt_bins = os.path.join(paths.qt, 'bin')
|
||||
qt_translations = os.path.join(paths.qt, 'translations')
|
||||
qt_plugins = os.path.join(paths.qt, 'plugins')
|
||||
qt_qml = os.path.join(paths.qt, 'qml')
|
||||
env = dict(os.environ)
|
||||
if paths.llvm:
|
||||
env['LLVM_INSTALL_DIR'] = paths.llvm
|
||||
common.check_print_call([script, app, qt_bins, qt_translations, qt_plugins, qt_qml],
|
||||
paths.build,
|
||||
env=env)
|
||||
else:
|
||||
cmd_args = ['python', '-u', os.path.join(paths.src, 'scripts', 'deployqt.py'), '-i']
|
||||
if paths.elfutils:
|
||||
cmd_args.extend(['--elfutils-path', paths.elfutils])
|
||||
if paths.llvm:
|
||||
cmd_args.extend(['--llvm-path', paths.llvm])
|
||||
exe = os.path.join(paths.install, 'bin', args.app_target)
|
||||
common.check_print_call(cmd_args + [exe, os.path.join(paths.qt, 'bin', 'qmake')],
|
||||
paths.build)
|
||||
|
||||
def package_qtcreator(args, paths):
|
||||
if not args.no_zip:
|
||||
common.check_print_call(['7z', 'a', '-mmt2',
|
||||
@@ -306,7 +283,6 @@ def main():
|
||||
build_qtcreator(args, paths)
|
||||
build_wininterrupt(args, paths)
|
||||
build_qtcreatorcdbext(args, paths)
|
||||
deploy_qt(args, paths)
|
||||
package_qtcreator(args, paths)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -30,6 +30,8 @@ import subprocess
|
||||
import sys
|
||||
|
||||
encoding = locale.getdefaultlocale()[1]
|
||||
if not encoding:
|
||||
encoding = 'UTF-8'
|
||||
|
||||
def is_windows_platform():
|
||||
return sys.platform.startswith('win')
|
||||
@@ -46,11 +48,11 @@ def to_posix_path(path):
|
||||
return path.replace('\\', '/')
|
||||
return path
|
||||
|
||||
def check_print_call(command, workdir, env=None):
|
||||
def check_print_call(command, workdir=None, env=None):
|
||||
print('------------------------------------------')
|
||||
print('COMMAND:')
|
||||
print(' '.join(['"' + c.replace('"', '\\"') + '"' for c in command]))
|
||||
print('PWD: "' + workdir + '"')
|
||||
print('PWD: "' + (workdir if workdir else os.getcwd()) + '"')
|
||||
print('------------------------------------------')
|
||||
subprocess.check_call(command, cwd=workdir, env=env)
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
################################################################################
|
||||
|
||||
import argparse
|
||||
import collections
|
||||
import os
|
||||
import locale
|
||||
import sys
|
||||
@@ -51,15 +52,22 @@ def get_args():
|
||||
parser.add_argument('--llvm-path',
|
||||
help='Path to LLVM installation',
|
||||
default=os.environ.get('LLVM_INSTALL_DIR'))
|
||||
parser.add_argument('qtcreator_binary', help='Path to Qt Creator binary')
|
||||
parser.add_argument('qtcreator_binary', help='Path to Qt Creator binary (or the app bundle on macOS)')
|
||||
parser.add_argument('qmake_binary', help='Path to qmake binary')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
args.qtcreator_binary = os.path.abspath(args.qtcreator_binary)
|
||||
if common.is_mac_platform():
|
||||
if not args.qtcreator_binary.lower().endswith(".app"):
|
||||
args.qtcreator_binary = args.qtcreator_binary + ".app"
|
||||
check = os.path.isdir
|
||||
else:
|
||||
check = os.path.isfile
|
||||
if common.is_windows_platform() and not args.qtcreator_binary.lower().endswith(".exe"):
|
||||
args.qtcreator_binary = args.qtcreator_binary + ".exe"
|
||||
if not os.path.isfile(args.qtcreator_binary):
|
||||
|
||||
if not check(args.qtcreator_binary):
|
||||
print('Cannot find Qt Creator binary.')
|
||||
sys.exit(1)
|
||||
|
||||
@@ -333,8 +341,37 @@ def deploy_elfutils(qtc_install_dir, chrpath_bin, args):
|
||||
print(file, '->', backends_install_path)
|
||||
shutil.copy(file, backends_install_path)
|
||||
|
||||
def deploy_mac(args):
|
||||
(_, qt_install) = get_qt_install_info(args.qmake_binary)
|
||||
|
||||
env = dict(os.environ)
|
||||
if args.llvm_path:
|
||||
env['LLVM_INSTALL_DIR'] = args.llvm_path
|
||||
|
||||
script_path = os.path.dirname(os.path.realpath(__file__))
|
||||
deployqtHelper_mac = os.path.join(script_path, 'deployqtHelper_mac.sh')
|
||||
common.check_print_call([deployqtHelper_mac, args.qtcreator_binary, qt_install.bin,
|
||||
qt_install.translations, qt_install.plugins, qt_install.qml],
|
||||
env=env)
|
||||
|
||||
def get_qt_install_info(qmake_binary):
|
||||
qt_install_info = common.get_qt_install_info(qmake_binary)
|
||||
QtInstallInfo = collections.namedtuple('QtInstallInfo', ['bin', 'lib', 'plugins',
|
||||
'qml', 'translations'])
|
||||
return (qt_install_info,
|
||||
QtInstallInfo(bin=qt_install_info['QT_INSTALL_BINS'],
|
||||
lib=qt_install_info['QT_INSTALL_LIBS'],
|
||||
plugins=qt_install_info['QT_INSTALL_PLUGINS'],
|
||||
qml=qt_install_info['QT_INSTALL_QML'],
|
||||
translations=qt_install_info['QT_INSTALL_TRANSLATIONS']))
|
||||
|
||||
def main():
|
||||
args = get_args()
|
||||
if common.is_mac_platform():
|
||||
deploy_mac(args)
|
||||
return
|
||||
|
||||
(qt_install_info, qt_install) = get_qt_install_info(args.qmake_binary)
|
||||
|
||||
qtcreator_binary_path = os.path.dirname(args.qtcreator_binary)
|
||||
install_dir = os.path.abspath(os.path.join(qtcreator_binary_path, '..'))
|
||||
@@ -350,13 +387,6 @@ def main():
|
||||
print("Cannot find required binary 'chrpath'.")
|
||||
sys.exit(2)
|
||||
|
||||
qt_install_info = common.get_qt_install_info(args.qmake_binary)
|
||||
QT_INSTALL_LIBS = qt_install_info['QT_INSTALL_LIBS']
|
||||
QT_INSTALL_BINS = qt_install_info['QT_INSTALL_BINS']
|
||||
QT_INSTALL_PLUGINS = qt_install_info['QT_INSTALL_PLUGINS']
|
||||
QT_INSTALL_QML = qt_install_info['QT_INSTALL_QML']
|
||||
QT_INSTALL_TRANSLATIONS = qt_install_info['QT_INSTALL_TRANSLATIONS']
|
||||
|
||||
plugins = ['assetimporters', 'accessible', 'codecs', 'designer', 'iconengines', 'imageformats', 'platformthemes',
|
||||
'platforminputcontexts', 'platforms', 'printsupport', 'qmltooling', 'sqldrivers', 'styles',
|
||||
'xcbglintegrations',
|
||||
@@ -370,10 +400,10 @@ def main():
|
||||
debug_build = is_debug(args.qtcreator_binary)
|
||||
|
||||
if common.is_windows_platform():
|
||||
copy_qt_libs(qt_deploy_prefix, QT_INSTALL_BINS, QT_INSTALL_BINS, QT_INSTALL_PLUGINS, QT_INSTALL_QML, plugins)
|
||||
copy_qt_libs(qt_deploy_prefix, qt_install.bin, qt_install.bin, qt_install.plugins, qt_install.qml, plugins)
|
||||
else:
|
||||
copy_qt_libs(qt_deploy_prefix, QT_INSTALL_BINS, QT_INSTALL_LIBS, QT_INSTALL_PLUGINS, QT_INSTALL_QML, plugins)
|
||||
copy_translations(install_dir, QT_INSTALL_TRANSLATIONS)
|
||||
copy_qt_libs(qt_deploy_prefix, qt_install.bin, qt_install.lib, qt_install.plugins, qt_install.qml, plugins)
|
||||
copy_translations(install_dir, qt_install.translations)
|
||||
if args.llvm_path:
|
||||
deploy_libclang(install_dir, args.llvm_path, chrpath_bin)
|
||||
|
||||
@@ -387,8 +417,4 @@ def main():
|
||||
add_qt_conf(os.path.join(install_dir, 'bin'), qt_deploy_prefix)
|
||||
|
||||
if __name__ == "__main__":
|
||||
if common.is_mac_platform():
|
||||
print("macOS is not supported by this script, please use macqtdeploy!")
|
||||
sys.exit(2)
|
||||
else:
|
||||
main()
|
||||
|
||||
@@ -682,6 +682,14 @@ class DumperBase():
|
||||
self.putValue(data, 'latin1', elided=elided)
|
||||
|
||||
def encodeString(self, value, limit=0):
|
||||
if self.qtVersion() >= 0x60000:
|
||||
dd, ptr, size = self.split('ppi', value)
|
||||
if not dd:
|
||||
return ""
|
||||
elided, shown = self.computeLimit(2 * size, 2 * self.displayStringLimit)
|
||||
data = self.readMemory(ptr, shown)
|
||||
return data
|
||||
else:
|
||||
elided, data = self.encodeStringHelper(self.extractPointer(value), limit)
|
||||
return data
|
||||
|
||||
@@ -691,7 +699,15 @@ class DumperBase():
|
||||
def encodeStringUtf8(self, value, limit=0):
|
||||
return self.encodedUtf16ToUtf8(self.encodeString(value, limit))
|
||||
|
||||
def stringData(self, value):
|
||||
def stringData(self, value): # -> (data, size, alloc)
|
||||
if self.qtVersion() >= 0x60000:
|
||||
dd, data, size = value.split('ppi')
|
||||
if dd:
|
||||
alloc, i, i = self.split('Pii', dd)
|
||||
else: # fromRawData
|
||||
alloc = size
|
||||
return data, size, alloc
|
||||
else:
|
||||
return self.byteArrayDataHelper(self.extractPointer(value))
|
||||
|
||||
def extractTemplateArgument(self, typename, position):
|
||||
@@ -728,6 +744,12 @@ class DumperBase():
|
||||
return inner
|
||||
|
||||
def putStringValue(self, value):
|
||||
if self.qtVersion() >= 0x60000:
|
||||
dd, ptr, size = self.split('ppi', value)
|
||||
elided, shown = self.computeLimit(2 * size, 2 * self.displayStringLimit)
|
||||
data = self.readMemory(ptr, shown)
|
||||
self.putValue(data, 'utf16', elided=elided)
|
||||
else:
|
||||
addr = self.extractPointer(value)
|
||||
elided, data = self.encodeStringHelper(addr, self.displayStringLimit)
|
||||
self.putValue(data, 'utf16', elided=elided)
|
||||
|
||||
@@ -815,6 +815,12 @@ def qdump__QVariantHash(d, value):
|
||||
|
||||
|
||||
def qdumpHelper_QHash(d, value, keyType, valueType):
|
||||
if d.qtVersion() >= 0x60000:
|
||||
qdumpHelper_QHash_6(d, value, keyType, valueType)
|
||||
else:
|
||||
qdumpHelper_QHash_5(d, value, keyType, valueType)
|
||||
|
||||
def qdumpHelper_QHash_5(d, value, keyType, valueType):
|
||||
def hashDataFirstNode():
|
||||
b = buckets
|
||||
n = numBuckets
|
||||
@@ -865,6 +871,45 @@ def qdumpHelper_QHash(d, value, keyType, valueType):
|
||||
node = hashDataNextNode(node)
|
||||
|
||||
|
||||
def qdumpHelper_QHash_6(d, value, keyType, valueType):
|
||||
dptr = d.extractPointer(value)
|
||||
ref, _, size, buckets, seed, spans = d.split('i@qqqp', dptr)
|
||||
|
||||
d.check(0 <= size and size <= 100 * 1000 * 1000)
|
||||
d.check(-1 <= ref and ref < 100000)
|
||||
#d.putValue("%d 0x%x 0x%x 0x%x" % (ref, size, buckets, seed));
|
||||
d.putItemCount(size)
|
||||
|
||||
if d.isExpanded():
|
||||
type_code = '{%s}@{%s}' % (keyType.name, valueType.name)
|
||||
_, entry_size, _ = d.describeStruct(type_code)
|
||||
with Children(d, size):
|
||||
span_size = 128 + 2 * d.ptrSize() # Including tail padding.
|
||||
nspans = int((buckets + 127) / 128)
|
||||
count = 0
|
||||
for b in range(nspans):
|
||||
span = spans + b * span_size
|
||||
offsets, entries, allocated, next_free = d.split('128spbb', span)
|
||||
#with SubItem(d, 'span %d' % b):
|
||||
# d.putValue('span: 0x%x %s alloc: %s next: %s'
|
||||
# % (span, d.hexencode(offsets), allocated, next_free))
|
||||
entry_pos = 0
|
||||
for i in range(128):
|
||||
offset = offsets[i]
|
||||
#with SubItem(d, 'offset %i' % i):
|
||||
# d.putValue('i: %s off: %s' % (i, offset))
|
||||
if offset != 255: # Entry is used
|
||||
entry = entries + offset * entry_size
|
||||
key, _, val = d.split(type_code, entry)
|
||||
#with SubItem(d, 'count %d entry %d' % (count, i)):
|
||||
# d.putValue('i: %s entry: 0x%x' % (i, entry))
|
||||
d.putPairItem(count, (key, val), 'key', 'value')
|
||||
count += 1
|
||||
entry_pos += 1
|
||||
#with SubItem(d, 'total'):
|
||||
# d.putValue('total: %s item size: %s' % (count, entry_size))
|
||||
|
||||
|
||||
def qform__QHashNode():
|
||||
return [DisplayFormat.CompactMap]
|
||||
|
||||
@@ -1044,21 +1089,24 @@ def qform__QImage():
|
||||
|
||||
|
||||
def qdump__QImage(d, value):
|
||||
if d.qtVersion() < 0x050000:
|
||||
(vtbl, painters, imageData) = value.split('ppp')
|
||||
if d.qtVersion() >= 0x060000:
|
||||
vtbl, painters, image_data = value.split('ppp')
|
||||
elif d.qtVersion() >= 0x050000:
|
||||
vtbl, painters, reserved, image_data = value.split('pppp')
|
||||
else:
|
||||
(vtbl, painters, reserved, imageData) = value.split('pppp')
|
||||
vtbl, painters, image_data = value.split('ppp')
|
||||
|
||||
if imageData == 0:
|
||||
if image_data == 0:
|
||||
d.putValue('(invalid)')
|
||||
return
|
||||
|
||||
(ref, width, height, depth, nbytes, padding, devicePixelRatio, colorTable,
|
||||
bits, iformat) = d.split('iiiii@dppi', imageData)
|
||||
|
||||
ref, width, height = d.split('iii', image_data)
|
||||
d.putValue('(%dx%d)' % (width, height))
|
||||
|
||||
d.putExpandable()
|
||||
if d.isExpanded():
|
||||
(ref, width, height, depth, nbytes, pad, devicePixelRatio, colorTable,
|
||||
bits, iformat) = d.split('iiiii@dppi', image_data)
|
||||
with Children(d):
|
||||
d.putIntItem('width', width)
|
||||
d.putIntItem('height', height)
|
||||
@@ -1320,15 +1368,19 @@ def qdump__QProcEnvKey(d, value):
|
||||
|
||||
|
||||
def qdump__QPixmap(d, value):
|
||||
if d.qtVersion() < 0x050000:
|
||||
(vtbl, painters, dataPtr) = value.split('ppp')
|
||||
if d.qtVersion() >= 0x060000:
|
||||
vtbl, painters, data = value.split('ppp')
|
||||
elif d.qtVersion() >= 0x050000:
|
||||
vtbl, painters, reserved, data = s = d.split('pppp', value)
|
||||
else:
|
||||
(vtbl, painters, reserved, dataPtr) = s = d.split('pppp', value)
|
||||
if dataPtr == 0:
|
||||
vtbl, painters, data = value.split('ppp')
|
||||
|
||||
if data == 0:
|
||||
d.putValue('(invalid)')
|
||||
else:
|
||||
(dummy, width, height) = d.split('pii', dataPtr)
|
||||
_, width, height = d.split('pii', data)
|
||||
d.putValue('(%dx%d)' % (width, height))
|
||||
|
||||
d.putPlainChildren(value)
|
||||
|
||||
|
||||
@@ -1381,28 +1433,32 @@ def qdump__QRegExp(d, value):
|
||||
|
||||
|
||||
def qdump__QRegion(d, value):
|
||||
regionDataPtr = d.extractPointer(value)
|
||||
if regionDataPtr == 0:
|
||||
d_ptr = d.extractPointer(value)
|
||||
if d_ptr == 0:
|
||||
d.putSpecialValue('empty')
|
||||
else:
|
||||
if d.qtVersion() >= 0x050400: # Padding removed in ee324e4ed
|
||||
(ref, pad, rgn) = d.split('i@p', regionDataPtr)
|
||||
(numRects, innerArea, rects, extents, innerRect) = \
|
||||
d.split('iiP{QRect}{QRect}', rgn)
|
||||
if d.qtVersion() >= 0x060000:
|
||||
ref, _, rgn = d.split('i@p', d_ptr)
|
||||
numRects, innerArea, rects, extents, innerRect = \
|
||||
d.split('ii{QList<QRect>}{QRect}{QRect}', rgn)
|
||||
elif d.qtVersion() >= 0x050400: # Padding removed in ee324e4ed
|
||||
ref, _, rgn = d.split('i@p', d_ptr)
|
||||
numRects, innerArea, rects, extents, innerRect = \
|
||||
d.split('ii{QVector<QRect>}{QRect}{QRect}', rgn)
|
||||
elif d.qtVersion() >= 0x050000:
|
||||
(ref, pad, rgn) = d.split('i@p', regionDataPtr)
|
||||
(numRects, pad, rects, extents, innerRect, innerArea) = \
|
||||
d.split('i@P{QRect}{QRect}i', rgn)
|
||||
ref, _, rgn = d.split('i@p', d_ptr)
|
||||
numRects, _, rects, extents, innerRect, innerArea = \
|
||||
d.split('i@{QVector<QRect>}{QRect}{QRect}i', rgn)
|
||||
else:
|
||||
if d.isWindowsTarget():
|
||||
(ref, pad, rgn) = d.split('i@p', regionDataPtr)
|
||||
ref, _, rgn = d.split('i@p', d_ptr)
|
||||
else:
|
||||
(ref, pad, xrgn, xrectangles, rgn) = d.split('i@ppp', regionDataPtr)
|
||||
ref, _, xrgn, xrectangles, rgn = d.split('i@ppp', d_ptr)
|
||||
if rgn == 0:
|
||||
numRects = 0
|
||||
else:
|
||||
(numRects, pad, rects, extents, innerRect, innerArea) = \
|
||||
d.split('i@P{QRect}{QRect}i', rgn)
|
||||
numRects, _, rects, extents, innerRect, innerArea = \
|
||||
d.split('i@{QVector<QRect>}{QRect}{QRect}i', rgn)
|
||||
|
||||
d.putItemCount(numRects)
|
||||
if d.isExpanded():
|
||||
@@ -1411,7 +1467,7 @@ def qdump__QRegion(d, value):
|
||||
d.putIntItem('innerArea', innerArea)
|
||||
d.putSubItem('extents', extents)
|
||||
d.putSubItem('innerRect', innerRect)
|
||||
d.putSubItem('rects', d.createVectorItem(rects, d.qtNamespace() + 'QRect'))
|
||||
d.putSubItem('rects', rects)
|
||||
|
||||
|
||||
def qdump__QScopedPointer(d, value):
|
||||
@@ -1585,18 +1641,8 @@ def qform__QString():
|
||||
|
||||
|
||||
def qdump__QString(d, value):
|
||||
if d.qtVersion() >= 0x60000:
|
||||
dd, data, size = value.split('ppi')
|
||||
if dd:
|
||||
_, _, alloc = d.split('iii', dd)
|
||||
else: # fromRawData
|
||||
alloc = size
|
||||
elided, shown = d.computeLimit(2 * size, 2 * d.displayStringLimit)
|
||||
p = d.readMemory(data, shown)
|
||||
d.putValue(p, 'utf16', elided=elided)
|
||||
else:
|
||||
d.putStringValue(value)
|
||||
(data, size, alloc) = d.stringData(value)
|
||||
data, size, _ = d.stringData(value)
|
||||
displayFormat = d.currentItemFormat()
|
||||
if displayFormat == DisplayFormat.Separate:
|
||||
d.putDisplay('utf16:separate', d.encodeString(value, limit=100000))
|
||||
@@ -2075,7 +2121,10 @@ if False:
|
||||
|
||||
|
||||
def qdump__QVarLengthArray(d, value):
|
||||
(cap, size, data) = value.split('iip')
|
||||
if d.qtVersion() >= 0x060000:
|
||||
cap, size, data = value.split('QQp')
|
||||
else:
|
||||
cap, size, data = value.split('iip')
|
||||
d.check(0 <= size)
|
||||
d.putItemCount(size)
|
||||
d.putPlotData(data, size, value.type[0])
|
||||
|
||||
@@ -412,6 +412,8 @@ QImage QuickItemNodeInstance::renderImage() const
|
||||
|
||||
QSize size = renderBoundingRect.size().toSize();
|
||||
static double devicePixelRatio = qgetenv("FORMEDITOR_DEVICE_PIXEL_RATIO").toDouble();
|
||||
if (size.width() * size.height() > 4000 * 4000)
|
||||
size = QSize(0,0);
|
||||
size *= devicePixelRatio;
|
||||
|
||||
QImage renderImage;
|
||||
|
||||
@@ -159,28 +159,5 @@ foreach(executable clang clang-cl clangd clang-tidy clazy-standalone)
|
||||
FILES "${LLVM_TOOLS_BINARY_DIR}/${executable}${CMAKE_EXECUTABLE_SUFFIX}"
|
||||
DESTINATION "${IDE_LIBEXEC_PATH}/clang/bin/"
|
||||
)
|
||||
# For the install directory
|
||||
install(PROGRAMS
|
||||
"${LLVM_TOOLS_BINARY_DIR}/${executable}${CMAKE_EXECUTABLE_SUFFIX}"
|
||||
DESTINATION "${IDE_LIBEXEC_PATH}/clang/bin"
|
||||
COMPONENT Dependencies
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
if (IS_SYMLINK "${LLVM_TOOLS_BINARY_DIR}/${executable}${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
file(READ_SYMLINK
|
||||
"${LLVM_TOOLS_BINARY_DIR}/${executable}${CMAKE_EXECUTABLE_SUFFIX}" real_executable)
|
||||
install(PROGRAMS
|
||||
"${LLVM_TOOLS_BINARY_DIR}/${real_executable}${CMAKE_EXECUTABLE_SUFFIX}"
|
||||
DESTINATION "${IDE_LIBEXEC_PATH}/clang/bin"
|
||||
COMPONENT Dependencies
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
install(DIRECTORY ${LLVM_LIBRARY_DIR}/clang/${CLANG_VERSION}/include
|
||||
DESTINATION "${IDE_LIBEXEC_PATH}/clang/lib/clang/${CLANG_VERSION}"
|
||||
COMPONENT Dependencies
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
@@ -426,6 +426,8 @@ PyType PyType::lookupType(const std::string &typeNameIn, ULONG64 module)
|
||||
typeName.erase(typeName.length() - 6);
|
||||
if (typeName == "__int64" || typeName == "unsigned __int64")
|
||||
typeName.erase(typeName.find("__"), 2);
|
||||
if (typeName == "signed char")
|
||||
typeName.erase(0, 7);
|
||||
|
||||
const static std::regex typeNameRE("^[a-zA-Z_][a-zA-Z0-9_]*!?[a-zA-Z0-9_<>:, \\*\\&\\[\\]]*$");
|
||||
if (!std::regex_match(typeName, typeNameRE))
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <shellapi.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <direct.h>
|
||||
|
||||
|
||||
@@ -895,13 +895,15 @@ void AndroidBuildApkStep::setBuildTargetSdk(const QString &sdk)
|
||||
void AndroidBuildApkStep::stdError(const QString &output)
|
||||
{
|
||||
AbstractProcessStep::stdError(output);
|
||||
if (output == "\n")
|
||||
return;
|
||||
|
||||
if (output.startsWith("warning", Qt::CaseInsensitive) || output.startsWith("note", Qt::CaseInsensitive))
|
||||
TaskHub::addTask(BuildSystemTask(Task::Warning, output));
|
||||
QString newOutput = output;
|
||||
newOutput.remove(QRegularExpression("^(\\n)+"));
|
||||
|
||||
if (newOutput.startsWith("warning", Qt::CaseInsensitive)
|
||||
|| newOutput.startsWith("note", Qt::CaseInsensitive))
|
||||
TaskHub::addTask(BuildSystemTask(Task::Warning, newOutput));
|
||||
else
|
||||
TaskHub::addTask(BuildSystemTask(Task::Error, output));
|
||||
TaskHub::addTask(BuildSystemTask(Task::Error, newOutput));
|
||||
}
|
||||
|
||||
QVariant AndroidBuildApkStep::data(Utils::Id id) const
|
||||
|
||||
@@ -552,13 +552,15 @@ void AndroidDeployQtStep::processReadyReadStdError(DeployErrorCode &errorCode)
|
||||
void AndroidDeployQtStep::stdError(const QString &line)
|
||||
{
|
||||
emit addOutput(line, BuildStep::OutputFormat::Stderr, BuildStep::DontAppendNewline);
|
||||
if (line == "\n")
|
||||
return;
|
||||
|
||||
if (line.startsWith("warning", Qt::CaseInsensitive) || line.startsWith("note", Qt::CaseInsensitive))
|
||||
TaskHub::addTask(DeploymentTask(Task::Warning, line));
|
||||
QString newOutput = line;
|
||||
newOutput.remove(QRegularExpression("^(\\n)+"));
|
||||
|
||||
if (newOutput.startsWith("warning", Qt::CaseInsensitive)
|
||||
|| newOutput.startsWith("note", Qt::CaseInsensitive))
|
||||
TaskHub::addTask(DeploymentTask(Task::Warning, newOutput));
|
||||
else
|
||||
TaskHub::addTask(DeploymentTask(Task::Error, line));
|
||||
TaskHub::addTask(DeploymentTask(Task::Error, newOutput));
|
||||
}
|
||||
|
||||
AndroidDeployQtStep::DeployErrorCode AndroidDeployQtStep::parseDeployErrors(QString &deployOutputLine) const
|
||||
|
||||
@@ -855,8 +855,6 @@ void AndroidManifestEditorWidget::syncToWidgets(const QDomDocument &doc)
|
||||
setApiLevel(m_androidTargetSdkVersion, usesSdkElement, QLatin1String("android:targetSdkVersion"));
|
||||
}
|
||||
|
||||
QString baseDir = m_textEditorWidget->textDocument()->filePath().toFileInfo().absolutePath();
|
||||
|
||||
QDomElement applicationElement = manifest.firstChildElement(QLatin1String("application"));
|
||||
m_appNameLineEdit->setText(applicationElement.attribute(QLatin1String("android:label")));
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include <utils/temporaryfile.h>
|
||||
#include <utils/url.h>
|
||||
|
||||
#include <QDate>
|
||||
#include <QDir>
|
||||
#include <QDirIterator>
|
||||
#include <QFileInfo>
|
||||
@@ -498,22 +499,45 @@ void AndroidRunnerWorker::setAndroidDeviceInfo(const AndroidDeviceInfo &info)
|
||||
<< m_deviceSerialNumber << m_apiLevel;
|
||||
}
|
||||
|
||||
void AndroidRunnerWorker::asyncStartHelper()
|
||||
void Android::Internal::AndroidRunnerWorker::asyncStartLogcat()
|
||||
{
|
||||
forceStop();
|
||||
|
||||
// Its assumed that the device or avd returned by selector() is online.
|
||||
// Start the logcat process before app starts.
|
||||
QTC_ASSERT(!m_adbLogcatProcess, /**/);
|
||||
m_adbLogcatProcess.reset(AndroidManager::runAdbCommandDetached(selector() << "logcat"));
|
||||
if (m_adbLogcatProcess) {
|
||||
m_adbLogcatProcess->setObjectName("AdbLogcatProcess");
|
||||
|
||||
// Ideally AndroidManager::runAdbCommandDetached() should be used, but here
|
||||
// we need to connect the readyRead signals from logcat otherwise we might
|
||||
// lost some output between the process start and connecting those signals.
|
||||
m_adbLogcatProcess.reset(new QProcess());
|
||||
|
||||
connect(m_adbLogcatProcess.get(), &QProcess::readyReadStandardOutput,
|
||||
this, &AndroidRunnerWorker::logcatReadStandardOutput);
|
||||
connect(m_adbLogcatProcess.get(), &QProcess::readyReadStandardError,
|
||||
this, &AndroidRunnerWorker::logcatReadStandardError);
|
||||
|
||||
// Get target current time to fetch only recent logs
|
||||
QString dateInSeconds;
|
||||
QStringList timeArg;
|
||||
if (runAdb({"shell", "date", "+%s"}, &dateInSeconds)) {
|
||||
timeArg << "-T";
|
||||
timeArg << QDateTime::fromSecsSinceEpoch(dateInSeconds.toInt())
|
||||
.toString("MM-dd hh:mm:ss.mmm");
|
||||
}
|
||||
|
||||
const QStringList logcatArgs = selector() << "logcat" << timeArg;
|
||||
const QString adb = AndroidConfigurations::currentConfig().adbToolPath().toString();
|
||||
qCDebug(androidRunWorkerLog) << "Running logcat command (async):"
|
||||
<< CommandLine(adb, logcatArgs).toUserOutput();
|
||||
m_adbLogcatProcess->start(adb, logcatArgs);
|
||||
if (m_adbLogcatProcess->waitForStarted(500) && m_adbLogcatProcess->state() == QProcess::Running)
|
||||
m_adbLogcatProcess->setObjectName("AdbLogcatProcess");
|
||||
}
|
||||
|
||||
void AndroidRunnerWorker::asyncStartHelper()
|
||||
{
|
||||
forceStop();
|
||||
asyncStartLogcat();
|
||||
|
||||
for (const QString &entry : m_beforeStartAdbCommands)
|
||||
runAdb(entry.split(' ', Qt::SkipEmptyParts));
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ private:
|
||||
bool deviceFileExists(const QString &filePath);
|
||||
bool packageFileExists(const QString& filePath);
|
||||
bool uploadDebugServer(const QString &debugServerFileName);
|
||||
void asyncStartLogcat();
|
||||
|
||||
enum class JDBState {
|
||||
Idle,
|
||||
|
||||
@@ -146,7 +146,6 @@ void AvdDialog::parseDeviceDefinitionsList()
|
||||
if (line.startsWith("---------") || line.isEmpty()) {
|
||||
DeviceDefinitionStruct deviceDefinition;
|
||||
for (const QString &line : avdDeviceInfo) {
|
||||
QString value;
|
||||
if (line.contains("id:")) {
|
||||
deviceDefinition.name_id = line.split("or").at(1);
|
||||
deviceDefinition.name_id = deviceDefinition.name_id.remove(0, 1).remove('"');
|
||||
|
||||
@@ -182,8 +182,8 @@ ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard)
|
||||
|
||||
if (wizard->copyGradle()) {
|
||||
auto checkBox = new QCheckBox(this);
|
||||
checkBox->setChecked(false);
|
||||
connect(checkBox, &QCheckBox::toggled, wizard, &CreateAndroidManifestWizard::setCopyGradle);
|
||||
checkBox->setChecked(false);
|
||||
checkBox->setText(tr("Copy the Gradle files to Android directory"));
|
||||
checkBox->setToolTip(tr("It is highly recommended if you are planning to extend the Java part of your Qt application."));
|
||||
m_layout->addRow(checkBox);
|
||||
|
||||
@@ -74,6 +74,7 @@ void QdbMakeDefaultAppService::handleProcessFinished(const QString &error)
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Check that ignoring is fine
|
||||
QByteArray processOutput = d->processRunner->readAllStandardOutput();
|
||||
|
||||
if (d->makeDefault)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
add_qtc_plugin(ClangFormat
|
||||
CONDITION TARGET libclang AND LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL 10.0.0
|
||||
CONDITION TARGET libclang AND LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL 10.0.0 AND QTC_CLANG_BUILDMODE_MATCH
|
||||
DEPENDS Utils Qt5::Widgets clangFormat
|
||||
INCLUDES "${CLANG_INCLUDE_DIRS}"
|
||||
PLUGIN_DEPENDS Core TextEditor CppEditor CppTools ProjectExplorer
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
add_qtc_plugin(ClangPchManager
|
||||
BUILD_DEFAULT OFF
|
||||
CONDITION TARGET libclang
|
||||
CONDITION TARGET libclang AND QTC_CLANG_BUILDMODE_MATCH
|
||||
DEPENDS ClangSupport CPlusPlus
|
||||
DEFINES CLANGPCHMANAGER_LIB
|
||||
PLUGIN_DEPENDS Core CppTools
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
add_qtc_plugin(ClangRefactoring
|
||||
BUILD_DEFAULT OFF
|
||||
CONDITION TARGET libclang
|
||||
CONDITION TARGET libclang AND QTC_CLANG_BUILDMODE_MATCH
|
||||
DEPENDS ClangSupport CPlusPlus
|
||||
PLUGIN_DEPENDS Core CppTools TextEditor ClangPchManager
|
||||
SOURCES ${TEST_SOURCES}
|
||||
|
||||
@@ -825,7 +825,7 @@ void ClangTool::loadDiagnosticsFromFiles()
|
||||
|
||||
// Show imported
|
||||
reset();
|
||||
onNewDiagnosticsAvailable(diagnostics);
|
||||
onNewDiagnosticsAvailable(diagnostics, /*generateMarks =*/ true);
|
||||
setState(State::ImportFinished);
|
||||
}
|
||||
|
||||
@@ -1129,10 +1129,10 @@ QSet<Diagnostic> ClangTool::diagnostics() const
|
||||
});
|
||||
}
|
||||
|
||||
void ClangTool::onNewDiagnosticsAvailable(const Diagnostics &diagnostics)
|
||||
void ClangTool::onNewDiagnosticsAvailable(const Diagnostics &diagnostics, bool generateMarks)
|
||||
{
|
||||
QTC_ASSERT(m_diagnosticModel, return);
|
||||
m_diagnosticModel->addDiagnostics(diagnostics);
|
||||
m_diagnosticModel->addDiagnostics(diagnostics, generateMarks);
|
||||
}
|
||||
|
||||
void ClangTool::updateForCurrentState()
|
||||
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
|
||||
const QString &name() const;
|
||||
|
||||
void onNewDiagnosticsAvailable(const Diagnostics &diagnostics);
|
||||
void onNewDiagnosticsAvailable(const Diagnostics &diagnostics, bool generateMarks);
|
||||
|
||||
QAction *startAction() const { return m_startAction; }
|
||||
QAction *startOnCurrentFileAction() const { return m_startOnCurrentFileAction; }
|
||||
|
||||
@@ -364,8 +364,12 @@ void ClangToolRunWorker::onRunnerFinishedWithSuccess(const QString &filePath)
|
||||
} else {
|
||||
if (!m_filesNotAnalyzed.contains(filePath))
|
||||
m_filesAnalyzed.insert(filePath);
|
||||
if (!diagnostics.isEmpty())
|
||||
tool()->onNewDiagnosticsAvailable(diagnostics);
|
||||
if (!diagnostics.isEmpty()) {
|
||||
// do not generate marks when we always analyze open files since marks from that
|
||||
// analysis should be more up to date
|
||||
const bool generateMarks = !m_runSettings.analyzeOpenFiles();
|
||||
tool()->onNewDiagnosticsAvailable(diagnostics, generateMarks);
|
||||
}
|
||||
}
|
||||
|
||||
handleFinished();
|
||||
@@ -381,7 +385,6 @@ void ClangToolRunWorker::onRunnerFinishedWithFailure(const QString &errorMessage
|
||||
|
||||
auto *toolRunner = qobject_cast<ClangToolRunner *>(sender());
|
||||
const QString fileToAnalyze = toolRunner->fileToAnalyze();
|
||||
const QString outputFilePath = toolRunner->outputFilePath();
|
||||
|
||||
m_filesAnalyzed.remove(fileToAnalyze);
|
||||
m_filesNotAnalyzed.insert(fileToAnalyze);
|
||||
|
||||
@@ -58,7 +58,7 @@ QVariant FilePathItem::data(int column, int role) const
|
||||
case Qt::DisplayRole:
|
||||
return m_filePath;
|
||||
case Qt::DecorationRole:
|
||||
return Core::FileIconProvider::icon(m_filePath);
|
||||
return Core::FileIconProvider::icon(QFileInfo(m_filePath));
|
||||
case Debugger::DetailedErrorView::FullTextRole:
|
||||
return m_filePath;
|
||||
default:
|
||||
@@ -102,7 +102,7 @@ QDebug operator<<(QDebug debug, const Diagnostic &d)
|
||||
;
|
||||
}
|
||||
|
||||
void ClangToolsDiagnosticModel::addDiagnostics(const Diagnostics &diagnostics)
|
||||
void ClangToolsDiagnosticModel::addDiagnostics(const Diagnostics &diagnostics, bool generateMarks)
|
||||
{
|
||||
const auto onFixitStatusChanged =
|
||||
[this](const QModelIndex &index, FixitStatus oldStatus, FixitStatus newStatus) {
|
||||
@@ -129,7 +129,7 @@ void ClangToolsDiagnosticModel::addDiagnostics(const Diagnostics &diagnostics)
|
||||
|
||||
// Add to file path item
|
||||
qCDebug(LOG) << "Adding diagnostic:" << d;
|
||||
filePathItem->appendChild(new DiagnosticItem(d, onFixitStatusChanged, this));
|
||||
filePathItem->appendChild(new DiagnosticItem(d, onFixitStatusChanged, generateMarks, this));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,11 +284,12 @@ static QString fullText(const Diagnostic &diagnostic)
|
||||
|
||||
DiagnosticItem::DiagnosticItem(const Diagnostic &diag,
|
||||
const OnFixitStatusChanged &onFixitStatusChanged,
|
||||
bool generateMark,
|
||||
ClangToolsDiagnosticModel *parent)
|
||||
: m_diagnostic(diag)
|
||||
, m_onFixitStatusChanged(onFixitStatusChanged)
|
||||
, m_parentModel(parent)
|
||||
, m_mark(new DiagnosticMark(diag))
|
||||
, m_mark(generateMark ? new DiagnosticMark(diag) : nullptr)
|
||||
{
|
||||
if (diag.hasFixits)
|
||||
m_fixitStatus = FixitStatus::NotScheduled;
|
||||
|
||||