forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/13.0'
Conflicts: doc/qtcreator/src/overview/creator-only/creator-reference.qdoc doc/qtcreator/src/qtcreator-toc.qdoc Change-Id: Ibea5488fda972321c448c64fad7f657e84d62cdb
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
<li><a href="creator-how-tos.html#create-models-and-diagrams">Create Models and Diagrams</a></li>
|
||||
<li><a href="creator-how-tos.html#debug">Debug</a></li>
|
||||
<li><a href="creator-how-tos.html#design-uis">Design UIs</a></li>
|
||||
<li><a href="creator-how-tos.html#develop-for-devices">Develop for Devices</a></li>
|
||||
<li><a href="creator-how-tos.html#edit-code">Edit Code</a></li>
|
||||
<li><a href="creator-how-tos.html#manage-kits">Manage Kits</a></li>
|
||||
<li><a href="creator-how-tos.html#manage-projects">Manage Projects</a></li>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB |
BIN
doc/qtcreator/images/qtcreator-mcu-new-project.webp
Normal file
BIN
doc/qtcreator/images/qtcreator-mcu-new-project.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
BIN
doc/qtcreator/images/qtcreator-preferences-kits-mcu.webp
Normal file
BIN
doc/qtcreator/images/qtcreator-preferences-kits-mcu.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
doc/qtcreator/images/qtcreator-preferences-mcu.webp
Normal file
BIN
doc/qtcreator/images/qtcreator-preferences-mcu.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
@@ -25,6 +25,10 @@
|
||||
\externalpage https://doc.qt.io/QtForMCUs/qtul-supported-platforms.html
|
||||
\title \QMCU - Supported Target Platforms
|
||||
*/
|
||||
/*!
|
||||
\externalpage https://doc.qt.io/QtForMCUs/qtul-prerequisites.html
|
||||
\title \QMCU - Prerequisites
|
||||
*/
|
||||
/*!
|
||||
\externalpage https://doc.qt.io/QtForMCUs/qtul-getting-started-renesas.html
|
||||
\title Getting Started on Renesas
|
||||
@@ -37,6 +41,10 @@
|
||||
\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-on-infineon.html
|
||||
\title Getting Started on Infineon
|
||||
*/
|
||||
/*!
|
||||
\externalpage https://doc.qt.io/QtForMCUs/qtul-getting-started-windows.html
|
||||
\title Getting Started on Windows
|
||||
|
||||
@@ -80,6 +80,21 @@
|
||||
|
||||
\generatelist creator-how-to-design
|
||||
|
||||
\section1 Develop for Devices
|
||||
|
||||
Install the toolchain for building applications for the targeted
|
||||
embedded or mobile platform on the computer, and use \QOI to
|
||||
install Qt libraries that are built for the platform. Then add a
|
||||
kit with the toolchain and the Qt version for the device's architecture.
|
||||
When possible, \QOI creates suitable kits for you.
|
||||
|
||||
\section2 MCUs
|
||||
|
||||
Install \l {Qt for MCUs} and connect devices to the computer to run and
|
||||
debug applications on them.
|
||||
|
||||
\generatelist creator-how-to-mcu
|
||||
|
||||
\section1 Edit Code
|
||||
|
||||
The code editor offers useful features for editing C++ and QML code, such
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
\list
|
||||
\li \l{Connecting MCUs}
|
||||
\li \l{Running Applications on MCUs}
|
||||
\li \l{MCUs}{How To: Develop for MCUs}
|
||||
\li \l{https://doc.qt.io/QtForMCUs/index.html}{\QMCU}
|
||||
\endlist
|
||||
|
||||
@@ -107,5 +107,5 @@
|
||||
\li \l{Qt for QNX}
|
||||
\endlist
|
||||
|
||||
\sa {Supported Platforms}
|
||||
\sa {Develop for Devices}{How To: Develop for Devices}, {Supported Platforms}
|
||||
*/
|
||||
|
||||
@@ -1,31 +1,29 @@
|
||||
// Copyright (C) 2020 The Qt Company Ltd.
|
||||
// Copyright (C) 2024 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\previouspage creator-developing-ios.html
|
||||
\page creator-developing-mcu.html
|
||||
\nextpage creator-developing-qnx.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\title Connecting MCUs
|
||||
\ingroup creator-reference-devices
|
||||
|
||||
\QMCU enables you to use subsets of QML and Qt Quick Controls
|
||||
to create user interfaces for devices that are powered by microcontroller
|
||||
units (MCU). It includes a new graphics rendering engine that has a low
|
||||
memory footprint and is optimized for MCUs and other resource-constrained
|
||||
devices.
|
||||
\title Developing for MCUs
|
||||
|
||||
You can connect MCU boards to a development host to build applications for
|
||||
them using the GNU Arm Embedded GCC compiler, libraries, and other GNU tools
|
||||
necessary for bare metal software development on devices based on the Arm
|
||||
Cortex-M processors. You can deploy the applications on MCUs to run and
|
||||
debug them using \QC.
|
||||
\brief Connect MCU devices to the computer to run and debug applications on
|
||||
them.
|
||||
|
||||
The toolchains are available for cross-compilation on Microsoft Windows,
|
||||
Linux, and macOS. However, the Qt for \QMCU SDK is currently only available
|
||||
for Windows and Linux.
|
||||
\note Enable the McuSupport plugin to develop for MCUs.
|
||||
|
||||
For a list of \QMCU reference implementations, see the
|
||||
\l{\QMCU - Supported Target Platforms}{\QMCU} documentation.
|
||||
Use subsets of QML and Qt Quick Controls to create user interfaces for
|
||||
devices that are powered by microcontroller units (MCU). \QMCU has a
|
||||
new graphics rendering engine with a low memory footprint and optimization
|
||||
for MCUs and other resource-constrained devices.
|
||||
|
||||
Connect MCU boards to a computer to build applications for them. Deploy the
|
||||
applications on MCUs to run and debug them.
|
||||
|
||||
For a list of \QMCU reference implementations, see
|
||||
\l{\QMCU - Supported Target Platforms}.
|
||||
|
||||
\section1 Requirements
|
||||
|
||||
@@ -33,157 +31,46 @@
|
||||
|
||||
\list
|
||||
\li \QMCU SDK (only available for Windows and Linux)
|
||||
\li \l{https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm}
|
||||
{GNU ARM Embedded Toolchain}
|
||||
\li \l {\QMCU - Prerequisites}{Suitable toolchain}
|
||||
\endlist
|
||||
|
||||
The toolchains are available for cross-compilation on Microsoft Windows,
|
||||
Linux, and macOS. However, the Qt for \QMCU SDK is currently only available
|
||||
for Windows and Linux.
|
||||
|
||||
The hardware-specific requirements vary depending on the hardware platform you are developing for.
|
||||
For more information see:
|
||||
\list
|
||||
\li \l{Getting Started on NXP}
|
||||
\li \l{Getting Started on STM}
|
||||
\li \l{Getting Started on Renesas}
|
||||
\li \l{Getting Started on Infineon}
|
||||
\endlist
|
||||
|
||||
\section1 Setting Up the Development Environment
|
||||
\section1 \QMCU SDKs
|
||||
|
||||
You must download and install the required software and create connections
|
||||
between \QC and MCUs. The following subsections guide you through the
|
||||
setup process.
|
||||
|
||||
\section2 MCU Plugin
|
||||
|
||||
To be able to develop applications for MCUs, you need the MCU plugin.
|
||||
This plugin is enabled automatically by \QOI when you
|
||||
install \QMCU.
|
||||
|
||||
\section2 Specifying MCU Settings
|
||||
|
||||
To configure a connection between \QC and your MCU board, select
|
||||
\preferences > \uicontrol Devices > \uicontrol MCU:
|
||||
|
||||
\image qtcreator-mcu-options.png "MCU preferences"
|
||||
|
||||
\list 1
|
||||
\li In the \uicontrol {\QMCU SDK} field, specify the path
|
||||
to the directory where you installed \QMCU SDK.
|
||||
\li In the \uicontrol {Targets supported by the \QMCU SDK}
|
||||
field, select your MCU board.
|
||||
\li In the \uicontrol Requirements section, ensure that the
|
||||
platform-specific requirements are met. This varies depending
|
||||
on the target chosen:
|
||||
\list
|
||||
\li For STM32 targets:
|
||||
\list
|
||||
\li The \uicontrol {GNU ARM Embedded Toolchain} or
|
||||
\uicontrol {IAR ARM Compiler} path.
|
||||
\li The \uicontrol {STM32CubeProgrammer} install path.
|
||||
\li The \uicontrol {MCU SDK} for the chosen target.
|
||||
\li The \uicontrol {FreeRTOS Sources} for the chosen target.
|
||||
\endlist
|
||||
\li For NXP targets:
|
||||
\list
|
||||
\li The \uicontrol {GNU ARM Embedded Toolchain} or
|
||||
\uicontrol {IAR ARM Compiler} path.
|
||||
\li The \uicontrol {MCUXpresso IDE} install path.
|
||||
\li The \uicontrol {MCU SDK} for the chosen target.
|
||||
\li The \uicontrol {FreeRTOS Sources} for the chosen target.
|
||||
\endlist
|
||||
\li For Renesas targets:
|
||||
\list
|
||||
\li The \uicontrol {Green Hills Compiler} path.
|
||||
\li The \uicontrol {Renesas Graphics Library} path.
|
||||
\endlist
|
||||
\endlist
|
||||
\li Select the
|
||||
\uicontrol {Automatically create kits for all available targets on start}
|
||||
option to create kits automatically the next time Qt Creator is
|
||||
started.
|
||||
\note You could also use \uicontrol {Create Kit} to manually
|
||||
create kits for the chosen target.
|
||||
\li Select \uicontrol Apply to save the settings.
|
||||
\endlist
|
||||
|
||||
\note When updating to other versions of the \QMCU SDK, \QC will
|
||||
ask you if you want to replace the existing kits, or create new ones
|
||||
alongside. This can also be done manually, for each individual target,
|
||||
via \uicontrol {Update Kit} and \uicontrol {Create Kit}, respectively.
|
||||
|
||||
\section2 Adding MCU Devices
|
||||
|
||||
\note This optional step is not necessary if you have already
|
||||
set up the MCU SDK as outlined in \l{Specifying MCU Settings}.
|
||||
|
||||
\QC automatically adds a default MCU device when you select
|
||||
\uicontrol Apply in the \uicontrol MCU tab after configuring the
|
||||
MCU tool chain.
|
||||
|
||||
\image qtcreator-mcu-device.png "MCU devices"
|
||||
|
||||
To add MCU devices, select \preferences > \uicontrol Devices > \uicontrol Add
|
||||
> \uicontrol {MCU Device} > \uicontrol {Start Wizard}:
|
||||
|
||||
\list 1
|
||||
\li In the \uicontrol Name field, give the device a name.
|
||||
\li In the \uicontrol Type field, select the board type.
|
||||
\li Select \uicontrol Apply to add the device.
|
||||
\endlist
|
||||
|
||||
\section2 Managing MCU Kits
|
||||
|
||||
\QC automatically adds kits for all the available targets, if the
|
||||
\uicontrol {Automatically create kits for all available targets on start}
|
||||
option is enabled under the \uicontrol MCU settings tab. You can also
|
||||
create kits for individual targets manually, as outlined
|
||||
in \l{Specifying MCU Settings}.
|
||||
|
||||
\image qtcreator-mcu-kit.png "MCU kits"
|
||||
|
||||
You can edit and/or remove individual kits in \preferences > \uicontrol Kits.
|
||||
|
||||
However, for adding new kits you should use the \uicontrol {Create Kit}
|
||||
button in the {\QMCU} settings tab. This method adds the paths to
|
||||
the kit's toolkits and SDKs, and keeps them synchronized when selecting
|
||||
\uicontrol Apply or \uicontrol OK.
|
||||
|
||||
The \uicontrol {MCU dependencies} field displays paths to 3rd party
|
||||
software required for MCU development with the current kit.
|
||||
|
||||
\section1 Running Applications on MCUs
|
||||
|
||||
You can use a wizard to set up a project for developing an application that
|
||||
you can run on MCUs. The project uses a subset of QML and Qt Quick Controls
|
||||
that are supported by \QMCU. For more information about developing
|
||||
applications for MCUs, see the \QMCU documentation.
|
||||
|
||||
To create an application and run it on a MCU board:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol File > \uicontrol {New Project} >
|
||||
\uicontrol {Application (\QMCU)} >
|
||||
\uicontrol {MCU Support Application} > \uicontrol Choose.
|
||||
\li Follow the instructions of the wizard to create the project.
|
||||
\li Select \uicontrol Projects > \uicontrol {Build & Run}, and then
|
||||
select the kit for building the application and running it on the
|
||||
MCU board specified in the kit.
|
||||
\li Select \uicontrol Run to specify run settings.
|
||||
Usually, you can use the default settings.
|
||||
\endlist
|
||||
|
||||
\section1 Supported \QMCU SDKs
|
||||
|
||||
\note The \QMCU SDK 2.3 requires \QC 9.0.0, or later.
|
||||
|
||||
The following table lists the \QC versions you can use to develop
|
||||
applications with particular \QMCU SDK versions.
|
||||
While you can use the latest \QC version to develop with any \QMCU SDK, the
|
||||
following combinations have been tested to work well.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li \QC version
|
||||
\li \QMCU SDK version
|
||||
\row
|
||||
\li 9.0.0 or later
|
||||
\li 2.0 or later
|
||||
\li 12.0.2 or later
|
||||
\li 2.7 or later
|
||||
\row
|
||||
\li 11.0.3
|
||||
\li 2.6
|
||||
\row
|
||||
\li 10.0.2
|
||||
\li 2.5
|
||||
\row
|
||||
\li 10.0.0
|
||||
\li 2.4
|
||||
\row
|
||||
\li 9.0.0
|
||||
\li 2.3
|
||||
\row
|
||||
\li 7.0.0 up to 8.0.2
|
||||
\li 2.0 up to 2.2
|
||||
@@ -203,4 +90,159 @@
|
||||
\li 4.11.x
|
||||
\li 1.0
|
||||
\endtable
|
||||
|
||||
\sa {Enable and disable plugins}, {MCUs}{How To: Develop for MCUs}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-create-mcu-kits.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-mcu
|
||||
|
||||
\title Connect MCU devices
|
||||
|
||||
\note Enable the McuSupport plugin to develop for MCUs.
|
||||
|
||||
To configure a connection between \QC and your MCU board:
|
||||
|
||||
\list 1
|
||||
\li Go to \preferences > \uicontrol Devices > \uicontrol MCU.
|
||||
\li In \uicontrol {\QMCU SDK}, specify the path to the directory where
|
||||
you installed \QMCU SDK.
|
||||
\image qtcreator-preferences-mcu.webp {MCU preferences}
|
||||
\li In \uicontrol {Targets supported by the \QMCU SDK}, select your MCU
|
||||
board.
|
||||
\li In \uicontrol Requirements, check that the platform-specific
|
||||
requirements are met. This depends on the target:
|
||||
\list
|
||||
\li For STM32 targets:
|
||||
\list
|
||||
\li The \uicontrol {GNU ARM Embedded Toolchain} or
|
||||
\uicontrol {IAR ARM Compiler} path.
|
||||
\li The \uicontrol {STM32CubeProgrammer} install path.
|
||||
\li The \uicontrol {Board SDK} for the chosen target.
|
||||
\li The \uicontrol {FreeRTOS Sources} for the chosen target.
|
||||
\endlist
|
||||
\li For NXP targets:
|
||||
\list
|
||||
\li The \uicontrol {GNU ARM Embedded Toolchain} or
|
||||
\uicontrol {IAR ARM Compiler} path.
|
||||
\li The \uicontrol {MCUXpresso IDE} install path.
|
||||
\li The \uicontrol {Board SDK} for the chosen target.
|
||||
\li The \uicontrol {FreeRTOS Sources} for the chosen target.
|
||||
\endlist
|
||||
\li For Renesas targets:
|
||||
\list
|
||||
\li The \uicontrol {Green Hills Compiler} path.
|
||||
\li The \uicontrol {Renesas Graphics Library} path.
|
||||
\endlist
|
||||
\li For Infineon targets:
|
||||
\list
|
||||
\li The \uicontrol {Green Hills Compiler for ARM} path.
|
||||
\li The \uicontrol {Graphics Driver for Traveo II Cluster Series}
|
||||
path.
|
||||
\li The \uicontrol {Infineon Auto Flash Utility} path.
|
||||
\endlist
|
||||
\endlist
|
||||
\li Select
|
||||
\uicontrol {Automatically create kits for all available targets on start}
|
||||
to create kits automatically the next time \QC starts.
|
||||
\note Select \uicontrol {Create Kit} to manually create kits for the
|
||||
target.
|
||||
\li Select \uicontrol Apply to save the preferences.
|
||||
\endlist
|
||||
|
||||
\section1 Add MCU devices
|
||||
|
||||
\QC automatically adds a default MCU device when you select
|
||||
\uicontrol Apply in the \uicontrol MCU tab after configuring the
|
||||
MCU tool chain.
|
||||
|
||||
\image qtcreator-mcu-device.png {MCU devices}
|
||||
|
||||
To add MCU devices, select \preferences > \uicontrol Devices > \uicontrol Add
|
||||
> \uicontrol {MCU Device} > \uicontrol {Start Wizard}:
|
||||
|
||||
\list 1
|
||||
\li In \uicontrol Name, give the device a name.
|
||||
\li In \uicontrol Type, select the board type.
|
||||
\li Select \uicontrol Apply to add the device.
|
||||
\endlist
|
||||
|
||||
\sa {Enable and disable plugins}, {MCUs}{How To: Develop for MCUs},
|
||||
{Developing for MCUs}
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\page creator-how-to-manage-mcu-kits.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-mcu
|
||||
|
||||
\title Manage MCU Kits
|
||||
|
||||
\note Enable the McuSupport plugin to develop for MCUs.
|
||||
|
||||
\QC automatically adds kits for all the available MCU targets if you select
|
||||
\uicontrol {Automatically create kits for all available targets on start}
|
||||
in \preferences > \uicontrol Devices > \uicontrol MCU.
|
||||
|
||||
\image qtcreator-preferences-kits-mcu.webp {MCU kit}
|
||||
|
||||
\note When you update the \QMCU SDK, \QC asks you whether you want to replace
|
||||
the existing kits or create additional kits. To do this manually for each
|
||||
target, select \uicontrol {Update Kit} or \uicontrol {Create Kit}.
|
||||
|
||||
To add new kits, go to \preferences > \uicontrol Devices > \uicontrol MCU,
|
||||
and select \uicontrol {Create Kit}. This adds the paths to the kit's toolkits
|
||||
and SDKs, and keeps them synchronized when you select \uicontrol Apply or
|
||||
\uicontrol OK.
|
||||
|
||||
\section1 Change or remove MCU kits
|
||||
|
||||
To change or remove individual kits, go to \preferences > \uicontrol Kits.
|
||||
|
||||
The \uicontrol {MCU dependencies} field displays paths to 3rd party
|
||||
software required for MCU development with the current kit.
|
||||
|
||||
\sa {Enable and disable plugins}, {MCUs}{How To: Develop for MCUs},
|
||||
{Developing for MCUs}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-run-on-mcu-devices.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-mcu
|
||||
|
||||
\title Create MCU projects
|
||||
|
||||
\note Enable the McuSupport plugin to develop for MCUs.
|
||||
|
||||
Create a project for developing an application that you can run on MCUs.
|
||||
The project imports a subset of QML and Qt Quick Controls types
|
||||
that are supported by \QMCU. For more information about developing
|
||||
applications for MCUs, see \l {Qt for MCUs}.
|
||||
|
||||
To create an application and run it on a MCU board:
|
||||
|
||||
\list 1
|
||||
\li Go to \uicontrol File > \uicontrol {New Project}.
|
||||
\image qtcreator-mcu-new-project.webp {New Project dialog}
|
||||
\li Select \uicontrol {QmlProject Application (\QMCU)} >
|
||||
\uicontrol {Qt for MCUs Empty Application} or
|
||||
\uicontrol {Qt for MCUs Example Application} > \uicontrol Choose.
|
||||
\li Follow the instructions of the wizard to create the project.
|
||||
\li Select \uicontrol Projects > \uicontrol {Build & Run}, and then
|
||||
select the kit for building the application and running it on the
|
||||
MCU board specified in the kit.
|
||||
\li Select \uicontrol Run to specify run settings.
|
||||
Usually, you can use the default settings.
|
||||
\endlist
|
||||
|
||||
\sa {Configure projects for running}, {Enable and disable plugins},
|
||||
{MCUs}{How To: Develop for MCUs}, {Use project wizards},
|
||||
{Developing for MCUs}
|
||||
*/
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
\QC detects the tools and configured devices automatically and uses
|
||||
the tools to build, deploy, and run applications.
|
||||
|
||||
\li \l{Connecting MCUs}
|
||||
\li \l{Developing for MCUs}
|
||||
|
||||
You can connect MCU boards to a development host to deploy, run, and
|
||||
debug applications on them from \QC.
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
as Android or QNX, the build and run configurations for the development
|
||||
targets might be set up automatically in \QC.
|
||||
|
||||
\annotatedlist creator-reference-devices
|
||||
|
||||
\section2 Deploy Configurations
|
||||
|
||||
Deploy configurations handle the packaging of the application as an
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
\li \l{Connecting Boot2Qt Devices}
|
||||
\li \l{Adding Docker Devices}
|
||||
\li \l{Connecting iOS Devices}
|
||||
\li \l{Connecting MCUs}
|
||||
\li \l{Connecting QNX Devices}
|
||||
\li \l{Connecting Remote Linux Devices}
|
||||
\li \l{Building Applications for the Web}
|
||||
@@ -63,6 +62,11 @@
|
||||
\generatelist creator-how-to-debug
|
||||
\li Design UIs
|
||||
\generatelist creator-how-to-design
|
||||
\li Develop for Devices
|
||||
\list
|
||||
\li MCUs
|
||||
\generatelist creator-how-to-mcu
|
||||
\endlist
|
||||
\li Edit Code
|
||||
\generatelist creator-how-to-edit
|
||||
\list
|
||||
@@ -106,6 +110,7 @@
|
||||
\generatelist creator-reference-build-configurations
|
||||
\endlist
|
||||
\li Devices
|
||||
\generatelist creator-reference-devices
|
||||
\list
|
||||
\li Deploy Configurations
|
||||
\generatelist creator-reference-deploy-configurations
|
||||
|
||||
@@ -89,12 +89,10 @@ QTCREATOR_UTILS_EXPORT FileDeletedPromptAnswer
|
||||
"Do you want to save it under a different name, or close "
|
||||
"the editor?").arg(QDir::toNativeSeparators(fileName));
|
||||
QMessageBox box(QMessageBox::Question, title, msg, QMessageBox::NoButton, parent);
|
||||
QPushButton *close =
|
||||
box.addButton(Tr::tr("&Close"), QMessageBox::RejectRole);
|
||||
QPushButton *saveas = box.addButton(Tr::tr("Save &as..."), QMessageBox::ActionRole);
|
||||
QPushButton *close = box.addButton(Tr::tr("&Close"), QMessageBox::RejectRole);
|
||||
QPushButton *closeAll =
|
||||
box.addButton(Tr::tr("C&lose All"), QMessageBox::RejectRole);
|
||||
QPushButton *saveas =
|
||||
box.addButton(Tr::tr("Save &as..."), QMessageBox::ActionRole);
|
||||
QPushButton *save =
|
||||
box.addButton(Tr::tr("&Save"), QMessageBox::AcceptRole);
|
||||
box.setDefaultButton(saveas);
|
||||
|
||||
@@ -288,9 +288,11 @@ void ToolTip::hideTipWithDelay()
|
||||
void ToolTip::hideTipImmediately()
|
||||
{
|
||||
if (m_tip) {
|
||||
m_tip->close();
|
||||
m_tip->deleteLater();
|
||||
m_tip = nullptr;
|
||||
TipLabel *tip = m_tip.data();
|
||||
m_tip.clear();
|
||||
|
||||
tip->close();
|
||||
tip->deleteLater();
|
||||
}
|
||||
m_showTimer.stop();
|
||||
m_hideDelayTimer.stop();
|
||||
|
||||
@@ -136,6 +136,8 @@ Internal::PresetsData CMakeProject::combinePresets(Internal::PresetsData &cmakeP
|
||||
&& left.inherits.value().contains(right.name);
|
||||
|
||||
const bool inheritsGreater = left.inherits && right.inherits
|
||||
&& !left.inherits.value().isEmpty()
|
||||
&& !right.inherits.value().isEmpty()
|
||||
&& left.inherits.value().first()
|
||||
> right.inherits.value().first();
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@ static const QPixmap &searchBoxIcon()
|
||||
}
|
||||
|
||||
SearchBox::SearchBox(QWidget *parent)
|
||||
: QLineEdit(parent)
|
||||
: Utils::FancyLineEdit(parent)
|
||||
{
|
||||
setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||
setAutoFillBackground(false);
|
||||
@@ -301,10 +301,9 @@ SearchBox::SearchBox(QWidget *parent)
|
||||
pal.setColor(QPalette::Text, searchBoxTextTF.color());
|
||||
setPalette(pal);
|
||||
|
||||
const QSize iconSize = searchBoxIcon().deviceIndependentSize().toSize();
|
||||
setContentsMargins({HPaddingXs, ExPaddingGapM,
|
||||
HPaddingXs + iconSize.width() + HPaddingXs, ExPaddingGapM});
|
||||
setContentsMargins({HPaddingXs, ExPaddingGapM, 0, ExPaddingGapM});
|
||||
setFixedHeight(ExPaddingGapM + searchBoxTextTF.lineHeight() + ExPaddingGapM);
|
||||
setFiltering(true);
|
||||
}
|
||||
|
||||
QSize SearchBox::minimumSizeHint() const
|
||||
@@ -351,10 +350,12 @@ void SearchBox::paintEvent(QPaintEvent *event)
|
||||
QPainter p(this);
|
||||
|
||||
paintCommonBackground(&p, rect(), this);
|
||||
const QPixmap icon = searchBoxIcon();
|
||||
const QSize iconS = icon.deviceIndependentSize().toSize();
|
||||
const QPoint iconPos(width() - HPaddingXs - iconS.width(), (height() - iconS.height()) / 2);
|
||||
p.drawPixmap(iconPos, icon);
|
||||
if (text().isEmpty()) {
|
||||
const QPixmap icon = searchBoxIcon();
|
||||
const QSize iconS = icon.deviceIndependentSize().toSize();
|
||||
const QPoint iconPos(width() - HPaddingXs - iconS.width(), (height() - iconS.height()) / 2);
|
||||
p.drawPixmap(iconPos, icon);
|
||||
}
|
||||
|
||||
QLineEdit::paintEvent(event);
|
||||
}
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
|
||||
namespace Utils { class FancyLineEdit; }
|
||||
|
||||
namespace Core {
|
||||
|
||||
namespace WelcomePageHelpers {
|
||||
@@ -113,7 +111,7 @@ private:
|
||||
const Role m_role = Primary;
|
||||
};
|
||||
|
||||
class CORE_EXPORT SearchBox : public QLineEdit
|
||||
class CORE_EXPORT SearchBox : public Utils::FancyLineEdit
|
||||
{
|
||||
public:
|
||||
explicit SearchBox(QWidget *parent = nullptr);
|
||||
|
||||
@@ -119,8 +119,12 @@ void TerminalWidget::setupPty()
|
||||
Environment env = m_openParameters.environment.value_or(Environment{})
|
||||
.appliedToEnvironment(shellCommand.executable().deviceEnvironment());
|
||||
|
||||
// Some OS/Distros set a default value for TERM such as "dumb", which then breaks
|
||||
// command line tools such as "clear" which try to figure out what terminal they are
|
||||
// running in. Therefore we have to force-set our own TERM value here.
|
||||
env.set("TERM", "xterm-256color");
|
||||
|
||||
// Set some useful defaults
|
||||
env.setFallback("TERM", "xterm-256color");
|
||||
env.setFallback("TERM_PROGRAM", QCoreApplication::applicationName());
|
||||
env.setFallback("COLORTERM", "truecolor");
|
||||
env.setFallback("COMMAND_MODE", "unix2003");
|
||||
|
||||
@@ -216,9 +216,11 @@ void CodeStyleSelectorWidget::slotImportClicked()
|
||||
void CodeStyleSelectorWidget::slotExportClicked()
|
||||
{
|
||||
ICodeStylePreferences *currentPreferences = m_codeStyle->currentPreferences();
|
||||
const FilePath filePath = FileUtils::getSaveFilePath(this, Tr::tr("Export Code Style"),
|
||||
FilePath::fromString(QString::fromUtf8(currentPreferences->id() + ".xml")),
|
||||
Tr::tr("Code styles (*.xml);;All files (*)"));
|
||||
const FilePath filePath = FileUtils::getSaveFilePath(
|
||||
this,
|
||||
Tr::tr("Export Code Style"),
|
||||
FileUtils::homePath().pathAppended(QString::fromUtf8(currentPreferences->id() + ".xml")),
|
||||
Tr::tr("Code styles (*.xml);;All files (*)"));
|
||||
if (!filePath.isEmpty()) {
|
||||
CodeStylePool *codeStylePool = m_codeStyle->delegatingPool();
|
||||
codeStylePool->exportCodeStyle(filePath, currentPreferences);
|
||||
|
||||
Reference in New Issue
Block a user