forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/5.0'
Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri Change-Id: Iba1e6cacaebf9bb4653ac77e981ddacaf729c52c
This commit is contained in:
@@ -78,7 +78,7 @@ endif()
|
||||
set(Qt5_FOUND ${Qt6_FOUND})
|
||||
set(Qt5_VERSION ${Qt6_VERSION})
|
||||
|
||||
foreach(tool qmake lrelease moc rcc qhelpgenerator)
|
||||
foreach(tool qmake lrelease lupdate moc rcc qhelpgenerator)
|
||||
if (TARGET Qt6::${tool} AND NOT TARGET Qt5::${tool})
|
||||
add_executable(Qt5::${tool} IMPORTED GLOBAL)
|
||||
get_target_property(imported_location Qt6::${tool} IMPORTED_LOCATION)
|
||||
|
@@ -95,7 +95,7 @@ function(_create_ts_custom_target name)
|
||||
endfunction()
|
||||
|
||||
function(add_translation_targets file_prefix)
|
||||
if (NOT TARGET Qt5::lrelease)
|
||||
if (NOT TARGET Qt5::lrelease OR NOT TARGET Qt5::lupdate)
|
||||
# No Qt translation tools were found: Skip this directory
|
||||
message(WARNING "No Qt translation tools found, skipping translation targets. Add find_package(Qt5 COMPONENTS LinguistTools) to CMake to enable.")
|
||||
return()
|
||||
|
2
dist/changes-5.0.0.md
vendored
2
dist/changes-5.0.0.md
vendored
@@ -94,6 +94,8 @@ Debugging
|
||||
(QTCREATORBUG-25762)
|
||||
* Fixed that comments in startup commands resulted in message boxes
|
||||
(QTCREATORBUG-25666)
|
||||
* Removed extra Server Start Script field in Attach to Running Server,
|
||||
use a custom deploy step instead.
|
||||
|
||||
### GDB
|
||||
|
||||
|
BIN
doc/qtcreator/images/qtcreator-boot2qt-deployment-steps.png
Normal file
BIN
doc/qtcreator/images/qtcreator-boot2qt-deployment-steps.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
doc/qtcreator/images/qtcreator-boot2qt-device-configurations.png
Normal file
BIN
doc/qtcreator/images/qtcreator-boot2qt-device-configurations.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
doc/qtcreator/images/qtcreator-boot2qt-flashing-wizard.png
Normal file
BIN
doc/qtcreator/images/qtcreator-boot2qt-flashing-wizard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
BIN
doc/qtcreator/images/qtcreator-devices-boot2qt.png
Normal file
BIN
doc/qtcreator/images/qtcreator-devices-boot2qt.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
@@ -26,7 +26,7 @@
|
||||
/*!
|
||||
\previouspage creator-deployment.html
|
||||
\page creator-deploying-android.html
|
||||
\nextpage creator-deployment-embedded-linux.html
|
||||
\nextpage creator-deployment-b2qt.html
|
||||
|
||||
\title Deploying Applications to Android Devices
|
||||
|
||||
|
@@ -26,7 +26,7 @@
|
||||
/*!
|
||||
\previouspage creator-developing-android.html
|
||||
\page creator-developing-baremetal.html
|
||||
\nextpage creator-developing-generic-linux.html
|
||||
\nextpage creator-developing-b2qt.html
|
||||
|
||||
\title Connecting Bare Metal Devices
|
||||
|
||||
|
@@ -405,8 +405,6 @@
|
||||
applications.
|
||||
\li Select the \uicontrol {Break at "main"} check box to stop the
|
||||
debugger at the main function.
|
||||
\li In the \uicontrol {Server start script} field, specify a
|
||||
script file to run when the server starts.
|
||||
\li In the \uicontrol {Override SysRoot} field, specify the path to
|
||||
the \c sysroot to use instead of the default \c sysroot.
|
||||
\li In the \uicontrol {Init commands} field, enter the commands
|
||||
|
@@ -77,15 +77,12 @@
|
||||
\uicontrol {Open With} > \uicontrol {Qt Linguist} in the context menu.
|
||||
For more information about Qt Linguist, see \l{Qt Linguist Manual}.
|
||||
|
||||
\section1 Previewing QML Files
|
||||
\section1 Running QML Files
|
||||
|
||||
You can preview the current QML document in the QML Viewer (Qt Quick 1) or
|
||||
QML Scene (Qt Quick 2). The preview tools enable you to load QML documents
|
||||
for viewing and testing while you are developing an application.
|
||||
You can test the current QML document while you are developing an application.
|
||||
|
||||
To preview the currently active QML file, select \uicontrol Tools >
|
||||
\uicontrol External > \uicontrol {Qt Quick} > \uicontrol {Qt Quick 1 Preview
|
||||
(qmlviewer)} or \uicontrol {Qt Quick 2 Preview (qmlscene)}.
|
||||
To run the currently active QML file, select \uicontrol Tools >
|
||||
\uicontrol External > \uicontrol {Qt Quick} > \uicontrol {QML Runtime}.
|
||||
|
||||
\section1 Using External Text Editors
|
||||
|
||||
|
158
doc/qtcreator/src/linux-mobile/b2qtdev.qdoc
Normal file
158
doc/qtcreator/src/linux-mobile/b2qtdev.qdoc
Normal file
@@ -0,0 +1,158 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Free Documentation License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Free
|
||||
** Documentation License version 1.3 as published by the Free Software
|
||||
** Foundation and appearing in the file included in the packaging of
|
||||
** this file. Please review the following information to ensure
|
||||
** the GNU Free Documentation License version 1.3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
\page creator-developing-b2qt.html
|
||||
\previouspage creator-developing-baremetal.html
|
||||
\nextpage creator-developing-generic-linux.html
|
||||
|
||||
\title Connecting Boot2Qt Devices
|
||||
|
||||
You can connect \l{Boot2Qt} devices to the development PC to run, debug,
|
||||
and analyze applications built for them from \QC.
|
||||
|
||||
If you have a tool chain for building applications for \Boot2Qt devices
|
||||
installed on the development PC, you can add it to \QC. You can then
|
||||
select a \l{glossary-buildandrun-kit}{kit} with the \uicontrol \Boot2Qt
|
||||
device type to build applications for and run them on the devices.
|
||||
|
||||
To be able to run and debug applications on \Boot2Qt devices,
|
||||
you must add devices and select them in the \QC
|
||||
\l{glossary-buildandrun-kit}{kit}.
|
||||
|
||||
\section1 Enabling the Boot2Qt Plugin
|
||||
|
||||
To enable the \Boot2Qt plugin:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Help > \uicontrol {About Plugins} >
|
||||
\uicontrol {Device Support} > \uicontrol \Boot2Qt to
|
||||
enable the plugin.
|
||||
\li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
|
||||
\endlist
|
||||
|
||||
\section1 Adding Boot2Qt Devices
|
||||
|
||||
You use a wizard to create the connections. You can use either a
|
||||
network connection or a USB connection. If \QC does not automatically
|
||||
detect a device you connected with USB, you can use a wizard to
|
||||
create a network connection to the device.
|
||||
|
||||
\note On Ubuntu Linux, the development user account must have access to
|
||||
plugged in devices. To allow the development user access to the device
|
||||
via USB, create a new \c udev rule, as described in
|
||||
\l{https://doc.qt.io/QtForDeviceCreation/b2qt-requirements-x11.html#setting-up-usb-access-to-embedded-devices}
|
||||
{Setting Up USB Access to Embedded Devices}.
|
||||
|
||||
You can edit the settings later in \uicontrol Tools > \uicontrol Options >
|
||||
\uicontrol Devices > \uicontrol Devices.
|
||||
|
||||
\image qtcreator-boot2qt-device-configurations.png "Devices dialog"
|
||||
|
||||
You can protect the connections between \QC and a device by using an
|
||||
\l{https://www.openssh.com/}{OpenSSH} connection. OpenSSH is a
|
||||
connectivity tool for remote login using the SSH protocol. The OpenSSH
|
||||
suite is not delivered with \QC, so you must download it and install it
|
||||
on the development PC. Then, you must configure the paths to the tools in
|
||||
\QC. For more information, see \l {Configuring SSH Connections}.
|
||||
|
||||
You need either a password or an SSH public and private key pair for
|
||||
authentication. If you do not have an SSH key, you can use the ssh-keygen
|
||||
tool to create it in \QC. For more information, see \l {Generating SSH Keys}.
|
||||
|
||||
\note \QC does not store passwords. If you use password authentication,
|
||||
you may need to enter the password on every connection to the device,
|
||||
or, if caching is enabled, at every \QC restart.
|
||||
|
||||
To reboot the selected device, select \uicontrol {Reboot Device}.
|
||||
|
||||
To restore the default application to the device, select
|
||||
\uicontrol {Restore Default App}.
|
||||
|
||||
\section1 Flashing Boot2Qt Devices
|
||||
|
||||
To flash the \Boot2Qt image to an SD card with Flashing Wizard, select
|
||||
\uicontrol Tools > \uicontrol {Flash Boot to Qt Device} and follow the
|
||||
instructions of the wizard.
|
||||
|
||||
\image qtcreator-boot2qt-flashing-wizard.png "Boot2Qt Flashing Wizard"
|
||||
|
||||
\section1 Configuring Connections
|
||||
|
||||
To configure connections between \QC and a \Boot2Qt device and to
|
||||
specify build and run settings for the device:
|
||||
|
||||
\list 1
|
||||
\li Make sure that your device can be reached via an IP address or
|
||||
connect it with a USB connection.
|
||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Kits >
|
||||
\uicontrol {Qt Versions} > \uicontrol Add to add the Qt version
|
||||
for \Boot2Qt.
|
||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Kits >
|
||||
\uicontrol Compilers > \uicontrol Add to add the compiler for
|
||||
building the applications.
|
||||
\li Select \uicontrol Tools > \uicontrol {Flash Boot to Qt Device}
|
||||
to flash the \Boot2Qt image to an SD card with Flashing Wizard.
|
||||
\li To deploy applications and run them remotely on devices, specify
|
||||
parameters for connecting to the devices over the network (\QC
|
||||
automatically detects devices connected with USB):
|
||||
\list 1
|
||||
\li Select \uicontrol Tools > \uicontrol Options >
|
||||
\uicontrol Devices > \uicontrol Devices > \uicontrol Add >
|
||||
\uicontrol \Boot2Qt > \uicontrol {Finish}.
|
||||
\image qtcreator-devices-boot2qt.png "Boot2Qt Network Device Setup wizard"
|
||||
\li In the \uicontrol {Device name} field, enter a name for
|
||||
the connection.
|
||||
\li In the \uicontrol {Device address} field, enter the host
|
||||
name or IP address of the device. This value will be
|
||||
available in the \c %{Device:HostAddress} variable.
|
||||
\li Click \uicontrol {Next} to create the connection.
|
||||
|
||||
You can edit the connection parameters in the
|
||||
\uicontrol Devices tab. The wizard does not show
|
||||
parameters that have sensible default values. One of
|
||||
these is the SSH port number, which is available in
|
||||
the variable \c %{Device:SshPort}.
|
||||
\endlist
|
||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Kits >
|
||||
\uicontrol Add to add a kit for building applications for the
|
||||
device. Select the Qt version, compiler, and device that you
|
||||
added above, and choose \uicontrol \Boot2Qt as the device type.
|
||||
\li To specify build settings:
|
||||
\list 1
|
||||
\li Open a project for an application you want to develop for the
|
||||
device.
|
||||
\li Select \uicontrol Projects > \uicontrol {Build & Run} to enable
|
||||
the kit that you specified above.
|
||||
\endlist
|
||||
\li Select \uicontrol Run to specify run settings. Usually, you can use
|
||||
the default settings.
|
||||
|
||||
When you run the project, \QC deploys the application as
|
||||
specified by the deploy steps. By default, \QC copies the
|
||||
application files to the device. For more information, see
|
||||
\l{Specifying Run Settings for Boot2Qt Devices}.
|
||||
\endlist
|
||||
*/
|
42
doc/qtcreator/src/linux-mobile/creator-deployment-b2qt.qdoc
Normal file
42
doc/qtcreator/src/linux-mobile/creator-deployment-b2qt.qdoc
Normal file
@@ -0,0 +1,42 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Free Documentation License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Free
|
||||
** Documentation License version 1.3 as published by the Free Software
|
||||
** Foundation and appearing in the file included in the packaging of
|
||||
** this file. Please review the following information to ensure
|
||||
** the GNU Free Documentation License version 1.3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
\page creator-deployment-b2qt.html
|
||||
\previouspage creator-deploying-android.html
|
||||
\nextpage creator-deployment-embedded-linux.html
|
||||
|
||||
\title Deploying Applications to Boot2Qt Devices
|
||||
|
||||
You can specify the generic deployment steps for remote Linux devices also
|
||||
for \l{Boot2Qt} devices.
|
||||
|
||||
\image qtcreator-boot2qt-deployment-steps.png "Boot2Qt deployment steps"
|
||||
|
||||
For more information, see \l{Generic Deployment Steps}.
|
||||
|
||||
In addition, to have your application launch on boot, select
|
||||
\uicontrol {Add Deploy Step} > \uicontrol {Change Default Application}.
|
||||
*/
|
@@ -31,7 +31,7 @@
|
||||
|
||||
/*!
|
||||
\page creator-deployment-embedded-linux.html
|
||||
\previouspage creator-deploying-android.html
|
||||
\previouspage creator-deployment-b2qt.html
|
||||
\if defined(qtdesignstudio)
|
||||
\nextpage creator-connecting-mobile.html
|
||||
\else
|
||||
@@ -104,47 +104,6 @@
|
||||
support will crash when an SFTP upload is being attempted. This is not a bug
|
||||
in \QC.
|
||||
|
||||
\section1 Qt for Device Creation Deployment Steps
|
||||
|
||||
\if defined(qtcreator)
|
||||
The deployment steps depend on the Qt for Device Creation version specified
|
||||
in the kit.
|
||||
|
||||
\section2 Developing with Qt 5.8 or Earlier
|
||||
|
||||
The generic deployment steps are not available when developing with Qt for
|
||||
Device Creation version 5.8 or earlier.
|
||||
|
||||
\image qtcreator-deployment-steps-b2qt-58.png
|
||||
|
||||
By default, \QC pushes the files to the device incrementally over an ADB
|
||||
connection. When developing on Windows, executable permissions are set for
|
||||
executable files after they are deployed to the device.
|
||||
|
||||
To execute custom commands, select \uicontrol {Add Deploy Step} >
|
||||
\uicontrol {Custom Remote Command (via adb shell)} and enter the command to
|
||||
execute.
|
||||
|
||||
\note You can add custom commands also as \l{Build Steps}{build steps}, to
|
||||
have them executed when the application is built.
|
||||
|
||||
To have your application launch on boot, select \uicontrol {Add Deploy Step}
|
||||
> \uicontrol {Make this application the default one}.
|
||||
|
||||
\section2 Developing with Qt 5.9 or Later
|
||||
|
||||
When developing with Qt for Device Creation version 5.9 or later, you can
|
||||
specify the deployment steps described in this section in addition to the
|
||||
generic deployment steps.
|
||||
\endif
|
||||
|
||||
To execute custom commands when the application is deployed to the device,
|
||||
select \uicontrol {Add Deploy Step} > \uicontrol {Run Custom Remote Command}
|
||||
and enter the command to execute.
|
||||
|
||||
To have your application launch on boot, select \uicontrol {Add Deploy Step}
|
||||
> \uicontrol {Change Default Application}.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\include creator-projects-cmake-deploying.qdocinc cmake deploying embedded
|
||||
\endif
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -77,7 +77,9 @@
|
||||
{Reference Target Devices and Development Hosts}
|
||||
\li \l{https://doc.qt.io/QtForDeviceCreation/b2qt-installation-guides.html}
|
||||
{Installation Guides}
|
||||
\li \l{Connecting Boot2Qt Devices}
|
||||
\li \l{Specifying Run Settings for Boot2Qt Devices}
|
||||
\li \l{Deploying Applications to Boot2Qt Devices}
|
||||
\li \l{https://doc.qt.io/qtcreator/creator-overview-qtasam.html}
|
||||
{Qt Creator Plugin for Qt Application Manager}
|
||||
\li \l{https://doc.qt.io/QtForDeviceCreation/index.html}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -41,7 +41,7 @@
|
||||
host and on the device.
|
||||
|
||||
For more information on the deployment steps, see
|
||||
\l{Deploying Applications to Generic Remote Linux Devices}.
|
||||
\l{Deploying Applications to Boot2Qt Devices}.
|
||||
|
||||
//! [run settings boot2qt]
|
||||
*/
|
||||
|
@@ -29,7 +29,7 @@
|
||||
\previouspage creator-developing-android.html
|
||||
\nextpage studio-advanced.html
|
||||
\else
|
||||
\previouspage creator-developing-baremetal.html
|
||||
\previouspage creator-developing-b2qt.html
|
||||
\nextpage creator-developing-ios.html
|
||||
\endif
|
||||
|
||||
|
@@ -78,10 +78,9 @@
|
||||
\li \l{Using External Tools}
|
||||
|
||||
You can use external tools directly from \QC. Qt Linguist,
|
||||
QML preview tools (QML Viewer and QML Scene), the default text
|
||||
editor for your system, and the \c sort tool are preconfigured for
|
||||
use. You can change their default configurations and configure new
|
||||
tools.
|
||||
QML utilities, the default text editor for your system, and the
|
||||
\c sort tool are preconfigured for use. You can change their default
|
||||
configurations and configure new tools.
|
||||
|
||||
\endlist
|
||||
|
||||
|
@@ -49,18 +49,25 @@
|
||||
When you deploy the application to an Android device, \QC copies
|
||||
the application files to the device. In addition, you can determine
|
||||
the Qt libraries to use.
|
||||
|
||||
\li \l {Deploying Applications to Boot2Qt Devices}
|
||||
|
||||
When you deploy the application to a Boot2Qt device, \QC copies
|
||||
the application files to the connected device. You can then test
|
||||
and debug the application on the device with \QC.
|
||||
|
||||
\li \l{Deploying Applications to Generic Remote Linux Devices}
|
||||
|
||||
When you deploy the application to a generic Linux-based device, \QC
|
||||
copies the application files to the connected device. You can test
|
||||
and debug the application on the device.
|
||||
copies the application files to the connected device. You can then
|
||||
test and debug the application on the device with \QC.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\li \l{Deploying Applications to QNX Neutrino Devices}
|
||||
|
||||
When you deploy the application to a QNX Neutrino device, \QC copies
|
||||
the application files to the connected device. You can test and
|
||||
debug the application on the device.
|
||||
the application files to the connected device. You can then test and
|
||||
debug the application on the device with \QC.
|
||||
\endif
|
||||
|
||||
\endlist
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -69,6 +69,11 @@
|
||||
to debug applications on them with GDB or a hardware debugger.
|
||||
\endif
|
||||
|
||||
\li \l{Connecting Boot2Qt Devices}
|
||||
|
||||
You can connect \l{Boot2Qt} devices to the development PC to run,
|
||||
debug, and analyze applications built for them from \QC.
|
||||
|
||||
\li \l{Connecting Generic Remote Linux Devices}
|
||||
|
||||
If you have a tool chain for building applications for embedded
|
||||
|
@@ -59,7 +59,7 @@
|
||||
\if defined(qtdesignstudio)
|
||||
\section1 Selecting the Preview Tool
|
||||
|
||||
By default, the \c qmlscene utility is used for previewing. To use some
|
||||
By default, the QML runtime is used for previewing. To use some
|
||||
other tool, specify it in the \uicontrol {QML viewer} field in the run
|
||||
settings of the project in the Projects mode.
|
||||
|
||||
|
@@ -73,10 +73,9 @@
|
||||
\li \l{Using External Tools}
|
||||
|
||||
You can use external tools directly from \QC. lupdate and lrelease,
|
||||
QML preview tools (QML Viewer and QML Scene), the default text
|
||||
editor for your system, and the \c sort tool are preconfigured for
|
||||
use. You can change their default configurations and configure new
|
||||
tools.
|
||||
QML utilities, the default text editor for your system, and the
|
||||
\c sort tool are preconfigured for use. You can change their default
|
||||
configurations and configure new tools.
|
||||
\li \l{Managing Data Collection}
|
||||
|
||||
\if defined (qtcreator)
|
||||
|
@@ -35,8 +35,8 @@ Section {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Source size")
|
||||
disabledState: !backendValues.%2_sourceSize_height.isAvailable
|
||||
&& !backendValues.%2_sourceSize_width.isAvailable
|
||||
blockedByTemplate: !backendValues.%2_sourceSize_height.isAvailable
|
||||
&& !backendValues.%2_sourceSize_width.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -53,8 +53,9 @@ Section {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("W")
|
||||
//disabledStateSoft: !backendValues.%2_sourceSize_width.isAvailable
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
enabled: !backendValues.%2_sourceSize_width.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
@@ -72,8 +73,9 @@ Section {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("H")
|
||||
//disabledStateSoft: !backendValues.%2_sourceSize_height.isAvailable
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
enabled: !backendValues.%2_sourceSize_height.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
@@ -112,7 +114,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Asynchronous")
|
||||
tooltip: qsTr("Loads images on the local filesystem asynchronously in a separate thread.")
|
||||
disabledState: !backendValues.%2_asynchronous.isAvailable
|
||||
blockedByTemplate: !backendValues.%2_asynchronous.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -130,7 +132,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Auto transform")
|
||||
tooltip: qsTr("Automatically applies image transformation metadata such as EXIF orientation.")
|
||||
disabledState: !backendValues.%2_autoTransform.isAvailable
|
||||
blockedByTemplate: !backendValues.%2_autoTransform.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -148,7 +150,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Cache")
|
||||
tooltip: qsTr("Caches the image.")
|
||||
disabledState: !backendValues.%2_cache.isAvailable
|
||||
blockedByTemplate: !backendValues.%2_cache.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -166,7 +168,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Mipmap")
|
||||
tooltip: qsTr("Uses mipmap filtering when the image is scaled or transformed.")
|
||||
disabledState: !backendValues.%2_mipmap.isAvailable
|
||||
blockedByTemplate: !backendValues.%2_mipmap.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -184,7 +186,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Mirror")
|
||||
tooltip: qsTr("Inverts the image horizontally.")
|
||||
disabledState: !backendValues.%2_mirror.isAvailable
|
||||
blockedByTemplate: !backendValues.%2_mirror.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -202,7 +204,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Smooth")
|
||||
tooltip: qsTr("Smoothly filters the image when it is scaled or transformed.")
|
||||
disabledState: !backendValues.%2_smooth.isAvailable
|
||||
blockedByTemplate: !backendValues.%2_smooth.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -53,14 +53,11 @@ Section {
|
||||
}
|
||||
|
||||
PropertyLabel {
|
||||
visible: majorQtQuickVersion > 1
|
||||
text: qsTr("Smooth")
|
||||
disabledState: !backendValues.smooth.isAvailable
|
||||
blockedByTemplate: !backendValues.smooth.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
visible: majorQtQuickVersion > 1
|
||||
|
||||
CheckBox {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
@@ -73,14 +70,11 @@ Section {
|
||||
}
|
||||
|
||||
PropertyLabel {
|
||||
visible: majorQtQuickVersion > 1
|
||||
text: qsTr("Antialiasing")
|
||||
disabledState: !backendValues.antialiasing.isAvailable
|
||||
blockedByTemplate: !backendValues.antialiasing.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
visible: majorQtQuickVersion > 1
|
||||
|
||||
CheckBox {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
@@ -95,7 +89,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Focus")
|
||||
tooltip: qsTr("Sets focus on the component within the enclosing focus scope.")
|
||||
disabledState: !backendValues.focus.isAvailable
|
||||
blockedByTemplate: !backendValues.focus.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -113,7 +107,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Focus on tab")
|
||||
tooltip: qsTr("Adds the component to the tab focus chain.")
|
||||
disabledState: !backendValues.activeFocusOnTab.isAvailable
|
||||
blockedByTemplate: !backendValues.activeFocusOnTab.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -131,7 +125,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Baseline offset")
|
||||
tooltip: qsTr("Position of the component's baseline in local coordinates.")
|
||||
disabledState: !backendValues.baselineOffset.isAvailable
|
||||
blockedByTemplate: !backendValues.baselineOffset.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -46,7 +46,7 @@ Column {
|
||||
SectionLayout {
|
||||
PropertyLabel {
|
||||
text: qsTr("Speed")
|
||||
disabledState: !backendValues.speed.isAvailable
|
||||
blockedByTemplate: !backendValues.speed.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -70,7 +70,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Playing")
|
||||
tooltip: qsTr("Whether the animation is playing or paused.")
|
||||
disabledState: !backendValues.playing.isAvailable && !backendValues.paused.isAvailable
|
||||
blockedByTemplate: !backendValues.playing.isAvailable && !backendValues.paused.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -52,7 +52,7 @@ Column {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Source size")
|
||||
disabledState: !backendValues.sourceSize.isAvailable
|
||||
blockedByTemplate: !backendValues.sourceSize.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -68,7 +68,11 @@ Column {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("W") }
|
||||
ControlLabel {
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
enabled: backendValues.sourceSize_width.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -84,7 +88,11 @@ Column {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("H") }
|
||||
ControlLabel {
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
enabled: backendValues.sourceSize_height.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -95,7 +103,7 @@ Column {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Tile mode H")
|
||||
disabledState: !backendValues.horizontalTileMode.isAvailable
|
||||
blockedByTemplate: !backendValues.horizontalTileMode.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -114,7 +122,7 @@ Column {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Tile mode V")
|
||||
disabledState: !backendValues.verticalTileMode.isAvailable
|
||||
blockedByTemplate: !backendValues.verticalTileMode.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -192,9 +200,9 @@ Column {
|
||||
}
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Mirror") // TODO remove Mirror checkbox when flipping is added to a global setion
|
||||
text: qsTr("Mirror")
|
||||
tooltip: qsTr("Specifies whether the image should be horizontally inverted.")
|
||||
disabledState: !backendValues.mirror.isAvailable
|
||||
blockedByTemplate: !backendValues.mirror.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -212,7 +220,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Smooth")
|
||||
tooltip: qsTr("Specifies whether the image is smoothly filtered when scaled or transformed.")
|
||||
disabledState: !backendValues.smooth.isAvailable
|
||||
blockedByTemplate: !backendValues.smooth.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -230,7 +238,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Cache")
|
||||
tooltip: qsTr("Specifies whether the image should be cached.")
|
||||
disabledState: !backendValues.cache.isAvailable
|
||||
blockedByTemplate: !backendValues.cache.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -248,7 +256,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Asynchronous")
|
||||
tooltip: qsTr("Specifies that images on the local filesystem should be loaded asynchronously in a separate thread.")
|
||||
disabledState: !backendValues.asynchronous.isAvailable
|
||||
blockedByTemplate: !backendValues.asynchronous.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -66,7 +66,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Display")
|
||||
tooltip: qsTr("Determines how the icon and text are displayed within the button.")
|
||||
disabledState: !backendValues.display.isAvailable
|
||||
blockedByTemplate: !backendValues.display.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -118,7 +118,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Exclusive")
|
||||
tooltip: qsTr("Whether the button is exclusive.")
|
||||
disabledState: !backendValues.autoExclusive.isAvailable
|
||||
blockedByTemplate: !backendValues.autoExclusive.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -51,7 +51,8 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Appearance")
|
||||
tooltip: qsTr("Whether the button is flat and/or highlighted.")
|
||||
disabledState: !backendValues.flat.isAvailable
|
||||
blockedByTemplate: !backendValues.flat.isAvailable
|
||||
&& !backendValues.highlighted.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -67,6 +67,7 @@ Section {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
backendValue: backendValues.hoverEnabled
|
||||
enabled: backendValues.hoverEnabled.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
@@ -75,6 +76,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Focus policy")
|
||||
tooltip: qsTr("Focus policy of the control.")
|
||||
blockedByTemplate: !backendValues.focusPolicy.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -85,6 +87,7 @@ Section {
|
||||
backendValue: backendValues.focusPolicy
|
||||
model: [ "TabFocus", "ClickFocus", "StrongFocus", "WheelFocus", "NoFocus" ]
|
||||
scope: "Qt"
|
||||
enabled: backendValues.focusPolicy.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
@@ -112,6 +115,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Wheel")
|
||||
tooltip: qsTr("Whether control accepts wheel events.")
|
||||
blockedByTemplate: !backendValues.wheelEnabled.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -120,6 +124,7 @@ Section {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
backendValue: backendValues.wheelEnabled
|
||||
enabled: backendValues.wheelEnabled.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
|
@@ -48,50 +48,48 @@ Section {
|
||||
PropertyLabel { text: qsTr("Vertical") }
|
||||
|
||||
SecondColumnLayout {
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
maximumValue: 10000
|
||||
minimumValue: -10000
|
||||
realDragRange: 5000
|
||||
decimals: 0
|
||||
backendValue: backendValues.topInset
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
MultiIconLabel {
|
||||
icon0: StudioTheme.Constants.paddingFrame
|
||||
icon1: StudioTheme.Constants.paddingEdge
|
||||
tooltip: qsTr("Top inset for the background.")
|
||||
//disabledStateSoft: !backendValues.topPadding.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
SpinBox {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
maximumValue: 10000
|
||||
minimumValue: -10000
|
||||
realDragRange: 5000
|
||||
decimals: 0
|
||||
backendValue: backendValues.bottomInset
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
MultiIconLabel {
|
||||
icon0: StudioTheme.Constants.paddingFrame
|
||||
icon1: StudioTheme.Constants.paddingEdge
|
||||
rotation: 180
|
||||
tooltip: qsTr("Bottom inset for the background.")
|
||||
//disabledStateSoft: !backendValues.bottomPadding.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
SpinBox {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
maximumValue: 10000
|
||||
minimumValue: -10000
|
||||
realDragRange: 5000
|
||||
decimals: 0
|
||||
backendValue: backendValues.topInset
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
MultiIconLabel {
|
||||
icon0: StudioTheme.Constants.paddingFrame
|
||||
icon1: StudioTheme.Constants.paddingEdge
|
||||
tooltip: qsTr("Top inset for the background.")
|
||||
enabled: !backendValues.topPadding.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
SpinBox {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
maximumValue: 10000
|
||||
minimumValue: -10000
|
||||
realDragRange: 5000
|
||||
decimals: 0
|
||||
backendValue: backendValues.bottomInset
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
MultiIconLabel {
|
||||
icon0: StudioTheme.Constants.paddingFrame
|
||||
icon1: StudioTheme.Constants.paddingEdge
|
||||
rotation: 180
|
||||
tooltip: qsTr("Bottom inset for the background.")
|
||||
enabled: !backendValues.bottomPadding.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel { text: qsTr("Horizontal") }
|
||||
@@ -114,7 +112,7 @@ Section {
|
||||
icon1: StudioTheme.Constants.paddingEdge
|
||||
rotation: 270
|
||||
tooltip: qsTr("Left inset for the background.")
|
||||
//disabledStateSoft: !backendValues.leftPadding.isAvailable
|
||||
enabled: !backendValues.leftPadding.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
@@ -136,7 +134,7 @@ Section {
|
||||
icon1: StudioTheme.Constants.paddingEdge
|
||||
rotation: 90
|
||||
tooltip: qsTr("Right inset for the background.")
|
||||
//disabledStateSoft: !backendValues.rightPadding.isAvailable
|
||||
enabled: !backendValues.rightPadding.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
|
@@ -83,7 +83,8 @@ Column {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("W")
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
tooltip: qsTr("Content width used for calculating the total implicit width.")
|
||||
}
|
||||
|
||||
@@ -102,7 +103,8 @@ Column {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("H")
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
tooltip: qsTr("Content height used for calculating the total implicit height.")
|
||||
}
|
||||
|
||||
|
@@ -64,7 +64,8 @@ Section {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("W")
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
tooltip: qsTr("Content width used for calculating the total implicit width.")
|
||||
}
|
||||
|
||||
@@ -83,7 +84,8 @@ Section {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("H")
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
tooltip: qsTr("Content height used for calculating the total implicit height.")
|
||||
}
|
||||
|
||||
|
@@ -111,7 +111,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Indeterminate")
|
||||
tooltip: qsTr("Whether the progress is indeterminate.")
|
||||
disabledState: !backendValues.indeterminate.isAvailable
|
||||
blockedByTemplate: !backendValues.indeterminate.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -50,7 +50,8 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Appearance")
|
||||
tooltip: qsTr("Whether the button is flat and/or highlighted.")
|
||||
disabledState: !backendValues.flat.isAvailable
|
||||
blockedByTemplate: !backendValues.flat.isAvailable
|
||||
&& !backendValues.highlighted.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -61,7 +61,8 @@ Column {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("W")
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
tooltip: qsTr("Content width used for calculating the total implicit width.")
|
||||
}
|
||||
|
||||
@@ -78,7 +79,8 @@ Column {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("H")
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
tooltip: qsTr("Content height used for calculating the total implicit height.")
|
||||
}
|
||||
|
||||
|
@@ -70,6 +70,7 @@ Column {
|
||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
backendValue: backendValues.live
|
||||
enabled: backendValues.live.isAvailable
|
||||
tooltip: qsTr("Whether the slider provides live value updates.")
|
||||
}
|
||||
|
||||
@@ -136,6 +137,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Drag threshold")
|
||||
tooltip: qsTr("The threshold (in logical pixels) at which a drag event will be initiated.")
|
||||
blockedByTemplate: !backendValues.touchDragThreshold.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -146,6 +148,7 @@ Column {
|
||||
maximumValue: 10000
|
||||
decimals: 0
|
||||
backendValue: backendValues.touchDragThreshold
|
||||
enabled: backendValues.touchDragThreshold.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
@@ -154,6 +157,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Snap mode")
|
||||
tooltip: qsTr("The snap mode of the slider.")
|
||||
blockedByTemplate: !backendValues.snapMode.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -164,6 +168,7 @@ Column {
|
||||
backendValue: backendValues.snapMode
|
||||
model: [ "NoSnap", "SnapOnRelease", "SnapAlways" ]
|
||||
scope: "RangeSlider"
|
||||
enabled: backendValues.snapMode.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
|
@@ -85,7 +85,8 @@ Column {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("W")
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
tooltip: qsTr("Content width used for calculating the total implicit width.")
|
||||
}
|
||||
|
||||
@@ -104,7 +105,8 @@ Column {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("H")
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
tooltip: qsTr("Content height used for calculating the total implicit height.")
|
||||
}
|
||||
|
||||
|
@@ -67,7 +67,10 @@ Section {
|
||||
}
|
||||
|
||||
SectionLayout {
|
||||
PropertyLabel { text: qsTr("Position") }
|
||||
PropertyLabel {
|
||||
text: qsTr("Position")
|
||||
enabled: xSpinBox.enabled || ySpinBox.enabled
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
@@ -86,6 +89,7 @@ Section {
|
||||
ControlLabel {
|
||||
text: "X"
|
||||
tooltip: xSpinBox.enabled ? "X" : root.disbaledTooltip
|
||||
enabled: xSpinBox.enabled
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
@@ -106,6 +110,7 @@ Section {
|
||||
ControlLabel {
|
||||
text: "Y"
|
||||
tooltip: xSpinBox.enabled ? "Y" : root.disbaledTooltip
|
||||
enabled: ySpinBox.enabled
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
@@ -115,7 +120,10 @@ Section {
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel { text: qsTr("Size") }
|
||||
PropertyLabel {
|
||||
text: qsTr("Size")
|
||||
enabled: widthSpinBox.enabled || heightSpinBox.enabled
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
@@ -132,8 +140,10 @@ Section {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("W")
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
tooltip: widthSpinBox.enabled ? qsTr("Width") : root.disbaledTooltip
|
||||
enabled: widthSpinBox.enabled
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
@@ -152,8 +162,10 @@ Section {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("H")
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
tooltip: heightSpinBox.enabled ? qsTr("Height") : root.disbaledTooltip
|
||||
enabled: heightSpinBox.enabled
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
@@ -163,7 +175,10 @@ Section {
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel { text: qsTr("Rotation") }
|
||||
PropertyLabel {
|
||||
text: qsTr("Rotation")
|
||||
blockedByTemplate: !backendValues.rotation.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
@@ -178,7 +193,10 @@ Section {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: "°" }
|
||||
ControlLabel {
|
||||
text: "°"
|
||||
enabled: backendValues.rotation.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -209,7 +227,10 @@ Section {
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel { text: qsTr("Scale") }
|
||||
PropertyLabel {
|
||||
text: qsTr("Scale")
|
||||
blockedByTemplate: !backendValues.scale.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
@@ -226,7 +247,10 @@ Section {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: "%" }
|
||||
ControlLabel {
|
||||
text: "%"
|
||||
enabled: backendValues.scale.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
@@ -245,7 +269,10 @@ Section {
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel { text: qsTr("Origin") }
|
||||
PropertyLabel {
|
||||
text: qsTr("Origin")
|
||||
blockedByTemplate: !backendValues.transformOrigin.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
OriginControl {
|
||||
|
@@ -58,7 +58,10 @@ Column {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("W") }
|
||||
ControlLabel {
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -72,7 +75,10 @@ Column {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("H") }
|
||||
ControlLabel {
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -132,7 +138,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Cache")
|
||||
tooltip: qsTr("Cache buffer")
|
||||
disabledState: !backendValues.cacheBuffer.isAvailable
|
||||
blockedByTemplate: !backendValues.cacheBuffer.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -152,7 +158,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Navigation wraps")
|
||||
tooltip: qsTr("Whether the grid wraps key navigation.")
|
||||
disabledState: !backendValues.keyNavigationWraps.isAvailable
|
||||
blockedByTemplate: !backendValues.keyNavigationWraps.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -164,7 +164,10 @@ Section {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("W") }
|
||||
ControlLabel {
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -179,7 +182,10 @@ Section {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("H") }
|
||||
ControlLabel {
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
@@ -303,7 +309,10 @@ Section {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("W") }
|
||||
ControlLabel {
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -319,7 +328,10 @@ Section {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("H") }
|
||||
ControlLabel {
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
@@ -241,7 +241,10 @@ SectionLayout {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("W") }
|
||||
ControlLabel {
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -256,7 +259,10 @@ SectionLayout {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("H") }
|
||||
ControlLabel {
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
@@ -278,7 +284,10 @@ SectionLayout {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("W") }
|
||||
ControlLabel {
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -293,7 +302,10 @@ SectionLayout {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("H") }
|
||||
ControlLabel {
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
@@ -315,7 +327,10 @@ SectionLayout {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("W") }
|
||||
ControlLabel {
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -330,7 +345,10 @@ SectionLayout {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("H") }
|
||||
ControlLabel {
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
@@ -48,5 +48,23 @@ Section {
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Layout direction")
|
||||
blockedByTemplate: !backendValues.layoutDirection.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "Qt"
|
||||
model: ["LeftToRight", "RightToLeft"]
|
||||
backendValue: backendValues.layoutDirection
|
||||
enabled: backendValues.layoutDirection.isAvailable
|
||||
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -48,5 +48,23 @@ Section {
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Layout direction")
|
||||
blockedByTemplate: !backendValues.layoutDirection.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "Qt"
|
||||
model: ["LeftToRight", "RightToLeft"]
|
||||
backendValue: backendValues.layoutDirection
|
||||
enabled: backendValues.layoutDirection.isAvailable
|
||||
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
||||
+ StudioTheme.Values.actionIndicatorWidth
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -61,7 +61,7 @@ Column {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Layout direction")
|
||||
disabledState: !backendValues.layoutDirection.isAvailable
|
||||
blockedByTemplate: !backendValues.layoutDirection.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -81,7 +81,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Snap mode")
|
||||
tooltip: qsTr("Determines how the view scrolling will settle following a drag or flick.")
|
||||
disabledState: !backendValues.snapMode.isAvailable
|
||||
blockedByTemplate: !backendValues.snapMode.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -119,7 +119,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Cache")
|
||||
tooltip: qsTr("Cache buffer.")
|
||||
disabledState: !backendValues.cacheBuffer.isAvailable
|
||||
blockedByTemplate: !backendValues.cacheBuffer.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -139,7 +139,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Navigation wraps")
|
||||
tooltip: qsTr("Whether the grid wraps key navigation.")
|
||||
disabledState: !backendValues.keyNavigationWraps.isAvailable
|
||||
blockedByTemplate: !backendValues.keyNavigationWraps.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -166,7 +166,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Range")
|
||||
tooltip: qsTr("Highlight range.")
|
||||
disabledState: !backendValues.highlightRangeMode.isAvailable
|
||||
blockedByTemplate: !backendValues.highlightRangeMode.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -186,7 +186,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Move duration")
|
||||
tooltip: qsTr("Move animation duration of the highlight delegate.")
|
||||
disabledState: !backendValues.highlightMoveDuration.isAvailable
|
||||
blockedByTemplate: !backendValues.highlightMoveDuration.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -206,7 +206,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Move velocity")
|
||||
tooltip: qsTr("Move animation velocity of the highlight delegate.")
|
||||
disabledState: !backendValues.highlightMoveVelocity.isAvailable
|
||||
blockedByTemplate: !backendValues.highlightMoveVelocity.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -226,7 +226,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Resize duration")
|
||||
tooltip: qsTr("Resize animation duration of the highlight delegate.")
|
||||
disabledState: !backendValues.highlightResizeDuration.isAvailable
|
||||
blockedByTemplate: !backendValues.highlightResizeDuration.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -246,7 +246,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Resize velocity")
|
||||
tooltip: qsTr("Resize animation velocity of the highlight delegate.")
|
||||
disabledState: !backendValues.highlightResizeVelocity.isAvailable
|
||||
blockedByTemplate: !backendValues.highlightResizeVelocity.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -266,7 +266,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Preferred begin")
|
||||
tooltip: qsTr("Preferred highlight begin - must be smaller than Preferred end.")
|
||||
disabledState: !backendValues.preferredHighlightBegin.isAvailable
|
||||
blockedByTemplate: !backendValues.preferredHighlightBegin.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -286,7 +286,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Preferred end")
|
||||
tooltip: qsTr("Preferred highlight end - must be larger than Preferred begin.")
|
||||
disabledState: !backendValues.preferredHighlightEnd.isAvailable
|
||||
blockedByTemplate: !backendValues.preferredHighlightEnd.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -306,7 +306,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Follows current")
|
||||
tooltip: qsTr("Whether the highlight is managed by the view.")
|
||||
disabledState: !backendValues.highlightFollowsCurrentItem.isAvailable
|
||||
blockedByTemplate: !backendValues.highlightFollowsCurrentItem.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -43,7 +43,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Enable")
|
||||
tooltip: qsTr("Accepts mouse events.")
|
||||
disabledState: !backendValues.enabled.isAvailable
|
||||
blockedByTemplate: !backendValues.enabled.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -71,7 +71,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Accepted buttons")
|
||||
tooltip: qsTr("Mouse buttons that the mouse area reacts to.")
|
||||
disabledState: !backendValues.acceptedButtons.isAvailable
|
||||
blockedByTemplate: !backendValues.acceptedButtons.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -91,7 +91,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Cursor shape")
|
||||
tooltip: qsTr("Cursor shape for this mouse area.")
|
||||
disabledState: !backendValues.cursorShape.isAvailable
|
||||
blockedByTemplate: !backendValues.cursorShape.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -134,7 +134,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Scroll gesture")
|
||||
tooltip: qsTr("Responds to scroll gestures from non-mouse devices.")
|
||||
disabledState: !backendValues.scrollGestureEnabled.isAvailable
|
||||
blockedByTemplate: !backendValues.scrollGestureEnabled.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -152,7 +152,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Prevent stealing")
|
||||
tooltip: qsTr("Stops mouse events from being stolen from this mouse area.")
|
||||
disabledState: !backendValues.preventStealing.isAvailable
|
||||
blockedByTemplate: !backendValues.preventStealing.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -170,7 +170,7 @@ Column {
|
||||
PropertyLabel {
|
||||
text: qsTr("Propagate events")
|
||||
tooltip: qsTr("Automatically propagates composed mouse events to other mouse areas.")
|
||||
disabledState: !backendValues.propagateComposedEvents.isAvailable
|
||||
blockedByTemplate: !backendValues.propagateComposedEvents.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -58,7 +58,7 @@ Column {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Border width")
|
||||
disabledState: !backendValues.border_width.isAvailable
|
||||
blockedByTemplate: !backendValues.border_width.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -57,7 +57,7 @@ Column {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Layout direction")
|
||||
disabledState: !backendValues.layoutDirection.isAvailable
|
||||
blockedByTemplate: !backendValues.layoutDirection.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -162,7 +162,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Style name")
|
||||
tooltip: qsTr("Font's style.")
|
||||
disabledState: !styleNameComboBox.enabled
|
||||
blockedByTemplate: !styleNameComboBox.enabled
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -298,6 +298,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Letter spacing")
|
||||
tooltip: qsTr("Letter spacing for the font.")
|
||||
blockedByTemplate: !getBackendValue("letterSpacing").isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -318,6 +319,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Word spacing")
|
||||
tooltip: qsTr("Word spacing for the font.")
|
||||
blockedByTemplate: !getBackendValue("wordSpacing").isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -339,7 +341,7 @@ Section {
|
||||
visible: root.showLineHeight
|
||||
text: qsTr("Line height")
|
||||
tooltip: qsTr("Line height for the text.")
|
||||
disabledState: !lineHeightSpinBox.enabled
|
||||
blockedByTemplate: !lineHeightSpinBox.enabled
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -49,4 +49,15 @@ T.Label {
|
||||
anchors.fill: parent
|
||||
tooltip: label.text
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "disabled"
|
||||
when: !label.enabled
|
||||
PropertyChanges {
|
||||
target: label
|
||||
color: StudioTheme.Values.themeTextColorDisabled
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -188,47 +188,30 @@ Item {
|
||||
|
||||
ListViewComboBox {
|
||||
id: dummyComboBox
|
||||
|
||||
//property int myIndex: index
|
||||
//property bool empty: dummyComboBox.initialModelData === ""
|
||||
|
||||
visible: myRepeater.count === 0
|
||||
|
||||
validator: RegExpValidator { regExp: /(^[a-z_]\w*|^[A-Z]\w*\.{1}([a-z_]\w*\.?)+)/ }
|
||||
|
||||
actionIndicatorVisible: false
|
||||
typeFilter: editableListView.typeFilter
|
||||
//editText: modelData
|
||||
//initialModelData: modelData
|
||||
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
||||
width: implicitWidth
|
||||
|
||||
onFocusChanged: {
|
||||
//if (itemFilterComboBox.focus)
|
||||
// myColumn.currentIndex = index
|
||||
|
||||
if (/*dummyComboBox.empty && */dummyComboBox.editText !== "") {
|
||||
//myRepeater.dirty = false
|
||||
if (dummyComboBox.editText !== "")
|
||||
editableListView.add(dummyComboBox.editText)
|
||||
}
|
||||
}
|
||||
|
||||
onCompressedActivated: {
|
||||
editableListView.activatedReason = reason
|
||||
|
||||
if (/*dummyComboBox.empty && */dummyComboBox.editText !== "") {
|
||||
//myRepeater.dirty = false
|
||||
if (dummyComboBox.editText !== "")
|
||||
editableListView.add(dummyComboBox.editText)
|
||||
} else {
|
||||
else
|
||||
editableListView.replace(dummyComboBox.myIndex, dummyComboBox.editText)
|
||||
}
|
||||
}
|
||||
|
||||
onHoverChanged: editableListView.delegateHover = dummyComboBox.hover
|
||||
}
|
||||
|
||||
|
||||
|
||||
StudioControls.AbstractButton {
|
||||
id: plusButton
|
||||
buttonIcon: StudioTheme.Constants.plus
|
||||
@@ -241,6 +224,7 @@ Item {
|
||||
myColumn.currentIndex = idx
|
||||
myColumn.currentItem.forceActiveFocus()
|
||||
}
|
||||
|
||||
onHoveredChanged: editableListView.delegateHover = plusButton.hovered
|
||||
}
|
||||
}
|
||||
|
@@ -51,7 +51,8 @@ Section {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("W")
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
tooltip: qsTr("Content width used for calculating the total implicit width.")
|
||||
}
|
||||
|
||||
@@ -68,7 +69,8 @@ Section {
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel {
|
||||
text: qsTr("H")
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
tooltip: qsTr("Content height used for calculating the total implicit height.")
|
||||
}
|
||||
|
||||
@@ -117,8 +119,8 @@ Section {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Origin")
|
||||
disabledState: (!backendValues.originX.isAvailable
|
||||
&& !backendValues.originY.isAvailable)
|
||||
blockedByTemplate: !backendValues.originX.isAvailable
|
||||
&& !backendValues.originY.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -133,7 +135,10 @@ Section {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: "X" }
|
||||
ControlLabel {
|
||||
text: "X"
|
||||
enabled: backendValues.originX.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -148,7 +153,10 @@ Section {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: "Y" }
|
||||
ControlLabel {
|
||||
text: "Y"
|
||||
enabled: backendValues.originY.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -159,7 +167,7 @@ Section {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Left margin")
|
||||
disabledState: !backendValues.leftMargin.isAvailable
|
||||
blockedByTemplate: !backendValues.leftMargin.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -172,12 +180,13 @@ Section {
|
||||
decimals: 0
|
||||
enabled: backendValue.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Right margin")
|
||||
disabledState: !backendValues.rightMargin.isAvailable
|
||||
blockedByTemplate: !backendValues.rightMargin.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -196,7 +205,7 @@ Section {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Top margin")
|
||||
disabledState: !backendValues.topMargin.isAvailable
|
||||
blockedByTemplate: !backendValues.topMargin.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -215,7 +224,7 @@ Section {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Bottom margin")
|
||||
disabledState: !backendValues.bottomMargin.isAvailable
|
||||
blockedByTemplate: !backendValues.bottomMargin.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -54,7 +54,7 @@ Section {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Flick direction")
|
||||
disabledState: !backendValues.flickableDirection.isAvailable
|
||||
blockedByTemplate: !backendValues.flickableDirection.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -74,7 +74,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Behavior")
|
||||
tooltip: qsTr("Whether the surface may be dragged beyond the Flickable's boundaries, or overshoot the Flickable's boundaries when flicked.")
|
||||
disabledState: !backendValues.boundsBehavior.isAvailable
|
||||
blockedByTemplate: !backendValues.boundsBehavior.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -94,7 +94,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Movement")
|
||||
tooltip: qsTr("Whether the Flickable will give a feeling that the edges of the view are soft, rather than a hard physical boundary.")
|
||||
disabledState: !backendValues.boundsMovement.isAvailable
|
||||
blockedByTemplate: !backendValues.boundsMovement.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -132,7 +132,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Deceleration")
|
||||
tooltip: qsTr("Flick deceleration")
|
||||
disabledState: !backendValues.flickDeceleration.isAvailable
|
||||
blockedByTemplate: !backendValues.flickDeceleration.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -152,7 +152,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Press delay")
|
||||
tooltip: qsTr("Time to delay delivering a press to children of the Flickable in milliseconds.")
|
||||
disabledState: !backendValues.pressDelay.isAvailable
|
||||
blockedByTemplate: !backendValues.pressDelay.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -172,7 +172,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Pixel aligned")
|
||||
tooltip: qsTr("Sets the alignment of contentX and contentY to pixels (true) or subpixels (false).")
|
||||
disabledState: !backendValues.pixelAligned.isAvailable
|
||||
blockedByTemplate: !backendValues.pixelAligned.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -192,7 +192,7 @@ Section {
|
||||
tooltip: qsTr("If set to true, then when the mouse or touchpoint moves far enough to begin dragging\n"
|
||||
+ "the content, the content will jump, such that the content pixel which was under the\n"
|
||||
+ "cursor or touchpoint when pressed remains under that point.")
|
||||
disabledState: !backendValues.synchronousDrag.isAvailable
|
||||
blockedByTemplate: !backendValues.synchronousDrag.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -46,7 +46,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Capitalization")
|
||||
tooltip: qsTr("Capitalization for the text.")
|
||||
disabledState: !getBackendValue("capitalization").isAvailable
|
||||
blockedByTemplate: !getBackendValue("capitalization").isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -66,7 +66,7 @@ Section {
|
||||
PropertyLabel {
|
||||
visible: root.showStyle
|
||||
text: qsTr("Style")
|
||||
disabledState: !styleComboBox.enabled
|
||||
blockedByTemplate: !styleComboBox.enabled
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -101,7 +101,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Hinting")
|
||||
tooltip: qsTr("Preferred hinting on the text.")
|
||||
disabledState: !getBackendValue("hintingPreference").isAvailable
|
||||
blockedByTemplate: !getBackendValue("hintingPreference").isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -122,7 +122,7 @@ Section {
|
||||
text: qsTr("Auto kerning")
|
||||
tooltip: qsTr("Enables or disables the kerning OpenType feature when shaping the text. Disabling this may " +
|
||||
"improve performance when creating or changing the text, at the expense of some cosmetic features.")
|
||||
disabledState: !getBackendValue("kerning").isAvailable
|
||||
blockedByTemplate: !getBackendValue("kerning").isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -142,7 +142,7 @@ Section {
|
||||
tooltip: qsTr("Sometimes, a font will apply complex rules to a set of characters in order to display them correctly.\n" +
|
||||
"In some writing systems, such as Brahmic scripts, this is required in order for the text to be legible, whereas in " +
|
||||
"Latin script,\n it is merely a cosmetic feature. Setting the preferShaping property to false will disable all such features\nwhen they are not required, which will improve performance in most cases.")
|
||||
disabledState: !getBackendValue("preferShaping").isAvailable
|
||||
blockedByTemplate: !getBackendValue("preferShaping").isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -149,7 +149,13 @@ Section {
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
PropertyLabel { text: qsTr("Emphasis") }
|
||||
PropertyLabel {
|
||||
text: qsTr("Emphasis")
|
||||
blockedByTemplate: !fontSection.boldStyle.isAvailable
|
||||
&& !fontSection.italicStyle.isAvailable
|
||||
&& !fontSection.underlineStyle.isAvailable
|
||||
&& !fontSection.strikeoutStyle.isAvailable
|
||||
}
|
||||
|
||||
FontStyleButtons {
|
||||
bold: fontSection.boldStyle
|
||||
@@ -162,7 +168,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Capitalization")
|
||||
tooltip: qsTr("Capitalization for the text.")
|
||||
disabledState: !getBackendValue("capitalization").isAvailable
|
||||
blockedByTemplate: !getBackendValue("capitalization").isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -182,6 +188,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Weight")
|
||||
tooltip: qsTr("Font's weight.")
|
||||
blockedByTemplate: styleNameComboBox.styleSet
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -201,7 +208,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Style name")
|
||||
tooltip: qsTr("Font's style.")
|
||||
disabledState: !styleNameComboBox.enabled
|
||||
blockedByTemplate: !styleNameComboBox.enabled
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -223,7 +230,7 @@ Section {
|
||||
PropertyLabel {
|
||||
visible: fontSection.showStyle
|
||||
text: qsTr("Style")
|
||||
disabledState: !styleComboBox.enabled
|
||||
blockedByTemplate: !styleComboBox.enabled
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -257,7 +264,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Hinting")
|
||||
tooltip: qsTr("Preferred hinting on the text.")
|
||||
disabledState: !getBackendValue("hintingPreference").isAvailable
|
||||
blockedByTemplate: !getBackendValue("hintingPreference").isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -277,6 +284,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Letter spacing")
|
||||
tooltip: qsTr("Letter spacing for the font.")
|
||||
blockedByTemplate: getBackendValue("letterSpacing").isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -297,6 +305,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Word spacing")
|
||||
tooltip: qsTr("Word spacing for the font.")
|
||||
blockedByTemplate: !backendValue.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -318,7 +327,7 @@ Section {
|
||||
text: qsTr("Auto kerning")
|
||||
tooltip: qsTr("Enables or disables the kerning OpenType feature when shaping the text. Disabling this may " +
|
||||
"improve performance when creating or changing the text, at the expense of some cosmetic features.")
|
||||
disabledState: !getBackendValue("kerning").isAvailable
|
||||
blockedByTemplate: !getBackendValue("kerning").isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -338,7 +347,7 @@ Section {
|
||||
tooltip: qsTr("Sometimes, a font will apply complex rules to a set of characters in order to display them correctly.\n" +
|
||||
"In some writing systems, such as Brahmic scripts, this is required in order for the text to be legible, whereas in " +
|
||||
"Latin script,\n it is merely a cosmetic feature. Setting the preferShaping property to false will disable all such features\nwhen they are not required, which will improve performance in most cases.")
|
||||
disabledState: !getBackendValue("preferShaping").isAvailable
|
||||
blockedByTemplate: !getBackendValue("preferShaping").isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -26,7 +26,6 @@
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import HelperWidgets 2.0
|
||||
import StudioControls 1.0 as StudioControls
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
Section {
|
||||
@@ -63,7 +62,7 @@ Section {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Source size")
|
||||
disabledState: !backendValues.sourceSize.isAvailable
|
||||
blockedByTemplate: !backendValues.sourceSize.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -79,7 +78,11 @@ Section {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("W") }
|
||||
ControlLabel {
|
||||
//: The width of the object
|
||||
text: qsTr("W", "width")
|
||||
enabled: backendValues.sourceSize_width.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -95,7 +98,11 @@ Section {
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
||||
|
||||
ControlLabel { text: qsTr("H") }
|
||||
ControlLabel {
|
||||
//: The height of the object
|
||||
text: qsTr("H", "height")
|
||||
enabled: backendValues.sourceSize_height.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
|
||||
@@ -104,7 +111,6 @@ Section {
|
||||
ExpandingSpacer {}
|
||||
}
|
||||
|
||||
|
||||
PropertyLabel { text: qsTr("Alignment H") }
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -138,7 +144,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Asynchronous")
|
||||
tooltip: qsTr("Loads images on the local filesystem asynchronously in a separate thread.")
|
||||
disabledState: !backendValues.asynchronous.isAvailable
|
||||
blockedByTemplate: !backendValues.asynchronous.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -156,7 +162,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Auto transform")
|
||||
tooltip: qsTr("Automatically applies image transformation metadata such as EXIF orientation.")
|
||||
disabledState: !backendValues.autoTransform.isAvailable
|
||||
blockedByTemplate: !backendValues.autoTransform.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -174,7 +180,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Cache")
|
||||
tooltip: qsTr("Caches the image.")
|
||||
disabledState: !backendValues.cache.isAvailable
|
||||
blockedByTemplate: !backendValues.cache.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -192,7 +198,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Mipmap")
|
||||
tooltip: qsTr("Uses mipmap filtering when the image is scaled or transformed.")
|
||||
disabledState: !backendValues.mipmap.isAvailable
|
||||
blockedByTemplate: !backendValues.mipmap.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -210,7 +216,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Mirror")
|
||||
tooltip: qsTr("Inverts the image horizontally.")
|
||||
disabledState: !backendValues.mirror.isAvailable
|
||||
blockedByTemplate: !backendValues.mirror.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -228,7 +234,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Smooth")
|
||||
tooltip: qsTr("Smoothly filters the image when it is scaled or transformed.")
|
||||
disabledState: !backendValues.smooth.isAvailable
|
||||
blockedByTemplate: !backendValues.smooth.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -28,6 +28,7 @@ import QtQuick.Templates 2.15 as T
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
property alias tooltip: toolTipArea.tooltip
|
||||
property alias icon0: icon0.text
|
||||
property alias icon1: icon1.text
|
||||
@@ -69,4 +70,15 @@ Rectangle {
|
||||
id: toolTipArea
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "disabled"
|
||||
when: !root.enabled
|
||||
PropertyChanges {
|
||||
target: icon1
|
||||
color: StudioTheme.Values.themeIconColorDisabled
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -37,7 +37,8 @@ Section {
|
||||
SectionLayout {
|
||||
PropertyLabel {
|
||||
text: qsTr("Vertical")
|
||||
disabledState: (!backendValues.topPadding.isAvailable && !backendValues.bottomPadding.isAvailable)
|
||||
blockedByTemplate: !backendValues.topPadding.isAvailable
|
||||
&& !backendValues.bottomPadding.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -57,7 +58,7 @@ Section {
|
||||
icon0: StudioTheme.Constants.paddingFrame
|
||||
icon1: StudioTheme.Constants.paddingEdge
|
||||
tooltip: qsTr("Padding between the content and the top edge of the item.")
|
||||
//disabledStateSoft: !backendValues.topPadding.isAvailable
|
||||
enabled: backendValues.topPadding.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
@@ -79,7 +80,7 @@ Section {
|
||||
icon1: StudioTheme.Constants.paddingEdge
|
||||
rotation: 180
|
||||
tooltip: qsTr("Padding between the content and the bottom edge of the item.")
|
||||
//disabledStateSoft: !backendValues.bottomPadding.isAvailable
|
||||
enabled: backendValues.bottomPadding.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
@@ -87,7 +88,8 @@ Section {
|
||||
|
||||
PropertyLabel {
|
||||
text: qsTr("Horizontal")
|
||||
disabledState: (!backendValues.leftPadding.isAvailable && !backendValues.rightPadding.isAvailable)
|
||||
blockedByTemplate: !backendValues.leftPadding.isAvailable
|
||||
&& !backendValues.rightPadding.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -108,7 +110,7 @@ Section {
|
||||
icon1: StudioTheme.Constants.paddingEdge
|
||||
rotation: 270
|
||||
tooltip: qsTr("Padding between the content and the left edge of the item.")
|
||||
//disabledStateSoft: !backendValues.leftPadding.isAvailable
|
||||
enabled: backendValues.leftPadding.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
@@ -130,7 +132,7 @@ Section {
|
||||
icon1: StudioTheme.Constants.paddingEdge
|
||||
rotation: 90
|
||||
tooltip: qsTr("Padding between the content and the right edge of the item.")
|
||||
//disabledStateSoft: !backendValues.rightPadding.isAvailable
|
||||
enabled: backendValues.rightPadding.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
@@ -139,7 +141,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Global")
|
||||
tooltip: qsTr("Padding between the content and the edges of the items.")
|
||||
disabledState: !backendValues.padding.isAvailable
|
||||
blockedByTemplate: !backendValues.padding.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -33,12 +33,12 @@ T.Label {
|
||||
|
||||
property alias tooltip: toolTipArea.tooltip
|
||||
|
||||
property bool disabledState: false
|
||||
property bool disabledStateSoft: false
|
||||
property bool blockedByContext: false
|
||||
property bool blockedByTemplate: false // MCU
|
||||
|
||||
width: StudioTheme.Values.propertyLabelWidth
|
||||
color: StudioTheme.Values.themeTextColor
|
||||
font.pixelSize: StudioTheme.Values.myFontSize // TODO
|
||||
font.pixelSize: StudioTheme.Values.myFontSize
|
||||
elide: Text.ElideRight
|
||||
|
||||
horizontalAlignment: Text.AlignRight
|
||||
@@ -50,26 +50,35 @@ T.Label {
|
||||
ToolTipArea {
|
||||
id: toolTipArea
|
||||
anchors.fill: parent
|
||||
tooltip: ((label.disabledState || label.disabledStateSoft)
|
||||
? qsTr("This property is not available in this configuration.")
|
||||
: label.text)
|
||||
tooltip: label.blockedByTemplate
|
||||
? qsTr("This property is not available in this configuration.")
|
||||
: label.text
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "disabled"
|
||||
when: label.disabledState
|
||||
when: !label.enabled && !(label.blockedByContext || label.blockedByTemplate)
|
||||
PropertyChanges {
|
||||
target: label
|
||||
color: StudioTheme.Values.themeTextColorDisabled
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "disabledSoft"
|
||||
when: label.disabledStateSoft
|
||||
name: "blockedByContext"
|
||||
when: label.blockedByContext
|
||||
PropertyChanges {
|
||||
target: label
|
||||
color: "red"//StudioTheme.Values.themeTextColorDisabled
|
||||
color: StudioTheme.Values.themeTextColorDisabled
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "blockedByTemplate"
|
||||
when: label.blockedByTemplate
|
||||
PropertyChanges {
|
||||
target: label
|
||||
color: StudioTheme.Values.themeTextColorDisabledMCU
|
||||
font.strikeout: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@@ -65,7 +65,7 @@ Section {
|
||||
implicitWidth: StudioTheme.Values.iconAreaWidth // TODO dedicated value
|
||||
implicitHeight: StudioTheme.Values.height // TODO dedicated value
|
||||
|
||||
T.Label {
|
||||
Label {
|
||||
id: richTextEditorIcon
|
||||
anchors.fill: parent
|
||||
text: StudioTheme.Constants.edit
|
||||
@@ -120,7 +120,7 @@ Section {
|
||||
PropertyLabel {
|
||||
visible: root.showVerticalAlignment
|
||||
text: qsTr("Wrap mode")
|
||||
disabledState: !backendValues.wrapMode.isAvailable
|
||||
blockedByTemplate: !backendValues.wrapMode.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -141,7 +141,7 @@ Section {
|
||||
PropertyLabel {
|
||||
visible: root.showElide
|
||||
text: qsTr("Elide")
|
||||
disabledState: !backendValues.elide.isAvailable
|
||||
blockedByTemplate: !backendValues.elide.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -163,7 +163,7 @@ Section {
|
||||
visible: root.showElide
|
||||
text: qsTr("Max line count")
|
||||
tooltip: qsTr("Limits the number of lines that the text component will show.")
|
||||
disabledState: !backendValues.maximumLineCount.isAvailable
|
||||
blockedByTemplate: !backendValues.maximumLineCount.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -202,7 +202,7 @@ Section {
|
||||
PropertyLabel {
|
||||
visible: root.showFormatProperty
|
||||
text: qsTr("Format")
|
||||
disabledState: !backendValues.textFormat.isAvailable
|
||||
blockedByTemplate: !backendValues.textFormat.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -223,7 +223,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Render type")
|
||||
tooltip: qsTr("Overrides the default rendering type for this component.")
|
||||
disabledState: !backendValues.renderType.isAvailable
|
||||
blockedByTemplate: !backendValues.renderType.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -244,7 +244,7 @@ Section {
|
||||
visible: root.showFontSizeMode
|
||||
text: qsTr("Size mode")
|
||||
tooltip: qsTr("Specifies how the font size of the displayed text is determined.")
|
||||
disabledState: !backendValues.fontSizeMode.isAvailable
|
||||
blockedByTemplate: !backendValues.fontSizeMode.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -266,8 +266,8 @@ Section {
|
||||
PropertyLabel {
|
||||
visible: root.showFontSizeMode
|
||||
text: qsTr("Min size")
|
||||
disabledState: !backendValues.minimumPixelSize.isAvailable
|
||||
&& !backendValues.minimumPointSize.isAvailable
|
||||
blockedByTemplate: !backendValues.minimumPixelSize.isAvailable
|
||||
&& !backendValues.minimumPointSize.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -288,7 +288,7 @@ Section {
|
||||
ControlLabel {
|
||||
text: "px"
|
||||
tooltip: qsTr("Minimum font pixel size of scaled text.")
|
||||
//disabledStateSoft: !backendValues.minimumPixelSize.isAvailable
|
||||
enabled: backendValues.minimumPixelSize.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
@@ -308,7 +308,7 @@ Section {
|
||||
ControlLabel {
|
||||
text: "pt"
|
||||
tooltip: qsTr("Minimum font point size of scaled text.")
|
||||
//disabledStateSoft: !backendValues.minimumPointSize.isAvailable
|
||||
enabled: backendValues.minimumPointSize.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
@@ -318,7 +318,7 @@ Section {
|
||||
visible: root.showLineHeight
|
||||
text: qsTr("Line height")
|
||||
tooltip: qsTr("Line height for the text.")
|
||||
disabledState: !lineHeightSpinBox.enabled
|
||||
blockedByTemplate: !lineHeightSpinBox.enabled
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -344,7 +344,7 @@ Section {
|
||||
visible: root.showLineHeight
|
||||
text: qsTr("Line height mode")
|
||||
tooltip: qsTr("Determines how the line height is specified.")
|
||||
disabledState: !backendValues.lineHeightMode.isAvailable
|
||||
blockedByTemplate: !backendValues.lineHeightMode.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -45,7 +45,7 @@ Section {
|
||||
PropertyLabel {
|
||||
visible: root.showWrapMode
|
||||
text: qsTr("Wrap mode")
|
||||
disabledState: !backendValues.wrapMode.isAvailable
|
||||
blockedByTemplate: !backendValues.wrapMode.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -67,7 +67,7 @@ Section {
|
||||
PropertyLabel {
|
||||
visible: root.showElide
|
||||
text: qsTr("Elide")
|
||||
disabledState: !backendValues.elide.isAvailable
|
||||
blockedByTemplate: !backendValues.elide.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -89,7 +89,7 @@ Section {
|
||||
PropertyLabel {
|
||||
visible: root.showFormatProperty
|
||||
text: qsTr("Format")
|
||||
disabledState: !backendValues.textFormat.isAvailable
|
||||
blockedByTemplate: !backendValues.textFormat.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -111,7 +111,7 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Render type")
|
||||
tooltip: qsTr("Overrides the default rendering type for this component.")
|
||||
disabledState: !backendValues.renderType.isAvailable
|
||||
blockedByTemplate: !backendValues.renderType.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -132,7 +132,7 @@ Section {
|
||||
visible: root.showLineHeight
|
||||
text: qsTr("Line height mode")
|
||||
tooltip: qsTr("Determines how the line height is specified.")
|
||||
disabledState: !backendValues.lineHeightMode.isAvailable
|
||||
blockedByTemplate: !backendValues.lineHeightMode.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -155,7 +155,7 @@ Section {
|
||||
visible: root.showFontSizeMode
|
||||
text: qsTr("Size mode")
|
||||
tooltip: qsTr("Specifies how the font size of the displayed text is determined.")
|
||||
disabledState: !backendValues.fontSizeMode.isAvailable
|
||||
blockedByTemplate: !backendValues.fontSizeMode.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -178,8 +178,8 @@ Section {
|
||||
PropertyLabel {
|
||||
visible: root.showFontSizeMode
|
||||
text: qsTr("Min size")
|
||||
disabledState: !backendValues.minimumPixelSize.isAvailable
|
||||
&& !backendValues.minimumPointSize.isAvailable
|
||||
blockedByTemplate: !backendValues.minimumPixelSize.isAvailable
|
||||
&& !backendValues.minimumPointSize.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -200,7 +200,7 @@ Section {
|
||||
ControlLabel {
|
||||
text: "px"
|
||||
tooltip: qsTr("Minimum font pixel size of scaled text.")
|
||||
//disabledStateSoft: !backendValues.minimumPixelSize.isAvailable
|
||||
enabled: backendValues.minimumPixelSize.isAvailable
|
||||
}
|
||||
|
||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||
@@ -220,7 +220,7 @@ Section {
|
||||
ControlLabel {
|
||||
text: "pt"
|
||||
tooltip: qsTr("Minimum font point size of scaled text.")
|
||||
//disabledStateSoft: !backendValues.minimumPointSize.isAvailable
|
||||
enabled: backendValues.minimumPointSize.isAvailable
|
||||
}
|
||||
|
||||
ExpandingSpacer {}
|
||||
@@ -230,7 +230,7 @@ Section {
|
||||
visible: root.showElide
|
||||
text: qsTr("Max line count")
|
||||
tooltip: qsTr("Limits the number of lines that the text component will show.")
|
||||
disabledState: !backendValues.maximumLineCount.isAvailable
|
||||
blockedByTemplate: !backendValues.maximumLineCount.isAvailable
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
@@ -220,6 +220,7 @@ QtObject {
|
||||
property string themeTextColorDisabled: Theme.color(Theme.DStextColorDisabled)
|
||||
property string themeTextSelectionColor: Theme.color(Theme.DStextSelectionColor)
|
||||
property string themeTextSelectedTextColor: Theme.color(Theme.DStextSelectedTextColor)
|
||||
property string themeTextColorDisabledMCU: "black" // TODO
|
||||
|
||||
property string themePlaceholderTextColor: Theme.color(Theme.DSplaceholderTextColor)
|
||||
property string themePlaceholderTextColorInteraction: Theme.color(Theme.DSplaceholderTextColorInteraction)
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"supportedProjectTypes": [ "QmlProjectManager.QmlProject" ],
|
||||
"id": "QA.QtQuickUi",
|
||||
"category": "H.Project",
|
||||
"trDescription": "Creates a Qt Quick 2 UI project with a QML entry point. To use it, you need to have a QML runtime environment such as qmlscene set up.\n\nUse this only if you are prototyping. You cannot create a full application with this. Consider using a Qt Quick Application project instead.",
|
||||
"trDescription": "Creates a Qt Quick 2 UI project with a QML entry point. To use it, you need to have a QML runtime environment.\n\nUse this only if you are prototyping. You cannot create a full application with this. Consider using a Qt Quick Application project instead.",
|
||||
"trDisplayName": "Qt Quick UI Prototype",
|
||||
"trDisplayCategory": "Other Project",
|
||||
"icon": "qtquickuiprototype.png",
|
||||
|
@@ -57,8 +57,7 @@ Product {
|
||||
var list = [
|
||||
"lrelease.xml",
|
||||
"lupdate.xml",
|
||||
"qmlscene.xml",
|
||||
"qmlviewer.xml",
|
||||
"qml.xml",
|
||||
]
|
||||
if (qbs.targetOS.contains("windows"))
|
||||
list.push("notepad_win.xml");
|
||||
|
@@ -51,18 +51,16 @@ public:
|
||||
explicit MessageId(const QString &id) : variant(id) {}
|
||||
explicit MessageId(const QJsonValue &value)
|
||||
{
|
||||
if (value.isUndefined())
|
||||
return;
|
||||
QTC_CHECK(value.isDouble() || value.isString());
|
||||
if (value.isDouble())
|
||||
*this = MessageId(value.toInt());
|
||||
else if (value.isString())
|
||||
*this = MessageId(value.toString());
|
||||
else
|
||||
m_valid = false;
|
||||
}
|
||||
|
||||
operator QJsonValue() const
|
||||
{
|
||||
QTC_CHECK(Utils::holds_alternative<int>(*this) || Utils::holds_alternative<QString>(*this));
|
||||
if (auto id = Utils::get_if<int>(this))
|
||||
return *id;
|
||||
if (auto id = Utils::get_if<QString>(this))
|
||||
@@ -70,7 +68,7 @@ public:
|
||||
return QJsonValue();
|
||||
}
|
||||
|
||||
bool isValid() const { return true; }
|
||||
bool isValid() const { return m_valid; }
|
||||
|
||||
QString toString() const
|
||||
{
|
||||
@@ -80,6 +78,9 @@ public:
|
||||
return QString::number(*id);
|
||||
return {};
|
||||
}
|
||||
|
||||
private:
|
||||
bool m_valid = true;
|
||||
};
|
||||
|
||||
struct ResponseHandler
|
||||
|
@@ -188,6 +188,8 @@ public:
|
||||
QString query() const { return typedValue<QString>(queryKey); }
|
||||
void setQuery(const QString &query) { insert(queryKey, query); }
|
||||
|
||||
void setLimit(int limit) { insert("limit", limit); } // clangd extension
|
||||
|
||||
bool isValid() const override { return contains(queryKey); }
|
||||
};
|
||||
|
||||
|
Submodule src/libs/qlitehtml updated: 44e15759b7...6af5648d12
@@ -46,6 +46,8 @@ Utils::optional<EnvironmentItems> EnvironmentDialog::getEnvironmentItems(
|
||||
tr("Edit Environment"),
|
||||
tr("Enter one environment variable per line.\n"
|
||||
"To set or change a variable, use VARIABLE=VALUE.\n"
|
||||
"To append to a variable, use VARIABLE+=VALUE.\n"
|
||||
"To prepend to a variable, use VARIABLE=+VALUE.\n"
|
||||
"Existing variables can be referenced in a VALUE with ${OTHER}.\n"
|
||||
"To clear a variable, put its name on a line with nothing else on it.\n"
|
||||
"To disable a variable, prefix the line with \"#\"."));
|
||||
|
@@ -939,6 +939,26 @@ bool FilePath::isReadableDir() const
|
||||
return fi.exists() && fi.isReadable() && fi.isDir();
|
||||
}
|
||||
|
||||
bool FilePath::isFile() const
|
||||
{
|
||||
if (needsDevice()) {
|
||||
QTC_ASSERT(s_deviceHooks.isFile, return false);
|
||||
return s_deviceHooks.isFile(*this);
|
||||
}
|
||||
const QFileInfo fi{m_data};
|
||||
return fi.exists() && fi.isFile();
|
||||
}
|
||||
|
||||
bool FilePath::isDir() const
|
||||
{
|
||||
if (needsDevice()) {
|
||||
QTC_ASSERT(s_deviceHooks.isDir, return false);
|
||||
return s_deviceHooks.isDir(*this);
|
||||
}
|
||||
const QFileInfo fi{m_data};
|
||||
return fi.exists() && fi.isDir();
|
||||
}
|
||||
|
||||
bool FilePath::createDir() const
|
||||
{
|
||||
if (needsDevice()) {
|
||||
@@ -1244,12 +1264,6 @@ bool FilePath::endsWith(const QString &s) const
|
||||
return m_data.endsWith(s, caseSensitivity());
|
||||
}
|
||||
|
||||
bool FilePath::isDir() const
|
||||
{
|
||||
QTC_CHECK(m_scheme.isEmpty()); // FIXME: Not implemented yet.
|
||||
return QFileInfo(m_data).isDir();
|
||||
}
|
||||
|
||||
/// \returns the relativeChildPath of FilePath to parent if FilePath is a child of parent
|
||||
/// \note returns a empty FilePath if FilePath is not a child of parent
|
||||
/// That is, this never returns a path starting with "../"
|
||||
|
@@ -77,6 +77,8 @@ public:
|
||||
std::function<bool(const FilePath &)> isReadableDir;
|
||||
std::function<bool(const FilePath &)> isWritableDir;
|
||||
std::function<bool(const FilePath &)> isWritableFile;
|
||||
std::function<bool(const FilePath &)> isFile;
|
||||
std::function<bool(const FilePath &)> isDir;
|
||||
std::function<bool(const FilePath &)> ensureWritableDir;
|
||||
std::function<bool(const FilePath &)> ensureExistingFile;
|
||||
std::function<bool(const FilePath &)> createDir;
|
||||
@@ -149,6 +151,8 @@ public:
|
||||
bool isReadableDir() const;
|
||||
bool isRelativePath() const;
|
||||
bool isAbsolutePath() const { return !isRelativePath(); }
|
||||
bool isFile() const;
|
||||
bool isDir() const;
|
||||
|
||||
bool createDir() const;
|
||||
QList<FilePath> dirEntries(const QStringList &nameFilters,
|
||||
@@ -177,7 +181,6 @@ public:
|
||||
bool startsWith(const QString &s) const;
|
||||
bool endsWith(const QString &s) const;
|
||||
|
||||
bool isDir() const;
|
||||
bool isNewerThan(const QDateTime &timeStamp) const;
|
||||
QDateTime lastModified() const;
|
||||
QFile::Permissions permissions() const;
|
||||
|
@@ -35,6 +35,10 @@
|
||||
#include <qt_windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
Qt::CaseSensitivity HostOsInfo::m_overrideFileNameCaseSensitivity = Qt::CaseSensitive;
|
||||
@@ -70,6 +74,17 @@ HostOsInfo::HostArchitecture HostOsInfo::hostArchitecture()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool HostOsInfo::isRunningUnderRosetta()
|
||||
{
|
||||
#ifdef Q_OS_MACOS
|
||||
int translated = 0;
|
||||
auto size = sizeof(translated);
|
||||
if (sysctlbyname("sysctl.proc_translated", &translated, &size, nullptr, 0) == 0)
|
||||
return translated;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
void HostOsInfo::setOverrideFileNameCaseSensitivity(Qt::CaseSensitivity sensitivity)
|
||||
{
|
||||
m_useOverrideFileNameCaseSensitivity = true;
|
||||
|
@@ -73,6 +73,8 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool isRunningUnderRosetta();
|
||||
|
||||
static QString withExecutableSuffix(const QString &executable)
|
||||
{
|
||||
return OsSpecificAspects::withExecutableSuffix(hostOs(), executable);
|
||||
|
@@ -529,69 +529,69 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
|
||||
*errorMessage = tr("The path \"%1\" expanded to an empty string.").arg(QDir::toNativeSeparators(path));
|
||||
return false;
|
||||
}
|
||||
const QFileInfo fi(expandedPath);
|
||||
const FilePath filePath = FilePath::fromString(expandedPath);
|
||||
|
||||
// Check if existing
|
||||
switch (d->m_acceptingKind) {
|
||||
case PathChooser::ExistingDirectory:
|
||||
if (!fi.exists()) {
|
||||
if (!filePath.exists()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("The path \"%1\" does not exist.").arg(QDir::toNativeSeparators(expandedPath));
|
||||
*errorMessage = tr("The path \"%1\" does not exist.").arg(filePath.toUserOutput());
|
||||
return false;
|
||||
}
|
||||
if (!fi.isDir()) {
|
||||
if (!filePath.isDir()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("The path \"%1\" is not a directory.").arg(QDir::toNativeSeparators(expandedPath));
|
||||
*errorMessage = tr("The path \"%1\" is not a directory.").arg(filePath.toUserOutput());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case PathChooser::File:
|
||||
if (!fi.exists()) {
|
||||
if (!filePath.exists()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("The path \"%1\" does not exist.").arg(QDir::toNativeSeparators(expandedPath));
|
||||
*errorMessage = tr("The path \"%1\" does not exist.").arg(filePath.toUserOutput());
|
||||
return false;
|
||||
}
|
||||
if (!fi.isFile()) {
|
||||
if (!filePath.isFile()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("The path \"%1\" is not a file.").arg(QDir::toNativeSeparators(expandedPath));
|
||||
*errorMessage = tr("The path \"%1\" is not a file.").arg(filePath.toUserOutput());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case PathChooser::SaveFile:
|
||||
if (!fi.absoluteDir().exists()) {
|
||||
if (!filePath.parentDir().exists()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("The directory \"%1\" does not exist.").arg(QDir::toNativeSeparators(fi.absolutePath()));
|
||||
*errorMessage = tr("The directory \"%1\" does not exist.").arg(filePath.toUserOutput());
|
||||
return false;
|
||||
}
|
||||
if (fi.exists() && fi.isDir()) {
|
||||
if (filePath.exists() && filePath.isDir()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("The path \"%1\" is not a file.").arg(QDir::toNativeSeparators(fi.absolutePath()));
|
||||
*errorMessage = tr("The path \"%1\" is not a file.").arg(filePath.toUserOutput());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case PathChooser::ExistingCommand:
|
||||
if (!fi.exists()) {
|
||||
if (!filePath.exists()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("The path \"%1\" does not exist.").arg(QDir::toNativeSeparators(expandedPath));
|
||||
*errorMessage = tr("The path \"%1\" does not exist.").arg(filePath.toUserOutput());
|
||||
return false;
|
||||
}
|
||||
if (!fi.isFile() || !fi.isExecutable()) {
|
||||
if (!filePath.isExecutableFile()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("The path \"%1\" is not an executable file.").arg(QDir::toNativeSeparators(expandedPath));
|
||||
*errorMessage = tr("The path \"%1\" is not an executable file.").arg(filePath.toUserOutput());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case PathChooser::Directory:
|
||||
if (fi.exists() && !fi.isDir()) {
|
||||
if (filePath.isDir()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("The path \"%1\" is not a directory.").arg(QDir::toNativeSeparators(expandedPath));
|
||||
*errorMessage = tr("The path \"%1\" is not a directory.").arg(filePath.toUserOutput());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case PathChooser::Command:
|
||||
if (fi.exists() && !fi.isExecutable()) {
|
||||
if (filePath.exists() && !filePath.isExecutableFile()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("Cannot execute \"%1\".").arg(QDir::toNativeSeparators(expandedPath));
|
||||
*errorMessage = tr("Cannot execute \"%1\".").arg(filePath.toUserOutput());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -601,7 +601,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
|
||||
}
|
||||
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("Full path: \"%1\"").arg(QDir::toNativeSeparators(expandedPath));
|
||||
*errorMessage = tr("Full path: \"%1\"").arg(filePath.toUserOutput());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -461,6 +461,8 @@ QString AndroidManager::androidNameForApiLevel(int x)
|
||||
return QLatin1String("Android 10");
|
||||
case 30:
|
||||
return QLatin1String("Android 11");
|
||||
case 31:
|
||||
return QLatin1String("Android 12");
|
||||
default:
|
||||
return tr("Unknown Android version. API Level: %1").arg(x);
|
||||
}
|
||||
|
@@ -84,6 +84,8 @@ int platformNameToApiLevel(const QString &platformName)
|
||||
apiLevel = 29;
|
||||
else if (apiLevelStr == 'R')
|
||||
apiLevel = 30;
|
||||
else if (apiLevelStr == 'S')
|
||||
apiLevel = 31;
|
||||
}
|
||||
}
|
||||
return apiLevel;
|
||||
|
@@ -179,7 +179,7 @@ void GTestOutputReader::processOutputLine(const QByteArray &outputLine)
|
||||
testResult->setResult(type);
|
||||
testResult->setLine(match.captured(3).toInt());
|
||||
const Utils::FilePath file = constructSourceFilePath(m_buildDir, match.captured(2));
|
||||
if (!file.isEmpty())
|
||||
if (file.exists())
|
||||
testResult->setFileName(file);
|
||||
testResult->setDescription(match.captured(4));
|
||||
reportResult(testResult);
|
||||
@@ -247,7 +247,7 @@ void GTestOutputReader::handleDescriptionAndReportResult(TestResultPtr testResul
|
||||
testResult->setResult(ResultType::MessageLocation);
|
||||
testResult->setLine(innerMatch.captured(2).toInt());
|
||||
const Utils::FilePath file = constructSourceFilePath(m_buildDir, innerMatch.captured(1));
|
||||
if (!file.isEmpty())
|
||||
if (file.exists())
|
||||
testResult->setFileName(file);
|
||||
resultDescription << output;
|
||||
}
|
||||
|
@@ -39,11 +39,10 @@
|
||||
namespace Autotest {
|
||||
|
||||
Utils::FilePath TestOutputReader::constructSourceFilePath(const Utils::FilePath &path,
|
||||
const QString &filePath)
|
||||
const QString &file)
|
||||
{
|
||||
if (!filePath.isEmpty() && filePath.at(0) != '.')
|
||||
return Utils::FilePath::fromFileInfo(QFileInfo(filePath));
|
||||
return (path / filePath).canonicalPath();
|
||||
const Utils::FilePath filePath = path.resolvePath(file);
|
||||
return filePath.exists() ? filePath : Utils::FilePath();
|
||||
}
|
||||
|
||||
TestOutputReader::TestOutputReader(const QFutureInterface<TestResultPtr> &futureInterface,
|
||||
@@ -177,9 +176,8 @@ void TestOutputReader::checkForSanitizerOutput(const QByteArray &line)
|
||||
if (m_sanitizerOutputMode == SanitizerOutputMode::Ubsan) {
|
||||
const Utils::FilePath path = constructSourceFilePath(m_buildDir, match.captured(1));
|
||||
// path may be empty if not existing - so, provide at least what we have
|
||||
m_sanitizerResult->setFileName(path.isEmpty()
|
||||
? Utils::FilePath::fromString(match.captured(1))
|
||||
: path);
|
||||
m_sanitizerResult->setFileName(
|
||||
path.exists() ? path : Utils::FilePath::fromString(match.captured(1)));
|
||||
m_sanitizerResult->setLine(match.captured(2).toInt());
|
||||
}
|
||||
}
|
||||
|
@@ -540,8 +540,10 @@ public:
|
||||
|
||||
void closeTempDocuments()
|
||||
{
|
||||
for (const Utils::FilePath &fp : qAsConst(openedFiles))
|
||||
q->closeExtraFile(fp);
|
||||
for (const Utils::FilePath &fp : qAsConst(openedFiles)) {
|
||||
if (!q->documentForFilePath(fp))
|
||||
q->closeExtraFile(fp);
|
||||
}
|
||||
openedFiles.clear();
|
||||
}
|
||||
|
||||
@@ -690,7 +692,6 @@ public:
|
||||
void sendGotoImplementationRequest(const Utils::Link &link);
|
||||
void handleGotoImplementationResult(const GotoImplementationRequest::Response &response);
|
||||
void handleDocumentInfoResults();
|
||||
void closeTempDocuments();
|
||||
|
||||
void handleDeclDefSwitchReplies();
|
||||
|
||||
|
@@ -43,6 +43,8 @@
|
||||
namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
|
||||
const int MaxResultCount = 10000;
|
||||
|
||||
class CppLocatorFilter : public CppTools::CppLocatorFilter
|
||||
{
|
||||
public:
|
||||
@@ -67,6 +69,7 @@ public:
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
setMaxResultCount(MaxResultCount);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -94,6 +97,7 @@ public:
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
setMaxResultCount(MaxResultCount);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -121,6 +125,7 @@ public:
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
setMaxResultCount(MaxResultCount);
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -120,7 +120,11 @@ static clang::format::FormatStyle qtcStyle()
|
||||
style.ExperimentalAutoDetectBinPacking = false;
|
||||
style.FixNamespaceComments = true;
|
||||
style.ForEachMacros = {"forever", "foreach", "Q_FOREACH", "BOOST_FOREACH"};
|
||||
#if LLVM_VERSION_MAJOR >= 12
|
||||
style.IncludeStyle.IncludeCategories = {{"^<Q.*", 200, 200, true}};
|
||||
#else
|
||||
style.IncludeStyle.IncludeCategories = {{"^<Q.*", 200, 200}};
|
||||
#endif
|
||||
style.IncludeStyle.IncludeIsMainRegex = "(Test)?$";
|
||||
style.IndentCaseLabels = false;
|
||||
style.IndentWidth = 4;
|
||||
|
@@ -98,6 +98,7 @@ static Q_LOGGING_CATEGORY(cmakeBuildConfigurationLog, "qtc.cmake.bc", QtWarningM
|
||||
const char CONFIGURATION_KEY[] = "CMake.Configuration";
|
||||
const char DEVELOPMENT_TEAM_FLAG[] = "Ios:DevelopmentTeam:Flag";
|
||||
const char PROVISIONING_PROFILE_FLAG[] = "Ios:ProvisioningProfile:Flag";
|
||||
const char CMAKE_OSX_ARCHITECTURES_FLAG[] = "CMAKE_OSX_ARCHITECTURES:DefaultFlag";
|
||||
const char CMAKE_QT6_TOOLCHAIN_FILE_ARG[] =
|
||||
"-DCMAKE_TOOLCHAIN_FILE:PATH=%{Qt:QT_INSTALL_PREFIX}/lib/cmake/Qt6/qt.toolchain.cmake";
|
||||
|
||||
@@ -890,6 +891,21 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
||||
return QString();
|
||||
});
|
||||
|
||||
macroExpander()->registerVariable(CMAKE_OSX_ARCHITECTURES_FLAG,
|
||||
tr("The CMake flag for the architecture on macOS"),
|
||||
[target] {
|
||||
if (HostOsInfo::isRunningUnderRosetta()) {
|
||||
if (auto *qt = QtSupport::QtKitAspect::qtVersion(target->kit())) {
|
||||
const Abis abis = qt->qtAbis();
|
||||
for (const Abi &abi : abis) {
|
||||
if (abi.architecture() == Abi::ArmArchitecture)
|
||||
return QLatin1String("-DCMAKE_OSX_ARCHITECTURES=arm64");
|
||||
}
|
||||
}
|
||||
}
|
||||
return QLatin1String();
|
||||
});
|
||||
|
||||
addAspect<SourceDirectoryAspect>();
|
||||
addAspect<BuildTypeAspect>();
|
||||
|
||||
@@ -939,27 +955,33 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
||||
}
|
||||
}
|
||||
|
||||
if (isIos(k)) {
|
||||
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||
if (qt && qt->qtVersion().majorVersion >= 6) {
|
||||
// TODO it would be better if we could set
|
||||
// CMAKE_SYSTEM_NAME=iOS and CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=YES
|
||||
// and build with "cmake --build . -- -arch <arch>" instead of setting the architecture
|
||||
// and sysroot in the CMake configuration, but that currently doesn't work with Qt/CMake
|
||||
// https://gitlab.kitware.com/cmake/cmake/-/issues/21276
|
||||
const Id deviceType = DeviceTypeKitAspect::deviceTypeId(k);
|
||||
// TODO the architectures are probably not correct with Apple Silicon in the mix...
|
||||
const QString architecture = deviceType == Ios::Constants::IOS_DEVICE_TYPE
|
||||
? QLatin1String("arm64")
|
||||
: QLatin1String("x86_64");
|
||||
const QString sysroot = deviceType == Ios::Constants::IOS_DEVICE_TYPE
|
||||
? QLatin1String("iphoneos")
|
||||
: QLatin1String("iphonesimulator");
|
||||
initialArgs.append(CMAKE_QT6_TOOLCHAIN_FILE_ARG);
|
||||
initialArgs.append("-DCMAKE_OSX_ARCHITECTURES:STRING=" + architecture);
|
||||
initialArgs.append("-DCMAKE_OSX_SYSROOT:STRING=" + sysroot);
|
||||
initialArgs.append("%{" + QLatin1String(DEVELOPMENT_TEAM_FLAG) + "}");
|
||||
initialArgs.append("%{" + QLatin1String(PROVISIONING_PROFILE_FLAG) + "}");
|
||||
const IDevice::ConstPtr device = DeviceKitAspect::device(k);
|
||||
if (device->osType() == Utils::OsTypeMac) {
|
||||
if (isIos(k)) {
|
||||
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||
if (qt && qt->qtVersion().majorVersion >= 6) {
|
||||
// TODO it would be better if we could set
|
||||
// CMAKE_SYSTEM_NAME=iOS and CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=YES
|
||||
// and build with "cmake --build . -- -arch <arch>" instead of setting the architecture
|
||||
// and sysroot in the CMake configuration, but that currently doesn't work with Qt/CMake
|
||||
// https://gitlab.kitware.com/cmake/cmake/-/issues/21276
|
||||
const Id deviceType = DeviceTypeKitAspect::deviceTypeId(k);
|
||||
// TODO the architectures are probably not correct with Apple Silicon in the mix...
|
||||
const QString architecture = deviceType == Ios::Constants::IOS_DEVICE_TYPE
|
||||
? QLatin1String("arm64")
|
||||
: QLatin1String("x86_64");
|
||||
const QString sysroot = deviceType == Ios::Constants::IOS_DEVICE_TYPE
|
||||
? QLatin1String("iphoneos")
|
||||
: QLatin1String("iphonesimulator");
|
||||
initialArgs.append(CMAKE_QT6_TOOLCHAIN_FILE_ARG);
|
||||
initialArgs.append("-DCMAKE_OSX_ARCHITECTURES:STRING=" + architecture);
|
||||
initialArgs.append("-DCMAKE_OSX_SYSROOT:STRING=" + sysroot);
|
||||
initialArgs.append("%{" + QLatin1String(DEVELOPMENT_TEAM_FLAG) + "}");
|
||||
initialArgs.append("%{" + QLatin1String(PROVISIONING_PROFILE_FLAG) + "}");
|
||||
}
|
||||
} else {
|
||||
// macOS
|
||||
initialArgs.append("%{" + QLatin1String(CMAKE_OSX_ARCHITECTURES_FLAG) + "}");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -203,9 +203,9 @@ QString CMakeConfigItem::expandedValue(const Utils::MacroExpander *expander) con
|
||||
return expander ? expander->expand(QString::fromUtf8(value)) : QString::fromUtf8(value);
|
||||
}
|
||||
|
||||
std::function<bool (const CMakeConfigItem &a, const CMakeConfigItem &b)> CMakeConfigItem::sortOperator()
|
||||
bool CMakeConfigItem::less(const CMakeConfigItem &a, const CMakeConfigItem &b)
|
||||
{
|
||||
return [](const CMakeConfigItem &a, const CMakeConfigItem &b) { return a.key < b.key; };
|
||||
return a.key < b.key;
|
||||
}
|
||||
|
||||
CMakeConfigItem CMakeConfigItem::fromString(const QString &s)
|
||||
@@ -393,7 +393,7 @@ QList<CMakeConfigItem> CMakeConfigItem::itemsFromFile(const Utils::FilePath &cac
|
||||
}
|
||||
}
|
||||
|
||||
Utils::sort(result, CMakeConfigItem::sortOperator());
|
||||
Utils::sort(result, &CMakeConfigItem::less);
|
||||
|
||||
return result;
|
||||
|
||||
|
@@ -62,7 +62,7 @@ public:
|
||||
QString expandedValue(const ProjectExplorer::Kit *k) const;
|
||||
QString expandedValue(const Utils::MacroExpander *expander) const;
|
||||
|
||||
static std::function<bool(const CMakeConfigItem &a, const CMakeConfigItem &b)> sortOperator();
|
||||
static bool less(const CMakeConfigItem &a, const CMakeConfigItem &b);
|
||||
static CMakeConfigItem fromString(const QString &s);
|
||||
static QList<CMakeConfigItem> itemsFromArguments(const QStringList &list);
|
||||
static QList<CMakeConfigItem> itemsFromFile(const Utils::FilePath &input, QString *errorMessage);
|
||||
|
@@ -43,6 +43,7 @@
|
||||
#include <projectexplorer/projectexplorersettings.h>
|
||||
#include <projectexplorer/task.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
@@ -1094,7 +1095,7 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const
|
||||
if (!version || !version->isValid()) {
|
||||
addWarning(tr("CMake configuration has a path to a qmake binary set, "
|
||||
"even though the kit has no valid Qt version."));
|
||||
} else if (qmakePath != version->qmakeCommand() && isQt4) {
|
||||
} else if (qmakePath != version->qmakeFilePath() && isQt4) {
|
||||
addWarning(tr("CMake configuration has a path to a qmake binary set "
|
||||
"that does not match the qmake binary path "
|
||||
"configured in the Qt version."));
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include <coreplugin/helpmanager.h>
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <utils/environment.h>
|
||||
#include <utils/pointeralgorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -64,6 +65,8 @@ CMakeToolManager::CMakeToolManager()
|
||||
QTC_ASSERT(!m_instance, return);
|
||||
m_instance = this;
|
||||
|
||||
qRegisterMetaType<QString *>();
|
||||
|
||||
d = new CMakeToolManagerPrivate;
|
||||
connect(ICore::instance(), &ICore::saveSettingsRequested,
|
||||
this, &CMakeToolManager::saveCMakeTools);
|
||||
@@ -177,6 +180,25 @@ void CMakeToolManager::updateDocumentation()
|
||||
Core::HelpManager::registerDocumentation(docs);
|
||||
}
|
||||
|
||||
void CMakeToolManager::autoDetectCMakeForDevice(const FilePath &deviceRoot,
|
||||
const QString &detectionSource,
|
||||
QString *logMessage)
|
||||
{
|
||||
QStringList messages;
|
||||
const FilePaths candidates = {FilePath::fromString("cmake").onDevice(deviceRoot)};
|
||||
const Environment env = deviceRoot.deviceEnvironment();
|
||||
for (const FilePath &candidate : candidates) {
|
||||
const FilePath cmake = candidate.searchOnDevice(env.path());
|
||||
if (!cmake.isEmpty()) {
|
||||
registerCMakeByPath(cmake, detectionSource);
|
||||
messages.append(tr("Found CMake binary: %1").arg(cmake.toUserOutput()));
|
||||
}
|
||||
}
|
||||
if (logMessage)
|
||||
*logMessage = messages.join('\n');
|
||||
}
|
||||
|
||||
|
||||
void CMakeToolManager::registerCMakeByPath(const FilePath &cmakePath, const QString &detectionSource)
|
||||
{
|
||||
const Id id = Id::fromString(cmakePath.toUserOutput());
|
||||
|
@@ -63,7 +63,11 @@ public:
|
||||
static void updateDocumentation();
|
||||
|
||||
public slots:
|
||||
void registerCMakeByPath(const Utils::FilePath &cmakePath, const QString &detectionSource);
|
||||
void autoDetectCMakeForDevice(const Utils::FilePath &deviceRoot,
|
||||
const QString &detectionSource,
|
||||
QString *logMessage);
|
||||
void registerCMakeByPath(const Utils::FilePath &cmakePath,
|
||||
const QString &detectionSource);
|
||||
|
||||
signals:
|
||||
void cmakeAdded (const Utils::Id &id);
|
||||
@@ -81,3 +85,5 @@ private:
|
||||
};
|
||||
|
||||
} // namespace CMakeProjectManager
|
||||
|
||||
Q_DECLARE_METATYPE(QString *)
|
||||
|
@@ -98,9 +98,8 @@ void CompilationDatabaseTests::testProject_data()
|
||||
void CompilationDatabaseTests::addTestRow(const QByteArray &relativeFilePath)
|
||||
{
|
||||
const QString absoluteFilePath = m_tmpDir->absolutePath(relativeFilePath);
|
||||
const QString fileName = QFileInfo(absoluteFilePath).fileName();
|
||||
|
||||
QTest::newRow(fileName.toUtf8().constData()) << absoluteFilePath;
|
||||
QTest::newRow(relativeFilePath.constData()) << absoluteFilePath;
|
||||
}
|
||||
|
||||
} // namespace CompilationDatabaseProjectManager
|
||||
|
@@ -1751,9 +1751,6 @@ bool EditorManagerPrivate::closeEditors(const QList<IEditor*> &editors, CloseFla
|
||||
|
||||
emit m_instance->editorsClosed(Utils::toList(acceptedEditors));
|
||||
|
||||
foreach (IEditor *editor, acceptedEditors)
|
||||
delete editor;
|
||||
|
||||
if (focusView) {
|
||||
activateView(focusView);
|
||||
} else {
|
||||
@@ -1761,6 +1758,9 @@ bool EditorManagerPrivate::closeEditors(const QList<IEditor*> &editors, CloseFla
|
||||
setCurrentEditor(currentView->currentEditor());
|
||||
}
|
||||
|
||||
foreach (IEditor *editor, acceptedEditors)
|
||||
delete editor;
|
||||
|
||||
if (!EditorManager::currentEditor()) {
|
||||
emit m_instance->currentEditorChanged(nullptr);
|
||||
updateActions();
|
||||
|
@@ -165,8 +165,12 @@ void CurrentDocumentFind::updateCandidateFindFilter(QWidget *old, QWidget *now)
|
||||
if (!impl)
|
||||
candidate = candidate->parentWidget();
|
||||
}
|
||||
if (candidate == m_candidateWidget && impl == m_candidateFind)
|
||||
if (candidate == m_candidateWidget && impl == m_candidateFind) {
|
||||
// trigger update of action state since a changed focus can still require disabling the
|
||||
// Find/Replace action
|
||||
emit changed();
|
||||
return;
|
||||
}
|
||||
if (m_candidateWidget)
|
||||
disconnect(Aggregation::Aggregate::parentAggregate(m_candidateWidget), &Aggregation::Aggregate::changed,
|
||||
this, &CurrentDocumentFind::candidateAggregationChanged);
|
||||
|
@@ -492,7 +492,7 @@ static void drawPrimitiveTweakedForDarkTheme(QStyle::PrimitiveElement element,
|
||||
QPen outline(indicatorColor, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
|
||||
painter->setPen(outline);
|
||||
QColor fill(frameColor);
|
||||
fill.setAlphaF(0.8);
|
||||
fill.setAlphaF(0.8f);
|
||||
painter->setBrush(fill);
|
||||
const double o = 3.5;
|
||||
painter->drawRect(QRectF(option->rect).adjusted(o, o, -o, -o));
|
||||
@@ -675,9 +675,9 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
|
||||
}
|
||||
if (option->state & State_HasFocus && (option->state & State_KeyboardFocusChange)) {
|
||||
QColor highlight = option->palette.highlight().color();
|
||||
highlight.setAlphaF(0.4);
|
||||
highlight.setAlphaF(0.4f);
|
||||
painter->setPen(QPen(highlight.lighter(), 1));
|
||||
highlight.setAlphaF(0.3);
|
||||
highlight.setAlphaF(0.3f);
|
||||
painter->setBrush(highlight);
|
||||
painter->setRenderHint(QPainter::Antialiasing);
|
||||
const QRectF rect = option->rect;
|
||||
@@ -743,10 +743,10 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
|
||||
|
||||
painter->setPen(Qt::NoPen);
|
||||
QColor dark = StyleHelper::borderColor();
|
||||
dark.setAlphaF(0.4);
|
||||
dark.setAlphaF(0.4f);
|
||||
|
||||
QColor light = StyleHelper::baseColor();
|
||||
light.setAlphaF(0.4);
|
||||
light.setAlphaF(0.4f);
|
||||
|
||||
painter->fillPath(path, light);
|
||||
painter->save();
|
||||
@@ -908,7 +908,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
|
||||
case CE_SizeGrip: {
|
||||
painter->save();
|
||||
QColor dark = Qt::white;
|
||||
dark.setAlphaF(0.1);
|
||||
dark.setAlphaF(0.1f);
|
||||
int x, y, w, h;
|
||||
option->rect.getRect(&x, &y, &w, &h);
|
||||
int sw = qMin(h, w);
|
||||
|
@@ -334,7 +334,7 @@ auto removeAndExtractTemplate(QString type)
|
||||
QString templateParameter;
|
||||
int counter = 0;
|
||||
int start = 0;
|
||||
int templateStart;
|
||||
int templateStart = 0;
|
||||
for (int i = 0; i < type.length(); ++i) {
|
||||
auto c = type[i];
|
||||
if (c == '<') {
|
||||
|
@@ -1665,8 +1665,8 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
|
||||
: locationsEnabled ? tr("Disable Location") : tr("Enable Location"),
|
||||
!selectedLocations.isEmpty() && handlesIndividualLocations,
|
||||
[this, selectedLocations, locationsEnabled] {
|
||||
for (const SubBreakpoint &sbp : selectedLocations)
|
||||
requestSubBreakpointEnabling(sbp, !locationsEnabled);
|
||||
for (SubBreakpointItem * const sbp : selectedLocations)
|
||||
requestSubBreakpointEnabling(QPointer(sbp), !locationsEnabled);
|
||||
}
|
||||
);
|
||||
|
||||
|
@@ -85,8 +85,6 @@ public:
|
||||
QCheckBox *runInTerminalCheckBox;
|
||||
QCheckBox *useTargetExtendedRemoteCheckBox;
|
||||
PathChooser *debuginfoPathChooser;
|
||||
QLabel *serverStartScriptLabel;
|
||||
PathChooser *serverStartScriptPathChooser;
|
||||
QLabel *sysRootLabel;
|
||||
PathChooser *sysRootPathChooser;
|
||||
QLabel *serverInitCommandsLabel;
|
||||
@@ -129,7 +127,6 @@ public:
|
||||
bool breakAtMain = false;
|
||||
bool runInTerminal = false;
|
||||
bool useTargetExtendedRemote = false;
|
||||
FilePath serverStartScript;
|
||||
FilePath sysRoot;
|
||||
QString serverInitCommands;
|
||||
QString serverResetCommands;
|
||||
@@ -144,7 +141,6 @@ bool StartApplicationParameters::equals(const StartApplicationParameters &rhs) c
|
||||
&& runnable.workingDirectory == rhs.runnable.workingDirectory
|
||||
&& breakAtMain == rhs.breakAtMain
|
||||
&& runInTerminal == rhs.runInTerminal
|
||||
&& serverStartScript == rhs.serverStartScript
|
||||
&& sysRoot == rhs.sysRoot
|
||||
&& serverInitCommands == rhs.serverInitCommands
|
||||
&& serverResetCommands == rhs.serverResetCommands
|
||||
@@ -184,7 +180,6 @@ void StartApplicationParameters::toSettings(QSettings *settings) const
|
||||
settings->setValue("LastExternalBreakAtMain", breakAtMain);
|
||||
settings->setValue("LastExternalRunInTerminal", runInTerminal);
|
||||
settings->setValue("LastExternalUseTargetExtended", useTargetExtendedRemote);
|
||||
settings->setValue("LastServerStartScript", serverStartScript.toVariant());
|
||||
settings->setValue("LastServerInitCommands", serverInitCommands);
|
||||
settings->setValue("LastServerResetCommands", serverResetCommands);
|
||||
settings->setValue("LastDebugInfoLocation", debugInfoLocation);
|
||||
@@ -202,7 +197,6 @@ void StartApplicationParameters::fromSettings(const QSettings *settings)
|
||||
breakAtMain = settings->value("LastExternalBreakAtMain").toBool();
|
||||
runInTerminal = settings->value("LastExternalRunInTerminal").toBool();
|
||||
useTargetExtendedRemote = settings->value("LastExternalUseTargetExtended").toBool();
|
||||
serverStartScript = FilePath::fromVariant(settings->value("LastServerStartScript"));
|
||||
serverInitCommands = settings->value("LastServerInitCommands").toString();
|
||||
serverResetCommands = settings->value("LastServerResetCommands").toString();
|
||||
debugInfoLocation = settings->value("LastDebugInfoLocation").toString();
|
||||
@@ -260,17 +254,6 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
|
||||
|
||||
d->useTargetExtendedRemoteCheckBox = new QCheckBox(this);
|
||||
|
||||
d->serverStartScriptPathChooser = new PathChooser(this);
|
||||
d->serverStartScriptPathChooser->setExpectedKind(PathChooser::File);
|
||||
d->serverStartScriptPathChooser->setPromptDialogTitle(tr("Select Server Start Script"));
|
||||
d->serverStartScriptPathChooser->setToolTip(tr(
|
||||
"This option can be used to point to a script that will be used "
|
||||
"to start a debug server. If the field is empty, "
|
||||
"default methods to set up debug servers will be used."));
|
||||
d->serverStartScriptLabel = new QLabel(tr("&Server start script:"), this);
|
||||
d->serverStartScriptLabel->setBuddy(d->serverStartScriptPathChooser);
|
||||
d->serverStartScriptLabel->setToolTip(d->serverStartScriptPathChooser->toolTip());
|
||||
|
||||
d->sysRootPathChooser = new PathChooser(this);
|
||||
d->sysRootPathChooser->setExpectedKind(PathChooser::Directory);
|
||||
d->sysRootPathChooser->setHistoryCompleter("Debugger.SysRoot.History");
|
||||
@@ -328,7 +311,6 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
|
||||
formLayout->addRow(tr("Run in &terminal:"), d->runInTerminalCheckBox);
|
||||
formLayout->addRow(tr("Break at \"&main\":"), d->breakAtMainCheckBox);
|
||||
formLayout->addRow(tr("Use target extended-remote to connect:"), d->useTargetExtendedRemoteCheckBox);
|
||||
formLayout->addRow(d->serverStartScriptLabel, d->serverStartScriptPathChooser);
|
||||
formLayout->addRow(d->sysRootLabel, d->sysRootPathChooser);
|
||||
formLayout->addRow(d->serverInitCommandsLabel, d->serverInitCommandsTextEdit);
|
||||
formLayout->addRow(d->serverResetCommandsLabel, d->serverResetCommandsTextEdit);
|
||||
@@ -418,8 +400,6 @@ void StartApplicationDialog::run(bool attachRemote)
|
||||
dialog.setHistory(history);
|
||||
dialog.setParameters(history.back());
|
||||
if (!attachRemote) {
|
||||
dialog.d->serverStartScriptPathChooser->setVisible(false);
|
||||
dialog.d->serverStartScriptLabel->setVisible(false);
|
||||
dialog.d->serverInitCommandsTextEdit->setVisible(false);
|
||||
dialog.d->serverInitCommandsLabel->setVisible(false);
|
||||
dialog.d->serverResetCommandsTextEdit->setVisible(false);
|
||||
@@ -465,7 +445,6 @@ void StartApplicationDialog::run(bool attachRemote)
|
||||
debugger->setBreakOnMain(newParameters.breakAtMain);
|
||||
debugger->setDebugInfoLocation(newParameters.debugInfoLocation);
|
||||
debugger->setInferior(inferior);
|
||||
debugger->setServerStartScript(newParameters.serverStartScript); // Note: This requires inferior.
|
||||
debugger->setCommandsAfterConnect(newParameters.serverInitCommands);
|
||||
debugger->setCommandsForReset(newParameters.serverResetCommands);
|
||||
debugger->setUseTerminal(newParameters.runInTerminal);
|
||||
@@ -505,7 +484,6 @@ StartApplicationParameters StartApplicationDialog::parameters() const
|
||||
result.serverPort = d->serverPortSpinBox->value();
|
||||
result.serverAddress = d->channelOverrideEdit->text();
|
||||
result.runnable.executable = d->localExecutablePathChooser->filePath();
|
||||
result.serverStartScript = d->serverStartScriptPathChooser->filePath();
|
||||
result.sysRoot = d->sysRootPathChooser->filePath();
|
||||
result.serverInitCommands = d->serverInitCommandsTextEdit->toPlainText();
|
||||
result.serverResetCommands = d->serverResetCommandsTextEdit->toPlainText();
|
||||
@@ -525,7 +503,6 @@ void StartApplicationDialog::setParameters(const StartApplicationParameters &p)
|
||||
d->serverPortSpinBox->setValue(p.serverPort);
|
||||
d->channelOverrideEdit->setText(p.serverAddress);
|
||||
d->localExecutablePathChooser->setFilePath(p.runnable.executable);
|
||||
d->serverStartScriptPathChooser->setFilePath(p.serverStartScript);
|
||||
d->sysRootPathChooser->setFilePath(p.sysRoot);
|
||||
d->serverInitCommandsTextEdit->setPlainText(p.serverInitCommands);
|
||||
d->serverResetCommandsTextEdit->setPlainText(p.serverResetCommands);
|
||||
|
@@ -53,11 +53,14 @@ using namespace Debugger::Internal;
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Debugger {
|
||||
|
||||
const char DEBUGGER_INFORMATION_COMMAND[] = "Binary";
|
||||
const char DEBUGGER_INFORMATION_DISPLAYNAME[] = "DisplayName";
|
||||
const char DEBUGGER_INFORMATION_ID[] = "Id";
|
||||
const char DEBUGGER_INFORMATION_ENGINETYPE[] = "EngineType";
|
||||
const char DEBUGGER_INFORMATION_AUTODETECTED[] = "AutoDetected";
|
||||
const char DEBUGGER_INFORMATION_AUTODETECTED[] = "AutoDetected"; // FIXME: Merge into DetectionSource
|
||||
const char DEBUGGER_INFORMATION_DETECTION_SOURCE[] = "DetectionSource";
|
||||
const char DEBUGGER_INFORMATION_VERSION[] = "Version";
|
||||
const char DEBUGGER_INFORMATION_ABIS[] = "Abis";
|
||||
const char DEBUGGER_INFORMATION_LASTMODIFIED[] = "LastModified";
|
||||
@@ -66,7 +69,7 @@ const char DEBUGGER_INFORMATION_WORKINGDIRECTORY[] = "WorkingDirectory";
|
||||
|
||||
//! Return the configuration of gdb as a list of --key=value
|
||||
//! \note That the list will also contain some output not in this format.
|
||||
static QString getConfigurationOfGdbCommand(const FilePath &command, const Utils::Environment &sysEnv)
|
||||
static QString getGdbConfiguration(const FilePath &command, const Environment &sysEnv)
|
||||
{
|
||||
// run gdb with the --configuration opion
|
||||
QtcProcess proc;
|
||||
@@ -93,8 +96,6 @@ static QString extractGdbTargetAbiStringFromGdbOutput(const QString &gdbOutput)
|
||||
}
|
||||
|
||||
|
||||
namespace Debugger {
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// DebuggerItem
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -113,6 +114,7 @@ DebuggerItem::DebuggerItem(const QVariantMap &data)
|
||||
m_workingDirectory = FilePath::fromVariant(data.value(DEBUGGER_INFORMATION_WORKINGDIRECTORY));
|
||||
m_unexpandedDisplayName = data.value(DEBUGGER_INFORMATION_DISPLAYNAME).toString();
|
||||
m_isAutoDetected = data.value(DEBUGGER_INFORMATION_AUTODETECTED, false).toBool();
|
||||
m_detectionSource = data.value(DEBUGGER_INFORMATION_DETECTION_SOURCE).toString();
|
||||
m_version = data.value(DEBUGGER_INFORMATION_VERSION).toString();
|
||||
m_engineType = DebuggerEngineType(data.value(DEBUGGER_INFORMATION_ENGINETYPE,
|
||||
static_cast<int>(NoEngineType)).toInt());
|
||||
@@ -149,7 +151,7 @@ static bool isUVisionExecutable(const QFileInfo &fileInfo)
|
||||
return baseName == "UV4";
|
||||
}
|
||||
|
||||
void DebuggerItem::reinitializeFromFile(const Utils::Environment &sysEnv)
|
||||
void DebuggerItem::reinitializeFromFile(const Environment &sysEnv)
|
||||
{
|
||||
// CDB only understands the single-dash -version, whereas GDB and LLDB are
|
||||
// happy with both -version and --version. So use the "working" -version
|
||||
@@ -210,8 +212,8 @@ void DebuggerItem::reinitializeFromFile(const Utils::Environment &sysEnv)
|
||||
const bool unableToFindAVersion = (0 == version);
|
||||
const bool gdbSupportsConfigurationFlag = (version >= 70700);
|
||||
if (gdbSupportsConfigurationFlag || unableToFindAVersion) {
|
||||
const auto gdbConfiguration = getConfigurationOfGdbCommand(m_command, sysEnv);
|
||||
const auto gdbTargetAbiString =
|
||||
const QString gdbConfiguration = getGdbConfiguration(m_command, sysEnv);
|
||||
const QString gdbTargetAbiString =
|
||||
extractGdbTargetAbiStringFromGdbOutput(gdbConfiguration);
|
||||
if (!gdbTargetAbiString.isEmpty()) {
|
||||
m_abis.append(Abi::abiFromTargetTriplet(gdbTargetAbiString));
|
||||
@@ -298,11 +300,11 @@ QDateTime DebuggerItem::lastModified() const
|
||||
QIcon DebuggerItem::decoration() const
|
||||
{
|
||||
if (m_engineType == NoEngineType)
|
||||
return Utils::Icons::CRITICAL.icon();
|
||||
return Icons::CRITICAL.icon();
|
||||
if (!m_command.toFileInfo().isExecutable())
|
||||
return Utils::Icons::WARNING.icon();
|
||||
return Icons::WARNING.icon();
|
||||
if (!m_workingDirectory.isEmpty() && !m_workingDirectory.isDir())
|
||||
return Utils::Icons::WARNING.icon();
|
||||
return Icons::WARNING.icon();
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
@@ -318,6 +320,7 @@ bool DebuggerItem::operator==(const DebuggerItem &other) const
|
||||
return m_id == other.m_id
|
||||
&& m_unexpandedDisplayName == other.m_unexpandedDisplayName
|
||||
&& m_isAutoDetected == other.m_isAutoDetected
|
||||
&& m_detectionSource == other.m_detectionSource
|
||||
&& m_command == other.m_command
|
||||
&& m_workingDirectory == other.m_workingDirectory;
|
||||
}
|
||||
@@ -331,6 +334,7 @@ QVariantMap DebuggerItem::toMap() const
|
||||
data.insert(DEBUGGER_INFORMATION_WORKINGDIRECTORY, m_workingDirectory.toVariant());
|
||||
data.insert(DEBUGGER_INFORMATION_ENGINETYPE, int(m_engineType));
|
||||
data.insert(DEBUGGER_INFORMATION_AUTODETECTED, m_isAutoDetected);
|
||||
data.insert(DEBUGGER_INFORMATION_DETECTION_SOURCE, m_detectionSource);
|
||||
data.insert(DEBUGGER_INFORMATION_VERSION, m_version);
|
||||
data.insert(DEBUGGER_INFORMATION_ABIS, abiNames());
|
||||
data.insert(DEBUGGER_INFORMATION_LASTMODIFIED, m_lastModified);
|
||||
|
@@ -103,6 +103,9 @@ public:
|
||||
Utils::FilePath workingDirectory() const { return m_workingDirectory; }
|
||||
void setWorkingDirectory(const Utils::FilePath &workingPath) { m_workingDirectory = workingPath; }
|
||||
|
||||
QString detectionSource() const { return m_detectionSource; }
|
||||
void setDetectionSource(const QString &source) { m_detectionSource = source; }
|
||||
|
||||
private:
|
||||
DebuggerItem(const QVariant &id);
|
||||
void initMacroExpander();
|
||||
@@ -116,6 +119,7 @@ private:
|
||||
QString m_version;
|
||||
ProjectExplorer::Abis m_abis;
|
||||
QDateTime m_lastModified;
|
||||
QString m_detectionSource;
|
||||
|
||||
friend class Internal::DebuggerConfigWidget;
|
||||
friend class Internal::DebuggerItemConfigWidget;
|
||||
|
@@ -92,7 +92,7 @@ public:
|
||||
QVariant registerDebugger(const DebuggerItem &item);
|
||||
void readDebuggers(const FilePath &fileName, bool isSystem);
|
||||
void autoDetectCdbDebuggers();
|
||||
void autoDetectGdbOrLldbDebuggers(const FilePath &deviceRoot);
|
||||
void autoDetectGdbOrLldbDebuggers(const FilePath &deviceRoot, const QString &detectionSource);
|
||||
void autoDetectUvscDebuggers();
|
||||
QString uniqueDisplayName(const QString &base);
|
||||
|
||||
@@ -556,7 +556,6 @@ void DebuggerConfigWidget::addDebugger()
|
||||
{
|
||||
DebuggerItem item;
|
||||
item.createId();
|
||||
item.setAutoDetected(false);
|
||||
item.setEngineType(NoEngineType);
|
||||
item.setUnexpandedDisplayName(d->uniqueDisplayName(tr("New Debugger")));
|
||||
item.setAutoDetected(false);
|
||||
@@ -715,7 +714,8 @@ static Utils::FilePaths searchGdbPathsFromRegistry()
|
||||
return searchPaths;
|
||||
}
|
||||
|
||||
void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers(const FilePath &deviceRoot)
|
||||
void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers(const FilePath &deviceRoot,
|
||||
const QString &detectionSource)
|
||||
{
|
||||
const QStringList filters = {"gdb-i686-pc-mingw32", "gdb-i686-pc-mingw32.exe", "gdb",
|
||||
"gdb.exe", "lldb", "lldb.exe", "lldb-[1-9]*",
|
||||
@@ -784,14 +784,17 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers(const FilePath &de
|
||||
}
|
||||
DebuggerItem item;
|
||||
item.createId();
|
||||
item.setDetectionSource(detectionSource);
|
||||
// Intentionally set items with non-empty source as manual for now to
|
||||
// give the user a chance to remove them. FIXME: Think of a better way.
|
||||
item.setAutoDetected(detectionSource.isEmpty());
|
||||
item.setCommand(command);
|
||||
item.reinitializeFromFile();
|
||||
if (item.engineType() == NoEngineType)
|
||||
continue;
|
||||
//: %1: Debugger engine type (GDB, LLDB, CDB...), %2: Path
|
||||
item.setUnexpandedDisplayName(tr("System %1 at %2")
|
||||
.arg(item.engineTypeName()).arg(command.toUserOutput()));
|
||||
item.setAutoDetected(true);
|
||||
const QString name = detectionSource.isEmpty() ? tr("System %1 at %2") : tr("Detected %1 at %2");
|
||||
item.setUnexpandedDisplayName(name.arg(item.engineTypeName()).arg(command.toUserOutput()));
|
||||
m_model->addDebugger(item);
|
||||
}
|
||||
}
|
||||
@@ -942,7 +945,7 @@ void DebuggerItemManagerPrivate::restoreDebuggers()
|
||||
|
||||
// Auto detect current.
|
||||
autoDetectCdbDebuggers();
|
||||
autoDetectGdbOrLldbDebuggers({});
|
||||
autoDetectGdbOrLldbDebuggers({}, {});
|
||||
autoDetectUvscDebuggers();
|
||||
}
|
||||
|
||||
@@ -1026,9 +1029,10 @@ void DebuggerItemManager::deregisterDebugger(const QVariant &id)
|
||||
});
|
||||
}
|
||||
|
||||
void DebuggerItemManager::autoDetectDebuggersForDevice(const Utils::FilePath &deviceRoot)
|
||||
void DebuggerItemManager::autoDetectDebuggersForDevice(const FilePath &deviceRoot,
|
||||
const QString &detectionSource)
|
||||
{
|
||||
d->autoDetectGdbOrLldbDebuggers(deviceRoot);
|
||||
d->autoDetectGdbOrLldbDebuggers(deviceRoot, detectionSource);
|
||||
}
|
||||
|
||||
} // namespace Debugger
|
||||
|
@@ -52,7 +52,8 @@ public:
|
||||
static QVariant registerDebugger(const DebuggerItem &item);
|
||||
static void deregisterDebugger(const QVariant &id);
|
||||
|
||||
static void autoDetectDebuggersForDevice(const Utils::FilePath &deviceRoot);
|
||||
static void autoDetectDebuggersForDevice(const Utils::FilePath &deviceRoot,
|
||||
const QString &detectionSource);
|
||||
|
||||
static const DebuggerItem *findByCommand(const Utils::FilePath &command);
|
||||
static const DebuggerItem *findById(const QVariant &id);
|
||||
|
@@ -185,9 +185,12 @@ void DebuggerKitAspect::setup(Kit *k)
|
||||
// This improves the situation a bit if a cross-compilation tool chain has the
|
||||
// same ABI as the host.
|
||||
if (level == DebuggerItem::MatchesPerfectly
|
||||
&& !item.command().needsDevice()
|
||||
&& systemEnvironment.path().contains(item.command().parentDir())) {
|
||||
level = DebuggerItem::MatchesPerfectlyInPath;
|
||||
}
|
||||
if (!item.detectionSource().isEmpty() && item.detectionSource() == k->autoDetectionSource())
|
||||
level = DebuggerItem::MatchLevel(level + 2);
|
||||
} else if (rawId.type() == QVariant::String) {
|
||||
// New structure.
|
||||
if (item.id() == rawId) {
|
||||
|
@@ -1746,9 +1746,10 @@ void DebuggerPlugin::getEnginesState(QByteArray *json) const
|
||||
*json = QJsonDocument(QJsonObject::fromVariantMap(result)).toJson();
|
||||
}
|
||||
|
||||
void DebuggerPlugin::autoDetectDebuggersForDevice(const FilePath &deviceRoot)
|
||||
void DebuggerPlugin::autoDetectDebuggersForDevice(const FilePath &deviceRoot,
|
||||
const QString &detectionId)
|
||||
{
|
||||
dd->m_debuggerItemManager.autoDetectDebuggersForDevice(deviceRoot);
|
||||
dd->m_debuggerItemManager.autoDetectDebuggersForDevice(deviceRoot, detectionId);
|
||||
}
|
||||
|
||||
void DebuggerPluginPrivate::attachToQmlPort()
|
||||
|
@@ -59,7 +59,7 @@ private:
|
||||
Q_SLOT void getEnginesState(QByteArray *json) const;
|
||||
|
||||
// Called from DockerDevice
|
||||
Q_SLOT void autoDetectDebuggersForDevice(const Utils::FilePath &deviceRoot);
|
||||
Q_SLOT void autoDetectDebuggersForDevice(const Utils::FilePath &deviceRoot, const QString &detectionId);
|
||||
|
||||
QVector<QObject *> createTestObjects() const override;
|
||||
};
|
||||
|
@@ -95,98 +95,6 @@ DebuggerEngine *createQmlEngine();
|
||||
DebuggerEngine *createLldbEngine();
|
||||
DebuggerEngine *createUvscEngine();
|
||||
|
||||
class LocalProcessRunner : public RunWorker
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::LocalProcessRunner)
|
||||
|
||||
public:
|
||||
LocalProcessRunner(DebuggerRunTool *runTool, const CommandLine &command)
|
||||
: RunWorker(runTool->runControl()), m_runTool(runTool), m_command(command)
|
||||
{
|
||||
connect(&m_proc, &QtcProcess::errorOccurred,
|
||||
this, &LocalProcessRunner::handleError);
|
||||
connect(&m_proc, &QtcProcess::readyReadStandardOutput,
|
||||
this, &LocalProcessRunner::handleStandardOutput);
|
||||
connect(&m_proc, &QtcProcess::readyReadStandardError,
|
||||
this, &LocalProcessRunner::handleStandardError);
|
||||
connect(&m_proc, &QtcProcess::finished,
|
||||
this, &LocalProcessRunner::handleFinished);
|
||||
}
|
||||
|
||||
void start() override
|
||||
{
|
||||
m_proc.setCommand(m_command);
|
||||
m_proc.start();
|
||||
}
|
||||
|
||||
void stop() override
|
||||
{
|
||||
m_proc.terminate();
|
||||
}
|
||||
|
||||
void handleStandardOutput()
|
||||
{
|
||||
const QByteArray ba = m_proc.readAllStandardOutput();
|
||||
const QString msg = QString::fromLocal8Bit(ba, ba.length());
|
||||
m_runTool->appendMessage(msg, StdOutFormat);
|
||||
}
|
||||
|
||||
void handleStandardError()
|
||||
{
|
||||
const QByteArray ba = m_proc.readAllStandardError();
|
||||
const QString msg = QString::fromLocal8Bit(ba, ba.length());
|
||||
m_runTool->appendMessage(msg, StdErrFormat);
|
||||
}
|
||||
|
||||
void handleFinished()
|
||||
{
|
||||
if (m_proc.result() == QtcProcess::FinishedWithSuccess) {
|
||||
// all good.
|
||||
reportDone();
|
||||
} else {
|
||||
reportFailure(tr("Upload failed: %1").arg(m_proc.errorString()));
|
||||
}
|
||||
}
|
||||
|
||||
void handleError(QProcess::ProcessError error)
|
||||
{
|
||||
QString msg;
|
||||
switch (error) {
|
||||
case QProcess::FailedToStart:
|
||||
msg = tr("The upload process failed to start. Shell missing?");
|
||||
break;
|
||||
case QProcess::Crashed:
|
||||
msg = tr("The upload process crashed some time after starting "
|
||||
"successfully.");
|
||||
break;
|
||||
case QProcess::Timedout:
|
||||
msg = tr("The last waitFor...() function timed out. "
|
||||
"The state of QProcess is unchanged, and you can try calling "
|
||||
"waitFor...() again.");
|
||||
break;
|
||||
case QProcess::WriteError:
|
||||
msg = tr("An error occurred when attempting to write "
|
||||
"to the upload process. For example, the process may not be running, "
|
||||
"or it may have closed its input channel.");
|
||||
break;
|
||||
case QProcess::ReadError:
|
||||
msg = tr("An error occurred when attempting to read from "
|
||||
"the upload process. For example, the process may not be running.");
|
||||
break;
|
||||
default:
|
||||
msg = tr("An unknown error in the upload process occurred. "
|
||||
"This is the default return value of error().");
|
||||
}
|
||||
|
||||
m_runTool->showMessage(msg, StatusBar);
|
||||
Core::AsynchronousMessageBox::critical(tr("Error"), msg);
|
||||
}
|
||||
|
||||
QPointer<DebuggerRunTool> m_runTool;
|
||||
CommandLine m_command;
|
||||
Utils::QtcProcess m_proc;
|
||||
};
|
||||
|
||||
class CoreUnpacker final : public RunWorker
|
||||
{
|
||||
public:
|
||||
@@ -421,16 +329,6 @@ void DebuggerRunTool::setCommandsForReset(const QString &commands)
|
||||
m_runParameters.commandsForReset = commands;
|
||||
}
|
||||
|
||||
void DebuggerRunTool::setServerStartScript(const FilePath &serverStartScript)
|
||||
{
|
||||
if (!serverStartScript.isEmpty()) {
|
||||
// Provide script information about the environment
|
||||
const CommandLine serverStarter(serverStartScript,
|
||||
{m_runParameters.inferior.executable.toString(), m_runParameters.remoteChannel});
|
||||
addStartDependency(new LocalProcessRunner(this, serverStarter));
|
||||
}
|
||||
}
|
||||
|
||||
void DebuggerRunTool::setDebugInfoLocation(const QString &debugInfoLocation)
|
||||
{
|
||||
m_runParameters.debugInfoLocation = debugInfoLocation;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user