Merge remote-tracking branch 'origin/4.13'

Change-Id: I015bac0cccdf466a923c706abdedd8bd8800b0cd
This commit is contained in:
Eike Ziller
2020-07-06 10:30:54 +02:00
225 changed files with 4591 additions and 1394 deletions

View File

@@ -1,19 +1,3 @@
# .clang-format for Qt Creator
#
# This is for clang-format >= 5.0.
#
# The configuration below follows the Qt Creator Coding Rules [1] as closely as
# possible. For documentation of the options, see [2].
#
# Use ../../tests/manual/clang-format-for-qtc/test.cpp for documenting problems
# or testing changes.
#
# In case you update this configuration please also update the qtcStyle() in src\plugins\clangformat\clangformatutils.cpp
#
# [1] https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html
# [2] https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
@@ -90,12 +74,12 @@ NamespaceIndentation: None
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 150
PenaltyBreakBeforeFirstCallParameter: 300
PenaltyBreakAssignment: 500
PenaltyBreakBeforeFirstCallParameter: 150
PenaltyBreakComment: 500
PenaltyBreakFirstLessLess: 400
PenaltyBreakString: 600
PenaltyExcessCharacter: 50
PenaltyExcessCharacter: 7
PenaltyReturnTypeOnItsOwnLine: 300
PointerAlignment: Right
ReflowComments: false

View File

@@ -5,6 +5,7 @@ on: [push, pull_request]
env:
QT_VERSION: 5.15.0
CLANG_VERSION: 100
ELFUTILS_VERSION: 0.175
CMAKE_VERSION: 3.17.0
NINJA_VERSION: 1.10.0
BUILD_TYPE: Release
@@ -46,7 +47,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init src/plugins/help/qlitehtml/litehtml
run: |
git submodule set-url -- perfparser https://code.qt.io/qt-creator/perfparser.git
git submodule update --init src/plugins/help/qlitehtml/litehtml
git submodule update --init src/tools/perfparser
- name: Download Ninja and CMake
id: cmake_and_ninja
@@ -261,6 +265,32 @@ jobs:
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/libclang" libclang_dir)
message("::set-output name=libclang_dir::${libclang_dir}")
- name: Download elfutils
if: runner.os == 'Windows' && matrix.config.is_msvc || runner.os == 'Linux'
id: elfutils
shell: cmake -P {0}
run: |
set(elfutils_version "$ENV{ELFUTILS_VERSION}")
if ("${{ runner.os }}" STREQUAL "Windows")
if ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat")
set(elfutils "elfutils-release_${elfutils_version}qt-windows-x86_64.7z")
elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat")
set(elfutils "elfutils-release_${elfutils_version}qt-windows-i686.7z")
endif()
elseif ("${{ runner.os }}" STREQUAL "Linux")
set(elfutils "elfutils-release_${elfutils_version}qt-linux-x86_64.7z")
endif()
set(elfutils_url "https://download.qt.io/development_releases/prebuilt/elfutils/${elfutils}")
file(DOWNLOAD "${elfutils_url}" ./elfutils.7z SHOW_PROGRESS)
file(MAKE_DIRECTORY elfutils)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ../elfutils.7z WORKING_DIRECTORY elfutils)
# Save the path for other steps
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/elfutils" elfutils_dir)
message("::set-output name=elfutils_dir::${elfutils_dir}")
- name: Download ccache
id: ccache
shell: cmake -P {0}
@@ -359,6 +389,12 @@ jobs:
set(CDB_OPTION)
endif()
if (NOT "${{ steps.elfutils.outputs.elfutils_dir }}" STREQUAL "")
set(ELFUTILS_OPTION "--elfutils-path;${{ steps.elfutils.outputs.elfutils_dir }}")
else()
set(ELFUTILS_OPTION)
endif()
execute_process(
COMMAND python
-u
@@ -369,6 +405,7 @@ jobs:
--llvm-path "${{ steps.libclang.outputs.libclang_dir }}"
--with-tests
${CDB_OPTION}
${ELFUTILS_OPTION}
--add-config=-DCMAKE_C_COMPILER_LAUNCHER=ccache
--add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
--add-config=-DIDE_REVISION_URL=https://github.com/$ENV{GITHUB_REPOSITORY}/commits/$ENV{GITHUB_SHA}

View File

@@ -349,6 +349,11 @@ function(enable_pch target)
file(GENERATE
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/empty_pch.cpp
CONTENT "/*empty file*/")
set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/empty_pch.c
${CMAKE_CURRENT_BINARY_DIR}/empty_pch.cpp
PROPERTIES GENERATED TRUE)
_add_pch_target(QtCreatorPchGui
"${PROJECT_SOURCE_DIR}/src/shared/qtcreator_gui_pch.h" Qt5::Widgets)
_add_pch_target(QtCreatorPchConsole

View File

@@ -138,6 +138,8 @@ function(add_translation_targets file_prefix)
add_custom_target("${_arg_ALL_QM_TARGET}" ALL COMMENT "Generate .qm-files")
endif()
file(MAKE_DIRECTORY ${_arg_OUTPUT_DIRECTORY})
foreach(l IN ITEMS ${_arg_LANGUAGES})
set(_ts_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_prefix}_${l}.ts")
set(_qm_file "${_arg_OUTPUT_DIRECTORY}/${file_prefix}_${l}.qm")

227
dist/changes-4.13.0.md vendored Normal file
View File

@@ -0,0 +1,227 @@
Qt Creator 4.13
===============
Qt Creator version 4.13 contains bug fixes and new features.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline origin/4.12..v4.13.0
General
-------
* Added experimental support for Meson projects
* Added experimental support for IncrediBuild
* Moved view related menu items to separate toplevel `View` menu (QTCREATORBUG-23610)
* Added basic `Install Plugin` wizard to `About Plugins` dialog
* Added support for multiple shortcuts per action (QTCREATORBUG-72)
* Added sections to marketplace browser (QTCREATORBUG-23808)
Help
----
* Adapted to new filter engine in Qt 5.15
Editing
-------
* Added option for excluding file patterns from whitespace cleanup (QTCREATORBUG-13358)
* Fixed issue with resolving highlighting definitions (QTCREATORBUG-7906)
### C++
* Updated to LLVM 10
* Added editor tool button for `Analyze File` (QTCREATORBUG-23348)
* Added `Add forward declaration` refactoring action (QTCREATORBUG-23444)
* Extended `Add Include` refactoring action to non-Qt classes (QTCREATORBUG-21)
* Fixed indentation with C++11 list initialization (QTCREATORBUG-16977, QTCREATORBUG-24035)
* Fixed indentation with trailing return types (QTCREATORBUG-23502)
* Fixed issue with `std::chrono::time_point` (QTCREATORBUG-24067)
* Fixed detection of `noexcept` as change of function signature (QTCREATORBUG-23895)
* Fixed `Extract Function` with namespaces (QTCREATORBUG-23256)
* Fixed `Find Usages` for `shared_ptr` with MSVC (QTCREATORBUG-7866)
* Fixed completion for `std::pair` with MSVC
* Fixed issues with anonymous enums (QTCREATORBUG-7487)
* Fixed that inaccessible members were offered in completion (QTCREATORBUG-1984)
* Fixed refactoring for operators (QTCREATORBUG-6236)
* Fixed issues with resolving overloads in presence of default arguments (QTCREATORBUG-17807)
* Fixed sorting in completion (QTCREATORBUG-6242)
* Fixed that find usages was finding function arguments when searching functions (QTCREATORBUG-2176)
* Fixed crash in lexer (QTCREATORBUG-19525)
### Language Client
* Added support for renaming symbols (QTCREATORBUG-21578)
* Added highlighting of code range for diagnostics
* Added tooltips for diagnostics
* Fixed various issues with completion, outline, files with spaces, and synchronization
### QML
* Added support for moving functions in outline (QTCREATORBUG-21993)
* Fixed issues with Qt 5.15 imports
* Fixed updating of outline (QTCREATORBUG-21335)
* Fixed resolution of easing curve (QTCREATORBUG-24142)
### Python
* Added tool button for opening interactive Python, optionally importing current file
### Diff Viewer
* Added option to select encoding (QTCREATORBUG-23835)
### Model Editor
* Improved intersection computation
### QRC
* Added option to sort file list
Projects
--------
* Improved responsiveness of project loading (QTCREATORBUG-18533)
* Improved handling of custom project settings when a kit is removed (QTCREATORBUG-23023)
* Improved editing of path list entries in environment settings (QTCREATORBUG-20965)
* Unified compile and application output parsing (QTCREATORBUG-22665)
* Added option to remove similar files when removing a file (QTCREATORBUG-23869)
* Added support for custom output parsers (QTCREATORBUG-23993)
* Fixed responsiveness with large messages in `Compile Output` (QTCREATORBUG-23944)
* Fixed issue with macros at the start of paths (QTCREATORBUG-24095)
### Wizards
* Added heuristics for finding header to include for non-standard base class (QTCREATORBUG-3855)
* Added information about default suffix for file wizards (QTCREATORBUG-23621)
### CMake
* Removed internal cache of CMake configuration options, which removes conflicts between internal
cache and existing configuration in build directory (QTCREATORBUG-23218)
* Removed support for server-mode (CMake < 3.14) (QTCREATORBUG-23915)
* Removed defaulting to `CodeBlocks` extra generator
* Added option to provide arguments for initial CMake configuration (QTCREATORBUG-16296,
QTCREATORBUG-18179)
* Added option to provide arguments to `cmake --build` (QTCREATORBUG-24088)
* Added option to build several targets simultaneously
* Fixed that special build targets were missing from target list (QTCREATORBUG-24064)
* Fixed that triggering a build did not ask for applying changed CMake configuration
(QTCREATORBUG-18504)
### Compilation Database
* Fixed that `-fpic` was removed from compiler commands (QTCREATORBUG-24106)
Debugging
---------
* Added option to reset all formats for watches to default
Analyzer
--------
### Clang
* Re-added editor text marks for diagnostics (QTCREATORBUG-23349)
* Changed to use separate `clazy-standalone` executable
* Fixed issue with `clang-tidy` and `WarningsAsErrors` (QTCREATORBUG-23423)
Version Control Systems
-----------------------
### Git
* Added option to open `git-bash` (Windows, `Tools` > `Git` > `Git Bash`)
* Added colors to log (QTCREATORBUG-19624)
Test Integration
----------------
* Added support for Catch test framework (QTCREATORBUG-19740)
### Google Test
Code Pasting
------------
* Added option for public or private pastes (QTCREATORBUG-23972)
Platforms
---------
### Linux
* Fixed issues with memory not being released (QTCREATORBUG-22832)
### Android
* Removed Ministro deployment option (QTCREATORBUG-23761)
* Added service editor to manifest editor (QTCREATORBUG-23937)
* Added splash screen editor to manifest editor (QTCREATORBUG-24011, QTCREATORBUG-24013)
* Fixed debugging on x86 and armv7 architectures (QTCREATORBUG-24191)
* Fixed issue with long kit names (QTBUG-83875)
### Bare Metal
* Added support for peripheral registers view using UVSC provider
* Added support for Keil C251 toolchain
* Added support for Keil C166 toolchain
* Added support for RISC-V architecture
* Added support for various Renesas architectures
Credits for these changes go to:
--------------------------------
Aleksei German
Alessandro Portale
Alexis Jeandet
Alexis Murzeau
Andre Hartmann
André Pönitz
Assam Boudjelthia
Christian Kamm
Christian Kandeler
Christian Stenger
Cristian Adam
David Schulz
Denis Shienkov
Eike Ziller
Federico Guerinoni
Henning Gruendl
Ivan Komissarov
Jaroslaw Kobus
Jochen Becher
Jochen Seemann
Johanna Vanhatapio
Joni Poikelin
Junker, Gregory
Knud Dollereder
Lars Knoll
Leena Miettinen
Mahmoud Badri
Marco Bubke
Michael Brüning
Michael Winkelmann
Miikka Heikkinen
Mitch Curtis
Nikolai Kosjar
Oliver Wolff
Or Kunst
Orgad Shaneh
Philip Van Hoof
Robert Löhning
Tarja Sundqvist
Thiago Macieira
Thomas Hartmann
Tim Jenssen
Tobias Hunger
Unseon Ryu
Viacheslav Tertychnyi
Ville Nummela
Ville Voutilainen
Volodymyr Zibarov
Yuya Nishihara

View File

@@ -16,6 +16,7 @@ macro.macos = "macOS"
macro.note = "\\b{Note:}"
macro.oslash.HTML = "&oslash;"
macro.ouml.HTML = "&ouml;"
macro.Q3DS = "Qt 3D Studio"
macro.QA = "Qt Assistant"
macro.QB = "Qt Bridge"
macro.QBPS = "Qt Bridge for Adobe Photoshop"

View File

@@ -32,7 +32,7 @@
/*!
\page creator-quick-tour.html
\if defined(qtdesignstudio)
\previouspage exporting-from-maya.html
\previouspage exporting-from-qt3ds.html
\else
\previouspage creator-overview.html
\endif

View File

@@ -256,6 +256,7 @@
\li \l{Setting Up an Autotools Project}
\li \l{Setting Up a Generic Project}
\li \l{Setting Up Nimble}
\li \l{Setting Up Meson}
\endlist
\li \l{Using Command Line Options}
\li \l{Keyboard Shortcuts}

View File

@@ -44,6 +44,7 @@ excludedirs += ../../qtcreator/examples/accelbubble \
../../qtcreator/src/ios \
../../qtcreator/src/linux-mobile \
../../qtcreator/src/mcu \
../../qtcreator/src/meson \
../../qtcreator/src/overview/creator-only \
../../qtcreator/src/projects \
../../qtcreator/src/qnx \

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -44,7 +44,9 @@
\li \l{Setting Up Qt Bridge for Sketch}
\li \l{Using Qt Bridge for Sketch}
\endlist
\li \l{Exporting from Blender}
\li \l{Exporting from Maya}
\li \l{Exporting from Qt 3D Studio}
\endlist
\li \l{User Interface}
\list

View File

@@ -195,5 +195,6 @@
\list
\li \l{Exporting from Blender}{Blender}
\li \l{Exporting from Maya}{Maya}
\li \l{Exporting from Qt 3D Studio}{Qt 3D Studio}
\endlist
*/

View File

@@ -29,7 +29,7 @@
\page exporting-from-maya.html
\previouspage exporting-from-blender.html
\if defined (qtdesignstudio)
\nextpage creator-quick-tour.html
\nextpage exporting-from-maya.html
\else
\nextpage studio-importing-3d.html
\endif

View File

@@ -0,0 +1,333 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt 3D Studio.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\page exporting-from-qt3ds.html
\previouspage exporting-from-maya.html
\nextpage creator-quick-tour.html
\title Exporting from Qt 3D Studio
Use the following guidelines to achieve the best results when converting
projects from \Q3DS to \QDS.
\section1 Best Practices
\list
\li If something in UI is clearly 2D, do not import it from \Q3DS
presentation. Implement it directly in \QDS.
\li QML streams cannot be imported as QML elements directly into \QDS.
They need to be copied manually since there is no import functionality
for QML files in \QDS.
\li If you do import the whole \Q3DS project (\c .uia file), use only the
parts you actually need from it. Use \uicontrol
{Move Component Into Separate File} for the parts you need, and
eventually delete all the rest from the project structure.
\li There are extra levels of \c Node elements in most imported QML files,
and they should be removed for improved performance. As a rule of thumb,
each Node that has only one child is considered an extra level that
should be deleted.
\li \Q3DS \e slides become \QDS \e states, and there may be problems
with state changes. Always go through each of the state changes to make
sure they work correctly.
\endlist
\section1 Importing Assets
\section2 Custom Materials
Custom materials (\e something.shader files in \Q3DS) are not imported
correctly, and have to be fixed manually.
\list
\li They are imported as \c {CustomMaterial { id: something; source:
"something" }} that neither works nor does anything.
\li Remove the \e {source: "something"} altogether.
\li Vertex shader part from the \e something.shader needs to be copied to
\c {Shader { stage: Shader.Vertex; shader: "vertex shader code here" }}
inside the \c CustomMaterial. Fragment shader part needs to be copied
to \c {Shader { stage: Shader.Fragment; shader: "fragment shader code
here" }}.
\li Properties in \e Metadata of the \e something.shader need to be
introduced manually as QML properties of the same name and correct type
inside the \c CustomMaterial element.
\li Add \c {import QtQuick3D.Materials 1.15} import statement to files that
have \c CustomMaterial elements.
\li If custom material uses textures, they are not imported automatically
and must be manually added to the project structure.
\li Many custom materials are not rendered in \uicontrol {3D Editor} or
\uicontrol {Form Editor} views due to an open bug in \QDS 1.5. The
project needs to be run for them to appear.
\endlist
\section2 Standard Materials
Some properties of standard materials may not be imported correctly.
\list
\li The sensible value ranges of some properties may have changed between
\Q3DS and \QDS and need to be redefined manually.
\li Extra properties may be added and can be removed manually.
\endlist
\section2 Models
Models have some extra properties (tessellations), which can be removed.
\section1 Example: Converting MyOwnCluster Project from \Q3DS to \QDS
\image exporting-from-qt3ds/porting-example-myowncluster.png "My Own Cluster project in Qt 3D Studio"
\e {My Own Cluster project in \Q3DS}
The following steps describe how to convert the My Own Cluster project from
\Q3DS to \QDS.
\section2 Creating a New Project in \QDS
\list 1
\li To create a new project in \QDS, select \uicontrol {File > New File or
Project}, or select \uicontrol {New Project} in the Welcome mode.
\image exporting-from-qt3ds/01-welcome-screen.png "Welcome mode in Qt Design Studio"
\li Creating a new project in \QDS is aided by a wizard that contains
templates for creating different types of projects. Choose the
\uicontrol {Qt Quick 3D Application} template to get started with your
new 3D project.
\image exporting-from-qt3ds/02-create-new-project.png "Create a new Project in Qt Design Studio"
\li In the \uicontrol Name field, enter a name for the project.
In the \uicontrol {Create in} field, enter the path for the project
files, and then select \uicontrol Next.
\image exporting-from-qt3ds/03-folder-and-project-name.png "Project location and name"
\li In the \uicontrol {Screen resolution} field, select the screen
resolution for previewing the UI on the desktop or on a device.
You must select one of the predefined screen resolutions, which will
later be altered to match the width and height of the original project.
In the \uicontrol {Qt Quick Controls Style} field, select one of the
predefined UI styles to use, and then select \uicontrol Finish.
\image exporting-from-qt3ds/04-project-size.png "Select the screen resolution for the project"
\li Your new project has now been created. For more information on
creating projects in \QDS, see \l {Creating Projects}.
For more information on how to get started with \QDS, see
\l {Getting Started}.
\image exporting-from-qt3ds/05-new-project-created.png "New project in Qt Design Studio"
\endlist
\section2 Getting Started with MyOwnCluster
\list 1
\li Return to your project in \Q3DS to check the size of the presentation.
Select \uicontrol {Edit} > \uicontrol {Presentation Settings} to see the
values for \uicontrol {Width x Height}.
\image exporting-from-qt3ds/06-check-screen-size-in-qt3ds-project.png "Check screen size in Qt 3D Studio presentation"
\li Adjust the canvas size of your project in \QDS according to the screen
size in \Q3DS presentation by editing the \c Constants.qml file in
\uicontrol {Text Editor}. If you cannot see the \uicontrol {Text Editor}
view, select \uicontrol Window > \uicontrol {Views}, and then select the
\uicontrol {Text Editor} checkbox. In the \uicontrol Projects view, open
the imports subfolder, then the subfolder named after your project, and
double-click \c Constants.qml. Edit the values for \e {readonly property
int width} and \e {readonly property int height} to match the \uicontrol
{Width x Height} values in \Q3DS presentation.
\image exporting-from-qt3ds/07-screen-size-in-text-editor.png "Adjust the canvas size"
\li To delete the placeholders created by the wizard, multiselect \uicontrol
Text and \uicontrol view3D components (\key Ctrl + mouse left click) in
\uicontrol Navigator, then right click on the selected items, and select
\uicontrol Edit > \uicontrol Delete.
\image exporting-from-qt3ds/08-delete-placeholders.png "Delete placeholders in Navigator"
\endlist
\section2 Importing Assets
\list 1
\li In the \uicontrol Library view, select \uicontrol {Add New Assets}.
\image exporting-from-qt3ds/09-add-new-assets.png
\li Select the \c .uia file for the \Q3DS project you wish to import, and
then select \uicontrol Open.
\image exporting-from-qt3ds/10-find-project-file.png "Find the uia file in file explorer"
\li Select \uicontrol Import, and after the import is complete, select \uicontrol
Close.
\image exporting-from-qt3ds/11-import.png "Import the file"
\li The 2D assets imported from \Q3DS now appear in \uicontrol Library
under \uicontrol Assets tab.
\image exporting-from-qt3ds/12-imported-image-assets.png "Imported assets in Library"
\li The QML components generated from the imported \Q3DS project now appear
as available imports in \uicontrol Library under \uicontrol {QML Types}.
Select \uicontrol Quick3DAssets.MyOwnCluster to import them to your
project.
\image exporting-from-qt3ds/13-myowncluster-in-qml-types.png "Available imports in QML Types"
\li The imported QML types now appear in \uicontrol Library and can be added
to the project.
\image exporting-from-qt3ds/14-add-myowncluster-to-project.png "MyOwnCluster in Library"
\endlist
\section2 Adding Components to the Project
\list 1
\li Drag \uicontrol MyOwnCluster from \uicontrol {My Quick3D Components}
in \uicontrol Library to \uicontrol {Form Editor}.
\image exporting-from-qt3ds/15-drag-to-project.png "Drag MyOwnCluster to Form Editor"
\li In \uicontrol Navigator, right click on myOwnCluster and select \uicontrol
{Go into Component}.
\image exporting-from-qt3ds/16-go-into-component.png "Go into component My Own Cluster"
\li Find the offending line in \uicontrol {Text Editor}.
\image exporting-from-qt3ds/17-offending-line.png
\li Comment out the offending line by placing two slashes in the beginning
of it (or remove the line).
\image exporting-from-qt3ds/17b-commented-out.png
\li In Navigator, go to each component of the project and comment out
(or remove) any offending lines you find.
\image exporting-from-qt3ds/18-repeat-where-needed.png
\li You should now see some parts of the project in \uicontrol {Form Editor}.
\image exporting-from-qt3ds/19-see-form-editor.png "Project in Form Editor"
\endlist
\section2 Converting 3D Elements
\list 1
\li Drag subpresentation_ADAS from \uicontrol {My QML Components} in \uicontrol
Library into layer folder in \uicontrol Navigator.
\image exporting-from-qt3ds/20-drag-subpresentation-adas-into-layer.png "Drag into layer"
\li To delete the old subpresentation rectangle, right-click on the file
name (subpresentation_ADAS2_u52017 in this project), select
\uicontrol Edit > \uicontrol Delete.
\li Go into the component subpresentation_ADAS.
\image exporting-from-qt3ds/22-go-into-subpresentation-adas.png "Go into component"
\li Reposition objects and/or camera in \uicontrol {3D Editor} according to
the original \Q3DS project. The desired scene may be achieved
simply by changing the z position sign from positive to negative, or
vice versa, in some cases.
For more information on how to edit a scene in \uicontrol {3D Editor},
see \l {Working in 3D Editor}.
\image exporting-from-qt3ds/23-replace-objects.png "Replace objects in 3D Editor"
\li Recreate animations in subpresentation_ADAS according to the original
project. For more information on creating animations in \QDS, see
\l {Creating Animations}.
\image exporting-from-qt3ds/24-recreate-animations.png "Recreate animations"
\li Go to the \uicontrol Timeline View to review the timeline for the
project.
\image exporting-from-qt3ds/25-adas-timeline.png "ADAS timeline view"
\endlist
\section2 Converting 2D Elements
\list 1
\li Recreate the 2D elements of the original project (in all layers) using
the 2D QML elements available in \QDS. You can use the imported 2D layer
as a guide for recreating the elements. If the 2D elements in the
original project have rotations, especially in a 3D layer, make sure to
add rotations that mimic the original ones to the \QDS project. For
example, rotation on one axis with perspective camera requires rotation
on two axes in pure 2D. You may need to use \uicontrol {Text Editor}
to achieve rotation similar to the rotation of the object in \Q3DS.
For more information on specifying advanced transformations on
\uicontrol Items, see \l Transform.
\image exporting-from-qt3ds/26-recreate-2d-elements.png "Recreate 2D elements"
\li To delete the 2D layer (telltaleLayer_u39332) in \uicontrol Navigator
after recreating the 2D elements, right-click on the component, and
select \uicontrol Edit > \uicontrol Delete.
\image exporting-from-qt3ds/27-delete-2d-layer.png "Delete the 2D layer"
\li Next, you need to delete the 2D elements from the 3D layer (speed_u20335
and rPM_u10371 from layer_32325). Right-click on the element, and
select \uicontrol Edit > \uicontrol Delete.
\image exporting-from-qt3ds/28-delete-2d-elements-from-3d-layer.png "Delete old 2D elements from the 3D layer"
\li Recreate the animations for 2D elements the same way it was done for the
3D elements.
\endlist
\section2 Converting QML Streams
\list 1
\li Find QML stream files in file explorer.
\image exporting-from-qt3ds/30-find-qml-stream-files-in-file-explorer.png "Find the QML stream file"
\li Move the QML stream files under the import's main folder (one level up
in this example).
\image exporting-from-qt3ds/31-move-under-myowncluster.png "Move the QML stream files under the import's main folder"
\li Make sure that the QML stream file names start with a capital letter
to enable \QDS to recognize them as QML component files.
\image exporting-from-qt3ds/32-rename-the-qml-stream-file.png "The QML stream file names should start with a capital letter"
\li Return to \QDS and enter the MyOwnCluster component. The QML stream
component now appears in \uicontrol {My QML Components}.
\image exporting-from-qt3ds/33-see-qml-stream-component-in-myqmlcomponents.png "QML stream in My QML Components"
\li Drag and drop the QML stream component to MyOwnCluster in \uicontrol
Navigator.
\image exporting-from-qt3ds/34-drag-to-myowncluster-in-navigator.png "Drag the QML stream component to MyOwnCluster"
\li Go to the \uicontrol States view and use the \uicontrol Visibility tab
in the \uicontrol Properties view to make the QML stream component
visible only in the correct state.
\image exporting-from-qt3ds/35-visible-states.png "Make components visible in correct states"
\li Next, recreate the animations for the QML stream according to the original project.
\image exporting-from-qt3ds/36-recreate-qml-animations.png "Recreate animations"
\li Recreate all the keyframes for the imported QML stream that is now a
component.
\image exporting-from-qt3ds/37-recreate-keyframes.png "Recreate keyframes"
\endlist
\section2 Cleaning Up the Project Structure
\list 1
\li Go to file explorer and clean up the project structure deleting
the folder and files that are not used in the \QDS project.
\image exporting-from-qt3ds/38-delete-unnecessary-folders.png "Delete folders in file explorer"
\li Individual files can also be deleted in the \uicontrol {Projects} view
in \QDS. To delete a file, right-click on it, select \uicontrol
{Delete File}, and then select \uicontrol Yes.
\image exporting-from-qt3ds/39-delete-individual-files-in-qds.png "Delete individual files"
\li This is the project structure after clean-up.
\image exporting-from-qt3ds/40-done.png "Project structure after clean-up"
\endlist
\section2 Finished
You have now converted your \Q3DS project to \QDS.
\image exporting-from-qt3ds/41-finished-qds-project.png
*/

View File

@@ -1,15 +1,15 @@
{
"common": {
"sdk_tools_url": {
"linux": "https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip",
"linux_sha256": "92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9",
"windows": "https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip",
"windows_sha256": "7e81d69c303e47a4f0e748a6352d85cd0c8fd90a5a95ae4e076b5e5f960d3c7a",
"mac": "https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip",
"mac_sha256": "ecb29358bc0f13d7c2fa0f9290135a5b608e38434aad9bf7067d0252c160853e"
"linux": "https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip",
"linux_sha256": "89f308315e041c93a37a79e0627c47f21d5c5edbe5e80ea8dc0aac8a649e0e92",
"windows": "https://dl.google.com/android/repository/commandlinetools-win-6609375_latest.zip",
"windows_sha256": "40bba20275180194bebf89bb58c74d712bb93cc401f36bd2f8f32383acf9826c",
"mac": "https://dl.google.com/android/repository/commandlinetools-mac-6609375_latest.zip",
"mac_sha256": "2c3822db1c916655223e5ee8ce0fbf6b73d0b99012045c9dc8eaa6a5736c0c55"
},
"sdk_essential_packages": {
"default": ["platform-tools", "platforms;android-29"],
"default": ["platform-tools", "platforms;android-29", "cmdline-tools;latest"],
"linux": [],
"mac": [],
"windows": ["extras;google;usb_driver"]

View File

@@ -3201,13 +3201,17 @@ class DumperBase():
val.laddress = self.pointer()
if val.laddress is None and self.laddress is not None:
val.laddress = self.laddress
val.type = self.dumper.nativeDynamicType(val.laddress, self.type.dereference())
val.type = self.type.dereference()
if self.dumper.useDynamicType:
val.type = self.dumper.nativeDynamicType(val.laddress, val.type)
else:
val = self.dumper.nativeValueDereferenceReference(self)
elif self.type.code == TypeCode.Pointer:
if self.nativeValue is None:
val.laddress = self.pointer()
val.type = self.dumper.nativeDynamicType(val.laddress, self.type.dereference())
val.type = self.type.dereference()
if self.dumper.useDynamicType:
val.type = self.dumper.nativeDynamicType(val.laddress, val.type)
else:
val = self.dumper.nativeValueDereferencePointer(self)
else:
@@ -3662,7 +3666,9 @@ class DumperBase():
% type(targetTypish))
val = self.Value(self)
val.ldata = self.toPointerData(targetAddress)
targetType = self.createType(targetTypish).dynamicType(targetAddress)
targetType = self.createType(targetTypish)
if self.useDynamicType:
targetType = targetType.dynamicType(targetAddress)
val.type = self.createPointerType(targetType)
return val
@@ -3675,7 +3681,8 @@ class DumperBase():
% type(targetType))
val = self.Value(self)
val.ldata = self.toPointerData(targetAddress)
targetType = targetType.dynamicType(targetAddress)
if self.useDynamicType:
targetType = targetType.dynamicType(targetAddress)
val.type = self.createReferenceType(targetType)
return val
@@ -3848,7 +3855,8 @@ class DumperBase():
if self.isInt(datish): # Used as address.
#DumperBase.warn('CREATING %s AT 0x%x' % (val.type.name, datish))
val.laddress = datish
val.type = val.type.dynamicType(datish)
if self.useDynamicType:
val.type = val.type.dynamicType(datish)
return val
if isinstance(datish, bytes):
#DumperBase.warn('CREATING %s WITH DATA %s' % (val.type.name, self.hexencode(datish)))

View File

@@ -229,10 +229,11 @@ class Dumper(DumperBase):
def fromFrameValue(self, nativeValue):
#DumperBase.warn('FROM FRAME VALUE: %s' % nativeValue.address)
val = nativeValue
try:
val = nativeValue.cast(nativeValue.dynamic_type)
except:
pass
if self.useDynamicType:
try:
val = nativeValue.cast(nativeValue.dynamic_type)
except:
pass
return self.fromNativeValue(val)
def fromNativeValue(self, nativeValue):
@@ -1151,7 +1152,9 @@ class Dumper(DumperBase):
def nativeValueDereferencePointer(self, value):
# This is actually pretty expensive, up to 100ms.
deref = value.nativeValue.dereference()
return self.fromNativeValue(deref.cast(deref.dynamic_type))
if self.useDynamicType:
deref = deref.cast(deref.dynamic_type)
return self.fromNativeValue(deref)
def nativeValueDereferenceReference(self, value):
nativeValue = value.nativeValue

View File

@@ -543,15 +543,60 @@ Item {
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton
onClicked: {
hoverEnabled: false
property MouseArea3D freeDraggerArea
property point pressPoint
property bool initialMoveBlock: false
onPressed: {
if (viewRoot.editView) {
var pickResult = viewRoot.editView.pick(mouse.x, mouse.y);
handleObjectClicked(_generalHelper.resolvePick(pickResult.objectHit),
mouse.modifiers & Qt.ControlModifier);
if (!pickResult.objectHit)
if (pickResult.objectHit) {
if (transformMode === EditView3D.TransformMode.Move)
freeDraggerArea = moveGizmo.freeDraggerArea;
else if (transformMode === EditView3D.TransformMode.Rotate)
freeDraggerArea = rotateGizmo.freeDraggerArea;
else if (transformMode === EditView3D.TransformMode.Scale)
freeDraggerArea = scaleGizmo.freeDraggerArea;
pressPoint.x = mouse.x;
pressPoint.y = mouse.y;
initialMoveBlock = true;
} else {
mouse.accepted = false;
}
}
}
onPositionChanged: {
if (freeDraggerArea) {
if (initialMoveBlock && Math.abs(pressPoint.x - mouse.x) + Math.abs(pressPoint.y - mouse.y) > 10) {
// Don't force press event at actual press, as that puts the gizmo
// in free-dragging state, which is bad UX if drag is not actually done
freeDraggerArea.forcePressEvent(pressPoint.x, pressPoint.y);
freeDraggerArea.forceMoveEvent(mouse.x, mouse.y);
initialMoveBlock = false;
} else {
freeDraggerArea.forceMoveEvent(mouse.x, mouse.y);
}
}
}
function handleRelease(mouse)
{
if (freeDraggerArea) {
if (initialMoveBlock)
freeDraggerArea.forceReleaseEvent(pressPoint.x, pressPoint.y);
else
freeDraggerArea.forceReleaseEvent(mouse.x, mouse.y);
freeDraggerArea = null;
}
}
onReleased: handleRelease(mouse)
onCanceled: handleRelease(mouse)
}
DropArea {

View File

@@ -38,6 +38,7 @@ Node {
|| planeX.dragging || planeY.dragging || planeZ.dragging
|| centerBall.dragging
property MouseArea3D dragHelper: null
property alias freeDraggerArea: centerBall.mouseArea
position: dragHelper.pivotScenePosition(targetNode)

View File

@@ -37,6 +37,7 @@ Model {
property bool dragging: mouseArea.dragging
property bool active: false
property MouseArea3D dragHelper: null
property alias mouseArea: mouseArea
readonly property bool hovering: mouseArea.hovering

View File

@@ -39,6 +39,7 @@ Node {
property MouseArea3D dragHelper: null
property real currentAngle
property point currentMousePos
property alias freeDraggerArea: mouseAreaFree
position: dragHelper.pivotScenePosition(targetNode)

View File

@@ -37,6 +37,7 @@ Node {
|| planeX.dragging || planeY.dragging || planeZ.dragging
|| centerMouseArea.dragging
property MouseArea3D dragHelper: null
property alias freeDraggerArea: centerMouseArea
position: dragHelper.pivotScenePosition(targetNode)

View File

@@ -512,6 +512,32 @@ double MouseArea3D::getRelativeScale(QQuick3DNode *node) const
return (scenePos1 - scenePos2).length() / 100.;
}
void MouseArea3D::forcePressEvent(double x, double y)
{
m_forceCaptureNextPress = true;
Qt::MouseButtons buttons;
Qt::KeyboardModifiers mods;
QMouseEvent event(QEvent::MouseButtonPress, QPointF(x, y), Qt::LeftButton, buttons, mods);
eventFilter(m_view3D, &event);
}
void QmlDesigner::Internal::MouseArea3D::forceMoveEvent(double x, double y)
{
Qt::MouseButtons buttons;
Qt::KeyboardModifiers mods;
QMouseEvent event(QEvent::MouseMove, QPointF(x, y), Qt::LeftButton, buttons, mods);
eventFilter(m_view3D, &event);
}
void QmlDesigner::Internal::MouseArea3D::forceReleaseEvent(double x, double y)
{
Qt::MouseButtons buttons;
Qt::KeyboardModifiers mods;
QMouseEvent event(QEvent::MouseButtonRelease, QPointF(x, y), Qt::LeftButton, buttons, mods);
eventFilter(m_view3D, &event);
}
QVector3D MouseArea3D::getMousePosInPlane(const MouseArea3D *helper,
const QPointF &mousePosInView) const
{
@@ -535,7 +561,8 @@ QVector3D MouseArea3D::getMousePosInPlane(const MouseArea3D *helper,
bool MouseArea3D::eventFilter(QObject *, QEvent *event)
{
if (!m_active || (m_grabsMouse && s_mouseGrab && s_mouseGrab != this
&& (m_priority <= s_mouseGrab->m_priority || s_mouseGrab->m_dragging))) {
&& (m_priority <= s_mouseGrab->m_priority || s_mouseGrab->m_dragging
|| s_mouseGrab->m_forceCaptureNextPress))) {
return false;
}
@@ -596,7 +623,8 @@ bool MouseArea3D::eventFilter(QObject *, QEvent *event)
m_dragHelper->setScale(sceneScale());
}
m_mousePosInPlane = getMousePosInPlane(m_dragHelper, mouseEvent->pos());
if (mouseOnTopOfMouseArea(m_mousePosInPlane, mouseEvent->pos())) {
if (m_forceCaptureNextPress || mouseOnTopOfMouseArea(m_mousePosInPlane, mouseEvent->pos())) {
m_forceCaptureNextPress = false;
setDragging(true);
emit pressed(m_mousePosInPlane.toVector2D(), mouseEvent->pos(), pickAngle);
if (m_grabsMouse) {

View File

@@ -116,6 +116,10 @@ public slots:
Q_INVOKABLE QVector3D pivotScenePosition(QQuick3DNode *node) const;
Q_INVOKABLE double getRelativeScale(QQuick3DNode *node) const;
Q_INVOKABLE void forcePressEvent(double x, double y);
Q_INVOKABLE void forceMoveEvent(double x, double y);
Q_INVOKABLE void forceReleaseEvent(double x, double y);
signals:
void view3DChanged();
@@ -171,6 +175,7 @@ private:
qreal m_minAngle = 0.;
QQuick3DNode *m_pickNode = nullptr;
MouseArea3D *m_dragHelper = nullptr;
bool m_forceCaptureNextPress = false;
};
}

View File

@@ -1,86 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
import QtQuick 2.1
import QtQuick.Controls 1.1 as Controls
import QtQuick.Controls.Styles 1.2
import QtQuickDesignerTheme 1.0
ComboBoxStyle {
property color textColor: Theme.color(Theme.PanelTextColorLight)
__editor: Item {
}
padding.left: 20
background: Item {
implicitWidth: 120
implicitHeight: 24
Rectangle {
anchors.fill: parent
visible: !control.pressed
color: Theme.qmlDesignerButtonColor()
border.color: Theme.qmlDesignerBorderColor()
border.width: 1
}
Rectangle {
color: Theme.qmlDesignerBackgroundColorDarker()
anchors.fill: parent
visible: control.pressed
border.color: Theme.qmlDesignerBorderColor()
border.width: 1
}
Image {
id: imageItem
width: 8
height: 4
source: "image://icons/down-arrow"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 8
opacity: control.enabled ? 1 : 0.5
}
}
label: Text {
id: textitem
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
text: control.currentText
renderType: Text.NativeRendering
color: control.textColor
}
__dropDownStyle: MenuStyle {
__maxPopupHeight: 600
__menuItemType: "comboboxitem"
frame: Rectangle {
}
}
}

View File

@@ -1,74 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
import QtQuick 2.1
import QtQuick.Controls 1.1 as Controls
import QtQuick.Controls.Styles 1.1
import QtQuickDesignerTheme 1.0
SpinBoxStyle {
selectionColor: Theme.color(Theme.PanelTextColorLight)
selectedTextColor: Theme.color(Theme.PanelTextColorMid)
textColor: spinBox.textColor
padding.top: 2
padding.bottom: 2
padding.right: 18
padding.left: 12
incrementControl: Item {
implicitWidth: 14
implicitHeight: parent.height/2
opacity: styleData.upEnabled ? styleData.upPressed ? 0.5 : 1 : 0.5
Image {
width: 8
height: 4
source: "image://icons/up-arrow"
x: 1
y: 5
}
}
decrementControl: Item {
implicitWidth: 14
implicitHeight: parent.height/2
opacity: styleData.downEnabled ? styleData.downPressed ? 0.5 : 1 : 0.5
Image {
width: 8
height: 4
source: "image://icons/down-arrow"
x: 1
y: 3
}
}
background: Rectangle {
implicitWidth: Math.max(64, styleData.contentWidth)
implicitHeight: 24
color: Theme.qmlDesignerBackgroundColorDarker()
border.color: Theme.qmlDesignerBorderColor()
}
}

View File

@@ -1,239 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
import QtQuick 2.1
import QtQuick.Controls 1.0 as Controls
import QtQuick.Window 2.0
import QtQuick.Controls.Styles 1.1
import "Constants.js" as Constants
import QtQuickDesignerTheme 1.0
Item {
width: 14
height: 14
id: extendedFunctionButton
property variant backendValue
property string icon: "image://icons/placeholder"
property string hoverIcon: "image://icons/submenu"
property bool active: true
signal reseted
function setIcon() {
if (backendValue == null) {
extendedFunctionButton.icon = "image://icons/placeholder"
} else if (backendValue.isBound) {
if (backendValue.isTranslated) {
//translations are a special case
extendedFunctionButton.icon = "image://icons/placeholder"
} else {
extendedFunctionButton.icon = "image://icons/expression"
}
} else {
if (backendValue.complexNode != null
&& backendValue.complexNode.exists) {
} else {
extendedFunctionButton.icon = "image://icons/placeholder"
}
}
}
onBackendValueChanged: {
setIcon()
}
property bool isBoundBackend: backendValue.isBound
property string backendExpression: backendValue.expression
onActiveChanged: {
if (active) {
setIcon()
opacity = 1
} else {
opacity = 0
}
}
onIsBoundBackendChanged: {
setIcon()
}
onBackendExpressionChanged: {
setIcon()
}
Image {
width: 14
height: 14
source: extendedFunctionButton.icon
anchors.centerIn: parent
}
MouseArea {
hoverEnabled: true
anchors.fill: parent
onHoveredChanged: {
if (containsMouse)
icon = hoverIcon
else
setIcon()
}
onClicked: {
menuLoader.show()
}
}
Loader {
id: menuLoader
active: false
function show() {
active = true
item.popup()
}
sourceComponent: Component {
Controls.Menu {
id: menu
onAboutToShow: {
exportMenuItem.checked = backendValue.hasPropertyAlias()
exportMenuItem.enabled = !backendValue.isAttachedProperty()
}
Controls.MenuItem {
text: qsTr("Reset")
onTriggered: {
transaction.start()
backendValue.resetValue()
backendValue.resetValue()
transaction.end()
extendedFunctionButton.reseted()
}
}
Controls.MenuItem {
text: qsTr("Set Binding")
onTriggered: expressionDialogLoader.show()
}
Controls.MenuItem {
id: exportMenuItem
text: qsTr("Export Property as Alias")
onTriggered: {
if (checked)
backendValue.exportPopertyAsAlias()
else
backendValue.removeAliasExport()
}
checkable: true
}
Controls.MenuItem {
text: qsTr("Insert Keyframe")
visible: hasActiveTimeline
onTriggered: insertKeyframe(backendValue.name)
}
}
}
}
Loader {
id: expressionDialogLoader
parent: itemPane
anchors.fill: parent
visible: false
active: visible
function show() {
expressionDialogLoader.visible = true
}
sourceComponent: Component {
Item {
id: expressionDialog
anchors.fill: parent
Component.onCompleted: {
textField.text = backendValue.expression
textField.forceActiveFocus()
}
Rectangle {
anchors.fill: parent
color: Theme.qmlDesignerBackgroundColorDarker()
opacity: 0.6
}
MouseArea {
anchors.fill: parent
onDoubleClicked: expressionDialog.visible = false
}
Rectangle {
x: 4
Component.onCompleted: {
var pos = itemPane.mapFromItem(
extendedFunctionButton.parent, 0, 0)
y = pos.y + 2
}
width: parent.width - 8
height: 260
radius: 2
color: Theme.qmlDesignerBackgroundColorDarkAlternate()
border.color: Theme.qmlDesignerBorderColor()
Label {
x: 8
y: 6
font.bold: true
text: qsTr("Binding Editor")
}
ExpressionTextField {
id: textField
onRejected: expressionDialogLoader.visible = false
onAccepted: {
backendValue.expression = textField.text.trim()
expressionDialogLoader.visible = false
}
anchors.fill: parent
anchors.leftMargin: 8
anchors.rightMargin: 8
anchors.topMargin: 24
anchors.bottomMargin: 32
}
}
}
}
}
}

View File

@@ -14,12 +14,8 @@ ColorEditor 2.0 ColorEditor.qml
ColorLine 2.0 ColorLine.qml
ColorLogic 2.0 ColorLogic.qml
ComboBox 2.0 ComboBox.qml
CustomCheckBoxStyle 2.0 CustomCheckBoxStyle.qml
CustomComboBoxStyle 2.0 CustomComboBoxStyle.qml
CustomSpinBoxStyle 2.0 CustomSpinBoxStyle.qml
EditableListView 2.0 EditableListView.qml
ExpandingSpacer 2.0 ExpandingSpacer.qml
ExtendedFunctionButton 2.0 ExtendedFunctionButton.qml
ExtendedFunctionLogic 2.0 ExtendedFunctionLogic.qml
FlickableSection 2.0 FlickableSection.qml
FontComboBox 2.0 FontComboBox.qml
@@ -28,7 +24,6 @@ FontStyleButtons 2.0 FontStyleButtons.qml
GradientLine 2.0 GradientLine.qml
GradientPresetList 2.0 GradientPresetList.qml
GradientPresetTabContent 2.0 GradientPresetTabContent.qml
GroupBox 2.0 GroupBox.qml
HueSlider 2.0 HueSlider.qml
IconLabel 2.0 IconLabel.qml
ItemFilterComboBox 2.0 ItemFilterComboBox.qml

View File

@@ -1,38 +1,24 @@
# This Python file uses the following encoding: utf-8
@if '%{Module}' === 'PySide2'
@if '%{ImportQtCore}'
from PySide2 import QtCore
@if '%{Module}' !== '<None>'
@if '%{ImportQtCore}' !== ''
from %{Module} import QtCore
@endif
@if '%{ImportQtWidgets}'
from PySide2 import QtWidgets
@if '%{ImportQtWidgets}' !== ''
from %{Module} import QtWidgets
@endif
@if '%{ImportQtQuick}'
from PySide2 import QtQuick
@endif
@else
@if '%{ImportQtCore}'
from PyQt5 import QtCore
@endif
@if '%{ImportQtWidgets}'
from PyQt5 import QtWidgets
@endif
@if '%{ImportQtQuick}'
from PyQt5 import QtQuick
@if '%{ImportQtQuick}' !== ''
from %{Module} import QtQuick
@endif
@endif
@if '%{Base}'
class %{Class}(%{Base}):
class %{Class}(%{FullBase}):
@else
class %{Class}:
@endif
def __init__(self):
@if '%{Base}' === 'QWidget'
QtWidgets.QWidget.__init__(self)
@elif '%{Base}' === 'QMainWindow'
QtWidgets.QMainWindow.__init__(self)
@elif '%{Base}' === 'QQuickItem'
QtQuick.QQuickItem.__init__(self)
@if %{JS: [ "QObject", "QWidget", "QMainWindow", "QQuickItem" ].indexOf("%Base")} >= 0
%{FullBase}.__init__(self)
@endif
pass

View File

@@ -12,7 +12,8 @@
"options":
[
{ "key": "Base", "value":"%{JS: value('BaseCB') === '' ? value('BaseEdit') : value('BaseCB')}" },
{ "key": "Imports", "value": "%{ImportQtCore}%{ImportQtWidgets}%{ImportQtDeclarative}"}
{ "key": "Package", "value": "%{JS: [ 'QWidget', 'QMainWindow' ].indexOf(value('Base')) >= 0 ? 'QtWidgets' : (value('Base') === 'QQuickItem' ? 'QtQuick' : (value('Base') === 'QObject' ? 'QtCore' : ''))}" },
{ "key": "FullBase", "value": "%{JS: value('Package') === '' ? value('Base') : value('Package') + '.' + value('Base')}" }
],
"pages":
@@ -32,11 +33,11 @@
},
{
"name": "Module",
"trDisplayName": "Python module:",
"trDisplayName": "Qt for Python module:",
"type": "ComboBox",
"data":
{
"items": ["PySide2", "PyQt5"]
"items": ["<None>", "PySide2", "PyQt5"]
}
},
{
@@ -46,8 +47,10 @@
"data":
{
"items": [ { "trKey": "<Custom>", "value": "" },
"QObject", "QWidget", "QMainWindow", "QDeclarativeItem", "QQuickItem" ]
}
"QObject", "QWidget", "QMainWindow", "QQuickItem" ]
},
"isComplete": "%{JS: (value('Module') === '<None>' && value('BaseCB') === '') || value('Module') !== '<None>'}",
"trIncompleteMessage": "You can choose Qt classes only if you select a Qt for Python module."
},
{
"name": "BaseEdit",
@@ -67,33 +70,36 @@
"name": "ImportQtCore",
"trDisplayName": "Import QtCore",
"type": "CheckBox",
"enabled": "%{JS: value('Module') !== '<None>'}",
"data":
{
"checkedValue": "QtCore",
"uncheckedValue": "",
"checked": "%{JS: value('Base') !== ''}"
"checked": "%{JS: value('BaseCB') !== ''}"
}
},
{
"name": "ImportQWidget",
"name": "ImportQtWidgets",
"trDisplayName": "Import QtWidgets",
"type": "CheckBox",
"enabled": "%{JS: value('Module') !== '<None>'}",
"data":
{
"checkedValue": "QtWidgets",
"uncheckedValue": "",
"checked": "%{JS: value('Base') === 'QWidget'}"
"checked": "%{JS: [ 'QWidget', 'QMainWindow' ].indexOf(value('BaseCB')) >= 0}"
}
},
{
"name": "ImportQtQuick",
"trDisplayName": "Import QtQuick",
"type": "CheckBox",
"enabled": "%{JS: value('Module') !== '<None>'}",
"data":
{
"checkedValue": "QtQuick",
"uncheckedValue": "",
"checked": "%{JS: value('Base') === 'QQuickItem'}"
"checked": "%{JS: value('BaseCB') === 'QQuickItem'}"
}
},
{

View File

@@ -61,4 +61,10 @@ long long FileSystem::lastModified(FilePathId filePathId) const
return 0;
}
void FileSystem::remove(const FilePathIds &filePathIds)
{
for (FilePathId filePathId : filePathIds)
QFile::remove(QString{m_filePathCache.filePath(filePathId)});
}
} // namespace ClangBackEnd

View File

@@ -41,6 +41,8 @@ public:
FilePathIds directoryEntries(const QString &directoryPath) const override;
long long lastModified(FilePathId filePathId) const override;
void remove(const FilePathIds &filePathIds) override;
private:
FilePathCachingInterface &m_filePathCache;
};

View File

@@ -36,6 +36,7 @@ class FileSystemInterface
public:
virtual FilePathIds directoryEntries(const QString &directoryPath) const = 0;
virtual long long lastModified(FilePathId filePathId) const = 0;
virtual void remove(const FilePathIds &filePathIds) = 0;
protected:
~FileSystemInterface() = default;

View File

@@ -1559,11 +1559,9 @@ void PluginManagerPrivate::readPluginPaths()
pluginCategories.insert(QString(), QVector<PluginSpec *>());
for (const QString &pluginFile : pluginFiles(pluginPaths)) {
auto *spec = new PluginSpec;
if (!spec->d->read(pluginFile)) { // not a Qt Creator plugin
delete spec;
PluginSpec *spec = PluginSpec::read(pluginFile);
if (!spec) // not a Qt Creator plugin
continue;
}
// defaultDisabledPlugins and defaultEnabledPlugins from install settings
// is used to override the defaults read from the plugin spec

View File

@@ -547,6 +547,16 @@ void PluginSpec::setEnabledBySettings(bool value)
d->setEnabledBySettings(value);
}
PluginSpec *PluginSpec::read(const QString &filePath)
{
auto spec = new PluginSpec;
if (!spec->d->read(filePath)) { // not a Qt Creator plugin
delete spec;
return nullptr;
}
return spec;
}
//==========PluginSpecPrivate==================
namespace {

View File

@@ -133,6 +133,8 @@ public:
void setEnabledBySettings(bool value);
static PluginSpec *read(const QString &filePath);
private:
PluginSpec();

View File

@@ -27,6 +27,7 @@
#include "utils_global.h"
#include <QList>
#include <QMetaType>
#include <QString>

View File

@@ -44,7 +44,6 @@ add_qtc_plugin(Android
androidsettingswidget.cpp androidsettingswidget.h androidsettingswidget.ui
androidsignaloperation.cpp androidsignaloperation.h
androidtoolchain.cpp androidtoolchain.h
androidtoolmanager.cpp androidtoolmanager.h
avddialog.cpp avddialog.h
certificatesmodel.cpp certificatesmodel.h
createandroidmanifestwizard.cpp createandroidmanifestwizard.h

View File

@@ -43,7 +43,6 @@ HEADERS += \
android_global.h \
androidbuildapkstep.h \
androidbuildapkwidget.h \
androidtoolmanager.h \
androidsdkmanager.h \
androidavdmanager.h \
adbcommandswidget.h \
@@ -90,7 +89,6 @@ SOURCES += \
avddialog.cpp \
androidbuildapkstep.cpp \
androidbuildapkwidget.cpp \
androidtoolmanager.cpp \
androidsdkmanager.cpp \
androidavdmanager.cpp \
adbcommandswidget.cpp \

View File

@@ -103,8 +103,6 @@ Project {
"androidsignaloperation.h",
"androidtoolchain.cpp",
"androidtoolchain.h",
"androidtoolmanager.cpp",
"androidtoolmanager.h",
"avddialog.cpp",
"avddialog.h",
"certificatesmodel.cpp",

View File

@@ -24,8 +24,6 @@
****************************************************************************/
#include "androidavdmanager.h"
#include "androidtoolmanager.h"
#include <coreplugin/icore.h>
#include <utils/algorithm.h>
#include <utils/qtcassert.h>
@@ -76,7 +74,7 @@ bool AndroidAvdManager::avdManagerCommand(const AndroidConfig &config, const QSt
Utils::SynchronousProcess proc;
auto env = AndroidConfigurations::toolsEnvironment(config).toStringList();
proc.setEnvironment(env);
qCDebug(avdManagerLog) << "Running command:" << cmd.toUserOutput();
qCDebug(avdManagerLog) << "Running AVD Manager command:" << cmd.toUserOutput();
SynchronousProcessResponse response = proc.runBlocking(cmd);
if (response.result == Utils::SynchronousProcessResponse::Finished) {
if (output)
@@ -138,7 +136,7 @@ static CreateAvdInfo createAvdCommand(const AndroidConfig &config, const CreateA
const QString avdManagerTool = config.avdManagerToolPath().toString();
qCDebug(avdManagerLog)
<< "Running command:" << CommandLine(avdManagerTool, arguments).toUserOutput();
<< "Running AVD Manager command:" << CommandLine(avdManagerTool, arguments).toUserOutput();
QProcess proc;
proc.start(avdManagerTool, arguments);
if (!proc.waitForStarted()) {
@@ -222,7 +220,6 @@ private:
AndroidAvdManager::AndroidAvdManager(const AndroidConfig &config):
m_config(config),
m_androidTool(new AndroidToolManager(m_config)),
m_parser(new AvdManagerOutputParser)
{

View File

@@ -32,7 +32,6 @@
namespace Android {
namespace Internal {
class AndroidToolManager;
class AvdManagerOutputParser;
class AndroidAvdManager
@@ -63,7 +62,6 @@ private:
private:
const AndroidConfig &m_config;
std::unique_ptr<AndroidToolManager> m_androidTool;
std::unique_ptr<AvdManagerOutputParser> m_parser;
};

View File

@@ -190,7 +190,7 @@ bool AndroidBuildApkStep::init()
m_packagePath = AndroidManager::apkPath(target()).toString();
}
qCDebug(buildapkstepLog) << "Package path:" << m_packagePath;
qCDebug(buildapkstepLog) << "APK or AAB path:" << m_packagePath;
if (!AbstractProcessStep::init())
return false;

View File

@@ -30,8 +30,6 @@
#include "androidmanager.h"
#include "androidqtversion.h"
#include "androiddevicedialog.h"
#include "androidsdkmanager.h"
#include "androidtoolmanager.h"
#include "avddialog.h"
#include <coreplugin/icore.h>
@@ -965,11 +963,10 @@ QStringList AndroidConfig::allEssentials() const
return allPackages;
}
bool AndroidConfig::allEssentialsInstalled()
bool AndroidConfig::allEssentialsInstalled(AndroidSdkManager *sdkManager)
{
QStringList essentialPkgs(allEssentials());
for (const AndroidSdkPackage *pkg :
AndroidConfigurations::sdkManager()->installedSdkPackages()) {
for (const AndroidSdkPackage *pkg : sdkManager->installedSdkPackages()) {
if (essentialPkgs.contains(pkg->sdkStylePath()))
essentialPkgs.removeOne(pkg->sdkStylePath());
if (essentialPkgs.isEmpty())

View File

@@ -27,6 +27,8 @@
#include "android_global.h"
#include "androidsdkpackage.h"
#include "androidsdkmanager.h"
#include <projectexplorer/toolchain.h>
#include <qtsupport/qtversionmanager.h>
@@ -134,7 +136,7 @@ public:
QStringList defaultEssentials() const;
QStringList essentialsFromQtVersion(const QtSupport::BaseQtVersion &version) const;
QStringList allEssentials() const;
bool allEssentialsInstalled();
bool allEssentialsInstalled(Internal::AndroidSdkManager *sdkManager);
bool sdkToolsOk() const;
Utils::FilePath openJDKLocation() const;

View File

@@ -122,8 +122,6 @@ void AndroidDebugSupport::start()
setUseContinueInsteadOfRun(true);
setAttachPid(m_runner->pid());
qCDebug(androidDebugSupportLog) << "Start. Package name: " << packageName
<< "PID: " << m_runner->pid().pid();
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit);
if (!Utils::HostOsInfo::isWindowsHost()
&& (qtVersion
@@ -187,6 +185,8 @@ void AndroidDebugSupport::start()
addSearchDirectory(qtVersion->qmlPath());
}
qCDebug(androidDebugSupportLog) << "Starting debugger - package name: " << packageName
<< ", PID: " << m_runner->pid().pid();
DebuggerRunTool::start();
}

View File

@@ -163,8 +163,12 @@ Utils::Id AndroidDeployQtStep::stepId()
bool AndroidDeployQtStep::init()
{
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(target()->kit());
if (!version) // TODO: Add error message
if (!version) {
qCDebug(deployStepLog,
"The Qt version for kit %s is not valid.",
qPrintable(target()->kit()->displayName()));
return false;
}
m_androiddeployqtArgs = CommandLine();
@@ -205,7 +209,7 @@ bool AndroidDeployQtStep::init()
m_avdName = info.avdname;
m_serialNumber = info.serialNumber;
qCDebug(deployStepLog) << "Selected Device:" << info;
qCDebug(deployStepLog) << "Selected device info:" << info;
gatherFilesToPull();
@@ -242,7 +246,6 @@ bool AndroidDeployQtStep::init()
emit addOutput(tr("Cannot find the androiddeployqt tool."), OutputFormat::Stderr);
return false;
}
qCDebug(deployStepLog) << "Using androiddeployqt";
m_command = m_command.pathAppended(HostOsInfo::withExecutableSuffix("androiddeployqt"));
m_workingDirectory = bc->buildDirectory().pathAppended(Constants::ANDROID_BUILDDIRECTORY);
@@ -493,9 +496,8 @@ void AndroidDeployQtStep::gatherFilesToPull()
m_filesToPull["/system/bin/" + linkerName] = buildDir + linkerName;
m_filesToPull["/system/" + libDirName + "/libc.so"] = buildDir + "libc.so";
qCDebug(deployStepLog) << "Files to pull from device:";
for (auto itr = m_filesToPull.constBegin(); itr != m_filesToPull.constEnd(); ++itr)
qCDebug(deployStepLog) << itr.key() << "to" << itr.value();
qCDebug(deployStepLog) << "Pulling file from device:" << itr.key() << "to:" << itr.value();
}
void AndroidDeployQtStep::doRun()

View File

@@ -433,7 +433,7 @@ QString AndroidManager::deviceSerialNumber(const Target *target)
void AndroidManager::setDeviceSerialNumber(Target *target, const QString &deviceSerialNumber)
{
qCDebug(androidManagerLog) << "Device serial for the target changed"
qCDebug(androidManagerLog) << "Target device serial changed:"
<< target->displayName() << deviceSerialNumber;
target->setNamedSettings(AndroidDeviceSn, deviceSerialNumber);
}
@@ -470,7 +470,7 @@ int AndroidManager::deviceApiLevel(const Target *target)
void AndroidManager::setDeviceApiLevel(Target *target, int level)
{
qCDebug(androidManagerLog) << "Device API level for the target changed"
qCDebug(androidManagerLog) << "Target device API level changed:"
<< target->displayName() << level;
target->setNamedSettings(ApiLevelKey, level);
}
@@ -815,7 +815,7 @@ SdkToolResult AndroidManager::runCommand(const CommandLine &command,
cmdResult.m_stdOut = response.stdOut().trimmed();
cmdResult.m_stdErr = response.stdErr().trimmed();
cmdResult.m_success = response.result == SynchronousProcessResponse::Finished;
qCDebug(androidManagerLog) << "Running command (sync) finshed:" << command.toUserOutput()
qCDebug(androidManagerLog) << "Command finshed (sync):" << command.toUserOutput()
<< "Success:" << cmdResult.m_success
<< "Output:" << response.allRawOutput();
if (!cmdResult.success())

View File

@@ -53,7 +53,7 @@ AndroidManifestEditorIconContainerWidget::AndroidManifestEditorIconContainerWidg
auto masterIconButton = new AndroidManifestEditorIconWidget(this,
lowDpiIconSize,
lowDpiIconSize,
tr("Master icon"), tr("Select master icon"));
tr("Master icon"), tr("Select master icon."));
masterIconButton->setIcon(QIcon::fromTheme(QLatin1String("document-open"), Utils::Icons::OPENFILE.icon()));
iconLayout->addWidget(masterIconButton);
iconLayout->addStretch(1);
@@ -69,7 +69,7 @@ AndroidManifestEditorIconContainerWidget::AndroidManifestEditorIconContainerWidg
auto lIconButton = new AndroidManifestEditorIconWidget(this,
lowDpiIconSize,
lowDpiIconSize,
tr("Low DPI icon"), tr("Select low DPI icon"),
tr("Low DPI icon"), tr("Select low DPI icon."),
textEditorWidget,
lowDpiIconPath,
iconFileName);
@@ -80,7 +80,7 @@ AndroidManifestEditorIconContainerWidget::AndroidManifestEditorIconContainerWidg
auto mIconButton = new AndroidManifestEditorIconWidget(this,
mediumDpiIconSize,
mediumDpiIconSize,
tr("Medium DPI icon"), tr("Select medium DPI icon"),
tr("Medium DPI icon"), tr("Select medium DPI icon."),
textEditorWidget,
mediumDpiIconPath,
iconFileName);
@@ -91,7 +91,7 @@ AndroidManifestEditorIconContainerWidget::AndroidManifestEditorIconContainerWidg
auto hIconButton = new AndroidManifestEditorIconWidget(this,
highDpiIconSize,
highDpiIconSize,
tr("High DPI icon"), tr("Select high DPI icon"),
tr("High DPI icon"), tr("Select high DPI icon."),
textEditorWidget,
highDpiIconPath,
iconFileName);

View File

@@ -87,7 +87,7 @@ AndroidManifestEditorIconWidget::AndroidManifestEditorIconWidget(
m_scaleWarningLabel->setMinimumSize(clearAndWarningSize);
m_scaleWarningLabel->setMaximumSize(clearAndWarningSize);
m_scaleWarningLabel->setPixmap(Utils::Icons::WARNING.icon().pixmap(clearAndWarningSize));
m_scaleWarningLabel->setToolTip(tr("Icon scaled up"));
m_scaleWarningLabel->setToolTip(tr("Icon scaled up."));
m_scaleWarningLabel->setVisible(false);
}
auto label = new QLabel(tr("Click to select..."), parent);

View File

@@ -58,6 +58,8 @@ public:
BuildStepConfigWidget *createConfigWidget() final;
QString nativeAndroidBuildPath() const;
private:
bool init() final;
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
@@ -74,8 +76,9 @@ public:
AndroidPackageInstallationStepWidget(BuildStep *step)
: BuildStepConfigWidget(step)
{
setDisplayName(tr("Make install"));
setSummaryText("<b>" + tr("Make install") + "</b>");
const QString cmd = static_cast<AndroidPackageInstallationStep *>(step)
->nativeAndroidBuildPath();
setSummaryText(tr("<b>Make install:</b> Copy App Files to %1").arg(cmd));
}
};
@@ -91,17 +94,14 @@ AndroidPackageInstallationStep::AndroidPackageInstallationStep(BuildStepList *bs
bool AndroidPackageInstallationStep::init()
{
QString dirPath = buildDirectory().pathAppended(Constants::ANDROID_BUILDDIRECTORY).toString();
if (HostOsInfo::isWindowsHost())
if (buildEnvironment().searchInPath("sh.exe").isEmpty())
dirPath = QDir::toNativeSeparators(dirPath);
ToolChain *tc = ToolChainKitAspect::cxxToolChain(target()->kit());
QTC_ASSERT(tc, return false);
CommandLine cmd{tc->makeCommand(buildEnvironment())};
QString dirPath = nativeAndroidBuildPath();
const QString innerQuoted = QtcProcess::quoteArg(dirPath);
const QString outerQuoted = QtcProcess::quoteArg("INSTALL_ROOT=" + innerQuoted);
CommandLine cmd{tc->makeCommand(buildEnvironment())};
cmd.addArgs(outerQuoted + " install", CommandLine::Raw);
ProcessParameters *pp = processParameters();
@@ -120,6 +120,16 @@ bool AndroidPackageInstallationStep::init()
return AbstractProcessStep::init();
}
QString AndroidPackageInstallationStep::nativeAndroidBuildPath() const
{
QString buildPath = buildDirectory().pathAppended(Constants::ANDROID_BUILDDIRECTORY).toString();
if (HostOsInfo::isWindowsHost())
if (buildEnvironment().searchInPath("sh.exe").isEmpty())
buildPath = QDir::toNativeSeparators(buildPath);
return buildPath;
}
void AndroidPackageInstallationStep::setupOutputFormatter(OutputFormatter *formatter)
{
formatter->addLineParser(new GnuMakeParser);

View File

@@ -51,7 +51,5 @@ private:
void recheck();
};
// TODO add "Download" links to the settings page?
}
}

View File

@@ -150,14 +150,12 @@ void AndroidRunner::qmlServerPortReady(Port port)
void AndroidRunner::remoteOutput(const QString &output)
{
Core::MessageManager::write("LOGCAT: " + output, Core::MessageManager::Silent);
appendMessage(output, Utils::StdOutFormat);
m_outputParser.processOutput(output);
}
void AndroidRunner::remoteErrorOutput(const QString &output)
{
Core::MessageManager::write("LOGCAT: " + output, Core::MessageManager::Silent);
appendMessage(output, Utils::StdErrFormat);
m_outputParser.processOutput(output);
}

View File

@@ -124,7 +124,6 @@ static qint64 extractPID(const QByteArray &output, const QString &packageName)
static void findProcessPID(QFutureInterface<qint64> &fi, QStringList selector,
const QString &packageName, bool preNougat)
{
qCDebug(androidRunWorkerLog) << "Finding PID. PreNougat:" << preNougat;
if (packageName.isEmpty())
return;
@@ -144,7 +143,7 @@ static void findProcessPID(QFutureInterface<qint64> &fi, QStringList selector,
}
} while (processPID == -1 && !isTimedOut(start) && !fi.isCanceled());
qCDebug(androidRunWorkerLog) << "PID found:" << processPID;
qCDebug(androidRunWorkerLog) << "PID found:" << processPID << ", PreNougat:" << preNougat;
if (!fi.isCanceled())
fi.reportResult(processPID);
}
@@ -157,7 +156,6 @@ static void deleter(QProcess *p)
p->kill();
p->waitForFinished();
}
qCDebug(androidRunWorkerLog) << "Done killing process:" << p->objectName();
// Might get deleted from its own signal handler.
p->deleteLater();
}
@@ -308,11 +306,11 @@ AndroidRunnerWorker::AndroidRunnerWorker(RunWorker *runner, const QString &packa
m_debugServerPath = debugServer(m_useLldb, target).toString();
qCDebug(androidRunWorkerLog) << "Device Serial:" << m_deviceSerialNumber
<< "API level:" << m_apiLevel
<< "Extra Start Args:" << m_amStartExtraArgs
<< "Before Start ADB cmds:" << m_beforeStartAdbCommands
<< "After finish ADB cmds:" << m_afterFinishAdbCommands
<< "Debug server path:" << m_debugServerPath;
<< ", API level:" << m_apiLevel
<< ", Extra Start Args:" << m_amStartExtraArgs
<< ", Before Start ADB cmds:" << m_beforeStartAdbCommands
<< ", After finish ADB cmds:" << m_afterFinishAdbCommands
<< ", Debug server path:" << m_debugServerPath;
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
m_useAppParamsForQmlDebugger = version->qtVersion() >= QtSupport::QtVersionNumber(5, 12);

View File

@@ -25,9 +25,9 @@
#include "androidsdkmanager.h"
#include "androidconfigurations.h"
#include "androidconstants.h"
#include "androidmanager.h"
#include "androidtoolmanager.h"
#include <utils/algorithm.h>
#include <utils/qtcassert.h>
@@ -49,10 +49,6 @@ static Q_LOGGING_CATEGORY(sdkManagerLog, "qtc.android.sdkManager", QtWarningMsg)
namespace Android {
namespace Internal {
// Though sdk manager is introduced in 25.2.3 but the verbose mode is avaialble in 25.3.0
// and android tool is supported in 25.2.3
const QVersionNumber sdkManagerIntroVersion(25, 3 ,0);
const char installLocationKey[] = "Installed Location:";
const char revisionKey[] = "Version:";
const char descriptionKey[] = "Description:";
@@ -134,6 +130,10 @@ void watcherDeleter(QFutureWatcher<void> *watcher)
delete watcher;
}
static QString sdkRootArg(const AndroidConfig &config)
{
return "--sdk_root=" + config.sdkLocation().toString();
}
/*!
Runs the \c sdkmanger tool with arguments \a args. Returns \c true if the command is
successfully executed. Output is copied into \a output. The function blocks the calling thread.
@@ -141,13 +141,16 @@ void watcherDeleter(QFutureWatcher<void> *watcher)
static bool sdkManagerCommand(const AndroidConfig &config, const QStringList &args,
QString *output, int timeout = sdkManagerCmdTimeoutS)
{
QStringList newArgs = args;
newArgs.append(sdkRootArg(config));
qCDebug(sdkManagerLog) << "Running SDK Manager command (sync):"
<< CommandLine(config.sdkManagerToolPath(), args).toUserOutput();
<< CommandLine(config.sdkManagerToolPath(), newArgs)
.toUserOutput();
SynchronousProcess proc;
proc.setProcessEnvironment(AndroidConfigurations::toolsEnvironment(config));
proc.setTimeoutS(timeout);
proc.setTimeOutMessageBoxEnabled(true);
SynchronousProcessResponse response = proc.run({config.sdkManagerToolPath(), args});
SynchronousProcessResponse response = proc.run({config.sdkManagerToolPath(), newArgs});
if (output)
*output = response.allOutput();
return response.result == SynchronousProcessResponse::Finished;
@@ -164,8 +167,10 @@ static void sdkManagerCommand(const AndroidConfig &config, const QStringList &ar
AndroidSdkManager::OperationOutput &output, double progressQuota,
bool interruptible = true, int timeout = sdkManagerOperationTimeoutS)
{
QStringList newArgs = args;
newArgs.append(sdkRootArg(config));
qCDebug(sdkManagerLog) << "Running SDK Manager command (async):"
<< CommandLine(config.sdkManagerToolPath(), args).toUserOutput();
<< CommandLine(config.sdkManagerToolPath(), newArgs).toUserOutput();
int offset = fi.progressValue();
SynchronousProcess proc;
proc.setProcessEnvironment(AndroidConfigurations::toolsEnvironment(config));
@@ -188,7 +193,7 @@ static void sdkManagerCommand(const AndroidConfig &config, const QStringList &ar
QObject::connect(&sdkManager, &AndroidSdkManager::cancelActiveOperations,
&proc, &SynchronousProcess::terminate);
}
SynchronousProcessResponse response = proc.run({config.sdkManagerToolPath(), args});
SynchronousProcessResponse response = proc.run({config.sdkManagerToolPath(), newArgs});
if (assertionFound) {
output.success = false;
output.stdOutput = response.stdOut();
@@ -916,23 +921,13 @@ void AndroidSdkManagerPrivate::reloadSdkPackages()
return;
}
if (m_config.sdkToolsVersion() < sdkManagerIntroVersion && !m_config.isCmdlineSdkToolsInstalled()) {
// Old Sdk tools.
m_packageListingSuccessful = true;
AndroidToolManager toolManager(m_config);
auto toAndroidSdkPackages = [](SdkPlatform *p) -> AndroidSdkPackage *{
return p;
};
m_allPackages = Utils::transform(toolManager.availableSdkPlatforms(), toAndroidSdkPackages);
} else {
QString packageListing;
QStringList args({"--list", "--verbose"});
args << m_config.sdkManagerToolArgs();
m_packageListingSuccessful = sdkManagerCommand(m_config, args, &packageListing);
if (m_packageListingSuccessful) {
SdkManagerOutputParser parser(m_allPackages);
parser.parsePackageListing(packageListing);
}
QString packageListing;
QStringList args({"--list", "--verbose"});
args << m_config.sdkManagerToolArgs();
m_packageListingSuccessful = sdkManagerCommand(m_config, args, &packageListing);
if (m_packageListingSuccessful) {
SdkManagerOutputParser parser(m_allPackages);
parser.parsePackageListing(packageListing);
}
emit m_sdkManager.packageReloadFinished();
}
@@ -1025,7 +1020,7 @@ void AndroidSdkManagerPrivate::checkPendingLicense(SdkCmdFutureInterface &fi)
fi.setProgressValue(0);
AndroidSdkManager::OperationOutput result;
result.type = AndroidSdkManager::LicenseCheck;
QStringList args("--licenses");
const QStringList args = {"--licenses", sdkRootArg(m_config)};
if (!fi.isCanceled())
sdkManagerCommand(m_config, args, m_sdkManager, fi, result, 100.0);
else
@@ -1044,7 +1039,7 @@ void AndroidSdkManagerPrivate::getPendingLicense(SdkCmdFutureInterface &fi)
QtcProcess licenseCommand;
licenseCommand.setProcessEnvironment(AndroidConfigurations::toolsEnvironment(m_config));
bool reviewingLicenses = false;
licenseCommand.setCommand(CommandLine(m_config.sdkManagerToolPath(), {"--licenses"}));
licenseCommand.setCommand(CommandLine(m_config.sdkManagerToolPath(), {"--licenses", sdkRootArg(m_config)}));
if (Utils::HostOsInfo::isWindowsHost())
licenseCommand.setUseCtrlCStub(true);
licenseCommand.start();

View File

@@ -172,7 +172,7 @@ void AndroidSdkManagerWidget::installEssentials()
"Install them manually after the current operation is done.\n")
.arg(m_sdkModel->missingEssentials().join("\", \"")));
}
m_ui->applySelectionButton->click();
onApplyButton();
}
void AndroidSdkManagerWidget::beginLicenseCheck()

View File

@@ -105,29 +105,14 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="packagesTypeGroup">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="title">
<string>Show Packages</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>12</number>
</property>
<item>
<widget class="QRadioButton" name="showAvailableRadio">
<property name="text">

View File

@@ -313,7 +313,8 @@ void AndroidSdkModel::selectMissingEssentials()
}
m_missingEssentials = pendingPkgs;
qCDebug(androidSdkModelLog) << "Couldn't find some essential packages:" << m_missingEssentials;
if (!m_missingEssentials.isEmpty())
qCDebug(androidSdkModelLog) << "Couldn't find some essential packages:" << m_missingEssentials;
}
QList<const AndroidSdkPackage *> AndroidSdkModel::userSelection() const

View File

@@ -189,15 +189,17 @@ public:
{
QTC_CHECK(m_detailsWidget);
auto layout = new QVBoxLayout(this);
layout->setContentsMargins(12, 12, 12, 12);
layout->setContentsMargins(22, 0, 0, 12);
layout->setSpacing(4);
for (auto itr = validationPoints.cbegin(); itr != validationPoints.cend(); ++itr) {
RowData data;
data.m_infoLabel = new InfoLabel(itr.value());
layout->addWidget(data.m_infoLabel);
m_validationData[itr.key()] = data;
setPointValid(itr.key(), true);
setPointValid(itr.key(), false);
}
m_detailsWidget->setWidget(this);
setContentsMargins(0, 0, 0, 0);
}
void setPointValid(int key, bool valid)
@@ -284,7 +286,7 @@ QVariant AvdModel::itemData(const AndroidDeviceInfo &info, int column, int role)
AvdModel::AvdModel()
{
//: AVD - Android Virtual Device
setHeader({tr("AVD Name"), tr("API"), tr("CPU/ABI"), tr("Device type"), tr("Target"), tr("SD-card size")});
setHeader({tr("AVD Name"), tr("API"), tr("CPU/ABI"), tr("Device Type"), tr("Target"), tr("SD-card Size")});
}
void AndroidSettingsWidget::showEvent(QShowEvent *event)
@@ -350,13 +352,18 @@ AndroidSettingsWidget::AndroidSettingsWidget()
sdkMangerLayout->setContentsMargins(0, 0, 0, 0);
sdkMangerLayout->addWidget(m_sdkManagerWidget);
connect(m_sdkManagerWidget, &AndroidSdkManagerWidget::updatingSdk, [this] {
m_ui.SDKLocationPathChooser->setEnabled(false);
// Disable the tab bar to restrict the user moving away from sdk manager tab untill
// operations finish.
// Disable the top level UI to keep the user from unintentionally interrupting operations
m_ui.javaSettingsGroupBox->setEnabled(false);
m_ui.androidSettingsGroupBox->setEnabled(false);
m_ui.androidOpenSSLSettingsGroupBox->setEnabled(false);
m_ui.CreateKitCheckBox->setEnabled(false);
m_ui.managerTabWidget->tabBar()->setEnabled(false);
});
connect(m_sdkManagerWidget, &AndroidSdkManagerWidget::updatingSdkFinished, [this] {
m_ui.SDKLocationPathChooser->setEnabled(true);
m_ui.javaSettingsGroupBox->setEnabled(true);
m_ui.androidSettingsGroupBox->setEnabled(true);
m_ui.androidOpenSSLSettingsGroupBox->setEnabled(true);
m_ui.CreateKitCheckBox->setEnabled(true);
m_ui.managerTabWidget->tabBar()->setEnabled(true);
});
connect(m_sdkManagerWidget, &AndroidSdkManagerWidget::licenseWorkflowStarted, [this] {
@@ -408,7 +415,7 @@ AndroidSettingsWidget::AndroidSettingsWidget()
currentSDKPath = AndroidConfig::defaultSdkPath();
m_ui.SDKLocationPathChooser->setFilePath(currentSDKPath);
m_ui.SDKLocationPathChooser->setPromptDialogTitle(tr("Select Android SDK folder"));
m_ui.SDKLocationPathChooser->setPromptDialogTitle(tr("Select Android SDK Folder"));
m_ui.openSslPathChooser->setPromptDialogTitle(tr("Select OpenSSL Include Project File"));
FilePath currentOpenSslPath = m_androidConfig.openSslLocation();
@@ -599,7 +606,8 @@ void AndroidSettingsWidget::validateSdk()
// after AndroidSdkManager::packageReloadFinished.
m_androidSummary->setPointValid(PlatformSdkInstalledRow,
!m_sdkManager.installedSdkPlatforms().isEmpty());
m_androidSummary->setPointValid(AllEssentialsInstalledRow, m_androidConfig.allEssentialsInstalled());
m_androidSummary->setPointValid(AllEssentialsInstalledRow,
m_androidConfig.allEssentialsInstalled(&m_sdkManager));
const bool sdkToolsOk = m_androidSummary->rowsOk({SdkPathExistsRow,
SdkPathWritableRow,
@@ -614,7 +622,7 @@ void AndroidSettingsWidget::validateSdk()
// Ask user to install essential SDK components. Works only for sdk tools version >= 26.0.0
QString message = tr("Android SDK installation is missing necessary packages. Do you "
"want to install the missing packages?");
auto userInput = QMessageBox::information(this, tr("Missing Android SDK packages"),
auto userInput = QMessageBox::information(this, tr("Missing Android SDK Packages"),
message, QMessageBox::Yes | QMessageBox::No);
if (userInput == QMessageBox::Yes) {
m_ui.managerTabWidget->setCurrentWidget(m_ui.sdkManagerTab);
@@ -692,7 +700,7 @@ void AndroidSettingsWidget::downloadOpenSslRepo(const bool silent)
msgBox.setText(tr("OpenSSL prebuilt libraries cloning failed. ") + msgSuffix
+ tr("Opening OpenSSL URL for manual download."));
msgBox.addButton(tr("OK"), QMessageBox::YesRole);
QAbstractButton *openButton = msgBox.addButton(tr("Open download URL"), QMessageBox::ActionRole);
QAbstractButton *openButton = msgBox.addButton(tr("Open Download URL"), QMessageBox::ActionRole);
msgBox.exec();
if (msgBox.clickedButton() == openButton)
@@ -716,7 +724,7 @@ void AndroidSettingsWidget::downloadOpenSslRepo(const bool silent)
connect(gitCloner, &QtcProcess::errorOccurred, this, [=](QProcess::ProcessError error) {
openSslProgressDialog->close();
if (error == QProcess::FailedToStart) {
failDialog(tr("The git tool might not be installed properly on your system. "));
failDialog(tr("The Git tool might not be installed properly on your system. "));
} else {
failDialog();
}

View File

@@ -66,7 +66,7 @@
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="javaSettingsGroup">
<widget class="QGroupBox" name="javaSettingsGroupBox">
<property name="minimumSize">
<size>
<width>0</width>
@@ -124,7 +124,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="androidSettingsGroupBox">
<property name="title">
<string>Android Settings</string>
</property>
@@ -151,7 +151,7 @@
</property>
</widget>
</item>
<item row="2" column="2" rowspan="3" colspan="3">
<item row="2" column="2" rowspan="3" colspan="4">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QPushButton" name="addCustomNdkButton">
@@ -252,7 +252,7 @@
<item row="0" column="1">
<widget class="Utils::PathChooser" name="SDKLocationPathChooser" native="true"/>
</item>
<item row="0" column="2" colspan="3">
<item row="0" column="2" colspan="4">
<widget class="QPushButton" name="sdkToolsAutoDownloadButton">
<property name="text">
<string>Set Up SDK</string>
@@ -263,7 +263,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<widget class="QGroupBox" name="androidOpenSSLSettingsGroupBox">
<property name="title">
<string>Android OpenSSL settings (Optional)</string>
</property>

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