Merge remote-tracking branch 'origin/4.12'
Change-Id: I79083060dfc3bc4408123acd3b7305b9701650fd
1
dist/changes-4.12.0.md
vendored
@@ -202,6 +202,7 @@ Platforms
|
|||||||
|
|
||||||
### Android
|
### Android
|
||||||
|
|
||||||
|
* Discontinued support for Ministro
|
||||||
* Added auto-detection of Java JDK (QTCREATORBUG-23407)
|
* Added auto-detection of Java JDK (QTCREATORBUG-23407)
|
||||||
* Added option to automatically download and install required Android tools (QTCREATORBUG-23285)
|
* Added option to automatically download and install required Android tools (QTCREATORBUG-23285)
|
||||||
* Added option to register multiple NDKs (QTCREATORBUG-23286)
|
* Added option to register multiple NDKs (QTCREATORBUG-23286)
|
||||||
|
@@ -14,6 +14,9 @@ the doc folder:
|
|||||||
- qtcreatordev
|
- qtcreatordev
|
||||||
- qtdesignstudio
|
- qtdesignstudio
|
||||||
|
|
||||||
|
For more information, see:
|
||||||
|
[Writing Documentation](https://doc.qt.io/qtcreator-extending/qtcreator-documentation.html)
|
||||||
|
|
||||||
The Qt Design Studio Manual is based on the Qt Creator Manual, with
|
The Qt Design Studio Manual is based on the Qt Creator Manual, with
|
||||||
additional topics. For more information, see the `README` file in the
|
additional topics. For more information, see the `README` file in the
|
||||||
qtdesignstudio subfolder.
|
qtdesignstudio subfolder.
|
||||||
@@ -21,16 +24,20 @@ qtdesignstudio subfolder.
|
|||||||
The Extending Qt Creator Manual has its own sources. In addition, it
|
The Extending Qt Creator Manual has its own sources. In addition, it
|
||||||
pulls in API reference documentation from the Qt Creator source files.
|
pulls in API reference documentation from the Qt Creator source files.
|
||||||
|
|
||||||
# QDoc Warnings
|
# QDoc
|
||||||
|
|
||||||
All the documents are built when you enter `make docs` on Linux or
|
All the documents are built when you enter `make docs` on Linux or
|
||||||
macOS or `nmake docs` on Windows. At the time of this writing, this
|
macOS or `nmake docs` on Windows.
|
||||||
leads to QDoc warnings being generated, because the Qt Creator Manual
|
|
||||||
requires QDoc from Qt 5.14 or later (it links to new modules), whereas
|
|
||||||
the Extending Qt Creator Manual requires QDoc from Qt 5.10 or earlier,
|
|
||||||
because the doc configuration is not supported when using the Clang
|
|
||||||
parser.
|
|
||||||
|
|
||||||
To hide the doc errors and make doc builds faster, enter an option
|
Since Qt Creator 4.12, you need to use QDoc Qt 5.14 or later to build
|
||||||
to write the doc errors to the log. For example, on Windows enter
|
the docs. While building with QDoc from Qt 5.11 or later technically
|
||||||
`nmake docs 2> log.txt`.
|
works, the Qt Creator Manual and Qt Design Studio Manual link to newer
|
||||||
|
Qt modules, which means link errors will be printed.
|
||||||
|
|
||||||
|
Please make the docs before submitting code changes to make sure that
|
||||||
|
you do not introduce new QDoc warnings.
|
||||||
|
|
||||||
|
While working on changes that introduce lots of warnings about missing API
|
||||||
|
documentation, for example, you can enter an option to write the doc
|
||||||
|
errors to the log. This helps make doc builds faster until you have
|
||||||
|
fixed the errors. For example, on Windows enter `nmake docs 2> log.txt`.
|
||||||
|
BIN
doc/qtcreator/images/qtcreator-android-avd-manager.png
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 18 KiB |
BIN
doc/qtcreator/images/qtcreator-android-create-avd.png
Normal file
After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 24 KiB |
BIN
doc/qtcreator/images/qtcreator-cppcheck-run-configuration.png
Normal file
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 14 KiB |
BIN
doc/qtcreator/images/qtcreator-options-android-main.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
doc/qtcreator/images/qtcreator-options-android-sdk-tools.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 13 KiB |
@@ -45,8 +45,9 @@
|
|||||||
|
|
||||||
You can drag and drop the views in the \uicontrol Debug mode to new
|
You can drag and drop the views in the \uicontrol Debug mode to new
|
||||||
positions on the screen. The size and position of views are saved for future
|
positions on the screen. The size and position of views are saved for future
|
||||||
sessions. Select \uicontrol {Window > Views > Reset to Default Layout} to
|
sessions. Select \uicontrol Window > \uicontrol Views >
|
||||||
reset the views to their original sizes and positions.
|
\uicontrol {Reset to Default Layout} to reset the views to their original
|
||||||
|
sizes and positions.
|
||||||
|
|
||||||
You can use the following code analysis tools in the \uicontrol Debug
|
You can use the following code analysis tools in the \uicontrol Debug
|
||||||
mode:
|
mode:
|
||||||
|
@@ -38,20 +38,29 @@
|
|||||||
The experimental Cppcheck Diagnostics plugin integrates diagnostics
|
The experimental Cppcheck Diagnostics plugin integrates diagnostics
|
||||||
that are generated by the Cppcheck tool into the C++ editor.
|
that are generated by the Cppcheck tool into the C++ editor.
|
||||||
|
|
||||||
To enable running Cppcheck automatically on currently open files:
|
Cppcheck is automatically run on open files. To select the files to
|
||||||
|
check in the currently active project, select \uicontrol Analyze >
|
||||||
|
\uicontrol Cppcheck.
|
||||||
|
|
||||||
|
\section1 Enabling the Cppcheck Plugin
|
||||||
|
|
||||||
|
To enable the Cppcheck plugin:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li Select \uicontrol Help > \uicontrol {About Plugins} >
|
\li Select \uicontrol Help > \uicontrol {About Plugins} >
|
||||||
\uicontrol {Code Analyzer} > \uicontrol Cppcheck to enable the
|
\uicontrol {Code Analyzer} > \uicontrol Cppcheck to enable the
|
||||||
plugin.
|
plugin.
|
||||||
\li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
|
\li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
|
||||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Analyzer
|
\endlist
|
||||||
> \uicontrol Cppcheck to specify settings for running Cppcheck.
|
|
||||||
\image qtcreator-cppcheck-options.png "Cppcheck options"
|
\section1 Running Cppcheck on Selected Files
|
||||||
|
|
||||||
|
\list 1
|
||||||
|
\li Select \uicontrol Analyze > \uicontrol Cppcheck.
|
||||||
|
\image qtcreator-cppcheck-run-configuration.png "Cppcheck run configuration"
|
||||||
\li In the \uicontrol Binary field, enter the path to the Cppcheck
|
\li In the \uicontrol Binary field, enter the path to the Cppcheck
|
||||||
executable file.
|
executable file.
|
||||||
\li In the \uicontrol Checks group, select the checks to perform on
|
\li In the \uicontrol Checks group, select the checks to perform.
|
||||||
currently open files.
|
|
||||||
\note By default, Cppcheck uses multiple threads to perform checks.
|
\note By default, Cppcheck uses multiple threads to perform checks.
|
||||||
Selecting the \uicontrol {Unused functions} option disables the
|
Selecting the \uicontrol {Unused functions} option disables the
|
||||||
default behavior.
|
default behavior.
|
||||||
@@ -78,8 +87,14 @@
|
|||||||
calculate additional arguments based on current project's settings
|
calculate additional arguments based on current project's settings
|
||||||
(such as the language used and standard version) and pass them to
|
(such as the language used and standard version) and pass them to
|
||||||
Cppcheck.
|
Cppcheck.
|
||||||
|
\li Select the files to run Cppcheck on.
|
||||||
|
\li Select \uicontrol Analyze.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\QC automatically runs Cppcheck on currently opened documents and displays
|
\QC runs Cppcheck on the selected files and displays results via text
|
||||||
results via text marks or annotations.
|
marks or annotations.
|
||||||
|
|
||||||
|
To specify the settings above for the automatically run checks,
|
||||||
|
select \uicontrol Tools > \uicontrol Options > \uicontrol Analyzer
|
||||||
|
> \uicontrol Cppcheck.
|
||||||
*/
|
*/
|
||||||
|
@@ -97,6 +97,10 @@
|
|||||||
To reset the default zoom level, right-click the timeline to open the
|
To reset the default zoom level, right-click the timeline to open the
|
||||||
context menu, and select \uicontrol {Reset Zoom}.
|
context menu, and select \uicontrol {Reset Zoom}.
|
||||||
|
|
||||||
|
Select the \inlineimage filtericon.png
|
||||||
|
(\uicontrol {Restrict to Threads}) button (10) to select the threads to
|
||||||
|
show.
|
||||||
|
|
||||||
\section2 Selecting Event Ranges
|
\section2 Selecting Event Ranges
|
||||||
|
|
||||||
You can select an event range (8) to view the time it represents or to zoom
|
You can select an event range (8) to view the time it represents or to zoom
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2018 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -41,12 +41,17 @@
|
|||||||
for detecting buffer overruns and memory leaks. You must download and
|
for detecting buffer overruns and memory leaks. You must download and
|
||||||
install Heob to run it from \QC.
|
install Heob to run it from \QC.
|
||||||
|
|
||||||
|
\image qtcreator-heob-settings.png
|
||||||
|
|
||||||
To run Heob on the currently open project:
|
To run Heob on the currently open project:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol Analyze > \uicontrol Heob.
|
\li Select \uicontrol Analyze > \uicontrol Heob.
|
||||||
|
|
||||||
|
\li Select the Heob settings profile to use, or select \uicontrol New
|
||||||
|
to create a new profile.
|
||||||
|
|
||||||
\li In the \uicontrol {Heob path} field, enter the path to the Heob
|
\li In the \uicontrol {Heob path} field, enter the path to the Heob
|
||||||
executable.
|
executable.
|
||||||
|
|
||||||
@@ -72,8 +77,6 @@
|
|||||||
|
|
||||||
To specify settings for Heob, select \uicontrol Analyze > \uicontrol Heob.
|
To specify settings for Heob, select \uicontrol Analyze > \uicontrol Heob.
|
||||||
|
|
||||||
\image qtcreator-heob-settings.png
|
|
||||||
|
|
||||||
In the \uicontrol {Extra arguments} field, enter additional arguments for
|
In the \uicontrol {Extra arguments} field, enter additional arguments for
|
||||||
running Heob. To list the available arguments in the Heob console, enter
|
running Heob. To list the available arguments in the Heob console, enter
|
||||||
\c -H in this field and press \key Enter.
|
\c -H in this field and press \key Enter.
|
||||||
@@ -83,7 +86,10 @@
|
|||||||
leaks visually in the file and the \c -L1024 option to record leak contents
|
leaks visually in the file and the \c -L1024 option to record leak contents
|
||||||
up to 1024 bytes in the file. For example, \c {-oleaks.html -g2 -L1024}
|
up to 1024 bytes in the file. For example, \c {-oleaks.html -g2 -L1024}
|
||||||
|
|
||||||
Select \uicontrol Save to save the current settings as default.
|
To save the settings profile, select \uicontrol Save.
|
||||||
|
|
||||||
|
To remove a customized settings profile, select the profile, and then
|
||||||
|
select \uicontrol Delete.
|
||||||
|
|
||||||
The following sections describe the available options in more detail.
|
The following sections describe the available options in more detail.
|
||||||
|
|
||||||
|
@@ -59,9 +59,9 @@
|
|||||||
For more information about analyzing applications for which you do not have
|
For more information about analyzing applications for which you do not have
|
||||||
a project, see \l{Running Valgrind Tools on External Applications}.
|
a project, see \l{Running Valgrind Tools on External Applications}.
|
||||||
|
|
||||||
To select options for the Valgrind tools, select \uicontrol {Tools > Options >
|
To select options for the Valgrind tools, select \uicontrol Tools >
|
||||||
Analyzer}. You can override the general settings for each project in the
|
\uicontrol Options > \uicontrol Analyzer. You can override the general
|
||||||
\uicontrol {Run Settings} for the project.
|
settings for each project in the \uicontrol {Run Settings} for the project.
|
||||||
|
|
||||||
The following sections describe how to use the Valgrind tools:
|
The following sections describe how to use the Valgrind tools:
|
||||||
|
|
||||||
@@ -74,4 +74,3 @@
|
|||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -93,8 +93,9 @@
|
|||||||
|
|
||||||
Stack traces can get quite large and confusing, and therefore, reading them
|
Stack traces can get quite large and confusing, and therefore, reading them
|
||||||
from the bottom up can help. If the stack trace is not big enough or it is
|
from the bottom up can help. If the stack trace is not big enough or it is
|
||||||
too big, select \uicontrol {Tools > Options > Analyzer} and define the
|
too big, select \uicontrol Tools > \uicontrol Options > \uicontrol Analyzer
|
||||||
length of the stack trace in the \uicontrol {Backtrace frame count} field.
|
and define the length of the stack trace in the
|
||||||
|
\uicontrol {Backtrace frame count} field.
|
||||||
|
|
||||||
\image qtcreator-valgrind-memcheck-options.png "Memory Analysis options"
|
\image qtcreator-valgrind-memcheck-options.png "Memory Analysis options"
|
||||||
|
|
||||||
@@ -138,7 +139,6 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\contentspage index.html
|
\contentspage index.html
|
||||||
\previouspage creator-analyzer.html
|
\previouspage creator-analyzer.html
|
||||||
@@ -221,8 +221,9 @@
|
|||||||
separately for each project in the \l{Specifying Run Settings}{run settings}
|
separately for each project in the \l{Specifying Run Settings}{run settings}
|
||||||
of the project.
|
of the project.
|
||||||
|
|
||||||
To specify settings for Valgrind, select \uicontrol {Tools > Options >
|
To specify settings for Valgrind, select \uicontrol Tools >
|
||||||
Analyzer}. The \uicontrol {Profiling Options} group contains Callgrind options.
|
\uicontrol Options > \uicontrol Analyzer. The \uicontrol {Profiling Options}
|
||||||
|
group contains Callgrind options.
|
||||||
|
|
||||||
\image qtcreator-valgrind-callgrind-options.png "Valgrind options"
|
\image qtcreator-valgrind-callgrind-options.png "Valgrind options"
|
||||||
|
|
||||||
@@ -269,7 +270,6 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\contentspage index.html
|
\contentspage index.html
|
||||||
\previouspage creator-cache-profiler.html
|
\previouspage creator-cache-profiler.html
|
||||||
|
@@ -36,50 +36,42 @@
|
|||||||
|
|
||||||
\title Connecting Android Devices
|
\title Connecting Android Devices
|
||||||
|
|
||||||
You can connect Android devices to the development PC to run, debug,
|
You can connect Android devices to the development PC to build, run, debug,
|
||||||
and analyze applications built for them from \QC. Devices with Android
|
and analyze applications from \QC. Devices with Android
|
||||||
version 4.1 (API level 16) or later are supported.
|
version 4.1 (API level 16) or later are supported.
|
||||||
|
|
||||||
If you have a tool chain for building applications for Android devices
|
If you have a tool chain for building applications for Android devices
|
||||||
installed on the development PC, you can add it to \QC. You can then add a
|
installed on the development PC, you can add it to \QC. You can then add a
|
||||||
\l{glossary-buildandrun-kit}{kit}
|
\l{glossary-buildandrun-kit}{kit}
|
||||||
with the Android device type, the tool chain, and the Qt version for Android,
|
with the tool chain, and the Qt version for Android for the device's architecture,
|
||||||
to build applications for and run them on Android devices. You can also
|
to build applications for and run them on Android devices. Starting from Qt 5.14.0,
|
||||||
allow \QC to automatically configure the kit.
|
Qt for Android package contains all the architectures (ABIs) installed as one.
|
||||||
|
You can also allow \QC to automatically create kits for installed Qt version
|
||||||
|
and tool chains.
|
||||||
|
|
||||||
The Android Debug Bridge (adb) command line tool is integrated to \QC to
|
The Android Debug Bridge (adb) command line tool is integrated to \QC to
|
||||||
enable you to deploy applications to connected Android devices, to run
|
enable you to deploy applications to connected Android devices, to run
|
||||||
the applications on them, and to read logs from them. It includes a client
|
them, and to read their logs. It includes a client and server that run on
|
||||||
and server that run on the development host and a daemon that runs on the
|
the development host and a daemon that runs on the emulator or device.
|
||||||
emulator or device.
|
|
||||||
|
|
||||||
\section1 Requirements
|
\section1 Requirements
|
||||||
|
|
||||||
To use \QC to develop Qt applications for Android, you need the following:
|
To use \QC to develop Qt applications for Android, you need the following:
|
||||||
|
|
||||||
\list
|
\list
|
||||||
|
\li \l{https://www.oracle.com/java/technologies/javase-jdk8-downloads.html}
|
||||||
\li \l{http://www.oracle.com/technetwork/java/javase/downloads/index.html}
|
{Java SE Development Kit (JDK)} version 6 up to 8.
|
||||||
{Java SE Development Kit (JDK)} version 6, or later.
|
|
||||||
You can also use \l{http://openjdk.java.net/}{OpenJDK} on Linux.
|
You can also use \l{http://openjdk.java.net/}{OpenJDK} on Linux.
|
||||||
|
|
||||||
\note Android SDK Tools have issues with JDK versions later than 8.
|
\note Android SDK Tools have issues with JDK versions later than 8.
|
||||||
|
|
||||||
\li \l{http://www.gradle.org}{Gradle} for building application packages
|
\li \l{http://www.gradle.org}{Gradle} for building application packages
|
||||||
(APK) and app bundles (AAB) for Android devices. Gradle is delivered
|
(APK) and app bundles (AAB) for Android devices. Gradle is delivered
|
||||||
with Qt 5.9, and later. Because Gradle scripts are not delivered
|
with Qt 5.9, and later, because Gradle scripts are not delivered
|
||||||
with Android SDK tools since version 26.0.0, they are delivered
|
with Android SDK tools since version 26.0.0.
|
||||||
with Qt 5.9 and 5.6.3.
|
|
||||||
|
|
||||||
\note Using Ant to build APKs is no longer supported.
|
\note Using Ant to build APKs is no longer supported.
|
||||||
|
|
||||||
\li A tool chain for building applications for Android devices provided
|
|
||||||
by the \l{http://developer.android.com/tools/sdk/ndk/index.html}
|
|
||||||
{Android NDK} from Google.
|
|
||||||
|
|
||||||
\note To develop with Qt 5.14.0 or later, you need Android NDK r20
|
|
||||||
or later.
|
|
||||||
|
|
||||||
\li \l{http://developer.android.com/sdk/index.html}{Android SDK Tools}
|
\li \l{http://developer.android.com/sdk/index.html}{Android SDK Tools}
|
||||||
|
|
||||||
The following Android SDK packages and tools are required for
|
The following Android SDK packages and tools are required for
|
||||||
@@ -89,47 +81,94 @@
|
|||||||
\li Platform tools
|
\li Platform tools
|
||||||
\li Build tools
|
\li Build tools
|
||||||
\li At least one SDK platform
|
\li At least one SDK platform
|
||||||
|
\li The \l{http://developer.android.com/tools/sdk/ndk/index.html}
|
||||||
|
{Android NDK} from Google that provides the tool chain for
|
||||||
|
building applications for Android devices. For a detailed
|
||||||
|
list of Qt versions and their recommended NDK versions,
|
||||||
|
see \l{https://doc-snapshots.qt.io/qt5-5.14/android-getting-started.html}
|
||||||
|
{The Android NDK}.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\li On Windows, you also need the following:
|
\li On Windows, you also need the Android Debug Bridge (ADB) driver
|
||||||
|
on the Windows platform to enable USB debugging. The default USB
|
||||||
\list
|
driver on Windows does not allow debugging. For more information
|
||||||
|
about installing ADB, see \l {ADB windows driver}
|
||||||
\li Android Debug Bridge (ADB) driver on the Windows platform to
|
{ADB driver installation}.
|
||||||
enable USB debugging. The default USB driver on Windows does not
|
|
||||||
allow debugging. For more information about obtaining the USB
|
|
||||||
driver, see \l{http://developer.android.com/sdk/win-usb.html}.
|
|
||||||
|
|
||||||
After installing the driver, try running a few basic
|
|
||||||
\l{http://developer.android.com/tools/help/adb.html}{adb}
|
|
||||||
commands to check that your device responds to them.
|
|
||||||
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
\note When using the command line tools instead of Android Studio,
|
|
||||||
it is recommended to create an empty folder and extract the
|
|
||||||
downloaded archive into this folder.
|
|
||||||
The sdkmanager will install downloaded packages next to the
|
|
||||||
\c tools folder that contains all command line tools.
|
|
||||||
You must specify the path to the folder where you extracted the
|
|
||||||
files as Android SDK location inside the Android settings.
|
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section1 Setting Up the Development Environment
|
\section1 Setting Up the Development Environment
|
||||||
|
|
||||||
You must download and install the latest Android NDK and SDK, and then
|
To build Android applications with Qt, install Qt for Android 5.2, or later.
|
||||||
update or install the tools and packages needed for development. However,
|
|
||||||
if your Qt version is earlier than v5.9, use the SDK tools package v25.2.5
|
|
||||||
or earlier.
|
|
||||||
|
|
||||||
The SDK tool used to update and install the other SDK tools and packages
|
\note You can build a 64-bit version of Qt for Android yourself. However,
|
||||||
depends on the Android SDK Tools version that you have installed:
|
for such a Qt version, the minimum required Android version on devices
|
||||||
|
is 5.0 (API level 21).
|
||||||
|
|
||||||
|
For more information, see \l{Qt for Android}.
|
||||||
|
|
||||||
|
Download and install the latest Android SDK, and then install
|
||||||
|
or update the NDKs, tools and packages needed for development.
|
||||||
|
|
||||||
|
Starting from \QC 4.12, \QC offers to automatically set up your Android
|
||||||
|
environment and install all the necessary packages and Tools, then
|
||||||
|
creating debuggers, tool chains, and kits. For more information,
|
||||||
|
see \l {Specifying Android Device Settings}.
|
||||||
|
|
||||||
|
Alternatively, use the Android SDK command line tools to install
|
||||||
|
the required packages. In that case, it is recommended to create an
|
||||||
|
empty folder and extract the downloaded archive into this folder.
|
||||||
|
|
||||||
|
\note The recommended Android SDK Tools version is 25.3.0, or later. The version
|
||||||
|
25.2.5, or earlier, can be used but it is not advised because it cannot be
|
||||||
|
fully integrated with \QC.
|
||||||
|
|
||||||
\list
|
\list
|
||||||
|
\li Android SDK Tools version 25.3.0, or later
|
||||||
|
|
||||||
|
This allows using the
|
||||||
|
\l{https://developer.android.com/studio/command-line/sdkmanager.html}
|
||||||
|
{sdkmanager} command line tool for SDK package management and the
|
||||||
|
\l{https://developer.android.com/studio/command-line/avdmanager.html}
|
||||||
|
{avdmanager} tool for Android Virtual Device (AVD) management.
|
||||||
|
|
||||||
|
The sdkmanager will install downloaded packages next to the \c tools
|
||||||
|
folder that contains all command line tools. You must specify the path
|
||||||
|
to the folder where you extracted the files as Android SDK location
|
||||||
|
inside the Android settings.
|
||||||
|
|
||||||
|
To install those packages, use the following command:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
./sdkmanager "platform-tools" "platforms;android-29" "build-tools;29.0.2" "ndk-bundle"
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
For Qt 5.12.0 to 5.12.5 and Qt 5.13.0 to 5.13.1, the following
|
||||||
|
should be installed instead:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
./sdkmanager "platform-tools" "platforms;android-29" "build-tools;28.0.2" "ndk;19.2.5345600"
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\target ADB windows driver
|
||||||
|
Under Windows, Google's USB drivers can be installed by running:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
sdkmanager.bat "extras;google;usb_driver"
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
For more information about altenative methods of obtaining the USB
|
||||||
|
driver, see \l{http://developer.android.com/sdk/win-usb.html}.
|
||||||
|
After the package installation is complete, install the driver from
|
||||||
|
\c{<ANDROID_SDK_ROOT>/extras/google/usb_driver}. Try running a few basic
|
||||||
|
\l{http://developer.android.com/tools/help/adb.html}{adb} commands now
|
||||||
|
and check whether your Android device responds to them.
|
||||||
|
|
||||||
\li Android SDK Tools version 25.2.5, or earlier
|
\li Android SDK Tools version 25.2.5, or earlier
|
||||||
|
|
||||||
|
If your Qt version is earlier than v5.9, use this SDK tools version.
|
||||||
|
The SDK tool used to install and update the other SDK tools and packages
|
||||||
|
depends on the Android SDK Tools version that you have installed:
|
||||||
|
|
||||||
Use the
|
Use the
|
||||||
\l{https://developer.android.com/studio/tools/help/android.html}
|
\l{https://developer.android.com/studio/tools/help/android.html}
|
||||||
{android} tool that comes with the SDK Tools package. For example,
|
{android} tool that comes with the SDK Tools package. For example,
|
||||||
@@ -139,54 +178,97 @@
|
|||||||
./android update sdk
|
./android update sdk
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\li Android SDK Tools version 25.3.0, or later
|
|
||||||
|
|
||||||
Use the
|
|
||||||
\l{https://developer.android.com/studio/command-line/sdkmanager.html}
|
|
||||||
{sdkmanager} command line tool for SDK package management and the
|
|
||||||
\l{https://developer.android.com/studio/command-line/avdmanager.html}
|
|
||||||
{avdmanager} tool for Android Virtual Device (AVD) management.
|
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
In addition, you must install Qt for Android as part of Qt 5.2, or later.
|
|
||||||
|
|
||||||
\note You can build a 64-bit version of Qt for Android yourself. However,
|
|
||||||
for such a Qt version, the minimum required Android version on devices
|
|
||||||
is 5.0 (API level 21).
|
|
||||||
|
|
||||||
For more information, see \l{Qt for Android}.
|
|
||||||
|
|
||||||
\section2 Specifying Android Device Settings
|
\section2 Specifying Android Device Settings
|
||||||
|
|
||||||
To configure connections between \QC and Android devices:
|
To configure connections to Android devices and general Android settings:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Devices >
|
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Devices >
|
||||||
\uicontrol Android.
|
\uicontrol Android.
|
||||||
|
|
||||||
\image qtcreator-options-android1.png "Android options"
|
\image qtcreator-options-android-main.png "Android options"
|
||||||
|
|
||||||
\li In the \uicontrol {JDK location} field, add the path to the JDK.
|
\li In the \uicontrol {JDK location} field, set the path to the JDK.
|
||||||
|
|
||||||
Select the \inlineimage icons/download-icon.png
|
By default, \QC tries to find any valid JDK/OpenJDK installation.
|
||||||
(\uicontrol Download) button to go to the site where you can
|
However, if none is found, you must set it manually. Click the
|
||||||
download the JDK. \QC checks the JDK installation and reports
|
\inlineimage icons/download-icon.png
|
||||||
errors.
|
(\uicontrol Download) button to open the JDK download web page in the
|
||||||
|
default browser. \QC checks the JDK installation and reports errors.
|
||||||
|
|
||||||
\li In the \uicontrol {Android Settings} group, add paths to the Android
|
\li In the \uicontrol {Android Settings} group, set the path to the
|
||||||
NDK and SDK.
|
Android SDK Tools.
|
||||||
|
|
||||||
Select \inlineimage icons/download-icon.png
|
Select \inlineimage reload_gray.png
|
||||||
to go to the sites where you can download the Android NDK and SDK.
|
button to automatically download and extract the Android SDK Tools
|
||||||
|
to the selected path. This will do the following:
|
||||||
|
|
||||||
|
\list 1
|
||||||
|
\li Download and extract the Android SDK Tools.
|
||||||
|
\li Install or update the essential packages such as NDKs,
|
||||||
|
build tools, platform tools.
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
The SDK Tools download URL, the essential packages list, and the
|
||||||
|
appropriate NDK for each Qt version are defined in a JSON
|
||||||
|
configuration file. The file is located under the user's \QC
|
||||||
|
resource folder:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
# Linux and macOS
|
||||||
|
~/.config/QtProject/qtcreator/android/sdk_definitions.json
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
C:\Users\Username\AppData\Local\QtProject\qtcreator\android\sdk_definitions.json
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
For example, the SDK configuration file defines the NDK version 19.2.5345600
|
||||||
|
to be used for Qt 5.12.0 to 5.12.5 and Qt 5.13.0 to 5.13.1 versions:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
"specific_qt_versions": [
|
||||||
|
{
|
||||||
|
"versions": ["5.12.[0-5]", "5.13.[0-1]"],
|
||||||
|
"sdk_essential_packages": ["build-tools;28.0.2", "ndk;19.2.5345600"],
|
||||||
|
"ndk_path": "ndk/19.2.5345600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
The latest version of the configuration file that is up-to-date
|
||||||
|
with the Android SDK and NDK changes is found
|
||||||
|
\l{https://code.qt.io/cgit/qt-creator/qt-creator.git/plain/share/qtcreator/android/sdk_definitions.json}{here}.
|
||||||
|
|
||||||
|
The installed NDK versions are listed below the SDK path.
|
||||||
|
The items with a lock icon are versions installed from the SDK Manager,
|
||||||
|
and can only be modified from the SDK Manager tab. For more information,
|
||||||
|
see \l{Managing Android SDK Packages}. Custom NDK paths can be manually
|
||||||
|
added to the global list of NDKs via the \uicontrol Add button.
|
||||||
|
This creates custom tool chains and debuggers associated to
|
||||||
|
that NDK, which can be used to create custom kits defined by the user.
|
||||||
|
|
||||||
|
To manually download the SDK Tools, select \inlineimage icons/download-icon.png
|
||||||
|
to open the SDK or NDK download web page in the default browser.
|
||||||
|
|
||||||
The SDK Manager checks the Android NDK and SDK installations,
|
The SDK Manager checks the Android NDK and SDK installations,
|
||||||
reports errors, and offers to install the necessary packages.
|
reports errors, and offers to install the necessary packages.
|
||||||
|
|
||||||
\image qtcreator-options-android2.png "Android NDK and SDK checks"
|
\image qtcreator-options-android-sdk-tools.png "Android NDK and SDK checks"
|
||||||
|
|
||||||
For more information, see \l {Managing Android SDK Packages}.
|
\li In the \uicontrol {Android OpenSSL} group, set the path to the
|
||||||
|
prebuilt OpenSSL libraries.
|
||||||
|
|
||||||
|
For Qt applications that require OpenSSL support, \QC allows to
|
||||||
|
quickly add the \l{https://marketplace.qt.io/products/android-openssl-support}
|
||||||
|
{Android OpenSSL support} to your project. For more details, see
|
||||||
|
\l{Adding External Libraries}.
|
||||||
|
|
||||||
|
Select \inlineimage icons/download-icon.png
|
||||||
|
to download the OpenSSL repository to the selected path. If the
|
||||||
|
automatic download fails, the download web page opens for manual download.
|
||||||
|
|
||||||
\li Select the \uicontrol {Automatically create kits for Android tool chains}
|
\li Select the \uicontrol {Automatically create kits for Android tool chains}
|
||||||
check box to allow \QC to create the kits for you. \QC displays a
|
check box to allow \QC to create the kits for you. \QC displays a
|
||||||
@@ -213,12 +295,13 @@
|
|||||||
Debugging is enabled in different ways on different Android devices.
|
Debugging is enabled in different ways on different Android devices.
|
||||||
Look for \uicontrol {USB Debugging} under \uicontrol {Developer Options}. On
|
Look for \uicontrol {USB Debugging} under \uicontrol {Developer Options}. On
|
||||||
some devices \uicontrol {Developer Options} is hidden and becomes visible
|
some devices \uicontrol {Developer Options} is hidden and becomes visible
|
||||||
when you tap the \uicontrol {Build number} field in \uicontrol Settings >
|
only when you tap the \uicontrol {Build number} field in \uicontrol Settings >
|
||||||
\uicontrol About several times.
|
\uicontrol About several times. For more details, check
|
||||||
|
\l{https://developer.android.com/studio/debug/dev-options}{Configure on-device developer options}.
|
||||||
|
|
||||||
\li Connect the Android device to the development PC with a USB cable.
|
\li Connect the Android device to the development PC with a USB cable.
|
||||||
You might be asked to select a device in the
|
You might be asked to select a device in the
|
||||||
\uicontrol {Select Android Devices} dialog.
|
\l{Selecting Android Devices}{Select Android Devices} dialog.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section2 Managing Android SDK Packages
|
\section2 Managing Android SDK Packages
|
||||||
@@ -230,11 +313,12 @@
|
|||||||
removing SDK packages. You can still use sdkmanager for advanced SDK
|
removing SDK packages. You can still use sdkmanager for advanced SDK
|
||||||
management.
|
management.
|
||||||
|
|
||||||
When you add paths to the Anroid NDK and SDK in the device options, the
|
After you set the path to the Anroid SDK in \uicontrol Tools >
|
||||||
|
\uicontrol Options > \uicontrol Devices > \uicontrol Android, the
|
||||||
SDK Manager checks that all the necessary SDK packages have been installed.
|
SDK Manager checks that all the necessary SDK packages have been installed.
|
||||||
If packages are missing or updates are needed, the SDK Manager offers to
|
If packages are missing or updates are needed, the SDK Manager offers to
|
||||||
add and remove packages, as necessary. Before taking action, it prompts you
|
add or remove those packages. Before taking action, it prompts
|
||||||
to accept the changes it is about to make. In addition, it prompts you to
|
you to accept the changes it is about to make. In addition, it prompts you to
|
||||||
accept Google licenses, as necessary.
|
accept Google licenses, as necessary.
|
||||||
|
|
||||||
To view the installed Android SDK packages, select \uicontrol Tools >
|
To view the installed Android SDK packages, select \uicontrol Tools >
|
||||||
@@ -261,13 +345,40 @@
|
|||||||
different Android SDK Tools versions. If you have the native SDK Manager
|
different Android SDK Tools versions. If you have the native SDK Manager
|
||||||
installed, you can open it by selecting \uicontrol {Native SDK Manager}.
|
installed, you can open it by selecting \uicontrol {Native SDK Manager}.
|
||||||
|
|
||||||
|
\section1 Managing Android Virtual Devices (AVD)
|
||||||
|
|
||||||
|
A list of AVDs is shown under \uicontrol Tools > \uicontrol Options >
|
||||||
|
\uicontrol Devices > \uicontrol Android > \uicontrol {AVD Manager}. This
|
||||||
|
works only with a valid \uicontrol {SDK Tools} path being set. The value in
|
||||||
|
\uicontrol {System/data partition size} is used to set the emulator's system
|
||||||
|
partition size upon execution with \uicontrol {Start}.
|
||||||
|
|
||||||
|
\image qtcreator-android-avd-manager.png "Android NDK and SDK checks"
|
||||||
|
|
||||||
|
\section1 Creating a New AVD
|
||||||
|
|
||||||
|
To create new virtual devices, select \uicontrol Tools > \uicontrol Options >
|
||||||
|
\uicontrol Devices > \uicontrol Android > \uicontrol {AVD Manager} > \uicontrol {Add}.
|
||||||
|
|
||||||
|
In the \uicontrol {Create new AVD} dialog, you can create a new custom AVD
|
||||||
|
by setting the name, device type, skin, architecture, API level, and SD card
|
||||||
|
size. You need to have a valid \uicontrol {System Image} installed
|
||||||
|
before using this dialog, either from \QC's \uicontrol {SDK Manager} tab or
|
||||||
|
from Android Studio.
|
||||||
|
|
||||||
|
For more advanced options for creating a new AVD, use the command-line tool
|
||||||
|
\l{https://developer.android.com/studio/command-line/avdmanager.html}{avdmanager},
|
||||||
|
or use Android Studio's native AVD Manager's UI.
|
||||||
|
|
||||||
|
\image qtcreator-android-create-avd.png "Android NDK and SDK checks"
|
||||||
|
|
||||||
\section1 Selecting Android Devices
|
\section1 Selecting Android Devices
|
||||||
|
|
||||||
When you deploy an application to an Android device with Android
|
When you deploy an application to an Android device with Android
|
||||||
version 4.2 or later, the \uicontrol {Select Android Devices} dialog opens. It
|
version 4.2 (API 16) or later, the \uicontrol {Select Android Device} dialog
|
||||||
lists the devices that are connected to the development PC. and their
|
opens. It lists the devices that are connected to the development PC, as
|
||||||
status. You can select devices from the \uicontrol {Compatible Devices} list for
|
well as AVDs, and their status. You can select devices or AVDs from the
|
||||||
deployment.
|
\uicontrol {Compatible Devices} list for deployment.
|
||||||
|
|
||||||
If \QC determines that a device is not ready for deployment, it places the
|
If \QC determines that a device is not ready for deployment, it places the
|
||||||
device in the \uicontrol {Incompatible Devices} list, with information about the
|
device in the \uicontrol {Incompatible Devices} list, with information about the
|
||||||
@@ -276,34 +387,41 @@
|
|||||||
\uicontrol {Refresh Device List}. The device is moved to the
|
\uicontrol {Refresh Device List}. The device is moved to the
|
||||||
\uicontrol {Compatible Devices} list and you can select it for deployment.
|
\uicontrol {Compatible Devices} list and you can select it for deployment.
|
||||||
|
|
||||||
Other reasons for placing a device on the \uicontrol {Incompatible Devices} are
|
Other reasons for showing a device in \uicontrol {Incompatible Devices} are
|
||||||
that the Android version on the device is too old or that the tool chain
|
that the Android version on the device is too old or that the tool chain
|
||||||
used for building does not match the Android architecture on the device
|
used for building does not match the Android architecture on the device
|
||||||
(for example, you cannot deploy an ARM build on an x86 device).
|
(for example, you cannot deploy an ARM build on an x86 device).
|
||||||
|
|
||||||
\image qtcreator-android-select-devices.png "Select Android Devices dialog"
|
\image qtcreator-android-select-devices.png "Select Android Devices dialog"
|
||||||
|
|
||||||
AVDs are also listed. To create new AVDs, select
|
To \l{Creating a New AVD}{create a new AVD}, select \uicontrol {Create Android Virtual Device}.
|
||||||
\uicontrol {Create Android Virtual Device}.
|
|
||||||
|
|
||||||
To set a device as the default device for a particular Android architecture,
|
To set a device as the default device for a particular Android architecture
|
||||||
select the \uicontrol {Always use this device for architecture} check box. The
|
for the current project, select the \uicontrol {Always use this device for architecture}
|
||||||
\uicontrol {Select Android Devices} dialog will not appear until you switch to
|
check box. The \uicontrol {Select Android Devices} dialog will not appear
|
||||||
another project or restart \QC.
|
until you switch to another project or restart \QC.
|
||||||
|
|
||||||
\section1 Using the Android Emulator
|
\section1 Using the Android Emulator
|
||||||
|
|
||||||
To run your application on the Android Emulator, you must create Android
|
To run your application on the Android Emulator, you must have an Android
|
||||||
virtual devices (AVD). Select \uicontrol Tools > \uicontrol Options >
|
virtual device (AVD). For more information about creating a new one, see
|
||||||
\uicontrol Devices > \uicontrol Android >
|
\l{Creating a New AVD}. If you run an application without a device connected to the
|
||||||
\uicontrol Add. If you run an application without a device connected to the
|
|
||||||
development PC and without an AVD specified, \QC asks you to add an AVD.
|
development PC and without an AVD specified, \QC asks you to add an AVD.
|
||||||
|
|
||||||
To manage AVDs, select \uicontrol {Start AVD Manager}.
|
For Android SDK Tools 25.2.5, or earlier, select \uicontrol {Native AVD Manager}
|
||||||
|
to manage AVDs.
|
||||||
|
|
||||||
\note The Android Emulator has a bug that prevents it from starting on some
|
\note The Android Emulator has a bug that prevents it from starting on some
|
||||||
systems. If the Android Emulator does not start, you can try starting it
|
systems. If the Android Emulator does not start, you can try starting it
|
||||||
manually by running the \c {emulator-arm} command from the command line.
|
manually by running the following commands:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
cd <ANDROID_SDK>/emulator
|
||||||
|
./emulator -avd <AVD_NAME>
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
For more information, see \l{https://developer.android.com/studio/run/emulator-commandline}
|
||||||
|
{Start the emulator from the command line}.
|
||||||
|
|
||||||
\section1 Debugging on Android Devices
|
\section1 Debugging on Android Devices
|
||||||
|
|
||||||
@@ -312,6 +430,9 @@
|
|||||||
|
|
||||||
\note \QC cannot debug applications on Android devices if Android Studio is
|
\note \QC cannot debug applications on Android devices if Android Studio is
|
||||||
running. If the following message is displayed in the \uicontrol Output
|
running. If the following message is displayed in the \uicontrol Output
|
||||||
pane, close Android Studio and try again: \e {Ignoring second debugger -
|
pane, close Android Studio and try again:
|
||||||
accepting and dropping.}
|
|
||||||
|
\badcode
|
||||||
|
Ignoring second debugger -accepting and dropping.
|
||||||
|
\endcode
|
||||||
*/
|
*/
|
||||||
|
@@ -37,6 +37,18 @@
|
|||||||
\uicontrol {Activity manager start options} field. However, if the default
|
\uicontrol {Activity manager start options} field. However, if the default
|
||||||
options conflict with the added options, the application might not start.
|
options conflict with the added options, the application might not start.
|
||||||
|
|
||||||
|
The default arguments for the Activity manager for a normal run:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
am start -n org.qtproject.example.notification/org.qtproject.qt5.android.bindings.QtActivity
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
The default arguments for the Activity manager for the debugger mode:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
am start -n org.qtproject.example.notification/org.qtproject.qt5.android.bindings.QtActivity -D
|
||||||
|
\endcode
|
||||||
|
|
||||||
For example, to run the application as a particular user, enter the start
|
For example, to run the application as a particular user, enter the start
|
||||||
option \c {--user 10}, where \c 10 is the user ID of the user account.
|
option \c {--user 10}, where \c 10 is the user ID of the user account.
|
||||||
|
|
||||||
|
@@ -46,19 +46,14 @@
|
|||||||
|
|
||||||
\QC supports the following methods of deployment for Android applications:
|
\QC supports the following methods of deployment for Android applications:
|
||||||
|
|
||||||
\list
|
\list
|
||||||
|
|
||||||
\li As a stand-alone, distributable application package (APK).
|
\li As a stand-alone, distributable application package (APK).
|
||||||
|
|
||||||
\li As a minimal APK that contains a dependency to the Ministro tool.
|
|
||||||
The Ministro tool downloads the necessary Qt libraries from a
|
|
||||||
repository of your choice.
|
|
||||||
|
|
||||||
\li Since Qt 5.14.0, as an app bundle (AAB), intended for distribution
|
\li Since Qt 5.14.0, as an app bundle (AAB), intended for distribution
|
||||||
in the Google Play store.
|
in the Google Play store.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
|
\note Since \QC 4.12, Ministro is not supported.
|
||||||
|
|
||||||
To specify settings for application packages, select \uicontrol Projects >
|
To specify settings for application packages, select \uicontrol Projects >
|
||||||
\uicontrol {Build Android APK} > \uicontrol Details.
|
\uicontrol {Build Android APK} > \uicontrol Details.
|
||||||
|
|
||||||
@@ -67,23 +62,6 @@
|
|||||||
see \l {Specifying Run Settings for Android Devices}.
|
see \l {Specifying Run Settings for Android Devices}.
|
||||||
\endif
|
\endif
|
||||||
|
|
||||||
\section1 Using Ministro to Install Qt Libraries
|
|
||||||
|
|
||||||
To minimize the size of your APK, you can package the application with an
|
|
||||||
external dependency called Ministro. If a user downloads your application,
|
|
||||||
and it is the first application on their device to depend on Ministro, they
|
|
||||||
are asked to install Ministro before they can run your application.
|
|
||||||
|
|
||||||
Ministro serves as a central repository for Qt libraries. This enables
|
|
||||||
several applications to share the libraries, which only need to be installed
|
|
||||||
once. To use this deployment method, you must set up a repository for the
|
|
||||||
libraries that you want to distribute. To specify the
|
|
||||||
repository URL, edit the file \c {android/res/values/libs.xml}, which is
|
|
||||||
created by \QC.
|
|
||||||
|
|
||||||
To use Ministro to install the Qt libraries, select the
|
|
||||||
\uicontrol {Use Ministro service to install Qt} option.
|
|
||||||
|
|
||||||
\section1 Packaging Applications
|
\section1 Packaging Applications
|
||||||
|
|
||||||
Because bundling applications as APK packages is not
|
Because bundling applications as APK packages is not
|
||||||
@@ -126,8 +104,8 @@
|
|||||||
|
|
||||||
The packages are deployed on the connected Android devices. To switch the
|
The packages are deployed on the connected Android devices. To switch the
|
||||||
device used as a default device for the selected kit, select
|
device used as a default device for the selected kit, select
|
||||||
\uicontrol Projects > \uicontrol Run >
|
\uicontrol Projects > \uicontrol Run > \uicontrol {Deploy to Android device}
|
||||||
\uicontrol {Reset Default Devices}. The setting applies until you restart \QC.
|
> \uicontrol {Reset Default Devices}. The setting applies until you restart \QC.
|
||||||
For more information, see \l{Selecting Android Devices}.
|
For more information, see \l{Selecting Android Devices}.
|
||||||
|
|
||||||
For more information about the \c androiddeployqt tool, see
|
For more information about the \c androiddeployqt tool, see
|
||||||
@@ -137,7 +115,7 @@
|
|||||||
|
|
||||||
You can specify settings for the \c androiddeployqt tool in \QC and in the
|
You can specify settings for the \c androiddeployqt tool in \QC and in the
|
||||||
project .pro file. To specify settings in \QC, select \uicontrol Projects >
|
project .pro file. To specify settings in \QC, select \uicontrol Projects >
|
||||||
\uicontrol {Build Android APK} > \uicontrol Details.
|
\uicontrol Build > \uicontrol {Build Android APK} > \uicontrol Details.
|
||||||
|
|
||||||
\image qtcreator-android-deploy-configurations.png "Deploy configurations"
|
\image qtcreator-android-deploy-configurations.png "Deploy configurations"
|
||||||
|
|
||||||
@@ -150,6 +128,22 @@
|
|||||||
the \uicontrol {Compile Output} pane. To view additional information, select the
|
the \uicontrol {Compile Output} pane. To view additional information, select the
|
||||||
\uicontrol {Verbose output} check box.
|
\uicontrol {Verbose output} check box.
|
||||||
|
|
||||||
|
\section3 Selecting API Level
|
||||||
|
|
||||||
|
In the \uicontrol {Android build SDK} field, you can select the API level to use
|
||||||
|
for building the application. Usually, you should select the newest API
|
||||||
|
level available.
|
||||||
|
|
||||||
|
\note For Qt 5.12.0 to 5.12.5 and Qt 5.13.0 to 5.13.1, Android build SDK 28 should
|
||||||
|
be used. For recent versions than the latter, build SDK 29, or the most recent
|
||||||
|
should be used.
|
||||||
|
|
||||||
|
This field does not specify the minimum supported API level nor the target
|
||||||
|
API level, which you can specify in the Android manifest. See
|
||||||
|
\l{Editing Manifest Files}. For more information about Android API levels, see
|
||||||
|
\l{http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels}
|
||||||
|
{What is API Level?}.
|
||||||
|
|
||||||
\section3 Building AABs
|
\section3 Building AABs
|
||||||
|
|
||||||
For testing the application locally, use the APK format, because
|
For testing the application locally, use the APK format, because
|
||||||
@@ -167,18 +161,6 @@
|
|||||||
|
|
||||||
\image qtcreator-android-build-steps.png "Android Build Steps"
|
\image qtcreator-android-build-steps.png "Android Build Steps"
|
||||||
|
|
||||||
\section3 Selecting API Level
|
|
||||||
|
|
||||||
In the \uicontrol {Android build SDK} field, you can select the API level to use
|
|
||||||
for building the application. Usually, you should select the newest API
|
|
||||||
level available.
|
|
||||||
|
|
||||||
This field does not specify the minimum supported API level nor the target
|
|
||||||
API level, which you can specify in the Android manifest file.
|
|
||||||
For more information about Android API levels, see
|
|
||||||
\l{http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels}
|
|
||||||
{What is API Level?}.
|
|
||||||
|
|
||||||
\section3 Signing Android Packages
|
\section3 Signing Android Packages
|
||||||
|
|
||||||
To publish your application, you must sign it by using a \e {public-private
|
To publish your application, you must sign it by using a \e {public-private
|
||||||
@@ -211,9 +193,9 @@
|
|||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li In the \uicontrol Keystore field, select \uicontrol Create to create a new
|
\li In the \uicontrol Keystore field, select \uicontrol Create to create
|
||||||
keystore that contains one key pair in the \uicontrol {Create Keystore and
|
a new keystore that contains one key pair in the
|
||||||
a Certificate} dialog:
|
\uicontrol {Create a Keystore and a Certificate} dialog:
|
||||||
|
|
||||||
\image qtcreator-android-certificate.png
|
\image qtcreator-android-certificate.png
|
||||||
|
|
||||||
@@ -238,8 +220,8 @@
|
|||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
To sign an Android package by using a key pair, specify settings in the
|
To sign an Android package by using a key pair, set the \uicontrol {Sign package}
|
||||||
\uicontrol {Sign package} group:
|
group settings described in \l{Specifying Settings for Packages}:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
@@ -258,21 +240,29 @@
|
|||||||
|
|
||||||
\QC automatically detects which Qt libraries the application uses and adds
|
\QC automatically detects which Qt libraries the application uses and adds
|
||||||
them as dependencies. If the application needs external libraries, specify
|
them as dependencies. If the application needs external libraries, specify
|
||||||
them in the \uicontrol {Additional Libraries} field. The libraries are copied into
|
them in \uicontrol Projects > \uicontrol Build > \uicontrol {Build Android APK}
|
||||||
|
> \uicontrol {Additional Libraries} field. The libraries are copied into
|
||||||
your application's library folder and loaded on startup.
|
your application's library folder and loaded on startup.
|
||||||
|
|
||||||
For example, to enable OpenSSL in your application, add the paths to the
|
To add OpenSSL libraries, select \uicontrol {Include prebuilt OpenSSL libraries}
|
||||||
required \c libssl.so and \c libcrypto.so libraries to the
|
in the \uicontrol {Additional Libraries} group. This will add the OpenSSL
|
||||||
\uicontrol {Additional Libraries} field.
|
include project defined in \l{Specifying Android Device Settings}{device settings}
|
||||||
|
in \uicontrol {Android OpenSSL} group. This can be used for QMake and CMake
|
||||||
|
projects.
|
||||||
|
|
||||||
\section3 Editing Manifest Files
|
Otherwise, you can manually add the paths to the required \c libssl.so and
|
||||||
|
\c libcrypto.so libraries to the \uicontrol {Additional Libraries} field.
|
||||||
|
|
||||||
|
\section1 Editing Manifest Files
|
||||||
|
|
||||||
You can use the qmake variables to specify all
|
You can use the qmake variables to specify all
|
||||||
the settings you need for the \c androiddeployqt tool and you do not need an
|
the settings you need for the \c androiddeployqt tool and you do not need an
|
||||||
Android manifest file until you want to publish the package in an
|
Android manifest file unless you need to specify Android specific settings
|
||||||
application store. To specify additional settings for APK packages, you can
|
like the application's icon. Also, the manifest file is needed if you want
|
||||||
create an Android manifest file and edit it in \QC. Select
|
to publish the package in the Play Store.
|
||||||
\uicontrol {Create Templates} to create the file and to open it in the
|
You can create an Android manifest file and edit it in \QC. Select
|
||||||
|
\uicontrol Projects > \uicontrol Build > \uicontrol {Build Android APK}
|
||||||
|
> \uicontrol {Create Templates} to create the file and to open it in the
|
||||||
Android Manifest Editor.
|
Android Manifest Editor.
|
||||||
|
|
||||||
\image qtcreator-android-manifest-editor.png "Android Manifest Editor"
|
\image qtcreator-android-manifest-editor.png "Android Manifest Editor"
|
||||||
@@ -292,9 +282,10 @@
|
|||||||
field, specify the version number that is shown to users.
|
field, specify the version number that is shown to users.
|
||||||
|
|
||||||
\li In the \uicontrol {Minimum required SDK} field, select the minimum API level
|
\li In the \uicontrol {Minimum required SDK} field, select the minimum API level
|
||||||
required to run the application. The minimum supported API level is
|
required to run the application. The minimum supported API level for \QC is
|
||||||
android-9. \QC does not allow you to select an API
|
android-9. However, Qt versions might have different minimum API levels, and
|
||||||
level that the Qt version specified for the kit does not support.
|
therefore \QC does not allow you to select an API level that the Qt version
|
||||||
|
specified for the kit does not support.
|
||||||
|
|
||||||
\li In the \uicontrol {Target SDK} field, select the targeted API level of the
|
\li In the \uicontrol {Target SDK} field, select the targeted API level of the
|
||||||
application. This affects the activation of some compatibility features in
|
application. This affects the activation of some compatibility features in
|
||||||
@@ -302,42 +293,49 @@
|
|||||||
means that the overflow button in the system navigation bar will not be
|
means that the overflow button in the system navigation bar will not be
|
||||||
enabled by default.
|
enabled by default.
|
||||||
|
|
||||||
\li In the \uicontrol Application group, you can give the application a name and
|
\li In the \uicontrol Application group, you can set the application's name.
|
||||||
select an icon for it. The three icon fields can contain different versions
|
You can also give an activity a name and select the activity to run.
|
||||||
of the icon with low, medium, and high DPI values, from left to right.
|
|
||||||
You can also give an activity a name and select the activity to run.
|
\li The \uicontrol {Style extraction} combo box sets the used method that Qt
|
||||||
|
uses to extract style information. It has the following values:
|
||||||
|
\list
|
||||||
|
\li \uicontrol Default or \uicontrol Full: Use this when working with
|
||||||
|
Qt Widgets or Qt Quick Controls 1.
|
||||||
|
|
||||||
|
\note This method uses some Android non-SDK interfaces,
|
||||||
|
that are being restricted by Google starting from Android 9.0
|
||||||
|
(API 28).
|
||||||
|
\li \uicontrol minimal: Use this when working with Qt Quick Controls 2
|
||||||
|
with no Qt Widgets or Qt Quick Controls 1. This is faster than
|
||||||
|
\uicontrol full or \uicontrol default.
|
||||||
|
\li \uicontrol none: Use this if you're not working with Qt Widgets,
|
||||||
|
or Qt Quick Controls 1 or 2 in your project.
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
\li In \uicontrol {Application icon}, select an icon. Click the
|
||||||
|
\uicontrol {Master icon} button to select an icon with the highest resolution,
|
||||||
|
then, it will resize and set the three icon fields for low, medium, and high DPI icons
|
||||||
|
as needed.
|
||||||
|
|
||||||
\li In the \uicontrol Permissions field, you can specify the permissions that your
|
\li In the \uicontrol Permissions field, you can specify the permissions that your
|
||||||
application needs. Users are asked to grant the permissions when they
|
application needs. Starting from Android 6.0 (API 23), permissions have to be
|
||||||
install the application. Android OS then grants the application access to
|
requested at runtime (See \l{QtAndroidExtras}{requestPermissionsSync} or
|
||||||
the appropriate data and features.
|
\l{QtAndroidExtras}{requestPermissions}). For lower Android API levels,
|
||||||
|
users are asked to grant the permissions when they install the application.
|
||||||
|
Android OS then grants the application access to the appropriate data and features.
|
||||||
|
|
||||||
\li Select the \uicontrol {Include default permissions for Qt modules} and
|
\li Select the \uicontrol {Include default permissions for Qt modules} and
|
||||||
\uicontrol {Include default features for Qt modules} check boxes to add the
|
\uicontrol {Include default features for Qt modules} check boxes to add the
|
||||||
permissions needed by Qt libraries.
|
permissions needed by Qt libraries. This can be
|
||||||
|
android.permission.WRITE_EXTERNAL_STORAGE for QtCore, or
|
||||||
|
android.permission.ACCESS_COARSE_LOCATION for QtLocation.
|
||||||
|
|
||||||
\li To add permissions, select them in the list, and then select \uicontrol Add.
|
\li To add a permission, select it from the list, and then click \uicontrol Add.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
Select the \uicontrol {XML Source} tab to edit the file in XML format.
|
On the top header, select the \uicontrol {XML Source} tab to edit the file
|
||||||
|
in XML format.
|
||||||
\section1 Installing Ministro
|
|
||||||
|
|
||||||
The easiest way to install Ministro is to do it on the device via Google
|
|
||||||
Play. When you run the application for the first time, a dialog pops up and
|
|
||||||
guides you through the installation.
|
|
||||||
|
|
||||||
To use \QC to install Ministro, you must first download the Ministro .apk
|
|
||||||
from the Google Market or from the
|
|
||||||
\l{http://necessitas.kde.org/necessitas/ministro.php}{Ministro} home page.
|
|
||||||
|
|
||||||
Then select \uicontrol Projects > \uicontrol Run > \uicontrol {Install Ministro from APK}.
|
|
||||||
|
|
||||||
You can use this option also to install any Android package (.apk).
|
|
||||||
|
|
||||||
You can use this option to install applications on an Android Virtual
|
|
||||||
Device (AVD).
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -380,6 +380,11 @@
|
|||||||
debugger at the main function.
|
debugger at the main function.
|
||||||
\li In the \uicontrol {Server start script} field, specify a
|
\li In the \uicontrol {Server start script} field, specify a
|
||||||
script file to run when the server starts.
|
script file to run when the server starts.
|
||||||
|
\li In the \uicontrol {Init commands} field, enter the commands
|
||||||
|
to execute immediately after the connection to a target has
|
||||||
|
been established.
|
||||||
|
\li In the \uicontrol {Reset commands} field, enter the commands
|
||||||
|
to execute when resetting the connection to a target.
|
||||||
\li In the \uicontrol {Debug information} field, specify the location
|
\li In the \uicontrol {Debug information} field, specify the location
|
||||||
for storing debug information. You cannot use an empty path.
|
for storing debug information. You cannot use an empty path.
|
||||||
\li In the \uicontrol {Override server channel} field, specify a
|
\li In the \uicontrol {Override server channel} field, specify a
|
||||||
@@ -620,6 +625,9 @@
|
|||||||
To save space on the screen, select \uicontrol Window > \uicontrol Views >
|
To save space on the screen, select \uicontrol Window > \uicontrol Views >
|
||||||
\uicontrol {Automatically Hide View Titlebars}.
|
\uicontrol {Automatically Hide View Titlebars}.
|
||||||
|
|
||||||
|
To show and hide columns in views, toggle \uicontrol {Show Column} in
|
||||||
|
the context menu.
|
||||||
|
|
||||||
Once the program starts running under the control of the debugger, it
|
Once the program starts running under the control of the debugger, it
|
||||||
behaves and performs as usual. You can interrupt a running C++ program by
|
behaves and performs as usual. You can interrupt a running C++ program by
|
||||||
selecting \uicontrol Debug > \uicontrol Interrupt. The program is
|
selecting \uicontrol Debug > \uicontrol Interrupt. The program is
|
||||||
|
@@ -79,8 +79,8 @@
|
|||||||
the \uicontrol {Enable QML} check box to enable
|
the \uicontrol {Enable QML} check box to enable
|
||||||
QML debugging.
|
QML debugging.
|
||||||
|
|
||||||
\li Select \uicontrol {Build > Rebuild Project} to clean and rebuild the
|
\li Select \uicontrol Build > \uicontrol {Rebuild Project} to clean and
|
||||||
project.
|
rebuild the project.
|
||||||
|
|
||||||
\li To debug applications on \l{glossary-device}{devices}, check that
|
\li To debug applications on \l{glossary-device}{devices}, check that
|
||||||
Qt 5.0, or later, libraries are installed on the device and
|
Qt 5.0, or later, libraries are installed on the device and
|
||||||
@@ -144,7 +144,8 @@
|
|||||||
the application from running until the debug client connects to the
|
the application from running until the debug client connects to the
|
||||||
server. This enables debugging from the start.
|
server. This enables debugging from the start.
|
||||||
|
|
||||||
\li Select \uicontrol {Debug > Start Debugging > Attach to QML Port}.
|
\li Select \uicontrol Debug > \uicontrol {Start Debugging} >
|
||||||
|
\uicontrol {Attach to QML Port}.
|
||||||
|
|
||||||
Choose the kit configured for the device where the application to
|
Choose the kit configured for the device where the application to
|
||||||
be debugged is running. The port number to use is displayed in the
|
be debugged is running. The port number to use is displayed in the
|
||||||
|
@@ -42,7 +42,8 @@
|
|||||||
\title Specifying Text Editor Settings
|
\title Specifying Text Editor Settings
|
||||||
|
|
||||||
Set the font preferences and apply color schemes for syntax highlighting in
|
Set the font preferences and apply color schemes for syntax highlighting in
|
||||||
\uicontrol {Tools > Options > Text Editor > Font & Colors}.
|
\uicontrol Tools > \uicontrol Options > \uicontrol {Text Editor} >
|
||||||
|
\uicontrol {Font & Colors}.
|
||||||
|
|
||||||
\image qtcreator-font-colors.png "Text editor options"
|
\image qtcreator-font-colors.png "Text editor options"
|
||||||
|
|
||||||
|
@@ -69,7 +69,8 @@
|
|||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol {Tools > Options > Environment > MIME Types}.
|
\li Select \uicontrol Tools > \uicontrol Options >
|
||||||
|
\uicontrol Environment > \uicontrol {MIME Types}.
|
||||||
|
|
||||||
\image qtcreator-mime-types.png "MIME Types"
|
\image qtcreator-mime-types.png "MIME Types"
|
||||||
|
|
||||||
|
@@ -34,3 +34,24 @@
|
|||||||
\title macOS
|
\title macOS
|
||||||
\internal
|
\internal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\externalpage https://doc.qt.io/QtForMCUs/qtul-environment.html
|
||||||
|
\title Qt for MCUs - Supported Target Platforms
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
\externalpage https://doc.qt.io/QtForMCUs/qtul-getting-started-on-stm.html
|
||||||
|
\title Getting Started on STM
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
\externalpage https://doc.qt.io/QtForMCUs/qtul-getting-started-on-stm.html
|
||||||
|
\title Getting Started on STM
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
\externalpage https://doc.qt.io/QtForMCUs/qtul-getting-started-on-nxp.html
|
||||||
|
\title Getting Started on NXP
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
\externalpage https://doc.qt.io/QtForMCUs/qtul-getting-started-windows.html
|
||||||
|
\title Getting Started on Windows
|
||||||
|
*/
|
||||||
|
@@ -70,8 +70,8 @@
|
|||||||
\uicontrol Linguist > \uicontrol {Release Translations (lrelease)}.
|
\uicontrol Linguist > \uicontrol {Release Translations (lrelease)}.
|
||||||
|
|
||||||
By default, the project .pro file is passed to the tools as an argument. To
|
By default, the project .pro file is passed to the tools as an argument. To
|
||||||
specify other command line arguments for the tools, select \uicontrol {Tools >
|
specify other command line arguments for the tools, select \uicontrol Tools >
|
||||||
External > Configure}.
|
\uicontrol External > \uicontrol Configure}.
|
||||||
|
|
||||||
To open TS files in Qt Linguist, right-click a TS file in the
|
To open TS files in Qt Linguist, right-click a TS file in the
|
||||||
\uicontrol Projects or \uicontrol {File System} view and select
|
\uicontrol Projects or \uicontrol {File System} view and select
|
||||||
@@ -111,9 +111,10 @@
|
|||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol {Tools > External > Configure}.
|
\li Select \uicontrol Tools > \uicontrol External >
|
||||||
|
\uicontrol Configure.
|
||||||
|
|
||||||
\li Select \uicontrol {Add > Add Tool}
|
\li Select \uicontrol Add > \uicontrol {Add Tool}
|
||||||
to add a new tool. You can also select \uicontrol {Add Category} to add a
|
to add a new tool. You can also select \uicontrol {Add Category} to add a
|
||||||
new category.
|
new category.
|
||||||
|
|
||||||
@@ -163,7 +164,8 @@
|
|||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
The category and tool are added to the \uicontrol {Tools > External} menu.
|
The category and tool are added to the \uicontrol Tools >
|
||||||
|
\uicontrol External menu.
|
||||||
|
|
||||||
If you change the configuration of preconfigured tools, you can later
|
If you change the configuration of preconfigured tools, you can later
|
||||||
revert the changes by selecting the \uicontrol Reset button.
|
revert the changes by selecting the \uicontrol Reset button.
|
||||||
|
@@ -78,11 +78,11 @@
|
|||||||
|
|
||||||
\section1 Viewing Function Tooltips
|
\section1 Viewing Function Tooltips
|
||||||
|
|
||||||
To hide function tooltips by default, select \uicontrol {Tools > Options >
|
To hide function tooltips by default, select \uicontrol Tools >
|
||||||
Text Editor > Behavior > Show help tooltips using the mouse >
|
\uicontrol Options > \uicontrol {Text Editor} > \uicontrol Behavior >
|
||||||
On Shift+Mouseover}. You
|
\uicontrol {Show help tooltips using the mouse} >
|
||||||
can still view the tooltips by pressing and holding down the \key Shift
|
\uicontrol {On Shift+Mouseover}. You can still view the tooltips by pressing
|
||||||
key.
|
and holding down the \key Shift key.
|
||||||
|
|
||||||
To use a keyboard shortcut for viewing help tooltips, select
|
To use a keyboard shortcut for viewing help tooltips, select
|
||||||
\uicontrol {Show help tooltips using keyboard shortcut (Alt)}.
|
\uicontrol {Show help tooltips using keyboard shortcut (Alt)}.
|
||||||
@@ -256,7 +256,8 @@
|
|||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol {Tools > Options > Help > Filters > Add}.
|
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Help >
|
||||||
|
\uicontrol Filters > \uicontrol Add.
|
||||||
|
|
||||||
\li Enter a name for the filter and press \uicontrol {OK}.
|
\li Enter a name for the filter and press \uicontrol {OK}.
|
||||||
|
|
||||||
|
@@ -50,8 +50,8 @@
|
|||||||
|
|
||||||
To view all functions available in \QC and the keyboard shortcuts defined
|
To view all functions available in \QC and the keyboard shortcuts defined
|
||||||
for them, select
|
for them, select
|
||||||
\uicontrol {Tools > Options > Environment > Keyboard}. The shortcuts are listed by
|
\uicontrol Tools > \uicontrol Options > \uicontrol Environment >
|
||||||
category. To find a keyboard
|
\uicontrol Keyboard. The shortcuts are listed by category. To find a keyboard
|
||||||
shortcut in the list, enter a function name or shortcut in the \uicontrol Filter
|
shortcut in the list, enter a function name or shortcut in the \uicontrol Filter
|
||||||
field.
|
field.
|
||||||
|
|
||||||
|
@@ -255,7 +255,8 @@
|
|||||||
create your own locator filters. That way you can locate files in a
|
create your own locator filters. That way you can locate files in a
|
||||||
directory structure you have defined.
|
directory structure you have defined.
|
||||||
|
|
||||||
To create locator filters, select \uicontrol {Tools > Options > Locator > Add}.
|
To create locator filters, select \uicontrol Tools > \uicontrol Options >
|
||||||
|
\uicontrol Locator > \uicontrol Add.
|
||||||
|
|
||||||
For more information, see \l{Creating Locator Filters}.
|
For more information, see \l{Creating Locator Filters}.
|
||||||
|
|
||||||
@@ -275,9 +276,9 @@
|
|||||||
\section1 Add a license header template for C++ code
|
\section1 Add a license header template for C++ code
|
||||||
|
|
||||||
A file containing a license header for C++ can be specified under
|
A file containing a license header for C++ can be specified under
|
||||||
\uicontrol{Tools > Options > C++ > License Template}. It may contain special
|
\uicontrol Tools > \uicontrol Options > \uicontrol C++ >
|
||||||
placeholders enclosed in \c{%%} that are replaced when generating a
|
\uicontrol {License Template}. It may contain special placeholders enclosed
|
||||||
new file:
|
in \c{%%} that are replaced when generating a new file:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
|
@@ -39,7 +39,8 @@
|
|||||||
|
|
||||||
When you exit \QC, a snapshot of your current workspace is stored as a
|
When you exit \QC, a snapshot of your current workspace is stored as a
|
||||||
\e session. To restore the session automatically when you start \QC,
|
\e session. To restore the session automatically when you start \QC,
|
||||||
select \uicontrol {File > Sessions > Manage > Restore last session on startup}.
|
select \uicontrol File > \uicontrol Sessions > \uicontrol Manage >
|
||||||
|
\uicontrol {Restore last session on startup}.
|
||||||
|
|
||||||
When you open or create any of the following items, they automatically
|
When you open or create any of the following items, they automatically
|
||||||
become a part of the session:
|
become a part of the session:
|
||||||
|
@@ -55,9 +55,9 @@
|
|||||||
compiler. What should I do?}
|
compiler. What should I do?}
|
||||||
|
|
||||||
Make sure that the application is in your system PATH when starting \QC.
|
Make sure that the application is in your system PATH when starting \QC.
|
||||||
Also select \uicontrol {Tools > Options} to check the settings specified
|
Also select \uicontrol Tools > \uicontrol Options to check the settings
|
||||||
for the application. Many plugins specify either the path to the tool they
|
specified for the application. Many plugins specify either the path to the
|
||||||
need or the environment they run in.
|
tool they need or the environment they run in.
|
||||||
|
|
||||||
This is especially relevant for the \macos where \c {/usr/local/bin} might
|
This is especially relevant for the \macos where \c {/usr/local/bin} might
|
||||||
not be in the path when \QC is started.
|
not be in the path when \QC is started.
|
||||||
@@ -66,9 +66,10 @@
|
|||||||
|
|
||||||
\QC has been localized into several languages. If the system
|
\QC has been localized into several languages. If the system
|
||||||
language is one of the supported languages, it is automatically selected.
|
language is one of the supported languages, it is automatically selected.
|
||||||
To change the language, select \uicontrol {Tools > Options > Environment} and
|
To change the language, select \uicontrol Tools > \uicontrol Options >
|
||||||
select a language in the \uicontrol Language field. Select
|
\uicontrol Environment and select a language in the \uicontrol Language
|
||||||
\uicontrol {Restart Now} to restart \QC and have the change take effect.
|
field. Select \uicontrol {Restart Now} to restart \QC and have the change
|
||||||
|
take effect.
|
||||||
|
|
||||||
\b {Has a reported issue been addressed?}
|
\b {Has a reported issue been addressed?}
|
||||||
|
|
||||||
@@ -172,8 +173,9 @@
|
|||||||
\uicontrol Help mode.
|
\uicontrol Help mode.
|
||||||
|
|
||||||
To view the documentation that is available and to add documentation,
|
To view the documentation that is available and to add documentation,
|
||||||
select \uicontrol {Tools > Options > Help > Documentation}. For more
|
select \uicontrol Tools > \uicontrol Options > \uicontrol Help >
|
||||||
information, see \l{Adding External Documentation}.
|
\uicontrol Documentation. For more information, see
|
||||||
|
\l{Adding External Documentation}.
|
||||||
|
|
||||||
\section1 Debugger Questions
|
\section1 Debugger Questions
|
||||||
|
|
||||||
@@ -195,10 +197,11 @@
|
|||||||
\b {How do I generate a core file in \QC?}
|
\b {How do I generate a core file in \QC?}
|
||||||
|
|
||||||
To trigger the GDB command that generates a core file while debugging,
|
To trigger the GDB command that generates a core file while debugging,
|
||||||
select \uicontrol {Window > Views > Debugger Log}. In the \uicontrol Command field,
|
select \uicontrol Window > \uicontrol Views > \uicontrol {Debugger Log}.
|
||||||
type \c gcore and press \key Enter. The core file is created in the
|
In the \uicontrol Command field, type \c gcore and press \key Enter. The
|
||||||
current working directory. You can specify another location for the file,
|
core file is created in the current working directory. You can specify
|
||||||
including a relative or absolute path, as an argument of the command.
|
another location for the file, including a relative or absolute path, as an
|
||||||
|
argument of the command.
|
||||||
|
|
||||||
\omit
|
\omit
|
||||||
To generate a temporary core file, select \uicontrol {Create Snapshot} in the
|
To generate a temporary core file, select \uicontrol {Create Snapshot} in the
|
||||||
@@ -272,8 +275,8 @@
|
|||||||
type of application, \c qDebug() and related functions use standard output
|
type of application, \c qDebug() and related functions use standard output
|
||||||
and error output.
|
and error output.
|
||||||
|
|
||||||
We recommend that you select \uicontrol {Projects > Run Settings > Run in
|
We recommend that you select \uicontrol Projects > \uicontrol {Run Settings} >
|
||||||
terminal} for console applications.
|
\uicontrol {Run in terminal} for console applications.
|
||||||
|
|
||||||
For GUI applications, \c qDebug() and related functions use the Windows API
|
For GUI applications, \c qDebug() and related functions use the Windows API
|
||||||
function \c OutputDebugString(). The output is displayed in the
|
function \c OutputDebugString(). The output is displayed in the
|
||||||
|
@@ -386,7 +386,7 @@
|
|||||||
\else
|
\else
|
||||||
\l{Using Git}{Version Control}
|
\l{Using Git}{Version Control}
|
||||||
\endif
|
\endif
|
||||||
panes, select \uicontrol {Window > Output Panes}.
|
panes, select \uicontrol Window > \uicontrol {Output Panes}.
|
||||||
\if defined(qtcreator)
|
\if defined(qtcreator)
|
||||||
To display the \uicontrol {To-Do Entries} pane, enable the Todo plugin.
|
To display the \uicontrol {To-Do Entries} pane, enable the Todo plugin.
|
||||||
\endif
|
\endif
|
||||||
|
@@ -120,7 +120,8 @@
|
|||||||
(\uicontrol {Filter Tree}) and select \uicontrol{Simplify Tree}.
|
(\uicontrol {Filter Tree}) and select \uicontrol{Simplify Tree}.
|
||||||
|
|
||||||
\li To hide source files which are automatically generated by the build
|
\li To hide source files which are automatically generated by the build
|
||||||
system, select \uicontrol {Filter Tree > Hide Generated Files}.
|
system, select \uicontrol {Filter Tree} >
|
||||||
|
\uicontrol {Hide Generated Files}.
|
||||||
|
|
||||||
\li To hide source files which are not enabled for the current target,
|
\li To hide source files which are not enabled for the current target,
|
||||||
select \uicontrol {Filter Tree} > \uicontrol {Hide Disabled Files}.
|
select \uicontrol {Filter Tree} > \uicontrol {Hide Disabled Files}.
|
||||||
|
@@ -47,22 +47,11 @@
|
|||||||
Linux, and macOS. However, the Qt for MCU SDK is currently only available
|
Linux, and macOS. However, the Qt for MCU SDK is currently only available
|
||||||
for Windows.
|
for Windows.
|
||||||
|
|
||||||
The following MCU boards are currently supported:
|
For a list of Qt for MCU reference implementations, see the
|
||||||
|
\l{Qt for MCUs - Supported Target Platforms}{Qt for MCUs} documentation.
|
||||||
\list
|
|
||||||
\li \l{https://www.st.com/en/evaluation-tools/stm32f7508-dk.html}
|
|
||||||
{STM32F7508-DK}
|
|
||||||
\li \l{https://www.st.com/en/evaluation-tools/32f769idiscovery.html}
|
|
||||||
{STM32F769I-DISCO}
|
|
||||||
\li \l{https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1050-evaluation-kit:MIMXRT1050-EVK}
|
|
||||||
{NXP i.MX RT1050 EVK}
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
For a list of Qt for MCU reference implementations, see the Qt for MCU
|
|
||||||
documentation.
|
|
||||||
|
|
||||||
You use the \l{Connecting Bare Metal Devices}{Bare metal plugin} to connect
|
You use the \l{Connecting Bare Metal Devices}{Bare metal plugin} to connect
|
||||||
to OpenOCD or ST-LINK Utility for debugging on MCUs.
|
to a debug server provider for debugging on MCUs.
|
||||||
|
|
||||||
\section1 Requirements
|
\section1 Requirements
|
||||||
|
|
||||||
@@ -73,25 +62,18 @@
|
|||||||
\li The Bare Metal plugin
|
\li The Bare Metal plugin
|
||||||
\li \l{https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm}
|
\li \l{https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm}
|
||||||
{GNU ARM Embedded Toolchain}
|
{GNU ARM Embedded Toolchain}
|
||||||
\li For STM32 boards:
|
\li The hardware specific requirements vary depending on the hardware platform you are developing for.
|
||||||
\list
|
For more information see:
|
||||||
\li \l{https://www.st.com/en/embedded-software/stm32cubef7.html}
|
\list
|
||||||
{STM32Cube SDK}
|
\li \l{Getting Started on NXP}
|
||||||
\li \l{https://www.st.com/en/development-tools/stm32cubeprog.html}
|
\li \l{Getting Started on STM}
|
||||||
{STM32Cube Programmer}
|
\endlist
|
||||||
\endlist
|
|
||||||
\li For NXP boards:
|
|
||||||
\list
|
|
||||||
\li \l{https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1050-evaluation-kit:MIMXRT1050-EVK}
|
|
||||||
{NXP EVKB-IMXRT 1050 SDK}
|
|
||||||
\li \l{https://www.segger.com/downloads/jlink}{SEGGER JLink}
|
|
||||||
\endlist
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section1 Setting Up the Development Environment
|
\section1 Setting Up the Development Environment
|
||||||
|
|
||||||
You must download and install the required software and create connections
|
You must download and install the required software and create connections
|
||||||
between \QC and MCUs.
|
between \QC and MCUs. For more information, see \l{Getting Started on Windows}.
|
||||||
|
|
||||||
\section2 Enabling Bare Metal and MCU Plugins
|
\section2 Enabling Bare Metal and MCU Plugins
|
||||||
|
|
||||||
@@ -117,7 +99,10 @@
|
|||||||
\image qtcreator-mcu-options.png "MCU options"
|
\image qtcreator-mcu-options.png "MCU options"
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li In the \uicontrol {MCU board} field, select your MCU board.
|
\li In the \uicontrol {Qt for MCUs SDK} field, specify the path
|
||||||
|
to the directory where you installed Qt for MCUs SDK.
|
||||||
|
\li In the \uicontrol {Targets supported by the Qt for MCUs SDK}
|
||||||
|
field, select your MCU board.
|
||||||
\li In the \uicontrol {GNU ARM Embedded Toolchain} field,
|
\li In the \uicontrol {GNU ARM Embedded Toolchain} field,
|
||||||
specify the path to the directory where you installed the
|
specify the path to the directory where you installed the
|
||||||
tool chain.
|
tool chain.
|
||||||
@@ -137,8 +122,6 @@
|
|||||||
\li In the \uicontrol {SEGGER JLink} field, specify the
|
\li In the \uicontrol {SEGGER JLink} field, specify the
|
||||||
path to the directory where you installed the tool.
|
path to the directory where you installed the tool.
|
||||||
\endlist
|
\endlist
|
||||||
\li In the \uicontrol {Qt MCU SDK} field, specify the path to the
|
|
||||||
directory where you installed Qt MCU.
|
|
||||||
\li Select \uicontrol Apply to save the settings and to generate
|
\li Select \uicontrol Apply to save the settings and to generate
|
||||||
a MCU device and kit.
|
a MCU device and kit.
|
||||||
\endlist
|
\endlist
|
||||||
|
@@ -60,7 +60,8 @@
|
|||||||
|
|
||||||
\image qtcreator-kit-selector.png "Kit selector"
|
\image qtcreator-kit-selector.png "Kit selector"
|
||||||
|
|
||||||
\li Choose \uicontrol {Build > Build Project} or press \key {Ctrl+B}.
|
\li Choose \uicontrol Build > \uicontrol {Build Project} or press
|
||||||
|
\key {Ctrl+B}.
|
||||||
|
|
||||||
You can also select the \uicontrol Run button (2) to also deploy and run
|
You can also select the \uicontrol Run button (2) to also deploy and run
|
||||||
the application after building it.
|
the application after building it.
|
||||||
|
@@ -478,8 +478,9 @@
|
|||||||
subproject in the \uicontrol{Project Management} dialog. However, the root project
|
subproject in the \uicontrol{Project Management} dialog. However, the root project
|
||||||
must specify that qmake uses the \c subdirs template to build the project.
|
must specify that qmake uses the \c subdirs template to build the project.
|
||||||
|
|
||||||
To create a root project, select \uicontrol {File > New File or Project >
|
To create a root project, select \uicontrol File >
|
||||||
Other Project > Subdirs Project > Choose}.
|
\uicontrol {New File or Project} > \uicontrol {Other Project} >
|
||||||
|
\uicontrol {Subdirs Project} > \uicontrol Choose.
|
||||||
|
|
||||||
On the \uicontrol Summary page, select \uicontrol {Finish & Add Subproject} to create
|
On the \uicontrol Summary page, select \uicontrol {Finish & Add Subproject} to create
|
||||||
the root project and to add another project, such as a C++ library.
|
the root project and to add another project, such as a C++ library.
|
||||||
|
@@ -124,7 +124,8 @@
|
|||||||
|
|
||||||
\li In the \uicontrol Projects view, right-click the project name to open the
|
\li In the \uicontrol Projects view, right-click the project name to open the
|
||||||
context menu and select
|
context menu and select
|
||||||
\uicontrol {Add Library > Internal Library > Next}.
|
\uicontrol {Add Library} > \uicontrol {Internal Library} >
|
||||||
|
\uicontrol Next.
|
||||||
|
|
||||||
\li In the \uicontrol Library field, select \b mylib and click \uicontrol Next.
|
\li In the \uicontrol Library field, select \b mylib and click \uicontrol Next.
|
||||||
|
|
||||||
|
@@ -164,8 +164,8 @@
|
|||||||
|
|
||||||
\section2 Adding Custom Build Steps
|
\section2 Adding Custom Build Steps
|
||||||
|
|
||||||
To add custom steps to the build settings, select \uicontrol {Add Build Step >
|
To add custom steps to the build settings, select
|
||||||
Custom Process Step}.
|
\uicontrol {Add Build Step} > \uicontrol {Custom Process Step}.
|
||||||
|
|
||||||
By default, custom steps are enabled. To disable a custom step, select
|
By default, custom steps are enabled. To disable a custom step, select
|
||||||
the \inlineimage buildstepdisable.png
|
the \inlineimage buildstepdisable.png
|
||||||
|
@@ -59,7 +59,7 @@
|
|||||||
\image qtcreator-code-style-clang-format.png "Clang Format Code Style settings in Projects mode"
|
\image qtcreator-code-style-clang-format.png "Clang Format Code Style settings in Projects mode"
|
||||||
|
|
||||||
To specify global code style settings sets for C++ files, select
|
To specify global code style settings sets for C++ files, select
|
||||||
\uicontrol {Tools > Options > C++}.
|
\uicontrol Tools > \uicontrol Options > \uicontrol C++.
|
||||||
|
|
||||||
To specify global code style settings sets for QML files, select \uicontrol {Tools
|
To specify global code style settings sets for QML files, select \uicontrol {Tools
|
||||||
> Options > Qt Quick}.
|
> Options > Qt Quick}.
|
||||||
|
@@ -43,8 +43,8 @@
|
|||||||
|
|
||||||
You can configure the text editor according to your needs. You can specify
|
You can configure the text editor according to your needs. You can specify
|
||||||
editor behavior either globally for all projects or separately for each
|
editor behavior either globally for all projects or separately for each
|
||||||
project. To specify global editor behavior, select \uicontrol {Tools > Options
|
project. To specify global editor behavior, select \uicontrol Tools >
|
||||||
> Text Editor > Behavior}.
|
\uicontrol Options > \uicontrol {Text Editor} > \uicontrol Behavior.
|
||||||
|
|
||||||
To configure the text editor behavior for the current project:
|
To configure the text editor behavior for the current project:
|
||||||
|
|
||||||
|
@@ -29,7 +29,6 @@
|
|||||||
// Run the fixnavi.pl script to adjust the links to the index order.
|
// Run the fixnavi.pl script to adjust the links to the index order.
|
||||||
// **********************************************************************
|
// **********************************************************************
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\contentspage{index.html}{Qt Creator}
|
\contentspage{index.html}{Qt Creator}
|
||||||
\page index.html
|
\page index.html
|
||||||
@@ -132,7 +131,7 @@
|
|||||||
\row
|
\row
|
||||||
\li {4,1} \note To report bugs and suggestions to the
|
\li {4,1} \note To report bugs and suggestions to the
|
||||||
\l{https://bugreports.qt.io/}{Qt Project Bug Tracker},
|
\l{https://bugreports.qt.io/}{Qt Project Bug Tracker},
|
||||||
select \uicontrol {Help > Report Bug}.
|
select \uicontrol Help > \uicontrol {Report Bug}.
|
||||||
To copy and paste detailed information about your system to the
|
To copy and paste detailed information about your system to the
|
||||||
bug report, select \uicontrol Help >
|
bug report, select \uicontrol Help >
|
||||||
\uicontrol {System Information}.
|
\uicontrol {System Information}.
|
||||||
|
@@ -184,9 +184,12 @@
|
|||||||
support for \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html}
|
support for \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html}
|
||||||
{Qt Virtual Keyboard} to the application.
|
{Qt Virtual Keyboard} to the application.
|
||||||
|
|
||||||
|
\note \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html}
|
||||||
|
{Qt Virtual Keyboard} is not supported for Android and iOS.
|
||||||
|
|
||||||
\li Select \l{glossary-buildandrun-kit}{kits} for the platforms that
|
\li Select \l{glossary-buildandrun-kit}{kits} for the platforms that
|
||||||
you want to build the application for. To build applications for
|
you want to build the application for. To build applications for
|
||||||
mobile devices, select kits for Android ARM and iPhone OS, and
|
mobile devices, select kits for Android ARM and iOS, and
|
||||||
click \uicontrol{Next}.
|
click \uicontrol{Next}.
|
||||||
|
|
||||||
\note Kits are listed if they have been specified in \uicontrol
|
\note Kits are listed if they have been specified in \uicontrol
|
||||||
|
@@ -99,8 +99,8 @@
|
|||||||
\note To profile applications on \l{glossary-device}{devices}, you
|
\note To profile applications on \l{glossary-device}{devices}, you
|
||||||
must install Qt 4.7.4 or later libraries on them.
|
must install Qt 4.7.4 or later libraries on them.
|
||||||
|
|
||||||
\li Select \uicontrol {Analyze > QML Profiler} to profile the current
|
\li Select \uicontrol Analyze > \uicontrol {QML Profiler} to profile the
|
||||||
application.
|
current application.
|
||||||
|
|
||||||
\li Select the
|
\li Select the
|
||||||
\inlineimage qtcreator-analyze-start-button.png
|
\inlineimage qtcreator-analyze-start-button.png
|
||||||
@@ -169,9 +169,9 @@
|
|||||||
\section1 Attaching to Running Qt Quick Applications
|
\section1 Attaching to Running Qt Quick Applications
|
||||||
|
|
||||||
To profile Qt Quick applications that are not launched by \QC, select
|
To profile Qt Quick applications that are not launched by \QC, select
|
||||||
\uicontrol {Analyze > QML Profiler (External)}. You must enable QML debugging and profiling for
|
\uicontrol Analyze > \uicontrol {QML Profiler (External)}. You must enable
|
||||||
the application in the project build settings. For more information, see
|
QML debugging and profiling for the application in the project build
|
||||||
\l{Setting Up QML Debugging}.
|
settings. For more information, see \l{Setting Up QML Debugging}.
|
||||||
|
|
||||||
In the \uicontrol {QML Profiler} dialog, \uicontrol Port field, specify the port to
|
In the \uicontrol {QML Profiler} dialog, \uicontrol Port field, specify the port to
|
||||||
listen to.
|
listen to.
|
||||||
|
@@ -97,10 +97,10 @@
|
|||||||
You can also select \uicontrol Tools and then select \uicontrol {Create Repository}
|
You can also select \uicontrol Tools and then select \uicontrol {Create Repository}
|
||||||
in the submenu for the version control system.
|
in the submenu for the version control system.
|
||||||
|
|
||||||
To import a project that is under version control, choose \uicontrol {File >
|
To import a project that is under version control, choose \uicontrol File >
|
||||||
New File or Project > Project from Version Control} and select the
|
\uicontrol {New File or Project} > \uicontrol {Project from Version Control}
|
||||||
version control system that you use. Follow the instructions of the
|
and select the version control system that you use. Follow the instructions
|
||||||
wizard to import the project.
|
of the wizard to import the project.
|
||||||
|
|
||||||
\section1 Using Common Functions
|
\section1 Using Common Functions
|
||||||
|
|
||||||
@@ -121,8 +121,8 @@
|
|||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
The \uicontrol{Version Control} output pane displays the commands that are
|
The \uicontrol{Version Control} output pane displays the commands that are
|
||||||
executed, a timestamp, and the relevant output. Select \uicontrol {Window > Output
|
executed, a timestamp, and the relevant output. Select \uicontrol Window >
|
||||||
Panes > Version Control} to open the pane.
|
\uicontrol {Output Panes} > \uicontrol {Version Control} to open the pane.
|
||||||
|
|
||||||
\image qtcreator-vcs-pane.png
|
\image qtcreator-vcs-pane.png
|
||||||
|
|
||||||
|
@@ -48,8 +48,9 @@
|
|||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol{File > New File or Project > Application > Qt Widgets
|
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||||
Application > Choose}.
|
\uicontrol Application > \uicontrol {Qt Widgets Application} >
|
||||||
|
\uicontrol Choose.
|
||||||
|
|
||||||
\image qtcreator-new-qt-gui-application.png "New File or Project dialog"
|
\image qtcreator-new-qt-gui-application.png "New File or Project dialog"
|
||||||
|
|
||||||
@@ -190,8 +191,8 @@
|
|||||||
|
|
||||||
\li Right-click the \uicontrol Find button to open a context-menu.
|
\li Right-click the \uicontrol Find button to open a context-menu.
|
||||||
|
|
||||||
\li Select \uicontrol {Go to Slot > clicked()}, and then select
|
\li Select \uicontrol {Go to Slot} > \uicontrol {clicked()}, and
|
||||||
\uicontrol OK.
|
then select \uicontrol OK.
|
||||||
|
|
||||||
A private slot, \c{on_findButton_clicked()}, is added to the
|
A private slot, \c{on_findButton_clicked()}, is added to the
|
||||||
header file, textfinder.h and a private function,
|
header file, textfinder.h and a private function,
|
||||||
@@ -282,8 +283,8 @@
|
|||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol{File > New File or Project > Qt > Qt Resource File >
|
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||||
Choose}.
|
\uicontrol Qt > \uicontrol {Qt Resource File} > \uicontrol Choose.
|
||||||
|
|
||||||
\image qtcreator-add-resource-wizard.png "New File or Project dialog"
|
\image qtcreator-add-resource-wizard.png "New File or Project dialog"
|
||||||
|
|
||||||
@@ -305,12 +306,13 @@
|
|||||||
and click \uicontrol{Finish} or \uicontrol Done to open the file in the code
|
and click \uicontrol{Finish} or \uicontrol Done to open the file in the code
|
||||||
editor.
|
editor.
|
||||||
|
|
||||||
\li Select \uicontrol{Add > Add Prefix}.
|
\li Select \uicontrol Add > \uicontrol {Add Prefix}.
|
||||||
|
|
||||||
\li In the \uicontrol{Prefix} field, replace the default prefix with a slash
|
\li In the \uicontrol{Prefix} field, replace the default prefix with a slash
|
||||||
(/).
|
(/).
|
||||||
|
|
||||||
\li Select \uicontrol{Add > Add Files}, to locate and add input.txt.
|
\li Select \uicontrol Add > \uicontrol {Add Files}, to locate and add
|
||||||
|
input.txt.
|
||||||
|
|
||||||
\image qtcreator-add-resource.png "Editing resource files"
|
\image qtcreator-add-resource.png "Editing resource files"
|
||||||
|
|
||||||
|
@@ -141,8 +141,8 @@
|
|||||||
building applications is configured and built to use the MinGW/g++ compiler.
|
building applications is configured and built to use the MinGW/g++ compiler.
|
||||||
Plugins built by using this version of Qt cannot be loaded by \QC because
|
Plugins built by using this version of Qt cannot be loaded by \QC because
|
||||||
the build-keys do not match. The plugins can only be used in the standalone
|
the build-keys do not match. The plugins can only be used in the standalone
|
||||||
version of \QD. Choose \uicontrol{Help > About \QC} to check the Qt version \QC
|
version of \QD. Choose \uicontrol Help > \uicontrol {About \QC} to check the
|
||||||
was built with.
|
Qt version \QC was built with.
|
||||||
|
|
||||||
To use \QD plugins that were built for the shipped Qt version, make sure
|
To use \QD plugins that were built for the shipped Qt version, make sure
|
||||||
that \QC is built with the same compiler by either recompiling \QC using
|
that \QC is built with the same compiler by either recompiling \QC using
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
\title External Tool Specification Files
|
\title External Tool Specification Files
|
||||||
|
|
||||||
An external tool specification file describes a tool that can be run from
|
An external tool specification file describes a tool that can be run from
|
||||||
the \uicontrol { Tools > External } menu.
|
the \uicontrol Tools > \uicontrol External menu.
|
||||||
It specifies the name of the tool, the executable to run, optional
|
It specifies the name of the tool, the executable to run, optional
|
||||||
arguments, and how to handle the output from the tool.
|
arguments, and how to handle the output from the tool.
|
||||||
|
|
||||||
|
@@ -121,8 +121,8 @@
|
|||||||
\list
|
\list
|
||||||
\li \l{https://doc.qt.io/qtcreator/creator-highlighting.html#generic-highlighting}
|
\li \l{https://doc.qt.io/qtcreator/creator-highlighting.html#generic-highlighting}
|
||||||
{Generic Highlighting}
|
{Generic Highlighting}
|
||||||
\li \l{http://kate-editor.org/2005/03/24/writing-a-syntax-highlighting-file/}
|
\li \l{https://docs.kde.org/stable5/en/applications/katepart/highlight.html}
|
||||||
{Writing a Syntax Highlighting File}
|
{Working with Syntax Highlighting}
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section2 Custom Text Editors
|
\section2 Custom Text Editors
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2017 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -61,40 +61,59 @@
|
|||||||
\li API documentation, which is generated from code comments
|
\li API documentation, which is generated from code comments
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section1 Configuring the Documentation Project
|
\section1 Configuring Documentation Projects
|
||||||
|
|
||||||
\QC documentation is written by using QDoc. For more information about using
|
\QC documentation is written by using QDoc. For more information about using
|
||||||
QDoc, see the \l{http://doc.qt.io/qt-5/qdoc-index.html}{QDoc Manual}.
|
QDoc, see the \l{http://doc.qt.io/qt-5/qdoc-index.html}{QDoc Manual}.
|
||||||
|
|
||||||
QDoc finds the new topics automatically, when you place them as \c {.qdoc}
|
QDoc finds the new topics automatically, when you place them as \c {.qdoc}
|
||||||
files in the correct folder. However, to make the topics accessible to
|
files in a doc source folder. However, to make the topics accessible to
|
||||||
readers, you must also add them to the table of contents
|
readers, you must also add them to the table of contents and fix the next
|
||||||
(\c {doc\src\qtcreator-toc.qdoc}) and fix the next page and previous page
|
page and previous page links to them from other topics.
|
||||||
links to them from other topics.
|
|
||||||
|
|
||||||
\section2 Creating Folders and Files
|
\section1 Creating Folders and Files
|
||||||
|
|
||||||
These instructions apply only to the \QC Manual. Add API documentation
|
The \c qtcreator repository contains the sources for building the following
|
||||||
directly to the code source files. However, you can write an API overview
|
documents:
|
||||||
also as a separate \c {.qdoc} file.
|
|
||||||
|
|
||||||
Create a subfolder for your documentation in the \QC project folder in the
|
\list
|
||||||
\c {doc\src} folder. Create a separate file for each topic.
|
\li \QC Manual
|
||||||
|
\li Extending \QC Manual
|
||||||
|
\li \QDS Manual
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
The sources for each project are stored in the following subfolders of
|
||||||
|
the \QC project folder:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li \c \doc\qtcreator\src
|
||||||
|
\li \c \doc\qtcreatordev\src
|
||||||
|
\li \c \doc\qtdesignstudio\src
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
The \QDS Manual is based on the \QC Manual, with additional topics.
|
||||||
|
|
||||||
|
The Extending \QC Manual has its own sources. In addition, it
|
||||||
|
pulls in API reference documentation from the \QC source files. Add
|
||||||
|
code documentation directly to the code source files. However, you can
|
||||||
|
write an API overview also as a separate \c {.qdoc} file.
|
||||||
|
|
||||||
|
Create a subfolder for your documentation in the appropriate \c src folder.
|
||||||
|
Create a separate file for each topic.
|
||||||
|
|
||||||
The easiest way is probably to copy an existing file, save it as a new file,
|
The easiest way is probably to copy an existing file, save it as a new file,
|
||||||
and modify it. This way, you already have samples of the necessary bits and
|
and modify it. This way, you already have samples of the necessary bits and
|
||||||
pieces in place, such as topic start and end commands, copyright statement,
|
pieces in place, such as topic start and end commands, copyright statement,
|
||||||
links to next and previous topics, and topic title.
|
links to next and previous topics, and topic title.
|
||||||
|
|
||||||
\section2 Integrating Topics to Documentation
|
\section1 Integrating Topics to Documentation
|
||||||
|
|
||||||
You must integrate your new topics to the \QC Manual and Extending \QC
|
You must integrate your new topics to the manuals by adding links to them
|
||||||
Manual by adding links to them to the table of contents and to other
|
to the table of contents and to other relevant topics.
|
||||||
relevant topics.
|
|
||||||
|
|
||||||
To link to the topic, you can use the topic title. For example:
|
To link to the topic, you can use the topic title. For example:
|
||||||
|
|
||||||
\code
|
\badcode
|
||||||
\l{Integrating Topics to Documentation}
|
\l{Integrating Topics to Documentation}
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
@@ -102,32 +121,148 @@
|
|||||||
title, the link breaks. You can avoid this risk by adding the \c {\target}
|
title, the link breaks. You can avoid this risk by adding the \c {\target}
|
||||||
command to your topic and then linking to the target.
|
command to your topic and then linking to the target.
|
||||||
|
|
||||||
|
\section2 Showing and Hiding Information
|
||||||
|
|
||||||
|
\QDS uses only a subset of \QC plugins and it has its own special plugins.
|
||||||
|
This means that their manuals have somewhat different structures. Which, in
|
||||||
|
turn breaks the navigation links to previous and next pages.
|
||||||
|
|
||||||
|
This also means that some of the \QC Manual source files are not needed at
|
||||||
|
all and some contain information that does not apply to the \QDS Manual. If
|
||||||
|
QDoc parsed all the \QC Manual sources, it would generate HTML files for each
|
||||||
|
topic and include those files and all the images that they refer to in the
|
||||||
|
\QDS help compilation files. This would unnecessarily increase the size of
|
||||||
|
the \QDS help database and pollute the help index with references to files
|
||||||
|
that are not actually listed in the table of contents of the \QDS Manual.
|
||||||
|
To avoid this, some files are excluded from the \QDS Manual builds.
|
||||||
|
|
||||||
|
\section3 Excluding Souce Files from \QDS Manual Builds
|
||||||
|
|
||||||
|
The directories to exclude from \QDS Manual builds are
|
||||||
|
listed as values of the \c excludedirs option in
|
||||||
|
\c {\doc\qtdesignstudio\config\qtdesignstudio.qdocconf}.
|
||||||
|
|
||||||
|
You only need to edit the values of the option if you want to show or hide
|
||||||
|
all the contents of a directory. For example, if you add support for a \QC
|
||||||
|
plugin that was previously not supported by \QDS, you should remove the
|
||||||
|
directory that contains the documentation for the plugin from the values.
|
||||||
|
|
||||||
|
To hide or show individual topics within individual \c {.qdoc} files, you
|
||||||
|
need to move the files in the \QC Manual source (\c \doc\qtcreator\src) to
|
||||||
|
or from the excluded directories.
|
||||||
|
|
||||||
|
For example, if support for iOS were added, you would need to check whether
|
||||||
|
the information about iOS support is applicable to \QDS Manual. If yes,
|
||||||
|
you would need to remove the following line from the \c excludedirs value:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
../../src/ios \
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
You would then use defines to hide any \QC specific information from the
|
||||||
|
source file in the directory.
|
||||||
|
|
||||||
|
If a directory contains some files that are needed in both manuals and some
|
||||||
|
that are only needed in the \QC Manual, the latter are located in a
|
||||||
|
subdirectory called \c {creator-only}, which is excluded from the \QDS
|
||||||
|
Manual builds.
|
||||||
|
|
||||||
|
\section3 Hiding Text in \QC Manual Sources
|
||||||
|
|
||||||
|
The \c qtcreator define is specified as a value of the
|
||||||
|
\c defines option in the \QC QDoc configuration file,
|
||||||
|
\c {\doc\qtcreator\config\qtcreator-project.qdocconf}.
|
||||||
|
It is mostly used in the \QC Manual sources to hide \QC
|
||||||
|
specific information when the \QDS Manual is built.
|
||||||
|
|
||||||
|
The \c {\else} command is sometimes used to replace some \QC specific text
|
||||||
|
with text that applies to \QDS. For example, the following \c if-else
|
||||||
|
statement is needed in the \QC Manual sources, because the project wizards
|
||||||
|
in \QDS are different from those in \QC, and are therefore described in
|
||||||
|
a new topic that is located in the \QDS Manual sources:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
For more information, see
|
||||||
|
\if defined(qtcreator)
|
||||||
|
\l{Creating Qt Quick Projects}.
|
||||||
|
\else
|
||||||
|
\l{Creating UI Prototype Projects}.
|
||||||
|
\endif
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\note Section titles in the two manuals can be identical only if the page is
|
||||||
|
excluded from the \QDS Manual. In this case, QDoc can correctly determine
|
||||||
|
the link target. If you add a link to a section title that appears twice in
|
||||||
|
the doc source files, QDoc uses the first reference to that title in the
|
||||||
|
\c {.index} file.
|
||||||
|
|
||||||
|
\section3 Writing About \QDS Specific Features
|
||||||
|
|
||||||
|
\QDS specific plugins and features are described in a set of doc
|
||||||
|
source files located in the \c {\doc\qtdesignstudio\src} directory. Some
|
||||||
|
files are used to include subsections in topics in the \QC Manual sources.
|
||||||
|
|
||||||
|
Screenshots and other illustrations are stored in the
|
||||||
|
\c {\qtdesignstudio\images} directory.
|
||||||
|
|
||||||
|
If you add new topics to the \QDS Manual, add links to them to the table
|
||||||
|
of contents in \c {qtdesignstudio-toc.qdoc} and check the values of the
|
||||||
|
navigation links around them.
|
||||||
|
|
||||||
|
\section3 Including Sections in \QC Manual Sources
|
||||||
|
|
||||||
|
\QMLD is an integral part of both \QC and \QDS. Therefore, most topics that
|
||||||
|
describe it are needed in the manuals of both tools. You can use the
|
||||||
|
\c {\include} command in the \QC Manual sources to include \c {.qdocinc}
|
||||||
|
files from the \QDS Manual sources when building the \QDS Manual.
|
||||||
|
|
||||||
|
For example, the following lines in the
|
||||||
|
\c {\doc\qtcreator\src\qtquick\qtquick-components.qdoc}
|
||||||
|
file add information about creating and using \QDS Components
|
||||||
|
to the \e {Creating Components} topic that is pulled from the
|
||||||
|
\QC Manual sources:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
\if defined(qtdesignstudio)
|
||||||
|
\include qtdesignstudio-components.qdocinc creating studio components
|
||||||
|
\include qtdesignstudio-components.qdocinc studio components
|
||||||
|
\endif
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Similarly, you can use include files to include subsections in different
|
||||||
|
main level topics in the two manuals.
|
||||||
|
|
||||||
\section2 Updating Next and Previous Links
|
\section2 Updating Next and Previous Links
|
||||||
|
|
||||||
When you add new topics to a document, you must also change the navigation
|
When you add new topics to a document, you must also change the navigation
|
||||||
links of the topics around them. This is very error prone when done
|
links of the topics around them.
|
||||||
manually, and therefore we have a script called \c {fixnavi.pl} for it. For
|
|
||||||
the script to work, you must add the \c {\nextpage} and \c {\previouspage}
|
|
||||||
commands to the topic, with dummy values (for example,
|
|
||||||
\c {\nextpage=anything.html}).
|
|
||||||
|
|
||||||
\note The script creates the links according to the TOC in the topic set as
|
The navigation order of the topics in the \QC Manual is specified in
|
||||||
the value of the \c indexTitle configuration parameter
|
\c {\doc\qtcreator\src\qtcreator-toc.qdoc} and that of the topics in the
|
||||||
(\c {doc\src\qtcreator-toc.qdoc}). If your topics are not listed in the TOC,
|
\QDS Manual in \c {\doc\qtdesignstudio\src\qtdesignstudio-toc.qdoc}. If
|
||||||
the script removes the \c {\nextpage} and \c {\previouspage} commands from
|
you add topics to or move them around in a TOC file, you must adjust the
|
||||||
them.
|
navigation links accordingly.
|
||||||
|
|
||||||
To run the script, you must have Perl installed. If you build Qt yourself,
|
The \c qtdesignstudio define is specified as a value of
|
||||||
you should already have it. Otherwise, download and install
|
the \c defines option in the \QDS Manual configuration file,
|
||||||
\l{http://www.perl.org/}{Perl}.
|
\c {qtcreator\doc\qtdesignstudio\config\qtdesignstudio.qdocconf}.
|
||||||
|
It is mostly used in the \QC Manual sources to specify values for the
|
||||||
|
\c {\previouspage} and \c {\nextpage} commands depending on whether
|
||||||
|
the \QDS Manual or \QC Manual is being built. For example, the
|
||||||
|
following \c if-else statement is needed, because only the Git
|
||||||
|
version control system is integrated to \QDS, and information about
|
||||||
|
the other systems integrated to \QC is hidden:
|
||||||
|
|
||||||
To run the script, enter the following command in the doc folder:
|
\badcode
|
||||||
|
\page creator-vcs-git.html
|
||||||
\list
|
\if defined(qtdesignstudio)
|
||||||
\li nmake fixnavi (on Windows)
|
\previouspage studio-projects.html
|
||||||
|
\nextpage studio-importing-designs.html
|
||||||
\li make fixnavi (on Linux)
|
\else
|
||||||
\endlist
|
\previouspage creator-vcs-cvs.html
|
||||||
|
\nextpage creator-vcs-mercurial.html
|
||||||
|
\endif
|
||||||
|
\endcode
|
||||||
|
|
||||||
\section1 Writing Text
|
\section1 Writing Text
|
||||||
|
|
||||||
@@ -153,7 +288,7 @@
|
|||||||
Use the \c {\image} and \c {\inlineimage} QDoc commands to refer to images
|
Use the \c {\image} and \c {\inlineimage} QDoc commands to refer to images
|
||||||
from the text. You do not need to add paths to image names. For example:
|
from the text. You do not need to add paths to image names. For example:
|
||||||
|
|
||||||
\code
|
\badcode
|
||||||
\image riot.png
|
\image riot.png
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
@@ -182,7 +317,7 @@
|
|||||||
image also in the screen capture tool).
|
image also in the screen capture tool).
|
||||||
|
|
||||||
\li To highlight parts of the screen shot, use the images of numbers
|
\li To highlight parts of the screen shot, use the images of numbers
|
||||||
that are stored in \c{doc\images\numbers} in the \QC repository.
|
that are stored in \c{doc/images/numbers} in the \QC repository.
|
||||||
|
|
||||||
\li Before you submit the images to the repository, optimize them to
|
\li Before you submit the images to the repository, optimize them to
|
||||||
save space.
|
save space.
|
||||||
@@ -201,9 +336,9 @@
|
|||||||
you can just insert the number of the element you are referring to in
|
you can just insert the number of the element you are referring to in
|
||||||
brackets.
|
brackets.
|
||||||
|
|
||||||
You can find a set of images that show the numbers from 1 to 10 in the
|
You can find a set of images that show the numbers from 1 to 10 in the
|
||||||
\c doc\images\numbers directory (or in the \c qtdoc module sources in
|
\c doc/images/numbers directory (or in the \c qtdoc module sources in
|
||||||
\c doc\images\numbers).
|
\c doc/images/numbers).
|
||||||
|
|
||||||
To use the numbers, copy-paste the number images on the screenshot to the
|
To use the numbers, copy-paste the number images on the screenshot to the
|
||||||
places that you want to refer to from text.
|
places that you want to refer to from text.
|
||||||
@@ -211,7 +346,7 @@
|
|||||||
\section2 Optimizing Images
|
\section2 Optimizing Images
|
||||||
|
|
||||||
Save images in the PNG format in the \QC project folder in the
|
Save images in the PNG format in the \QC project folder in the
|
||||||
\c {doc\images} folder. Binary images can easily add megabytes to the Git
|
\c {doc/images} folder. Binary images can easily add megabytes to the Git
|
||||||
history. To keep the history as small as possible, the Git post-commit hooks
|
history. To keep the history as small as possible, the Git post-commit hooks
|
||||||
remind you to try to keep image size below 50 kilobytes. To achieve this
|
remind you to try to keep image size below 50 kilobytes. To achieve this
|
||||||
goal, crop images so that only relevant information is visible in them.
|
goal, crop images so that only relevant information is visible in them.
|
||||||
@@ -262,31 +397,38 @@
|
|||||||
folder (or any folder that contains your project). To optimize a screenshot,
|
folder (or any folder that contains your project). To optimize a screenshot,
|
||||||
enter the following command (here, from the \QC project folder):
|
enter the following command (here, from the \QC project folder):
|
||||||
|
|
||||||
\code
|
\badcode
|
||||||
optipng -o 7 -strip all doc/images/<screenshot_name>
|
optipng -o 7 -strip all doc/images/<screenshot_name>
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section1 Building Documentation
|
\section1 Building Documentation
|
||||||
|
|
||||||
You use QDoc to build the documentation. Build the documentation from time
|
You use QDoc to build the documentation. Build the documentation before
|
||||||
to time, to check its structure and the validity of the QDoc commands.
|
submitting any documentation patches, to check its structure, contents,
|
||||||
The error messages that QDoc issues are generally very useful for
|
and the validity of the QDoc commands. The error messages that QDoc
|
||||||
troubleshooting.
|
issues are generally very useful for troubleshooting.
|
||||||
|
|
||||||
For more information about setting up the build environment if you do not
|
\section2 Setting Up Documentation Builds
|
||||||
want to build the whole Qt, see
|
|
||||||
|
You can run \c qmake from an installed Qt to build documentation.
|
||||||
|
|
||||||
|
\note Since \QC version 4.12, only Qt 5.14.0 or later is supported
|
||||||
|
for building documentation.
|
||||||
|
|
||||||
|
For more information about setting up the build environment with a
|
||||||
|
self-built Qt if you do not want to build the whole Qt, see
|
||||||
\l{https://wiki.qt.io/Building_Qt_Documentation}{Building Qt Documentation}
|
\l{https://wiki.qt.io/Building_Qt_Documentation}{Building Qt Documentation}
|
||||||
on the Qt wiki.
|
on the Qt wiki.
|
||||||
|
|
||||||
The content and formatting of documentation are separated in QDoc.
|
The content and formatting of documentation are separated in QDoc.
|
||||||
The documentation configuration, style sheets, and templates have
|
The documentation configuration, style sheets, and templates have
|
||||||
changed over time, so they differ between Qt and \QC versions. Since \QC
|
changed over time, so they differ between Qt and \QC versions.
|
||||||
version 3.3, only Qt 5 is supported for building documentation. The
|
|
||||||
templates to use are defined by the
|
The templates to use are defined by the
|
||||||
\c {qt5\qtbase\doc\global\qt-html-templates-offline.qdocconf} and
|
\c {qt5/qtbase/doc/global/qt-html-templates-offline.qdocconf}
|
||||||
\c {qt5\qtbase\doc\global\qt-html-templates-online.qdocconf} configuration
|
and \c {qt5/qtbase/doc/global/qt-html-templates-online.qdocconf}
|
||||||
file. They are fetched from Qt sources by adding the following lines to the
|
configuration file. They are fetched from Qt sources by adding
|
||||||
qdocconf file:
|
the following lines to the qdocconf file:
|
||||||
|
|
||||||
\list
|
\list
|
||||||
\li \c {include ($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf)}
|
\li \c {include ($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf)}
|
||||||
@@ -299,45 +441,82 @@
|
|||||||
running it on a web server.
|
running it on a web server.
|
||||||
|
|
||||||
\note If the styles look wrong to you when reading help files in \QC or \QA,
|
\note If the styles look wrong to you when reading help files in \QC or \QA,
|
||||||
you might be looking at them in the QTextBrowser instead of the Qr WebEngine
|
you might be looking at them in the QTextBrowser instead of the Qt WebEngine
|
||||||
browser. This happens if you do not have Qt WebEngine installed.
|
browser. This happens if you do not have Qt WebEngine installed.
|
||||||
|
|
||||||
|
\section2 Documentation Build Commands
|
||||||
|
|
||||||
To build documentation for the sources from the qtcreator master branch, use
|
To build documentation for the sources from the qtcreator master branch, use
|
||||||
build scripts defined in the doc.pri file. To build all \QC docs in the
|
build scripts defined in the doc.pri file. To build the docs in the
|
||||||
help format and to create help files (.qch), enter the following build
|
HTML format and to create help files (.qch), enter the following build
|
||||||
commands from the project folder (after running qmake):
|
commands from the project folder (after running qmake):
|
||||||
|
|
||||||
\list
|
\list
|
||||||
\li nmake docs (on Windows)
|
\li \c {nmake docs} (on Windows)
|
||||||
|
|
||||||
\li make docs (on Linux and \macos)
|
\li \c {make docs} (on Linux and \macos)
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
The \QC Manual HTML files are generated in the \c {doc/qtcreator} directory.
|
The HTML documentation is generated in the following folders:
|
||||||
The Extending \QC Manual files are generated in the
|
|
||||||
\c {doc/qtcreator-dev} directory. The help files (\c {.qch}) are generated in the
|
\list
|
||||||
|
\li \c doc/html/qtcreator
|
||||||
|
\li \c doc/html/qtcreatordev
|
||||||
|
\li \c doc/html/qtdesignstudio
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
The help files (\c {.qch}) are generated in the
|
||||||
\c {share/doc/qtcreator} directory in the \QC build directory on Windows and
|
\c {share/doc/qtcreator} directory in the \QC build directory on Windows and
|
||||||
Linux, and in the \c {bin/Qt Creator.app/Contents/Resources/app} directory
|
Linux, and in the \c {bin/Qt Creator.app/Contents/Resources/app} directory
|
||||||
on \macos. You can view the HTML files in a browser and the help files in
|
on \macos.
|
||||||
|
|
||||||
|
You can view the HTML files in a browser and the help files in
|
||||||
the \QC \uicontrol Help mode. For more information about adding the help
|
the \QC \uicontrol Help mode. For more information about adding the help
|
||||||
files to \QC, see
|
files to \QC, see
|
||||||
\l{http://doc.qt.io/qtcreator/creator-help.html#adding-external-documentation}
|
\l{http://doc.qt.io/qtcreator/creator-help.html#adding-external-documentation}
|
||||||
{Adding External Documentation}.
|
{Adding External Documentation}.
|
||||||
|
|
||||||
Besides \c docs, you have the following options:
|
Besides \c docs, you have the following options for building a particular
|
||||||
|
document in a particular format:
|
||||||
|
|
||||||
\list
|
\list
|
||||||
\li html_docs_qtcreator - build \QC Manual in help format, but do not
|
\li \c html_docs_qtcreator - build \QC Manual in help format, but do not
|
||||||
generate a help file
|
generate a help file
|
||||||
|
|
||||||
\li html_docs_qtcreator-dev - build Extending \QC Manual in help
|
\li \c html_docs_qtcreator-dev - build Extending \QC Manual in help
|
||||||
format, but do not generate a help file
|
format, but do not generate a help file
|
||||||
|
|
||||||
\li qch_docs_qtcreator - build \QC Manual in help format and generate
|
\li \c qch_docs_qtcreator - build \QC Manual in help format and generate
|
||||||
a help file (.qch)
|
a help file (.qch)
|
||||||
|
|
||||||
\li qch_docs_qtcreator-dev - build Extending \QC Manual in help format
|
\li \c qch_docs_qtcreator-dev - build Extending \QC Manual in help format
|
||||||
and generate a help file (.qch)
|
and generate a help file (.qch)
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
|
\section3 Building the \QDS Manual
|
||||||
|
|
||||||
|
To get the correct product name and version, you must run \c {qmake -r} on
|
||||||
|
\c {qtcreator.pro} with the \c IDE_BRANDING_PRI option set to the absolute
|
||||||
|
path of \c {ide_branding.pri} in the \QDS (private) repository.
|
||||||
|
|
||||||
|
For example, on Windows enter (all on one line):
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
C:\dev\qtc-super\qtcreator>..\..\..\Qt\5.14.1\msvc2017_64\bin\qmake.exe
|
||||||
|
qtcreator.pro -r
|
||||||
|
IDE_BRANDING_PRI=C:\dev\tqtc-plugin-qtquickdesigner\studiodata\branding\ide_branding.pri
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
To build the \QDS Manual:
|
||||||
|
|
||||||
|
\list 1
|
||||||
|
\li Run \c qmake from Qt 5.14.0, or later with the path to the branding
|
||||||
|
information as an option (all on one line):
|
||||||
|
|
||||||
|
\c {<relative_path_to>/qmake.exe
|
||||||
|
qtcreator.pro -r
|
||||||
|
IDE_BRANDING_PRI=<absolute_path_to>ide_branding.pri}
|
||||||
|
\li Run \c {make docs} on Linux and macOS or \c {nmake docs}
|
||||||
|
on Windows.
|
||||||
|
\endlist
|
||||||
*/
|
*/
|
||||||
|
@@ -6,151 +6,23 @@ Manual are pulled in from Qt Creator sources. This is enabled by creating
|
|||||||
separate table of contents files for each Manual and by using defines
|
separate table of contents files for each Manual and by using defines
|
||||||
to hide and show information depending on which Manual is being built.
|
to hide and show information depending on which Manual is being built.
|
||||||
|
|
||||||
This readme file describes how to build the Qt Design Studio Manual and how to
|
Because branding information is needed to use the correct product name and
|
||||||
edit or add source files when necessary.
|
version, you must run `qmake -r` on `qtcreator.pro` with the `IDE_BRANDING_PRI`
|
||||||
|
option set to the absolute path of `ide_branding.pri` in the Qt Design Studio
|
||||||
|
repository.
|
||||||
|
|
||||||
|
For example, on Windows enter (all on one line):
|
||||||
|
|
||||||
|
`C:\dev\qtc-super\qtcreator>..\..\..\Qt\5.14.1\msvc2017_64\bin\qmake.exe
|
||||||
|
qtcreator.pro -r
|
||||||
|
IDE_BRANDING_PRI=C:\dev\tqtc-plugin-qtquickdesigner\studiodata\branding\ide_branding.pri`
|
||||||
|
|
||||||
## Building the Qt Design Studio Manual
|
## Building the Qt Design Studio Manual
|
||||||
|
|
||||||
1. Edit qtcreator\qtcreator.pri as follows:
|
1. Run `qmake` from Qt 5.14.0, or later with the path to the branding
|
||||||
`isEmpty(IDE_DISPLAY_NAME): IDE_DISPLAY_NAME = Qt Design Studio`
|
information as a parameter:
|
||||||
`isEmpty(IDE_ID): IDE_ID = qtdesignstudio`
|
`<relative_path_to>\qmake.exe qtcreator.pro -r IDE_BRANDING_PRI=<absolute_path_to>\tqtc-plugin-qtquickdesigner\studiodata\branding\ide_branding.pri`
|
||||||
`isEmpty(IDE_CASED_ID): IDE_CASED_ID = QtDesignStudio`
|
|
||||||
2. Switch to the `qtcreator\doc\qtdesignstudio` directory.
|
|
||||||
4. Run `qmake` from Qt 5.14.0, or later
|
|
||||||
(because you need the Qt Timeline and Qt Quick 3D module docs)
|
|
||||||
5. Run `make docs` on Linux and macOS or `nmake docs` on Windows.
|
5. Run `make docs` on Linux and macOS or `nmake docs` on Windows.
|
||||||
|
|
||||||
The docs are generated in `qtcreator\doc\qtdesignstudio\doc\qtdesignstudio`
|
The docs are generated in `qtcreator\doc\html\qtdesignstudio` with the
|
||||||
|
Qt Design Studio branding.
|
||||||
## Showing and Hiding Information
|
|
||||||
|
|
||||||
Qt Design Studio uses only a subset of Qt Creator plugins and it has its
|
|
||||||
own special plugins. This means that their manuals have somewhat different
|
|
||||||
structures. Which, in turn breaks the navigation links to previous and next
|
|
||||||
pages.
|
|
||||||
|
|
||||||
This also means that some of the Qt Creator doc source files are not needed at
|
|
||||||
all and some contain information that does not apply to the Qt Design Studio
|
|
||||||
Manual. If QDoc parses all the Qt Creator doc sources, it would generate
|
|
||||||
HTML files for each topic and include those files and all the images that they
|
|
||||||
refer to in the help compilation files. This would unnecessarily increase the
|
|
||||||
size of the help database and pollute the help index with references to files
|
|
||||||
that are not actually listed in the table of contents of the manual. To avoid
|
|
||||||
this, the files that are not needed are excluded from doc builds in the doc
|
|
||||||
build configuration file.
|
|
||||||
|
|
||||||
### Fixing the Navigation Links
|
|
||||||
|
|
||||||
The navigation order of the topics in the Qt Design Studio Manual is specified
|
|
||||||
in `qtcreator\doc\qtdesignstudio\src\qtdesignstudio-toc.qdoc`. The
|
|
||||||
order of the topics in the Qt Creator Manual is specified in
|
|
||||||
`qtcreator\doc\src\qtcreator-toc.qdoc`. If you add topics to or move them
|
|
||||||
around in the TOC file, you must adjust the navigation links accordingly.
|
|
||||||
|
|
||||||
The `qtdesignstudio` define is specified as a value of the `defines` option in
|
|
||||||
the Qt Design Studio doc configuration file,
|
|
||||||
`qtcreator\doc\qtdesignstudio\config\qtdesignstudio.qdocconf`. It is
|
|
||||||
mostly used in the Qt Creator doc sources to specify values for the
|
|
||||||
\previouspage and \nextpage commands depending on whether the Qt Design Studio
|
|
||||||
Manual or Qt Creator Manual is being built. For example, the following if-else
|
|
||||||
statement is needed, because the `quick-buttons.html` is excluded from the
|
|
||||||
Qt Design Studio Manual:
|
|
||||||
|
|
||||||
`\page quick-components.html`
|
|
||||||
`\previouspage creator-using-qt-quick-designer.html`
|
|
||||||
`\if defined(qtdesignstudio)`
|
|
||||||
`\nextpage qtquick-navigator.html`
|
|
||||||
`\else`
|
|
||||||
`\nextpage quick-buttons.html`
|
|
||||||
`\endif`
|
|
||||||
|
|
||||||
### Excluding Souce Files from Builds
|
|
||||||
|
|
||||||
The directories to exclude from Qt Design Studio Manual builds are listed as
|
|
||||||
values of the `excludedirs` option in `\config\qtdesignstudio.qdocconf`.
|
|
||||||
|
|
||||||
You only need to edit the values of the option if you want to show or hide all
|
|
||||||
the contents of a directory. For example, if you add support for a Qt Creator
|
|
||||||
plugin that was previously not supported by Qt Design Studio, you should remove
|
|
||||||
the directory that contains the documentation for the plugin from the values.
|
|
||||||
|
|
||||||
To hide or show individual topics within individual `.qdoc` files, you need to
|
|
||||||
move the files in the Qt Creator doc source (`qtcreator\doc\src`) to or from
|
|
||||||
excluded directories.
|
|
||||||
|
|
||||||
For example, if support for iOS were added, you would need to check whether the
|
|
||||||
information about iOS support is applicable to Qt Design Studio Manual. If yes,
|
|
||||||
you would need to remove the following line from the `excludedirs` value:
|
|
||||||
|
|
||||||
`../../src/ios \`
|
|
||||||
|
|
||||||
You would then use defines to hide any Qt Creator specific information from the
|
|
||||||
source file in the directory.
|
|
||||||
|
|
||||||
If a directory contains some files that are needed in both manuals and some that
|
|
||||||
are only needed in the Qt Creator Manual, the latter are located in a
|
|
||||||
subdirectory called `creator-only`, which is excluded from the Qt Design Studio
|
|
||||||
doc builds.
|
|
||||||
|
|
||||||
### Hiding Text in Qt Creator Doc Sources
|
|
||||||
|
|
||||||
The `qtcreator` define is specified as a value of the `defines` option in the
|
|
||||||
Qt Creator doc configuration file,
|
|
||||||
`qtcreator\doc\src\config\qtcreator-project.qdocconf`. It is mostly used in the
|
|
||||||
Qt Creator doc sources to hide Qt Creator specific information when the Qt
|
|
||||||
Design Studio Manual is built.
|
|
||||||
|
|
||||||
The `\else` command is sometimes used to replace some Qt Creator specific text
|
|
||||||
with text that applies to Qt Design Studio. For example, the following if-else
|
|
||||||
statement is needed in the Qt Creator doc sources, because the project wizards
|
|
||||||
in Qt Design Studio are different from those in Qt Creator, and are therefore
|
|
||||||
described in a new topic that is located in the Qt Design Studio doc sources:
|
|
||||||
|
|
||||||
`For more information, see`
|
|
||||||
`\if defined(qtcreator)`
|
|
||||||
`\l{Creating Qt Quick Projects}.`
|
|
||||||
`\else`
|
|
||||||
`\l{Creating UI Prototype Projects}.`
|
|
||||||
`\endif`
|
|
||||||
|
|
||||||
Note that titles in the two manuals can be identical only if the page is
|
|
||||||
excluded from the Qt Design Studio Manual. In this case, QDoc can correctly
|
|
||||||
determine the link target. If you add a link to a section title that appears
|
|
||||||
twice in the doc source files, QDoc uses the first reference to that title
|
|
||||||
in the `.index` file.
|
|
||||||
|
|
||||||
## Writing About Qt Design Studio Specific Features
|
|
||||||
|
|
||||||
Qt Design Studio specific plugins and features are described in a set of doc
|
|
||||||
source files located in the `qtcreator\doc\qtdesignstudio\src` directory. Some
|
|
||||||
files are used to include subsections in topics in the Qt Creator doc sources.
|
|
||||||
|
|
||||||
Screenshots and other illustrations are stored in the `\qtdesignstudio\images`
|
|
||||||
directory.
|
|
||||||
|
|
||||||
### Adding Topics
|
|
||||||
|
|
||||||
If you add new topics to the Qt Design Studio Manual, add links to them to the
|
|
||||||
table of contents in `qtdesignstudio-toc.qdoc` and check the values of the
|
|
||||||
navigation links around them.
|
|
||||||
|
|
||||||
### Including Sections in Qt Creator Doc Sources
|
|
||||||
|
|
||||||
Qt Quick Designer is an integral part of both Qt Creator and Qt Design Studio.
|
|
||||||
Therefore, most topics that describe it are needed in the manuals of both tools.
|
|
||||||
You can use the `\include` command in the Qt Creator doc sources to include
|
|
||||||
`.qdocinc` files from the Qt Design Studio doc sources when building the
|
|
||||||
Qt Design Studio Manual.
|
|
||||||
|
|
||||||
For example, the following lines in the
|
|
||||||
`qtcreator\doc\src\qtquick\qtquick-components.qdoc` file add information about
|
|
||||||
creating and using Qt Design Studio Components to the `Creating Components`
|
|
||||||
topic that is pulled from the Qt Creator doc sources:
|
|
||||||
|
|
||||||
`\if defined(qtdesignstudio)`
|
|
||||||
`\include qtdesignstudio-components.qdocinc creating studio components`
|
|
||||||
`\include qtdesignstudio-components.qdocinc studio components`
|
|
||||||
`\endif`
|
|
||||||
|
|
||||||
Similarly, you can use include files to include subsections in different main
|
|
||||||
level topics in the two manuals.
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="studio-getting-started.html">Getting Started</a></li>
|
<li><a href="studio-getting-started.html">Getting Started</a></li>
|
||||||
<li><a href="studio-projects-managing.html">Managing Projects</a></li>
|
<li><a href="studio-projects-managing.html">Managing Projects</a></li>
|
||||||
<li><a href="studio-prototyping.html">Creating UIs</a></li>
|
<li><a href="quick-uis.html">Creating UIs</a></li>
|
||||||
<li><a href="studio-adding-dynamics.html">Adding Dynamics</a></li>
|
<li><a href="studio-adding-dynamics.html">Adding Dynamics</a></li>
|
||||||
<li><a href="studio-3d.html">Editing 3D Scenes</a></li>
|
<li><a href="studio-3d.html">Editing 3D Scenes</a></li>
|
||||||
<li><a href="creator-live-preview.html">Previewing</a></li>
|
<li><a href="creator-live-preview.html">Previewing</a></li>
|
||||||
|
BIN
doc/qtdesignstudio/images/studio-navigator-view3d.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.4 KiB |
BIN
doc/qtdesignstudio/images/studio-qtquick-3d-model.png
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
doc/qtdesignstudio/images/studio-qtquick-3d-view.png
Normal file
After Width: | Height: | Size: 20 KiB |
@@ -40,12 +40,14 @@
|
|||||||
types: cube, cone, cylinder, plane (rectangle) or sphere. You can drag and
|
types: cube, cone, cylinder, plane (rectangle) or sphere. You can drag and
|
||||||
drop a model from the \uicontrol Library to a 3D scene.
|
drop a model from the \uicontrol Library to a 3D scene.
|
||||||
|
|
||||||
\image studio-qtquick-3d-components.png
|
\image studio-qtquick-3d-components.png "Library view QML Types tab Qt Quick 3D section"
|
||||||
|
|
||||||
You can change the model type in the \uicontrol Source field in the
|
You can change the model type in the \uicontrol Source field in the
|
||||||
\uicontrol Properties view. Select the \inlineimage plus.png
|
\uicontrol Properties view. Select the \inlineimage plus.png
|
||||||
button to add custom model types to the list.
|
button to add custom model types to the list.
|
||||||
|
|
||||||
|
\image studio-qtquick-3d-model.png "Model properties"
|
||||||
|
|
||||||
To enable picking the model against the scene, select the
|
To enable picking the model against the scene, select the
|
||||||
\uicontrol Pickable check box. Picking transforms the screen
|
\uicontrol Pickable check box. Picking transforms the screen
|
||||||
space x and y coordinates to a ray cast towards the specified
|
space x and y coordinates to a ray cast towards the specified
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Design Studio documentation.
|
** This file is part of the Qt Design Studio documentation.
|
||||||
@@ -31,6 +31,13 @@
|
|||||||
|
|
||||||
\title Adding 3D Views
|
\title Adding 3D Views
|
||||||
|
|
||||||
|
To display \l {Qt Quick 3D} types in the \uicontrol Library, select
|
||||||
|
\uicontrol Library > \uicontrol {QML Imports} > \uicontrol {Add Import} >
|
||||||
|
\uicontrol QtQuick3D. The types are displayed in the \uicontrol {QML Types}
|
||||||
|
tab.
|
||||||
|
|
||||||
|
\image studio-qtquick-3d-components.png
|
||||||
|
|
||||||
To add a 3D view to the scene, drag and drop a \uicontrol {View 3D}
|
To add a 3D view to the scene, drag and drop a \uicontrol {View 3D}
|
||||||
component from \uicontrol Library > \uicontrol {QML Types} >
|
component from \uicontrol Library > \uicontrol {QML Types} >
|
||||||
\uicontrol {Qt Quick 3D} to the 3D editor or to the \uicontrol Navigator.
|
\uicontrol {Qt Quick 3D} to the 3D editor or to the \uicontrol Navigator.
|
||||||
@@ -38,6 +45,8 @@
|
|||||||
and model. A default material is attached to the model. You can attach
|
and model. A default material is attached to the model. You can attach
|
||||||
textures to materials.
|
textures to materials.
|
||||||
|
|
||||||
|
\image studio-navigator-view3d.png "View 3D component in the Navigator"
|
||||||
|
|
||||||
By default, a directional light and a perspective camera are used.
|
By default, a directional light and a perspective camera are used.
|
||||||
To use other light and camera types, change the type of the component in
|
To use other light and camera types, change the type of the component in
|
||||||
the \uicontrol Type field in the \uicontrol Properties view. For example,
|
the \uicontrol Type field in the \uicontrol Properties view. For example,
|
||||||
@@ -49,6 +58,8 @@
|
|||||||
or in the \uicontrol Navigator and modify the property values in the
|
or in the \uicontrol Navigator and modify the property values in the
|
||||||
\uicontrol Properties view.
|
\uicontrol Properties view.
|
||||||
|
|
||||||
|
\image studio-qtquick-3d-view.png "View 3D component properties"
|
||||||
|
|
||||||
For more information about the available components and their properties,
|
For more information about the available components and their properties,
|
||||||
see \l{Using 3D Components}.
|
see \l{Using 3D Components}.
|
||||||
*/
|
*/
|
||||||
|
@@ -879,7 +879,35 @@ class Dumper(DumperBase):
|
|||||||
self.debugger.SetCurrentPlatformSDKRoot(self.sysRoot_)
|
self.debugger.SetCurrentPlatformSDKRoot(self.sysRoot_)
|
||||||
|
|
||||||
exefile = None if self.attachPid_ > 0 else self.executable_
|
exefile = None if self.attachPid_ > 0 else self.executable_
|
||||||
self.target = self.debugger.CreateTarget(exefile, None, None, True, error)
|
|
||||||
|
self.target = self.debugger.CreateTarget(
|
||||||
|
exefile, None, self.platform_, True, error)
|
||||||
|
|
||||||
|
if not error.Success():
|
||||||
|
self.report(self.describeError(error))
|
||||||
|
self.reportState('enginerunfailed')
|
||||||
|
return
|
||||||
|
|
||||||
|
if (self.startMode_ == DebuggerStartMode.AttachToRemoteServer
|
||||||
|
or self.startMode_ == DebuggerStartMode.AttachToRemoteProcess):
|
||||||
|
|
||||||
|
|
||||||
|
remote_channel = 'connect://' + self.remoteChannel_
|
||||||
|
connect_options = lldb.SBPlatformConnectOptions(remote_channel)
|
||||||
|
|
||||||
|
res = self.target.GetPlatform().ConnectRemote(connect_options)
|
||||||
|
DumperBase.warn("CONNECT: %s %s %s" % (res,
|
||||||
|
self.target.GetPlatform().GetName(),
|
||||||
|
self.target.GetPlatform().IsConnected()))
|
||||||
|
|
||||||
|
|
||||||
|
broadcaster = self.target.GetBroadcaster()
|
||||||
|
listener = self.debugger.GetListener()
|
||||||
|
broadcaster.AddListener(listener, lldb.SBProcess.eBroadcastBitStateChanged)
|
||||||
|
listener.StartListeningForEvents(broadcaster, lldb.SBProcess.eBroadcastBitStateChanged)
|
||||||
|
broadcaster.AddListener(listener, lldb.SBTarget.eBroadcastBitBreakpointChanged)
|
||||||
|
listener.StartListeningForEvents(
|
||||||
|
broadcaster, lldb.SBTarget.eBroadcastBitBreakpointChanged)
|
||||||
|
|
||||||
if self.nativeMixed:
|
if self.nativeMixed:
|
||||||
self.interpreterEventBreakpoint = \
|
self.interpreterEventBreakpoint = \
|
||||||
@@ -918,17 +946,29 @@ class Dumper(DumperBase):
|
|||||||
self.reportState('enginerunandinferiorrunok')
|
self.reportState('enginerunandinferiorrunok')
|
||||||
elif (self.startMode_ == DebuggerStartMode.AttachToRemoteServer
|
elif (self.startMode_ == DebuggerStartMode.AttachToRemoteServer
|
||||||
or self.startMode_ == DebuggerStartMode.AttachToRemoteProcess):
|
or self.startMode_ == DebuggerStartMode.AttachToRemoteProcess):
|
||||||
self.process = self.target.ConnectRemote(
|
|
||||||
self.debugger.GetListener(),
|
f = lldb.SBFileSpec()
|
||||||
self.remoteChannel_, None, error)
|
f.SetFilename(self.executable_)
|
||||||
|
|
||||||
|
launchInfo = lldb.SBLaunchInfo(self.processArgs_)
|
||||||
|
#launchInfo.SetWorkingDirectory(self.workingDirectory_)
|
||||||
|
launchInfo.SetWorkingDirectory('/tmp')
|
||||||
|
launchInfo.SetExecutableFile(f, True)
|
||||||
|
|
||||||
|
DumperBase.warn("TARGET: %s" % self.target)
|
||||||
|
self.process = self.target.Launch(launchInfo, error)
|
||||||
|
DumperBase.warn("PROCESS: %s" % self.process)
|
||||||
|
|
||||||
if not error.Success():
|
if not error.Success():
|
||||||
self.report(self.describeError(error))
|
self.report(self.describeError(error))
|
||||||
self.reportState('enginerunfailed')
|
self.reportState('enginerunfailed')
|
||||||
return
|
return
|
||||||
|
|
||||||
# Even if it stops it seems that LLDB assumes it is running
|
# Even if it stops it seems that LLDB assumes it is running
|
||||||
# and later detects that it did stop after all, so it is be
|
# and later detects that it did stop after all, so it is be
|
||||||
# better to mirror that and wait for the spontaneous stop.
|
# better to mirror that and wait for the spontaneous stop.
|
||||||
self.reportState('enginerunandinferiorrunok')
|
self.reportState('enginerunandinferiorrunok')
|
||||||
|
|
||||||
elif self.startMode_ == DebuggerStartMode.AttachCore:
|
elif self.startMode_ == DebuggerStartMode.AttachCore:
|
||||||
coreFile = args.get('coreFile', '')
|
coreFile = args.get('coreFile', '')
|
||||||
self.process = self.target.LoadCore(coreFile)
|
self.process = self.target.LoadCore(coreFile)
|
||||||
@@ -949,14 +989,6 @@ class Dumper(DumperBase):
|
|||||||
return
|
return
|
||||||
self.report('pid="%s"' % self.process.GetProcessID())
|
self.report('pid="%s"' % self.process.GetProcessID())
|
||||||
self.reportState('enginerunandinferiorrunok')
|
self.reportState('enginerunandinferiorrunok')
|
||||||
if self.target is not None:
|
|
||||||
broadcaster = self.target.GetBroadcaster()
|
|
||||||
listener = self.debugger.GetListener()
|
|
||||||
broadcaster.AddListener(listener, lldb.SBProcess.eBroadcastBitStateChanged)
|
|
||||||
listener.StartListeningForEvents(broadcaster, lldb.SBProcess.eBroadcastBitStateChanged)
|
|
||||||
broadcaster.AddListener(listener, lldb.SBTarget.eBroadcastBitBreakpointChanged)
|
|
||||||
listener.StartListeningForEvents(
|
|
||||||
broadcaster, lldb.SBTarget.eBroadcastBitBreakpointChanged)
|
|
||||||
|
|
||||||
def loop(self):
|
def loop(self):
|
||||||
event = lldb.SBEvent()
|
event = lldb.SBEvent()
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick3D 1.15
|
import QtQuick3D 1.15
|
||||||
import QtGraphicalEffects 1.12
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: iconGizmo
|
id: iconGizmo
|
||||||
@@ -45,7 +44,6 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property alias iconSource: iconImage.source
|
property alias iconSource: iconImage.source
|
||||||
//property alias overlayColor: colorOverlay.color
|
|
||||||
|
|
||||||
signal positionCommit()
|
signal positionCommit()
|
||||||
signal clicked(Node node, bool multi)
|
signal clicked(Node node, bool multi)
|
||||||
@@ -91,15 +89,6 @@ Item {
|
|||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ColorOverlay doesn't work correctly with hidden windows so commenting it out for now
|
|
||||||
// ColorOverlay {
|
|
||||||
// id: colorOverlay
|
|
||||||
// anchors.fill: parent
|
|
||||||
// cached: true
|
|
||||||
// source: iconImage
|
|
||||||
// color: "#00000000"
|
|
||||||
// opacity: 0.6
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -30,19 +30,17 @@ IconGizmo {
|
|||||||
id: lightGizmo
|
id: lightGizmo
|
||||||
|
|
||||||
property Model lightModel: null
|
property Model lightModel: null
|
||||||
|
property color overlayColor: targetNode ? targetNode.color : "transparent"
|
||||||
|
|
||||||
iconSource: targetNode
|
iconSource: targetNode
|
||||||
? targetNode instanceof DirectionalLight
|
? targetNode instanceof DirectionalLight
|
||||||
? "qrc:///qtquickplugin/mockfiles/images/directional_light_gradient.png"
|
? "image://IconGizmoImageProvider/directional_light_gradient.png:" + overlayColor
|
||||||
: targetNode instanceof AreaLight
|
: targetNode instanceof AreaLight
|
||||||
? "qrc:///qtquickplugin/mockfiles/images/area_light_gradient.png"
|
? "image://IconGizmoImageProvider/area_light_gradient.png:" + overlayColor
|
||||||
: targetNode instanceof PointLight
|
: targetNode instanceof PointLight
|
||||||
? "qrc:///qtquickplugin/mockfiles/images/point_light_gradient.png"
|
? "image://IconGizmoImageProvider/point_light_gradient.png:" + overlayColor
|
||||||
: "qrc:///qtquickplugin/mockfiles/images/spot_light_gradient.png"
|
: "image://IconGizmoImageProvider/spot_light_gradient.png:" + overlayColor
|
||||||
: "qrc:///qtquickplugin/mockfiles/images/point_light_gradient.png"
|
: "image://IconGizmoImageProvider/point_light_gradient.png:" + overlayColor
|
||||||
|
|
||||||
// ColorOverlay doesn't work correctly with hidden windows so commenting it out for now
|
|
||||||
//overlayColor: targetNode ? targetNode.color : "transparent"
|
|
||||||
|
|
||||||
function connectModel(model)
|
function connectModel(model)
|
||||||
{
|
{
|
||||||
@@ -57,6 +55,9 @@ IconGizmo {
|
|||||||
model.targetNode = targetNode;
|
model.targetNode = targetNode;
|
||||||
model.targetNode = Qt.binding(function() {return targetNode;});
|
model.targetNode = Qt.binding(function() {return targetNode;});
|
||||||
|
|
||||||
|
model.color = lightGizmo.overlayColor;
|
||||||
|
model.color = Qt.binding(function() {return lightGizmo.overlayColor;});
|
||||||
|
|
||||||
model.visible = visible;
|
model.visible = visible;
|
||||||
model.visible = Qt.binding(function() {return visible;});
|
model.visible = Qt.binding(function() {return visible;});
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,7 @@ Model {
|
|||||||
property Node targetNode: null
|
property Node targetNode: null
|
||||||
property Node scene: null
|
property Node scene: null
|
||||||
property bool selected: false
|
property bool selected: false
|
||||||
|
property color color
|
||||||
|
|
||||||
function updateGeometry()
|
function updateGeometry()
|
||||||
{
|
{
|
||||||
@@ -49,7 +50,7 @@ Model {
|
|||||||
materials: [
|
materials: [
|
||||||
DefaultMaterial {
|
DefaultMaterial {
|
||||||
id: defaultMaterial
|
id: defaultMaterial
|
||||||
emissiveColor: lightModel.selected ? "#FF0000" : "#555555"
|
emissiveColor: lightModel.selected ? lightModel.color : "#555555"
|
||||||
lighting: DefaultMaterial.NoLighting
|
lighting: DefaultMaterial.NoLighting
|
||||||
cullMode: Material.NoCulling
|
cullMode: Material.NoCulling
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,8 @@ HEADERS += $$PWD/generalhelper.h \
|
|||||||
$$PWD/lightgeometry.h \
|
$$PWD/lightgeometry.h \
|
||||||
$$PWD/gridgeometry.h \
|
$$PWD/gridgeometry.h \
|
||||||
$$PWD/selectionboxgeometry.h \
|
$$PWD/selectionboxgeometry.h \
|
||||||
$$PWD/linegeometry.h
|
$$PWD/linegeometry.h \
|
||||||
|
$$PWD/icongizmoimageprovider.h
|
||||||
|
|
||||||
SOURCES += $$PWD/generalhelper.cpp \
|
SOURCES += $$PWD/generalhelper.cpp \
|
||||||
$$PWD/mousearea3d.cpp \
|
$$PWD/mousearea3d.cpp \
|
||||||
@@ -12,4 +13,5 @@ SOURCES += $$PWD/generalhelper.cpp \
|
|||||||
$$PWD/lightgeometry.cpp \
|
$$PWD/lightgeometry.cpp \
|
||||||
$$PWD/gridgeometry.cpp \
|
$$PWD/gridgeometry.cpp \
|
||||||
$$PWD/selectionboxgeometry.cpp \
|
$$PWD/selectionboxgeometry.cpp \
|
||||||
$$PWD/linegeometry.cpp
|
$$PWD/linegeometry.cpp \
|
||||||
|
$$PWD/icongizmoimageprovider.cpp
|
||||||
|
@@ -0,0 +1,73 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and The Qt Company. For licensing terms
|
||||||
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||||
|
** information use the contact form at https://www.qt.io/contact-us.
|
||||||
|
**
|
||||||
|
** GNU General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 3 as published by the Free Software
|
||||||
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||||
|
** included in the packaging of this file. Please review the following
|
||||||
|
** information to ensure the GNU General Public License requirements will
|
||||||
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "icongizmoimageprovider.h"
|
||||||
|
|
||||||
|
namespace QmlDesigner {
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
|
IconGizmoImageProvider::IconGizmoImageProvider()
|
||||||
|
: QQuickImageProvider(QQuickImageProvider::Image)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QImage IconGizmoImageProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize)
|
||||||
|
{
|
||||||
|
// id format: <file name>:<color name>
|
||||||
|
QStringList parts = id.split(':');
|
||||||
|
if (parts.size() == 2) {
|
||||||
|
QImage image(QStringLiteral("://qtquickplugin/mockfiles/images/%1").arg(parts[0]));
|
||||||
|
|
||||||
|
// Recolorize non-transparent image pixels
|
||||||
|
QColor targetColor(parts[1]);
|
||||||
|
int r = targetColor.red();
|
||||||
|
int g = targetColor.green();
|
||||||
|
int b = targetColor.blue();
|
||||||
|
int size = image.sizeInBytes();
|
||||||
|
uchar *byte = image.bits();
|
||||||
|
for (int i = 0; i < size; i += 4) {
|
||||||
|
// Skip if alpha is zero
|
||||||
|
if (*(byte + 3) != 0) {
|
||||||
|
// Average between target color and current color
|
||||||
|
*byte = uchar((int(*byte) + b) / 2);
|
||||||
|
++byte;
|
||||||
|
*byte = uchar((int(*byte) + g) / 2);
|
||||||
|
++byte;
|
||||||
|
*byte = uchar((int(*byte) + r) / 2);
|
||||||
|
++byte;
|
||||||
|
// Preserve alpha
|
||||||
|
++byte;
|
||||||
|
} else {
|
||||||
|
byte += 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return image;
|
||||||
|
} else {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,41 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2020 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.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QtQuick/qquickimageprovider.h>
|
||||||
|
|
||||||
|
namespace QmlDesigner {
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
|
class IconGizmoImageProvider : public QQuickImageProvider
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
IconGizmoImageProvider();
|
||||||
|
|
||||||
|
QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) override;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
@@ -150,10 +150,10 @@ void IconRenderer::setupRender()
|
|||||||
QTimer::singleShot(1000, qGuiApp, &QGuiApplication::quit);
|
QTimer::singleShot(1000, qGuiApp, &QGuiApplication::quit);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
qGuiApp->quit();
|
QTimer::singleShot(0, qGuiApp, &QGuiApplication::quit);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qGuiApp->quit();
|
QTimer::singleShot(0, qGuiApp, &QGuiApplication::quit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -753,10 +753,14 @@ QObject *ObjectNodeInstance::createComponent(const QString &componentPath, QQmlC
|
|||||||
Q_UNUSED(disableComponentComplete)
|
Q_UNUSED(disableComponentComplete)
|
||||||
|
|
||||||
QQmlComponent component(context->engine(), fixComponentPathForIncompatibleQt(componentPath));
|
QQmlComponent component(context->engine(), fixComponentPathForIncompatibleQt(componentPath));
|
||||||
QObject *object = component.beginCreate(context);
|
|
||||||
|
|
||||||
QmlPrivateGate::tweakObjects(object);
|
QObject *object = nullptr;
|
||||||
component.completeCreate();
|
if (!component.isError()) {
|
||||||
|
object = component.beginCreate(context);
|
||||||
|
QmlPrivateGate::tweakObjects(object);
|
||||||
|
component.completeCreate();
|
||||||
|
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
|
||||||
|
}
|
||||||
|
|
||||||
if (component.isError()) {
|
if (component.isError()) {
|
||||||
qDebug() << componentPath;
|
qDebug() << componentPath;
|
||||||
@@ -764,8 +768,6 @@ QObject *ObjectNodeInstance::createComponent(const QString &componentPath, QQmlC
|
|||||||
qWarning() << error;
|
qWarning() << error;
|
||||||
}
|
}
|
||||||
|
|
||||||
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
|
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -71,6 +71,7 @@
|
|||||||
#include "../editor3d/gridgeometry.h"
|
#include "../editor3d/gridgeometry.h"
|
||||||
#include "../editor3d/selectionboxgeometry.h"
|
#include "../editor3d/selectionboxgeometry.h"
|
||||||
#include "../editor3d/linegeometry.h"
|
#include "../editor3d/linegeometry.h"
|
||||||
|
#include "../editor3d/icongizmoimageprovider.h"
|
||||||
|
|
||||||
#include <designersupportdelegate.h>
|
#include <designersupportdelegate.h>
|
||||||
#include <qmlprivategate.h>
|
#include <qmlprivategate.h>
|
||||||
@@ -114,6 +115,8 @@ void Qt5InformationNodeInstanceServer::createEditView3D()
|
|||||||
QObject::connect(helper, &QmlDesigner::Internal::GeneralHelper::toolStateChanged,
|
QObject::connect(helper, &QmlDesigner::Internal::GeneralHelper::toolStateChanged,
|
||||||
this, &Qt5InformationNodeInstanceServer::handleToolStateChanged);
|
this, &Qt5InformationNodeInstanceServer::handleToolStateChanged);
|
||||||
engine()->rootContext()->setContextProperty("_generalHelper", helper);
|
engine()->rootContext()->setContextProperty("_generalHelper", helper);
|
||||||
|
engine()->addImageProvider(QLatin1String("IconGizmoImageProvider"),
|
||||||
|
new QmlDesigner::Internal::IconGizmoImageProvider);
|
||||||
m_3dHelper = helper;
|
m_3dHelper = helper;
|
||||||
|
|
||||||
m_editView3D = new QQuickView(quickView()->engine(), quickView());
|
m_editView3D = new QQuickView(quickView()->engine(), quickView());
|
||||||
|
@@ -37,7 +37,7 @@ Section {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
Label {
|
Label {
|
||||||
text: qsTr("Running")
|
text: qsTr("Running")
|
||||||
tooltip: qsTr("Sets whether the animation should run to completion when it is stopped.")
|
tooltip: qsTr("Sets whether the animation is currently running.")
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
@@ -41,7 +41,7 @@ Item {
|
|||||||
|
|
||||||
property bool block: false
|
property bool block: false
|
||||||
|
|
||||||
signal clicked
|
signal updateColor
|
||||||
signal rightMouseButtonClicked
|
signal rightMouseButtonClicked
|
||||||
|
|
||||||
onAlphaChanged: invalidateColor();
|
onAlphaChanged: invalidateColor();
|
||||||
@@ -216,7 +216,7 @@ Item {
|
|||||||
}
|
}
|
||||||
onReleased: {
|
onReleased: {
|
||||||
if (mouse.button === Qt.LeftButton)
|
if (mouse.button === Qt.LeftButton)
|
||||||
colorButton.clicked()
|
colorButton.updateColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
@@ -245,7 +245,7 @@ Item {
|
|||||||
if (colorButton.hue !== value)
|
if (colorButton.hue !== value)
|
||||||
colorButton.hue = value
|
colorButton.hue = value
|
||||||
}
|
}
|
||||||
onClicked: colorButton.clicked()
|
onClicked: colorButton.updateColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
@@ -278,7 +278,7 @@ Item {
|
|||||||
var tmp = redSlider.value / 255.0
|
var tmp = redSlider.value / 255.0
|
||||||
if (colorButton.color.r !== tmp && !colorButton.block) {
|
if (colorButton.color.r !== tmp && !colorButton.block) {
|
||||||
colorButton.color.r = tmp
|
colorButton.color.r = tmp
|
||||||
colorButton.clicked()
|
colorButton.updateColor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -307,7 +307,7 @@ Item {
|
|||||||
var tmp = greenSlider.value / 255.0
|
var tmp = greenSlider.value / 255.0
|
||||||
if (colorButton.color.g !== tmp && !colorButton.block) {
|
if (colorButton.color.g !== tmp && !colorButton.block) {
|
||||||
colorButton.color.g = tmp
|
colorButton.color.g = tmp
|
||||||
colorButton.clicked()
|
colorButton.updateColor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -336,7 +336,7 @@ Item {
|
|||||||
var tmp = blueSlider.value / 255.0
|
var tmp = blueSlider.value / 255.0
|
||||||
if (colorButton.color.b !== tmp && !colorButton.block) {
|
if (colorButton.color.b !== tmp && !colorButton.block) {
|
||||||
colorButton.color.b = tmp
|
colorButton.color.b = tmp
|
||||||
colorButton.clicked()
|
colorButton.updateColor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -359,7 +359,7 @@ Item {
|
|||||||
onValueModified: {
|
onValueModified: {
|
||||||
if (colorButton.alpha !== alphaSlider.value && !colorButton.block) {
|
if (colorButton.alpha !== alphaSlider.value && !colorButton.block) {
|
||||||
colorButton.alpha = alphaSlider.value
|
colorButton.alpha = alphaSlider.value
|
||||||
colorButton.clicked()
|
colorButton.updateColor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -384,7 +384,7 @@ Item {
|
|||||||
onValueModified: {
|
onValueModified: {
|
||||||
if (colorButton.hue !== hueSlider2.value && !colorButton.block) {
|
if (colorButton.hue !== hueSlider2.value && !colorButton.block) {
|
||||||
colorButton.hue = hueSlider2.value
|
colorButton.hue = hueSlider2.value
|
||||||
colorButton.clicked()
|
colorButton.updateColor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -406,7 +406,7 @@ Item {
|
|||||||
onValueModified: {
|
onValueModified: {
|
||||||
if (colorButton.saturation !== saturationSlider.value && !colorButton.block) {
|
if (colorButton.saturation !== saturationSlider.value && !colorButton.block) {
|
||||||
colorButton.saturation = saturationSlider.value
|
colorButton.saturation = saturationSlider.value
|
||||||
colorButton.clicked()
|
colorButton.updateColor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -428,7 +428,7 @@ Item {
|
|||||||
onValueModified: {
|
onValueModified: {
|
||||||
if (colorButton.lightness !== lightnessSlider.value && !colorButton.block) {
|
if (colorButton.lightness !== lightnessSlider.value && !colorButton.block) {
|
||||||
colorButton.lightness = lightnessSlider.value
|
colorButton.lightness = lightnessSlider.value
|
||||||
colorButton.clicked()
|
colorButton.updateColor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -626,7 +626,7 @@ Column {
|
|||||||
|
|
||||||
sliderMargins: 4
|
sliderMargins: 4
|
||||||
|
|
||||||
onClicked: {
|
onUpdateColor: {
|
||||||
colorEditor.color = colorButton.color
|
colorEditor.color = colorButton.color
|
||||||
if (contextMenu.opened)
|
if (contextMenu.opened)
|
||||||
contextMenu.close()
|
contextMenu.close()
|
||||||
|
@@ -38,53 +38,69 @@ QtObject {
|
|||||||
|
|
||||||
readonly property string actionIcon: "\u0021"
|
readonly property string actionIcon: "\u0021"
|
||||||
readonly property string actionIconBinding: "\u0022"
|
readonly property string actionIconBinding: "\u0022"
|
||||||
readonly property string addFile: "\u0023"
|
readonly property string addColumnAfter: "\u0023"
|
||||||
readonly property string alignBottom: "\u0024"
|
readonly property string addColumnBefore: "\u0024"
|
||||||
readonly property string alignCenterHorizontal: "\u0025"
|
readonly property string addFile: "\u0025"
|
||||||
readonly property string alignCenterVertical: "\u0026"
|
readonly property string addRowAfter: "\u0026"
|
||||||
readonly property string alignLeft: "\u0027"
|
readonly property string addRowBefore: "\u0027"
|
||||||
readonly property string alignRight: "\u0028"
|
readonly property string addTable: "\u0028"
|
||||||
readonly property string alignTo: "\u0029"
|
readonly property string alignBottom: "\u0029"
|
||||||
readonly property string alignTop: "\u002A"
|
readonly property string alignCenterHorizontal: "\u002A"
|
||||||
readonly property string anchorBaseline: "\u002B"
|
readonly property string alignCenterVertical: "\u002B"
|
||||||
readonly property string anchorBottom: "\u002C"
|
readonly property string alignLeft: "\u002C"
|
||||||
readonly property string anchorFill: "\u002D"
|
readonly property string alignRight: "\u002D"
|
||||||
readonly property string anchorLeft: "\u002E"
|
readonly property string alignTo: "\u002E"
|
||||||
readonly property string anchorRight: "\u002F"
|
readonly property string alignTop: "\u002F"
|
||||||
readonly property string anchorTop: "\u0030"
|
readonly property string anchorBaseline: "\u0030"
|
||||||
readonly property string annotationBubble: "\u0031"
|
readonly property string anchorBottom: "\u0031"
|
||||||
readonly property string annotationDecal: "\u0032"
|
readonly property string anchorFill: "\u0032"
|
||||||
readonly property string centerHorizontal: "\u0033"
|
readonly property string anchorLeft: "\u0033"
|
||||||
readonly property string centerVertical: "\u0034"
|
readonly property string anchorRight: "\u0034"
|
||||||
readonly property string closeCross: "\u0035"
|
readonly property string anchorTop: "\u0035"
|
||||||
readonly property string distributeBottom: "\u0036"
|
readonly property string annotationBubble: "\u0036"
|
||||||
readonly property string distributeCenterHorizontal: "\u0037"
|
readonly property string annotationDecal: "\u0037"
|
||||||
readonly property string distributeCenterVertical: "\u0038"
|
readonly property string centerHorizontal: "\u0038"
|
||||||
readonly property string distributeLeft: "\u0039"
|
readonly property string centerVertical: "\u0039"
|
||||||
readonly property string distributeOriginBottomRight: "\u003A"
|
readonly property string closeCross: "\u003A"
|
||||||
readonly property string distributeOriginCenter: "\u003B"
|
readonly property string deleteColumn: "\u003B"
|
||||||
readonly property string distributeOriginNone: "\u003C"
|
readonly property string deleteRow: "\u003C"
|
||||||
readonly property string distributeOriginTopLeft: "\u003D"
|
readonly property string deleteTable: "\u003D"
|
||||||
readonly property string distributeRight: "\u003E"
|
readonly property string distributeBottom: "\u003E"
|
||||||
readonly property string distributeSpacingHorizontal: "\u003F"
|
readonly property string distributeCenterHorizontal: "\u003F"
|
||||||
readonly property string distributeSpacingVertical: "\u0040"
|
readonly property string distributeCenterVertical: "\u0040"
|
||||||
readonly property string distributeTop: "\u0041"
|
readonly property string distributeLeft: "\u0041"
|
||||||
readonly property string edit: "\u0042"
|
readonly property string distributeOriginBottomRight: "\u0042"
|
||||||
readonly property string fontStyleBold: "\u0043"
|
readonly property string distributeOriginCenter: "\u0043"
|
||||||
readonly property string fontStyleItalic: "\u0044"
|
readonly property string distributeOriginNone: "\u0044"
|
||||||
readonly property string fontStyleStrikethrough: "\u0045"
|
readonly property string distributeOriginTopLeft: "\u0045"
|
||||||
readonly property string fontStyleUnderline: "\u0046"
|
readonly property string distributeRight: "\u0046"
|
||||||
readonly property string testIcon: "\u0047"
|
readonly property string distributeSpacingHorizontal: "\u0047"
|
||||||
readonly property string textAlignBottom: "\u0048"
|
readonly property string distributeSpacingVertical: "\u0048"
|
||||||
readonly property string textAlignCenter: "\u0049"
|
readonly property string distributeTop: "\u0049"
|
||||||
readonly property string textAlignLeft: "\u004A"
|
readonly property string edit: "\u004A"
|
||||||
readonly property string textAlignMiddle: "\u004B"
|
readonly property string fontStyleBold: "\u004B"
|
||||||
readonly property string textAlignRight: "\u004C"
|
readonly property string fontStyleItalic: "\u004C"
|
||||||
readonly property string textAlignTop: "\u004D"
|
readonly property string fontStyleStrikethrough: "\u004D"
|
||||||
readonly property string tickIcon: "\u004E"
|
readonly property string fontStyleUnderline: "\u004E"
|
||||||
readonly property string triState: "\u004F"
|
readonly property string mergeCells: "\u004F"
|
||||||
readonly property string upDownIcon: "\u0050"
|
readonly property string redo: "\u0050"
|
||||||
readonly property string upDownSquare2: "\u0051"
|
readonly property string splitColumns: "\u0051"
|
||||||
|
readonly property string splitRows: "\u0052"
|
||||||
|
readonly property string testIcon: "\u0053"
|
||||||
|
readonly property string textAlignBottom: "\u0054"
|
||||||
|
readonly property string textAlignCenter: "\u0055"
|
||||||
|
readonly property string textAlignLeft: "\u0056"
|
||||||
|
readonly property string textAlignMiddle: "\u0057"
|
||||||
|
readonly property string textAlignRight: "\u0058"
|
||||||
|
readonly property string textAlignTop: "\u0059"
|
||||||
|
readonly property string textBulletList: "\u005A"
|
||||||
|
readonly property string textFullJustification: "\u005B"
|
||||||
|
readonly property string textNumberedList: "\u005C"
|
||||||
|
readonly property string tickIcon: "\u005D"
|
||||||
|
readonly property string triState: "\u005E"
|
||||||
|
readonly property string undo: "\u005F"
|
||||||
|
readonly property string upDownIcon: "\u0060"
|
||||||
|
readonly property string upDownSquare2: "\u0061"
|
||||||
|
|
||||||
readonly property font iconFont: Qt.font({
|
readonly property font iconFont: Qt.font({
|
||||||
"family": controlIcons.name,
|
"family": controlIcons.name,
|
||||||
|
@@ -325,6 +325,11 @@ void DebuggerRunTool::setSymbolFile(const FilePath &symbolFile)
|
|||||||
m_runParameters.symbolFile = symbolFile;
|
m_runParameters.symbolFile = symbolFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebuggerRunTool::setLldbPlatform(const QString &platform)
|
||||||
|
{
|
||||||
|
m_runParameters.platform = platform;
|
||||||
|
}
|
||||||
|
|
||||||
void DebuggerRunTool::setRemoteChannel(const QString &channel)
|
void DebuggerRunTool::setRemoteChannel(const QString &channel)
|
||||||
{
|
{
|
||||||
m_runParameters.remoteChannel = channel;
|
m_runParameters.remoteChannel = channel;
|
||||||
@@ -1078,9 +1083,9 @@ DebugServerRunner::DebugServerRunner(RunControl *runControl, DebugServerPortsGat
|
|||||||
setStarter([this, runControl, mainRunnable, portsGatherer] {
|
setStarter([this, runControl, mainRunnable, portsGatherer] {
|
||||||
QTC_ASSERT(portsGatherer, reportFailure(); return);
|
QTC_ASSERT(portsGatherer, reportFailure(); return);
|
||||||
|
|
||||||
Runnable gdbserver;
|
Runnable debugServer;
|
||||||
gdbserver.environment = mainRunnable.environment;
|
debugServer.environment = mainRunnable.environment;
|
||||||
gdbserver.workingDirectory = mainRunnable.workingDirectory;
|
debugServer.workingDirectory = mainRunnable.workingDirectory;
|
||||||
|
|
||||||
QStringList args = QtcProcess::splitArgs(mainRunnable.commandLineArguments, OsTypeLinux);
|
QStringList args = QtcProcess::splitArgs(mainRunnable.commandLineArguments, OsTypeLinux);
|
||||||
|
|
||||||
@@ -1092,23 +1097,31 @@ DebugServerRunner::DebugServerRunner(RunControl *runControl, DebugServerPortsGat
|
|||||||
portsGatherer->qmlServer()));
|
portsGatherer->qmlServer()));
|
||||||
}
|
}
|
||||||
if (isQmlDebugging && !isCppDebugging) {
|
if (isQmlDebugging && !isCppDebugging) {
|
||||||
gdbserver.executable = mainRunnable.executable; // FIXME: Case should not happen?
|
debugServer.executable = mainRunnable.executable; // FIXME: Case should not happen?
|
||||||
} else {
|
} else {
|
||||||
gdbserver.executable = FilePath::fromString(runControl->device()->debugServerPath());
|
debugServer.executable = FilePath::fromString(runControl->device()->debugServerPath());
|
||||||
if (gdbserver.executable.isEmpty())
|
if (debugServer.executable.isEmpty())
|
||||||
gdbserver.executable = FilePath::fromString("gdbserver");
|
debugServer.executable = FilePath::fromString("gdbserver");
|
||||||
args.clear();
|
args.clear();
|
||||||
if (m_useMulti)
|
if (debugServer.executable.toString().contains("lldb-server")) {
|
||||||
args.append("--multi");
|
args.append("platform");
|
||||||
if (m_pid.isValid())
|
args.append("--listen");
|
||||||
args.append("--attach");
|
args.append(QString("*:%1").arg(portsGatherer->gdbServer().port()));
|
||||||
args.append(QString(":%1").arg(portsGatherer->gdbServer().port()));
|
args.append("--server");
|
||||||
if (m_pid.isValid())
|
} else {
|
||||||
args.append(QString::number(m_pid.pid()));
|
// Something resembling gdbserver
|
||||||
|
if (m_useMulti)
|
||||||
|
args.append("--multi");
|
||||||
|
if (m_pid.isValid())
|
||||||
|
args.append("--attach");
|
||||||
|
args.append(QString(":%1").arg(portsGatherer->gdbServer().port()));
|
||||||
|
if (m_pid.isValid())
|
||||||
|
args.append(QString::number(m_pid.pid()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
gdbserver.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux);
|
debugServer.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux);
|
||||||
|
|
||||||
doStart(gdbserver, runControl->device());
|
doStart(debugServer, runControl->device());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -92,6 +92,7 @@ public:
|
|||||||
|
|
||||||
void setSysRoot(const Utils::FilePath &sysRoot);
|
void setSysRoot(const Utils::FilePath &sysRoot);
|
||||||
void setSymbolFile(const Utils::FilePath &symbolFile);
|
void setSymbolFile(const Utils::FilePath &symbolFile);
|
||||||
|
void setLldbPlatform(const QString &platform);
|
||||||
void setRemoteChannel(const QString &channel);
|
void setRemoteChannel(const QString &channel);
|
||||||
void setRemoteChannel(const QString &host, int port);
|
void setRemoteChannel(const QString &host, int port);
|
||||||
void setRemoteChannel(const QUrl &url);
|
void setRemoteChannel(const QUrl &url);
|
||||||
|
@@ -278,6 +278,7 @@ void LldbEngine::setupEngine()
|
|||||||
cmd2.arg("workingdirectory", rp.inferior.workingDirectory);
|
cmd2.arg("workingdirectory", rp.inferior.workingDirectory);
|
||||||
cmd2.arg("environment", rp.inferior.environment.toStringList());
|
cmd2.arg("environment", rp.inferior.environment.toStringList());
|
||||||
cmd2.arg("processargs", toHex(QtcProcess::splitArgs(rp.inferior.commandLineArguments).join(QChar(0))));
|
cmd2.arg("processargs", toHex(QtcProcess::splitArgs(rp.inferior.commandLineArguments).join(QChar(0))));
|
||||||
|
cmd2.arg("platform", rp.platform);
|
||||||
|
|
||||||
if (terminal()) {
|
if (terminal()) {
|
||||||
const qint64 attachedPID = terminal()->applicationPid();
|
const qint64 attachedPID = terminal()->applicationPid();
|
||||||
|
@@ -471,7 +471,7 @@ void AbstractProcessStep::slotProcessFinished(int, QProcess::ExitStatus)
|
|||||||
|
|
||||||
const QString stdOutLine = process ? QString::fromLocal8Bit(process->readAllStandardOutput()) : QString();
|
const QString stdOutLine = process ? QString::fromLocal8Bit(process->readAllStandardOutput()) : QString();
|
||||||
for (const QString &l : stdOutLine.split('\n'))
|
for (const QString &l : stdOutLine.split('\n'))
|
||||||
stdError(l);
|
stdOutput(l);
|
||||||
|
|
||||||
cleanUp(process);
|
cleanUp(process);
|
||||||
}
|
}
|
||||||
|
@@ -652,7 +652,7 @@ void BuildManager::nextBuildQueue()
|
|||||||
void BuildManager::progressChanged(int percent, const QString &text)
|
void BuildManager::progressChanged(int percent, const QString &text)
|
||||||
{
|
{
|
||||||
if (d->m_progressFutureInterface)
|
if (d->m_progressFutureInterface)
|
||||||
d->m_progressFutureInterface->setProgressValueAndText(percent, text);
|
d->m_progressFutureInterface->setProgressValueAndText(percent + 100 * d->m_progress, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildManager::nextStep()
|
void BuildManager::nextStep()
|
||||||
|
@@ -51,6 +51,8 @@ TreeScanner::TreeScanner(QObject *parent) : QObject(parent)
|
|||||||
|
|
||||||
TreeScanner::~TreeScanner()
|
TreeScanner::~TreeScanner()
|
||||||
{
|
{
|
||||||
|
disconnect(&m_futureWatcher, nullptr, nullptr, nullptr); // Do not trigger signals anymore!
|
||||||
|
|
||||||
if (!m_futureWatcher.isFinished()) {
|
if (!m_futureWatcher.isFinished()) {
|
||||||
m_futureWatcher.cancel();
|
m_futureWatcher.cancel();
|
||||||
m_futureWatcher.waitForFinished();
|
m_futureWatcher.waitForFinished();
|
||||||
|
@@ -536,10 +536,20 @@ void QbsBuildSystem::handleQbsParsingDone(bool success)
|
|||||||
bool dataChanged = false;
|
bool dataChanged = false;
|
||||||
bool envChanged = m_lastParseEnv != m_qbsProjectParser->environment();
|
bool envChanged = m_lastParseEnv != m_qbsProjectParser->environment();
|
||||||
m_lastParseEnv = m_qbsProjectParser->environment();
|
m_lastParseEnv = m_qbsProjectParser->environment();
|
||||||
|
const bool isActiveBuildSystem = project()->activeTarget()
|
||||||
|
&& project()->activeTarget()->buildSystem() == this;
|
||||||
if (success) {
|
if (success) {
|
||||||
const QJsonObject projectData = m_qbsProjectParser->session()->projectData();
|
const QJsonObject projectData = m_qbsProjectParser->session()->projectData();
|
||||||
if (projectData != m_projectData) {
|
if (projectData != m_projectData) {
|
||||||
m_projectData = projectData;
|
m_projectData = projectData;
|
||||||
|
dataChanged = isActiveBuildSystem;
|
||||||
|
} else if (isActiveBuildSystem
|
||||||
|
&& (!project()->rootProjectNode() || static_cast<QbsProjectNode *>(
|
||||||
|
project()->rootProjectNode())->projectData() != projectData)) {
|
||||||
|
// This is needed to trigger the necessary updates when switching targets.
|
||||||
|
// Nothing has changed on the BuildSystem side, but this build system's data now
|
||||||
|
// represents the project, so the data has changed from the overall project's
|
||||||
|
// point of view.
|
||||||
dataChanged = true;
|
dataChanged = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@@ -85,6 +85,7 @@ QByteArray Edit3DAction::category() const
|
|||||||
|
|
||||||
bool Edit3DAction::isVisible(const SelectionContext &selectionContext) const
|
bool Edit3DAction::isVisible(const SelectionContext &selectionContext) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(selectionContext)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -143,6 +143,7 @@ void Edit3DWidget::showCanvas(bool show)
|
|||||||
|
|
||||||
void Edit3DWidget::linkActivated(const QString &link)
|
void Edit3DWidget::linkActivated(const QString &link)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(link)
|
||||||
if (m_view)
|
if (m_view)
|
||||||
m_view->addQuick3DImport();
|
m_view->addQuick3DImport();
|
||||||
}
|
}
|
||||||
|
@@ -46,6 +46,8 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
|
const int flowBlockSize = 200;
|
||||||
|
|
||||||
FormEditorScene *FormEditorItem::scene() const {
|
FormEditorScene *FormEditorItem::scene() const {
|
||||||
return qobject_cast<FormEditorScene*>(QGraphicsItem::scene());
|
return qobject_cast<FormEditorScene*>(QGraphicsItem::scene());
|
||||||
}
|
}
|
||||||
@@ -646,17 +648,71 @@ void FormEditorTransitionItem::setDataModelPositionInBaseState(const QPointF &)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ResolveConnection
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ResolveConnection(const QmlItemNode &node) :
|
||||||
|
from({})
|
||||||
|
,to(node.modelNode().bindingProperty("to").resolveToModelNode())
|
||||||
|
,areaNode(ModelNode())
|
||||||
|
{
|
||||||
|
if (node.modelNode().hasBindingProperty("from"))
|
||||||
|
from = node.modelNode().bindingProperty("from").resolveToModelNode();
|
||||||
|
const QmlFlowItemNode to = node.modelNode().bindingProperty("to").resolveToModelNode();
|
||||||
|
|
||||||
|
if (from.isValid()) {
|
||||||
|
for (const QmlFlowActionAreaNode &area : from.flowActionAreas()) {
|
||||||
|
ModelNode target = area.targetTransition();
|
||||||
|
if (target == node.modelNode()) {
|
||||||
|
areaNode = area;
|
||||||
|
} else {
|
||||||
|
const ModelNode decisionNode = area.decisionNodeForTransition(node.modelNode());
|
||||||
|
if (decisionNode.isValid()) {
|
||||||
|
from = decisionNode;
|
||||||
|
areaNode = ModelNode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (from.modelNode().hasAuxiliaryData("joinConnection"))
|
||||||
|
joinConnection = from.modelNode().auxiliaryData("joinConnection").toBool();
|
||||||
|
} else {
|
||||||
|
if (from == node.rootModelNode()) {
|
||||||
|
isStartLine = true;
|
||||||
|
} else {
|
||||||
|
for (const ModelNode wildcard : QmlFlowViewNode(node.rootModelNode()).wildcards()) {
|
||||||
|
if (wildcard.bindingProperty("target").resolveToModelNode() == node.modelNode()) {
|
||||||
|
from = wildcard;
|
||||||
|
isWildcardLine = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool joinConnection = false;
|
||||||
|
|
||||||
|
bool isStartLine = false;
|
||||||
|
|
||||||
|
bool isWildcardLine = false;
|
||||||
|
|
||||||
|
QmlFlowItemNode from;
|
||||||
|
QmlFlowItemNode to;
|
||||||
|
QmlFlowActionAreaNode areaNode;
|
||||||
|
};
|
||||||
|
|
||||||
void FormEditorTransitionItem::updateGeometry()
|
void FormEditorTransitionItem::updateGeometry()
|
||||||
{
|
{
|
||||||
FormEditorItem::updateGeometry();
|
FormEditorItem::updateGeometry();
|
||||||
|
|
||||||
const ModelNode from = qmlItemNode().modelNode().bindingProperty("from").resolveToModelNode();
|
ResolveConnection resolved(qmlItemNode());
|
||||||
const ModelNode to = qmlItemNode().modelNode().bindingProperty("to").resolveToModelNode();
|
|
||||||
|
|
||||||
QPointF fromP = QmlItemNode(from).flowPosition();
|
QPointF fromP = QmlItemNode(resolved.from).flowPosition();
|
||||||
QRectF sizeTo = QmlItemNode(to).instanceBoundingRect();
|
QRectF sizeTo = resolved.to.instanceBoundingRect();
|
||||||
|
|
||||||
QPointF toP = QmlItemNode(to).flowPosition();
|
QPointF toP = QmlItemNode(resolved.to).flowPosition();
|
||||||
|
|
||||||
|
if (QmlItemNode(resolved.to).isFlowDecision())
|
||||||
|
sizeTo = QRectF(0, 0, flowBlockSize, flowBlockSize);
|
||||||
|
|
||||||
qreal x1 = fromP.x();
|
qreal x1 = fromP.x();
|
||||||
qreal x2 = toP.x();
|
qreal x2 = toP.x();
|
||||||
@@ -923,83 +979,44 @@ void FormEditorTransitionItem::paint(QPainter *painter, const QStyleOptionGraphi
|
|||||||
if (!qmlItemNode().modelNode().isValid())
|
if (!qmlItemNode().modelNode().isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!(qmlItemNode().modelNode().hasBindingProperty("from")
|
if (!qmlItemNode().modelNode().hasBindingProperty("to"))
|
||||||
&& qmlItemNode().modelNode().hasBindingProperty("to")))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
painter->save();
|
painter->save();
|
||||||
|
|
||||||
QmlFlowItemNode from = qmlItemNode().modelNode().bindingProperty("from").resolveToModelNode();
|
ResolveConnection resolved(qmlItemNode());
|
||||||
const QmlFlowItemNode to = qmlItemNode().modelNode().bindingProperty("to").resolveToModelNode();
|
|
||||||
|
|
||||||
QmlFlowActionAreaNode areaNode = ModelNode();
|
if (!resolved.from.modelNode().isValid())
|
||||||
|
|
||||||
bool joinConnection = false;
|
|
||||||
|
|
||||||
bool isStartLine = false;
|
|
||||||
|
|
||||||
bool isWildcardLine = false;
|
|
||||||
|
|
||||||
if (from.isValid()) {
|
|
||||||
for (const QmlFlowActionAreaNode &area : from.flowActionAreas()) {
|
|
||||||
ModelNode target = area.targetTransition();
|
|
||||||
if (target == qmlItemNode().modelNode()) {
|
|
||||||
areaNode = area;
|
|
||||||
} else {
|
|
||||||
const ModelNode decisionNode = area.decisionNodeForTransition(qmlItemNode().modelNode());
|
|
||||||
if (decisionNode.isValid()) {
|
|
||||||
from = decisionNode;
|
|
||||||
areaNode = ModelNode();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (from.modelNode().hasAuxiliaryData("joinConnection"))
|
|
||||||
joinConnection = from.modelNode().auxiliaryData("joinConnection").toBool();
|
|
||||||
} else {
|
|
||||||
if (from == qmlItemNode().rootModelNode()) {
|
|
||||||
isStartLine = true;
|
|
||||||
} else {
|
|
||||||
for (const ModelNode wildcard : QmlFlowViewNode(qmlItemNode().rootModelNode()).wildcards()) {
|
|
||||||
if (wildcard.bindingProperty("target").resolveToModelNode() == qmlItemNode().modelNode()) {
|
|
||||||
from = wildcard;
|
|
||||||
isWildcardLine = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!from.modelNode().isValid())
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QRectF fromRect = QmlItemNode(from).instanceBoundingRect();
|
QRectF fromRect = QmlItemNode(resolved.from).instanceBoundingRect();
|
||||||
if (QmlItemNode(from).isFlowDecision())
|
if (QmlItemNode(resolved.from).isFlowDecision())
|
||||||
fromRect = QRectF(0,0,200,200);
|
fromRect = QRectF(0, 0, flowBlockSize, flowBlockSize);
|
||||||
|
|
||||||
if (QmlItemNode(from).isFlowWildcard())
|
if (QmlItemNode(resolved.from).isFlowWildcard())
|
||||||
fromRect = QRectF(0,0,200,200);
|
fromRect = QRectF(0, 0, flowBlockSize, flowBlockSize);
|
||||||
fromRect.translate(QmlItemNode(from).flowPosition());
|
fromRect.translate(QmlItemNode(resolved.from).flowPosition());
|
||||||
|
|
||||||
if (isStartLine) {
|
if (resolved.isStartLine) {
|
||||||
fromRect = QRectF(0,0,100,100);
|
fromRect = QRectF(0,0,100,100);
|
||||||
fromRect.translate(QmlItemNode(to).flowPosition()- QPoint(200, 0));
|
fromRect.translate(QmlItemNode(resolved.to).flowPosition()- QPoint(200, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!joinConnection && areaNode.isValid()) {
|
if (!resolved.joinConnection && resolved.areaNode.isValid()) {
|
||||||
fromRect = QmlItemNode(areaNode).instanceBoundingRect();
|
fromRect = QmlItemNode(resolved.areaNode).instanceBoundingRect();
|
||||||
fromRect.translate(QmlItemNode(from).flowPosition());
|
fromRect.translate(QmlItemNode(resolved.from).flowPosition());
|
||||||
fromRect.translate(areaNode.instancePosition());
|
fromRect.translate(resolved.areaNode.instancePosition());
|
||||||
}
|
}
|
||||||
|
|
||||||
QRectF toRect = QmlItemNode(to).instanceBoundingRect();
|
QRectF toRect = QmlItemNode(resolved.to).instanceBoundingRect();
|
||||||
if (QmlItemNode(to).isFlowDecision())
|
if (QmlItemNode(resolved.to).isFlowDecision())
|
||||||
toRect = QRectF(0,0,200,200);
|
toRect = QRectF(0, 0, flowBlockSize,flowBlockSize);
|
||||||
|
|
||||||
toRect.translate(QmlItemNode(to).flowPosition());
|
toRect.translate(QmlItemNode(resolved.to).flowPosition());
|
||||||
|
|
||||||
if (isStartLine) {
|
if (resolved.isStartLine) {
|
||||||
fromRect = QRectF(0,0,50,50);
|
fromRect = QRectF(0,0,50,50);
|
||||||
fromRect.translate(QmlItemNode(to).flowPosition() + QPoint(-120, toRect.height() / 2 - 25));
|
fromRect.translate(QmlItemNode(resolved.to).flowPosition() + QPoint(-120, toRect.height() / 2 - 25));
|
||||||
}
|
}
|
||||||
|
|
||||||
toRect.translate(-pos());
|
toRect.translate(-pos());
|
||||||
@@ -1021,9 +1038,12 @@ void FormEditorTransitionItem::paint(QPainter *painter, const QStyleOptionGraphi
|
|||||||
|
|
||||||
QColor color = "#e71919";
|
QColor color = "#e71919";
|
||||||
|
|
||||||
if (isStartLine)
|
if (resolved.isStartLine)
|
||||||
color = "blue";
|
color = "blue";
|
||||||
|
|
||||||
|
if (resolved.isWildcardLine)
|
||||||
|
color = "green";
|
||||||
|
|
||||||
bool dash = false;
|
bool dash = false;
|
||||||
|
|
||||||
if (qmlItemNode().modelNode().hasAuxiliaryData("color"))
|
if (qmlItemNode().modelNode().hasAuxiliaryData("color"))
|
||||||
@@ -1048,7 +1068,7 @@ void FormEditorTransitionItem::paint(QPainter *painter, const QStyleOptionGraphi
|
|||||||
|
|
||||||
paintConnection(painter, fromRect, toRect, width, adjustedWidth ,color, dash, outOffset, inOffset, breakOffset);
|
paintConnection(painter, fromRect, toRect, width, adjustedWidth ,color, dash, outOffset, inOffset, breakOffset);
|
||||||
|
|
||||||
if (isStartLine) {
|
if (resolved.isStartLine) {
|
||||||
QPen pen;
|
QPen pen;
|
||||||
pen.setCosmetic(true);
|
pen.setCosmetic(true);
|
||||||
|
|
||||||
@@ -1094,7 +1114,7 @@ QTransform FormEditorItem::viewportTransform() const
|
|||||||
void FormEditorFlowDecisionItem::updateGeometry()
|
void FormEditorFlowDecisionItem::updateGeometry()
|
||||||
{
|
{
|
||||||
prepareGeometryChange();
|
prepareGeometryChange();
|
||||||
m_selectionBoundingRect = QRectF(0,0, 200, 200);
|
m_selectionBoundingRect = QRectF(0,0, flowBlockSize, flowBlockSize);
|
||||||
m_paintedBoundingRect = m_selectionBoundingRect;
|
m_paintedBoundingRect = m_selectionBoundingRect;
|
||||||
m_boundingRect = m_paintedBoundingRect;
|
m_boundingRect = m_paintedBoundingRect;
|
||||||
setTransform(qmlItemNode().instanceTransformWithContentTransform());
|
setTransform(qmlItemNode().instanceTransformWithContentTransform());
|
||||||
@@ -1104,6 +1124,8 @@ void FormEditorFlowDecisionItem::updateGeometry()
|
|||||||
|
|
||||||
void FormEditorFlowDecisionItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
void FormEditorFlowDecisionItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(option)
|
||||||
|
Q_UNUSED(widget)
|
||||||
if (!painter->isActive())
|
if (!painter->isActive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1162,6 +1184,7 @@ void FormEditorFlowDecisionItem::paint(QPainter *painter, const QStyleOptionGrap
|
|||||||
|
|
||||||
bool FormEditorFlowDecisionItem::flowHitTest(const QPointF &point) const
|
bool FormEditorFlowDecisionItem::flowHitTest(const QPointF &point) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(point)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -275,6 +275,11 @@ void ItemLibraryAssetImporter::parseQuick3DAsset(const QString &file, const QVar
|
|||||||
|
|
||||||
QString targetDirPath = targetDir.filePath(assetName);
|
QString targetDirPath = targetDir.filePath(assetName);
|
||||||
|
|
||||||
|
if (outDir.exists(assetName)) {
|
||||||
|
addWarning(tr("Skipped import of duplicate asset: \"%1\"").arg(assetName));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (targetDir.exists(assetName)) {
|
if (targetDir.exists(assetName)) {
|
||||||
if (!confirmAssetOverwrite(assetName)) {
|
if (!confirmAssetOverwrite(assetName)) {
|
||||||
addWarning(tr("Skipped import of existing asset: \"%1\"").arg(assetName));
|
addWarning(tr("Skipped import of existing asset: \"%1\"").arg(assetName));
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
#include <nodemetainfo.h>
|
#include <nodemetainfo.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QMetaProperty>
|
#include <QMetaProperty>
|
||||||
@@ -290,13 +291,15 @@ void ItemLibraryModel::addRoleNames()
|
|||||||
|
|
||||||
void ItemLibraryModel::sortSections()
|
void ItemLibraryModel::sortSections()
|
||||||
{
|
{
|
||||||
|
int nullPointerSectionCount = m_sections.removeAll(QPointer<ItemLibrarySection>());
|
||||||
|
QTC_ASSERT(nullPointerSectionCount == 0,;);
|
||||||
auto sectionSort = [](ItemLibrarySection *first, ItemLibrarySection *second) {
|
auto sectionSort = [](ItemLibrarySection *first, ItemLibrarySection *second) {
|
||||||
return QString::localeAwareCompare(first->sortingName(), second->sortingName()) < 1;
|
return QString::localeAwareCompare(first->sortingName(), second->sortingName()) < 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::sort(m_sections.begin(), m_sections.end(), sectionSort);
|
std::sort(m_sections.begin(), m_sections.end(), sectionSort);
|
||||||
|
|
||||||
foreach (ItemLibrarySection *itemLibrarySection, m_sections)
|
for (auto itemLibrarySection : m_sections)
|
||||||
itemLibrarySection->sortItems();
|
itemLibrarySection->sortItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -74,7 +74,7 @@ bool ItemLibrarySection::updateSectionVisibility(const QString &searchText, bool
|
|||||||
|
|
||||||
*changed = false;
|
*changed = false;
|
||||||
|
|
||||||
foreach(ItemLibraryItem *itemLibraryItem, m_sectionEntries.items()) {
|
for (auto itemLibraryItem : m_sectionEntries.items()) {
|
||||||
bool itemVisible = itemLibraryItem->itemName().toLower().contains(searchText)
|
bool itemVisible = itemLibraryItem->itemName().toLower().contains(searchText)
|
||||||
|| itemLibraryItem->typeName().toLower().contains(searchText);
|
|| itemLibraryItem->typeName().toLower().contains(searchText);
|
||||||
|
|
||||||
|
@@ -27,6 +27,8 @@
|
|||||||
|
|
||||||
#include "itemlibraryitem.h"
|
#include "itemlibraryitem.h"
|
||||||
|
|
||||||
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
@@ -79,13 +81,15 @@ void ItemLibrarySectionModel::addItem(ItemLibraryItem *element)
|
|||||||
element->setVisible(true);
|
element->setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QList<ItemLibraryItem *> &ItemLibrarySectionModel::items() const
|
const QList<QPointer<ItemLibraryItem>> &ItemLibrarySectionModel::items() const
|
||||||
{
|
{
|
||||||
return m_itemList;
|
return m_itemList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemLibrarySectionModel::sortItems()
|
void ItemLibrarySectionModel::sortItems()
|
||||||
{
|
{
|
||||||
|
int nullPointerSectionCount = m_itemList.removeAll(QPointer<ItemLibraryItem>());
|
||||||
|
QTC_ASSERT(nullPointerSectionCount == 0,;);
|
||||||
auto itemSort = [](ItemLibraryItem *first, ItemLibraryItem *second) {
|
auto itemSort = [](ItemLibraryItem *first, ItemLibraryItem *second) {
|
||||||
return QString::localeAwareCompare(first->itemName(), second->itemName()) < 1;
|
return QString::localeAwareCompare(first->itemName(), second->itemName()) < 1;
|
||||||
};
|
};
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
#include "itemlibrarymodel.h"
|
#include "itemlibrarymodel.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ public:
|
|||||||
|
|
||||||
void addItem(ItemLibraryItem *item);
|
void addItem(ItemLibraryItem *item);
|
||||||
|
|
||||||
const QList<ItemLibraryItem *> &items() const;
|
const QList<QPointer<ItemLibraryItem> > &items() const;
|
||||||
|
|
||||||
void sortItems();
|
void sortItems();
|
||||||
void resetModel();
|
void resetModel();
|
||||||
@@ -56,7 +57,7 @@ private: // functions
|
|||||||
void addRoleNames();
|
void addRoleNames();
|
||||||
|
|
||||||
private: // variables
|
private: // variables
|
||||||
QList<ItemLibraryItem*> m_itemList;
|
QList<QPointer<ItemLibraryItem>> m_itemList;
|
||||||
QHash<int, QByteArray> m_roleNames;
|
QHash<int, QByteArray> m_roleNames;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -48,37 +48,37 @@ const Utils::Icon NO_SNAPPING_AND_ANCHORING({
|
|||||||
{QLatin1String(":/icon/layout/snapping_and_anchoring.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/icon/layout/snapping_and_anchoring.png"), Utils::Theme::IconsBaseColor}});
|
||||||
|
|
||||||
const Utils::Icon EDIT3D_LIGHT_ON({
|
const Utils::Icon EDIT3D_LIGHT_ON({
|
||||||
{QLatin1String(":/edit3d/images/edit_light_on.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/edit_light_on.png"), Utils::Theme::QmlDesigner_HighlightColor}});
|
||||||
const Utils::Icon EDIT3D_LIGHT_OFF({
|
const Utils::Icon EDIT3D_LIGHT_OFF({
|
||||||
{QLatin1String(":/edit3d/images/edit_light_off.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/edit_light_off.png"), Utils::Theme::IconsBaseColor}});
|
||||||
const Utils::Icon EDIT3D_GRID_ON({
|
const Utils::Icon EDIT3D_GRID_ON({
|
||||||
{QLatin1String(":/edit3d/images/grid_on.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/grid_on.png"), Utils::Theme::QmlDesigner_HighlightColor}});
|
||||||
const Utils::Icon EDIT3D_GRID_OFF({
|
const Utils::Icon EDIT3D_GRID_OFF({
|
||||||
{QLatin1String(":/edit3d/images/grid_off.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/grid_off.png"), Utils::Theme::IconsBaseColor}});
|
||||||
const Utils::Icon EDIT3D_SELECTION_MODE_ON({
|
const Utils::Icon EDIT3D_SELECTION_MODE_ON({
|
||||||
{QLatin1String(":/edit3d/images/select_group.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/select_group.png"), Utils::Theme::QmlDesigner_HighlightColor}});
|
||||||
const Utils::Icon EDIT3D_SELECTION_MODE_OFF({
|
const Utils::Icon EDIT3D_SELECTION_MODE_OFF({
|
||||||
{QLatin1String(":/edit3d/images/select_item.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/select_item.png"), Utils::Theme::IconsBaseColor}});
|
||||||
const Utils::Icon EDIT3D_MOVE_TOOL_ON({
|
const Utils::Icon EDIT3D_MOVE_TOOL_ON({
|
||||||
{QLatin1String(":/edit3d/images/move_on.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/move_on.png"), Utils::Theme::QmlDesigner_HighlightColor}});
|
||||||
const Utils::Icon EDIT3D_MOVE_TOOL_OFF({
|
const Utils::Icon EDIT3D_MOVE_TOOL_OFF({
|
||||||
{QLatin1String(":/edit3d/images/move_off.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/move_off.png"), Utils::Theme::IconsBaseColor}});
|
||||||
const Utils::Icon EDIT3D_ROTATE_TOOL_ON({
|
const Utils::Icon EDIT3D_ROTATE_TOOL_ON({
|
||||||
{QLatin1String(":/edit3d/images/rotate_on.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/rotate_on.png"), Utils::Theme::QmlDesigner_HighlightColor}});
|
||||||
const Utils::Icon EDIT3D_ROTATE_TOOL_OFF({
|
const Utils::Icon EDIT3D_ROTATE_TOOL_OFF({
|
||||||
{QLatin1String(":/edit3d/images/rotate_off.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/rotate_off.png"), Utils::Theme::IconsBaseColor}});
|
||||||
const Utils::Icon EDIT3D_SCALE_TOOL_ON({
|
const Utils::Icon EDIT3D_SCALE_TOOL_ON({
|
||||||
{QLatin1String(":/edit3d/images/scale_on.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/scale_on.png"), Utils::Theme::QmlDesigner_HighlightColor}});
|
||||||
const Utils::Icon EDIT3D_SCALE_TOOL_OFF({
|
const Utils::Icon EDIT3D_SCALE_TOOL_OFF({
|
||||||
{QLatin1String(":/edit3d/images/scale_off.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/scale_off.png"), Utils::Theme::IconsBaseColor}});
|
||||||
const Utils::Icon EDIT3D_FIT_SELECTED_OFF({
|
const Utils::Icon EDIT3D_FIT_SELECTED_OFF({
|
||||||
{QLatin1String(":/edit3d/images/fit_selected.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/fit_selected.png"), Utils::Theme::IconsBaseColor}});
|
||||||
const Utils::Icon EDIT3D_EDIT_CAMERA_ON({
|
const Utils::Icon EDIT3D_EDIT_CAMERA_ON({
|
||||||
{QLatin1String(":/edit3d/images/perspective_camera.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/perspective_camera.png"), Utils::Theme::QmlDesigner_HighlightColor}});
|
||||||
const Utils::Icon EDIT3D_EDIT_CAMERA_OFF({
|
const Utils::Icon EDIT3D_EDIT_CAMERA_OFF({
|
||||||
{QLatin1String(":/edit3d/images/orthographic_camera.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/orthographic_camera.png"), Utils::Theme::IconsBaseColor}});
|
||||||
const Utils::Icon EDIT3D_ORIENTATION_ON({
|
const Utils::Icon EDIT3D_ORIENTATION_ON({
|
||||||
{QLatin1String(":/edit3d/images/global.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/global.png"), Utils::Theme::QmlDesigner_HighlightColor}});
|
||||||
const Utils::Icon EDIT3D_ORIENTATION_OFF({
|
const Utils::Icon EDIT3D_ORIENTATION_OFF({
|
||||||
{QLatin1String(":/edit3d/images/local.png"), Utils::Theme::IconsBaseColor}});
|
{QLatin1String(":/edit3d/images/local.png"), Utils::Theme::IconsBaseColor}});
|
||||||
|
|
||||||
|
@@ -41,14 +41,15 @@ LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RunControl *runControl)
|
|||||||
setUsePortsGatherer(isCppDebugging(), isQmlDebugging());
|
setUsePortsGatherer(isCppDebugging(), isQmlDebugging());
|
||||||
addQmlServerInferiorCommandLineArgumentIfNeeded();
|
addQmlServerInferiorCommandLineArgumentIfNeeded();
|
||||||
|
|
||||||
auto gdbServer = new DebugServerRunner(runControl, portsGatherer());
|
auto debugServer = new DebugServerRunner(runControl, portsGatherer());
|
||||||
gdbServer->setEssential(true);
|
debugServer->setEssential(true);
|
||||||
|
|
||||||
addStartDependency(gdbServer);
|
addStartDependency(debugServer);
|
||||||
|
|
||||||
setStartMode(AttachToRemoteServer);
|
setStartMode(AttachToRemoteServer);
|
||||||
setCloseMode(KillAndExitMonitorAtClose);
|
setCloseMode(KillAndExitMonitorAtClose);
|
||||||
setUseExtendedRemote(true);
|
setUseExtendedRemote(true);
|
||||||
|
setLldbPlatform("remote-linux");
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|