From 1325be78d932a48cabe8012018d78adfdcdf49d1 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 1 Jul 2021 12:02:01 +0200 Subject: [PATCH 01/40] Doc: Describe Boot2Qt Plugin - Add connecting to Boot2Qt devices topic - Move information about deploying to the generic embedded Linux devices topic to a Boot2Qt topic Fixes: QTCREATORBUG-25946 Change-Id: I72f12ceece133f4a4efe303e82d25a3b5e9b9135 Reviewed-by: Rami Potinkara Reviewed-by: Alessandro Portale --- .../qtcreator-boot2qt-deployment-steps.png | Bin 0 -> 13002 bytes ...tcreator-boot2qt-device-configurations.png | Bin 0 -> 13529 bytes .../qtcreator-boot2qt-flashing-wizard.png | Bin 0 -> 6466 bytes .../images/qtcreator-devices-boot2qt.png | Bin 0 -> 4897 bytes .../src/android/deploying-android.qdoc | 2 +- .../src/baremetal/creator-baremetal-dev.qdoc | 2 +- doc/qtcreator/src/linux-mobile/b2qtdev.qdoc | 158 ++++++++++++++++++ .../linux-mobile/creator-deployment-b2qt.qdoc | 42 +++++ .../creator-deployment-embedded-linux.qdoc | 43 +---- .../creator-embedded-platforms.qdoc | 4 +- ...creator-projects-settings-run-b2qt.qdocinc | 4 +- doc/qtcreator/src/linux-mobile/linuxdev.qdoc | 2 +- .../creator-deployment-overview.qdoc | 15 +- .../creator-only/creator-mobile-targets.qdoc | 7 +- 14 files changed, 226 insertions(+), 53 deletions(-) create mode 100644 doc/qtcreator/images/qtcreator-boot2qt-deployment-steps.png create mode 100644 doc/qtcreator/images/qtcreator-boot2qt-device-configurations.png create mode 100644 doc/qtcreator/images/qtcreator-boot2qt-flashing-wizard.png create mode 100644 doc/qtcreator/images/qtcreator-devices-boot2qt.png create mode 100644 doc/qtcreator/src/linux-mobile/b2qtdev.qdoc create mode 100644 doc/qtcreator/src/linux-mobile/creator-deployment-b2qt.qdoc diff --git a/doc/qtcreator/images/qtcreator-boot2qt-deployment-steps.png b/doc/qtcreator/images/qtcreator-boot2qt-deployment-steps.png new file mode 100644 index 0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5YQvH9=AcOB0*rF{&X74vjWz2TNUFBeuGO8FdA?$`4pWZkYimBs;!nx6)C+FjGX zD0AsaP?7aA^L=jx$}5i~y@5GeH(Y)~V)CgCa^Dx3qPk{reUs4{ z-PY1GAExe@n#d`gc-6>ue#wG2=kp)gEa5vDE8G5c?{kp5El++o6+hG~{!s0{Le8GQ z-)`GY<=^@&*Ma@U!kYJ$-prsD3u5qyz$ANt0%T|krN5jh!oYCj{({OkH#Sa>t9r@q z<<8ms`P0Vad(I3DlUdJBFzT1L-?w4IhCO>~Tr;N{=p+^#5|Fk2)_>29fkBw%tU;`J z(-qJ>`jkE)Hg%pr35|SZh6c{2vpxFq_q>`pYb$IEyOV3i(~D~pELYq;(G$vC74v25xivRE!1IGs96ujw<^CKQDVMV8>A`Dj9WTZ7 zeHXd?*7oz~&nMfPC)@1Y`setM?%B6*&RccsgVXdnK=Pmi;zxz(rq`6zKHQ0&A z&hwu(pWiz<9TMcf7ToMeZ`Rp1dBM$f^H-RefwHr4`Z@Q+En+6e<4P*`)q^I1mT}H{ zet!OZ=_ybBop$@3LBR-1WJd2E_N7&1t%7ZiR22O|EG&zT-VPG~<1zP@<)Ll&#?V^GT^& zR@82uDYE$QN`~8omo)CB^&gK50nNU>Ua)h^mM^dBrk$Q&_xtVg>A$b<|M~Nq%h&R! zi@plAfjZO{S&qg}&YaJGSG`Nrgpr|4&O}^Xyna!S4#eJ*P0#r2e;mHN+<(4pb=a&o zTA)PR+W5(giD8C9#=b9~P9N`+wJv>iWoPkov8iF4he1jA;%WW;Z*o}}3>+`;I9=hn wTxuU+CiV|0z`(%Z>FVdQ&MBb@0FLVAegFUf literal 0 HcmV?d00001 diff --git a/doc/qtcreator/images/qtcreator-boot2qt-device-configurations.png b/doc/qtcreator/images/qtcreator-boot2qt-device-configurations.png new file mode 100644 index 0000000000000000000000000000000000000000..cddc2ea4d2f6d6f8e41c640d6a7719def22280c5 GIT binary patch literal 13529 zcmeAS@N?(olHy`uVBq!ia0y~yV4BF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*A{LwDUG=@(Sk$wYdk>FNpqr z&tTIdx4@(e-H&L(jN8a-V!U9 zwen_p$t;~2X&dooLebH?qB%X5S9WaF`*Muu<-vuQe14xd+Q0mzjh5jz*~Qy0I^3Up zlutJKwN%yfxJ6GZ-voVWYo4u^7%;KdS5afg)+u|5Mw_ zm%1+Rmc7H(c5acSE91gbW)9OkFHVj4^k8v7CCC^f#e$rOl^LNeo}Te4fwJZAPCeUN z`0V*{W>Vrtwb}=1($ubV2wuuXX3M6lRN=Y1ZHW)GXxv zvg6}6!KE=8tDQD^D`=kWRymW@U9@GL*0mz_1;1ZJ2!7!|-eC85kxi+@S+(NIc>%BXg+?a8-nUWTYNLY21tY_ zmruKNclVdiLKlvD7?@4EP`&I`*&7c2{F)nU8|U3Fo4BR8@iS&S4p{`LO^4F41hwKJ z7^x+X+^R>g8}U^QAUQ}qZ_;wX-c4DJ_3!?SBP=D*Gzv?r{A=Z2PMvdb|93Bk`)(K3 ze|K}Z@AJaekp*YDdff5~O|dn;L7?su+$Ojz`L)`Q|_jf(N&L=zF$~x`%3$#I)Cituzx?ZL#yom z9+ZsT&|sHf`gc*?-{Y6R&%M~WHm0Wf#k%|r!N0q^`${%FXZXU{To<@A**D$!g8kop zW$&-=`xbO)i9PoPcA;Ob@~hf@mP@zhSr-Lm+}mt=cgOeT{LHlz?p6!bBp-ekTmJBh z?(O-_4_;q;;#&B&eeZsDEB_}A;FdL`Y%YV9aeBi!8A}rmCM&c!39MhZc;e;%j2 \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 +*/ diff --git a/doc/qtcreator/src/linux-mobile/creator-deployment-b2qt.qdoc b/doc/qtcreator/src/linux-mobile/creator-deployment-b2qt.qdoc new file mode 100644 index 00000000000..40af933a85a --- /dev/null +++ b/doc/qtcreator/src/linux-mobile/creator-deployment-b2qt.qdoc @@ -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}. +*/ diff --git a/doc/qtcreator/src/linux-mobile/creator-deployment-embedded-linux.qdoc b/doc/qtcreator/src/linux-mobile/creator-deployment-embedded-linux.qdoc index a7efe0ba1a1..11d7ac33518 100644 --- a/doc/qtcreator/src/linux-mobile/creator-deployment-embedded-linux.qdoc +++ b/doc/qtcreator/src/linux-mobile/creator-deployment-embedded-linux.qdoc @@ -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 diff --git a/doc/qtcreator/src/linux-mobile/creator-embedded-platforms.qdoc b/doc/qtcreator/src/linux-mobile/creator-embedded-platforms.qdoc index 182501dd732..c67c1157467 100644 --- a/doc/qtcreator/src/linux-mobile/creator-embedded-platforms.qdoc +++ b/doc/qtcreator/src/linux-mobile/creator-embedded-platforms.qdoc @@ -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} diff --git a/doc/qtcreator/src/linux-mobile/creator-projects-settings-run-b2qt.qdocinc b/doc/qtcreator/src/linux-mobile/creator-projects-settings-run-b2qt.qdocinc index 5a7edda0f50..167de0044ce 100644 --- a/doc/qtcreator/src/linux-mobile/creator-projects-settings-run-b2qt.qdocinc +++ b/doc/qtcreator/src/linux-mobile/creator-projects-settings-run-b2qt.qdocinc @@ -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] */ diff --git a/doc/qtcreator/src/linux-mobile/linuxdev.qdoc b/doc/qtcreator/src/linux-mobile/linuxdev.qdoc index e726841c0a7..392f04dc6df 100644 --- a/doc/qtcreator/src/linux-mobile/linuxdev.qdoc +++ b/doc/qtcreator/src/linux-mobile/linuxdev.qdoc @@ -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 diff --git a/doc/qtcreator/src/overview/creator-only/creator-deployment-overview.qdoc b/doc/qtcreator/src/overview/creator-only/creator-deployment-overview.qdoc index f1d40a058d8..184a58437c4 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-deployment-overview.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-deployment-overview.qdoc @@ -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 diff --git a/doc/qtcreator/src/overview/creator-only/creator-mobile-targets.qdoc b/doc/qtcreator/src/overview/creator-only/creator-mobile-targets.qdoc index acd109a80bb..bf08dceaff3 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-mobile-targets.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-mobile-targets.qdoc @@ -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 From 716f0bd032d8da6eac9da1381b390a90fddafa7f Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 9 Jul 2021 14:32:41 +0200 Subject: [PATCH 02/40] Avoid compiler warnings about truncation from double to float They appeared when compiling against Qt 6 Change-Id: I6bb94168f9776a7fa416d51ff4bb3ca32c9f02fc Reviewed-by: hjk --- src/plugins/coreplugin/manhattanstyle.cpp | 12 ++++++------ .../components/navigator/navigatortreeview.cpp | 4 ++-- src/plugins/texteditor/textmark.cpp | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index a6bf33491a0..c8bb751ef59 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -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); diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp index 3327fefcb44..2d1ef6f554d 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp @@ -169,13 +169,13 @@ private: // functions QColor highlightBrushColor() const { QColor color = Theme::getColor(Theme::Color::DSnavigatorDropIndicatorBackground); - color.setAlphaF(0.7); + color.setAlphaF(0.7f); return color; } QColor highlightLineColor() const { QColor color = Theme::getColor(Theme::Color::DSnavigatorDropIndicatorOutline); - color.setAlphaF(0.7); + color.setAlphaF(0.7f); return color; } diff --git a/src/plugins/texteditor/textmark.cpp b/src/plugins/texteditor/textmark.cpp index 110f451eed9..43aaf3e54b5 100644 --- a/src/plugins/texteditor/textmark.cpp +++ b/src/plugins/texteditor/textmark.cpp @@ -504,7 +504,7 @@ AnnotationColors &AnnotationColors::getAnnotationColors(const QColor &markColor, : highClipHsl(backgroundLightness + 0.5); colors.rectColor = markColor; - colors.rectColor.setAlphaF(0.15); + colors.rectColor.setAlphaF(0.15f); colors.textColor.setHslF(markColor.hslHueF(), markColor.hslSaturationF(), From 27e6cbeb5b4e748ff608404d7d98048f2d267c5e Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 9 Jul 2021 14:35:53 +0200 Subject: [PATCH 03/40] PE: Do not skip explicitly missing test files Amends 9e5fc953da7. Change-Id: I08f792d426cb0ffcfc3904fd293c290565b0856c Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/abi.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/abi.cpp b/src/plugins/projectexplorer/abi.cpp index ba4acf1f519..10134096d9c 100644 --- a/src/plugins/projectexplorer/abi.cpp +++ b/src/plugins/projectexplorer/abi.cpp @@ -1403,8 +1403,10 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiOfBinary() QFETCH(QStringList, abis); const Utils::FilePath fp = Utils::FilePath::fromString(file); - if (!fp.exists()) + const QString dataTag = QString::fromLocal8Bit(QTest::currentDataTag()); + if (!fp.exists() && dataTag != "no file" && dataTag != "non existing file") QSKIP("binary file not present"); + const Abis result = Abi::abisOfBinary(fp); QCOMPARE(result.count(), abis.count()); for (int i = 0; i < abis.count(); ++i) From 4361103193970ae542bdaba4c0a22b951b1a821f Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 9 Jul 2021 11:20:27 +0200 Subject: [PATCH 04/40] LanguageClient: highlight current argument in function hint Change-Id: I23be02c4bef30a527ba9f419a059c1d3bfed1c2b Reviewed-by: Christian Kandeler --- .../languageclientfunctionhint.cpp | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/plugins/languageclient/languageclientfunctionhint.cpp b/src/plugins/languageclient/languageclientfunctionhint.cpp index 32c0ff0a637..c650c3cdbf0 100644 --- a/src/plugins/languageclient/languageclientfunctionhint.cpp +++ b/src/plugins/languageclient/languageclientfunctionhint.cpp @@ -57,9 +57,28 @@ private: QString FunctionHintProposalModel::text(int index) const { + using Parameters = QList; if (index < 0 || m_sigis.signatures().size() <= index) return {}; - return m_sigis.signatures().at(index).label(); + const SignatureInformation signature = m_sigis.signatures().at(index); + QString label = signature.label(); + if (index != m_sigis.activeSignature().value_or(-1)) + return label; + + const int parametersIndex = m_sigis.activeParameter().value_or(-1); + if (parametersIndex < 0) + return label; + + const QList parameters = Utils::transform(signature.parameters().value_or(Parameters()), + &ParameterInformation::label); + if (parameters.size() <= parametersIndex) + return label; + + const QString ¶meterText = parameters.at(parametersIndex); + const int start = label.indexOf(parameterText); + const int end = start + parameterText.length(); + return label.mid(0, start).toHtmlEscaped() + "" + parameterText.toHtmlEscaped() + "" + + label.mid(end).toHtmlEscaped(); } class FunctionHintProcessor : public IAssistProcessor From 5b18d1efa73783152bd94cc0fd2676725fac7152 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 9 Jul 2021 14:08:24 +0200 Subject: [PATCH 05/40] LanguageClient: update outline after document Update the outline sidebar widget after document changes are send to the server like in the outline combobox in: Amends ed199da1dfc035c26ee3674ce8f1f7fcd7412327 Change-Id: Iab58c0712a1c489576ed25a9b7e28f6f01e65946 Reviewed-by: Christian Kandeler --- src/plugins/languageclient/languageclientoutline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/languageclient/languageclientoutline.cpp b/src/plugins/languageclient/languageclientoutline.cpp index a9c3bf5b8b6..98edfcfd4df 100644 --- a/src/plugins/languageclient/languageclientoutline.cpp +++ b/src/plugins/languageclient/languageclientoutline.cpp @@ -153,8 +153,8 @@ LanguageClientOutlineWidget::LanguageClientOutlineWidget(Client *client, &DocumentSymbolCache::gotSymbols, this, &LanguageClientOutlineWidget::handleResponse); - connect(editor->textDocument(), &TextEditor::TextDocument::contentsChanged, this, [this]() { - if (m_client) + connect(client, &Client::documentUpdated, this, [this](TextEditor::TextDocument *document) { + if (m_client && m_uri == DocumentUri::fromFilePath(document->filePath())) m_client->documentSymbolCache()->requestSymbols(m_uri); }); From a8a3cd4f91a0d3ebba5713f5c94f759addd494a7 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 9 Jul 2021 14:09:36 +0200 Subject: [PATCH 06/40] LanguageClient: directly update document highlights on changes If the document highlights are requested after a timeout the document might have changed again inbetween leading to another document change notification that gets send to the server. Change-Id: I476e833c55e1bed96c9bd49ee2f17915ee3536a2 Reviewed-by: Christian Kandeler --- src/plugins/languageclient/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp index aaf8d3caba5..9a42f38ef9e 100644 --- a/src/plugins/languageclient/client.cpp +++ b/src/plugins/languageclient/client.cpp @@ -1195,7 +1195,7 @@ void Client::sendPostponedDocumentUpdates() emit documentUpdated(update.document); if (currentWidget && currentWidget->textDocument() == update.document) - cursorPositionChanged(currentWidget); + requestDocumentHighlights(currentWidget); m_tokentSupport.updateSemanticTokens(update.document); } From f6290d52f5cc12528a197875af695b1219ed1e8c Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 12 Jul 2021 11:41:30 +0200 Subject: [PATCH 07/40] Bump version to 5.0 beta2 Change-Id: Ie8a9f5be343d5aa939b9ec54e549c604d05d223f Reviewed-by: Eike Ziller --- cmake/QtCreatorIDEBranding.cmake | 6 +++--- qbs/modules/qtc/qtc.qbs | 6 +++--- qtcreator_ide_branding.pri | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmake/QtCreatorIDEBranding.cmake b/cmake/QtCreatorIDEBranding.cmake index bf5ec9e4e76..f2ca1e51f8d 100644 --- a/cmake/QtCreatorIDEBranding.cmake +++ b/cmake/QtCreatorIDEBranding.cmake @@ -1,6 +1,6 @@ -set(IDE_VERSION "4.82.0") # The IDE version. -set(IDE_VERSION_COMPAT "4.82.0") # The IDE Compatibility version. -set(IDE_VERSION_DISPLAY "5.0.0-beta1") # The IDE display version. +set(IDE_VERSION "4.83.0") # The IDE version. +set(IDE_VERSION_COMPAT "4.83.0") # The IDE Compatibility version. +set(IDE_VERSION_DISPLAY "5.0.0-beta2") # The IDE display version. set(IDE_COPYRIGHT_YEAR "2021") # The IDE current copyright year. set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation. diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 8a242902426..e9153b715a0 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -3,15 +3,15 @@ import qbs.Environment import qbs.FileInfo Module { - property string qtcreator_display_version: '5.0.0-beta1' + property string qtcreator_display_version: '5.0.0-beta2' property string ide_version_major: '4' - property string ide_version_minor: '82' + property string ide_version_minor: '83' property string ide_version_release: '0' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release property string ide_compat_version_major: '4' - property string ide_compat_version_minor: '82' + property string ide_compat_version_minor: '83' property string ide_compat_version_release: '0' property string qtcreator_compat_version: ide_compat_version_major + '.' + ide_compat_version_minor + '.' + ide_compat_version_release diff --git a/qtcreator_ide_branding.pri b/qtcreator_ide_branding.pri index 7efd86dacea..eb4c98328d7 100644 --- a/qtcreator_ide_branding.pri +++ b/qtcreator_ide_branding.pri @@ -1,6 +1,6 @@ -QTCREATOR_VERSION = 4.82.0 -QTCREATOR_COMPAT_VERSION = 4.82.0 -QTCREATOR_DISPLAY_VERSION = 5.0.0-beta1 +QTCREATOR_VERSION = 4.83.0 +QTCREATOR_COMPAT_VERSION = 4.83.0 +QTCREATOR_DISPLAY_VERSION = 5.0.0-beta2 QTCREATOR_COPYRIGHT_YEAR = 2021 IDE_DISPLAY_NAME = Qt Creator From 505401a7d43ff9054212314d427a3107d63dd8bf Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 9 Jul 2021 14:39:30 +0200 Subject: [PATCH 08/40] CompilationDatabasePM: Be more verbose inside test Makes it easier to understand what is failing. Change-Id: I23140641a796150aa97f02c514c0ccd8e7623f51 Reviewed-by: Christian Kandeler --- .../compilationdatabasetests.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdatabasetests.cpp b/src/plugins/compilationdatabaseprojectmanager/compilationdatabasetests.cpp index 42ba0e08871..9b97a1988d3 100644 --- a/src/plugins/compilationdatabaseprojectmanager/compilationdatabasetests.cpp +++ b/src/plugins/compilationdatabaseprojectmanager/compilationdatabasetests.cpp @@ -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 From 288306a707e5cbd2ecc0a1b706e61ce497ca4ea4 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 12 Jul 2021 07:18:29 +0200 Subject: [PATCH 09/40] LanguageClient: fix completion item isSnippet Change-Id: Iffe170bc0f74d722662007596906ba8793de36d7 Reviewed-by: Christian Kandeler --- src/plugins/languageclient/languageclientcompletionassist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/languageclient/languageclientcompletionassist.cpp b/src/plugins/languageclient/languageclientcompletionassist.cpp index 612ad19402a..3826f151cc0 100644 --- a/src/plugins/languageclient/languageclientcompletionassist.cpp +++ b/src/plugins/languageclient/languageclientcompletionassist.cpp @@ -188,7 +188,7 @@ QString LanguageClientCompletionItem::detail() const bool LanguageClientCompletionItem::isSnippet() const { - return m_item.insertTextFormat().value_or(CompletionItem::PlainText); + return m_item.insertTextFormat() == CompletionItem::Snippet; } bool LanguageClientCompletionItem::isValid() const From ee974ec491c09f67c4a47fe743680f49acb33a87 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 12 Jul 2021 11:50:48 +0200 Subject: [PATCH 10/40] Utils: Mention environment dialog += and =+ to append and prepend Change-Id: I9aea9c7bbdfcbdc164c0233b0b12fd634c4b2a47 Reviewed-by: Eike Ziller --- src/libs/utils/environmentdialog.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libs/utils/environmentdialog.cpp b/src/libs/utils/environmentdialog.cpp index 123a571646b..7a8b8f588fa 100644 --- a/src/libs/utils/environmentdialog.cpp +++ b/src/libs/utils/environmentdialog.cpp @@ -46,6 +46,8 @@ Utils::optional 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 \"#\".")); From b0aee9ccd91b7b09a65fc035d7a3441586bcde92 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 12 Jul 2021 11:34:29 +0200 Subject: [PATCH 11/40] Update Find/Replace action even in edge cases The Issues pane has a placeholder for the find tool bar, there is one in the top level layout for all output panes, but it doesn't support searching itself. Make sure that the Find/Replace action is updated even when switching focus from another find tool bar to the issues pane. Fixes: QTCREATORBUG-25991 Change-Id: If96e9a2c59e159408aa881a01a1df0bb7bf28963 Reviewed-by: David Schulz --- src/plugins/coreplugin/find/currentdocumentfind.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/find/currentdocumentfind.cpp b/src/plugins/coreplugin/find/currentdocumentfind.cpp index 7cbe94783f6..7fe84aac158 100644 --- a/src/plugins/coreplugin/find/currentdocumentfind.cpp +++ b/src/plugins/coreplugin/find/currentdocumentfind.cpp @@ -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); From b349e22e7e2e4c65290c3a2db9c7555c53d8ae34 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 9 Jul 2021 11:53:42 +0200 Subject: [PATCH 12/40] QMake: Properly use build device environment in more cases Change-Id: I3d9000c1de448bb023a9b9012db06ed400bbe85a Reviewed-by: Christian Stenger --- src/plugins/qtsupport/baseqtversion.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 0ba9d049672..b670482729a 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -1178,7 +1178,7 @@ void BaseQtVersion::ensureMkSpecParsed() const QMakeVfs vfs; QMakeGlobals option; applyProperties(&option); - Environment env = Environment::systemEnvironment(); // FIXME: Use build device + Environment env = d->m_qmakeCommand.deviceEnvironment(); setupQmakeRunEnvironment(env); option.environment = env.toProcessEnvironment(); ProMessageHandler msgHandler(true); @@ -1709,7 +1709,7 @@ void BaseQtVersion::addToEnvironment(const Kit *k, Environment &env) const Environment BaseQtVersion::qmakeRunEnvironment() const { - Environment env = Environment::systemEnvironment(); // FIXME: Use build environment + Environment env = d->m_qmakeCommand.deviceEnvironment(); setupQmakeRunEnvironment(env); return env; } @@ -2291,7 +2291,8 @@ BaseQtVersion *QtVersionFactory::createQtVersionFromQMakePath (const FilePath &qmakePath, bool isAutoDetected, const QString &autoDetectionSource, QString *error) { QHash versionInfo; - if (!BaseQtVersionPrivate::queryQMakeVariables(qmakePath, Environment::systemEnvironment(), &versionInfo, error)) + const Environment env = qmakePath.deviceEnvironment(); + if (!BaseQtVersionPrivate::queryQMakeVariables(qmakePath, env, &versionInfo, error)) return nullptr; FilePath mkspec = BaseQtVersionPrivate::mkspecFromVersionInfo(versionInfo, qmakePath); From e429aaa43bc341db488e2a7e251dc92289b35da8 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 9 Jul 2021 18:37:32 +0200 Subject: [PATCH 13/40] Debugger: Remove the extra server start script setting This was part of very original gdbserver support where normal remote debugging did not start the server on the device. The effect can still be achieved by a custom deploy step. Change-Id: I8763ea131700115065693bd8a8a5382f0e02a113 Reviewed-by: Orgad Shaneh --- dist/changes-5.0.0.md | 2 + .../creator-only/creator-debugger.qdoc | 2 - src/plugins/debugger/debuggerdialogs.cpp | 23 ---- src/plugins/debugger/debuggerruncontrol.cpp | 102 ------------------ 4 files changed, 2 insertions(+), 127 deletions(-) diff --git a/dist/changes-5.0.0.md b/dist/changes-5.0.0.md index 8bcf9440bc6..df87c466b73 100644 --- a/dist/changes-5.0.0.md +++ b/dist/changes-5.0.0.md @@ -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 diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc index 34ecaa1785a..29f0e534af0 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc @@ -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 diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp index 24e4b754be6..f00aca55722 100644 --- a/src/plugins/debugger/debuggerdialogs.cpp +++ b/src/plugins/debugger/debuggerdialogs.cpp @@ -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); diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index 837c71f9062..e3fcefe3bf7 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -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 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; From d603654acaca2377483ecf241e77af6d7c0c2302 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 12 Jul 2021 11:24:19 +0200 Subject: [PATCH 14/40] ClangdClient: Do not close temporarily opened files ... if they have been properly opened in the meantime. This fixes the problem that when a file was opened indirectly via "Go to definition", the didClose message for the file that we temporarily opened to search for overrides sometimes came in after the "regular" opening of the file. As a result, such files were not actually in clangd's open documents set, and no functionality was available for them (e.g. F2 on a symbol would do nothing). Also remove a left-over related declaration. Change-Id: I9fc85d95595cb38a8d92e3f46505b9c514537d21 Reviewed-by: David Schulz --- src/plugins/clangcodemodel/clangdclient.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/clangcodemodel/clangdclient.cpp b/src/plugins/clangcodemodel/clangdclient.cpp index ae1e29a8eb8..c180710a340 100644 --- a/src/plugins/clangcodemodel/clangdclient.cpp +++ b/src/plugins/clangcodemodel/clangdclient.cpp @@ -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(); From 1936006a9134a383a04b32ea94ecc1f152278eac Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 9 Jul 2021 13:18:22 +0200 Subject: [PATCH 15/40] Docker: Force a container restart when mounts have changed Change-Id: Iaddb52b6c4fb27ff9ccc098d76cc6e333e02c7e4 Reviewed-by: Christian Stenger --- src/plugins/docker/dockerdevice.cpp | 25 +++++++++++++++++++++++-- src/plugins/docker/dockerdevice.h | 1 + 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index 42359391480..cffabe40ad4 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -299,6 +299,7 @@ public: void tryCreateLocalFileAccess(); + void stopCurrentContainer(); void fetchSystemEnviroment(); DockerDevice *q; @@ -352,8 +353,8 @@ public: "mapped one-to-one into the Docker container.")); m_pathsLineEdit->setText(data.mounts.join(';')); - connect(m_pathsLineEdit, &QLineEdit::textChanged, this, [&data](const QString &text) { - data.mounts = text.split(';'); + connect(m_pathsLineEdit, &QLineEdit::textChanged, this, [dockerDevice](const QString &text) { + dockerDevice->setMounts(text.split(';')); }); auto logView = new QTextBrowser; @@ -615,6 +616,20 @@ void DockerDevice::tryCreateLocalFileAccess() const d->tryCreateLocalFileAccess(); } +void DockerDevicePrivate::stopCurrentContainer() +{ + if (m_container.isEmpty()) + return; + + QtcProcess proc; + proc.setCommand({"docker", {"container", "stop", m_container}}); + + m_container.clear(); + m_mergedDir.clear(); + + proc.runBlocking(); +} + void DockerDevicePrivate::tryCreateLocalFileAccess() { if (!m_container.isEmpty()) @@ -710,6 +725,12 @@ bool DockerDevice::hasLocalFileAccess() const return !d->m_mergedDir.isEmpty(); } +void DockerDevice::setMounts(const QStringList &mounts) const +{ + d->m_data.mounts = mounts; + d->stopCurrentContainer(); // Force re-start with new mounts. +} + FilePath DockerDevice::mapToLocalAccess(const FilePath &filePath) const { QTC_ASSERT(!d->m_mergedDir.isEmpty(), return {}); diff --git a/src/plugins/docker/dockerdevice.h b/src/plugins/docker/dockerdevice.h index 0dd441bfd95..a0f504fd07e 100644 --- a/src/plugins/docker/dockerdevice.h +++ b/src/plugins/docker/dockerdevice.h @@ -105,6 +105,7 @@ public: void tryCreateLocalFileAccess() const; bool hasLocalFileAccess() const; + void setMounts(const QStringList &mounts) const; Utils::FilePath mapToLocalAccess(const Utils::FilePath &filePath) const; Utils::FilePath mapFromLocalAccess(const Utils::FilePath &filePath) const; From 264fa85f506f58e9cfc6a5a7ebe7c17b9db22494 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 12 Jul 2021 12:03:26 +0200 Subject: [PATCH 16/40] Fix a number of compiler warnings Change-Id: I3e71bffb2099d896742a6fca77febe20e2076464 Reviewed-by: hjk --- src/plugins/clangformat/clangformatutils.cpp | 4 ++++ src/plugins/cppeditor/cppquickfixsettings.cpp | 2 +- src/plugins/debugger/breakhandler.cpp | 4 ++-- src/plugins/projectexplorer/devicesupport/desktopdevice.cpp | 2 +- src/plugins/projectexplorer/devicesupport/idevice.cpp | 1 + .../qmldesigner/components/propertyeditor/aligndistribute.cpp | 2 +- .../designercore/projectstorage/projectstoragetypes.h | 2 +- src/plugins/qmldesigner/settingspage.cpp | 2 +- src/plugins/webassembly/webassemblytoolchain.cpp | 1 + 9 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp index 3905ae5f6a5..816dc09650b 100644 --- a/src/plugins/clangformat/clangformatutils.cpp +++ b/src/plugins/clangformat/clangformatutils.cpp @@ -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 = {{"^ DesktopDevice::directoryEntries(const FilePath &filePath, { QTC_CHECK(!filePath.needsDevice()); const QDir dir(filePath.path()); - const QFileInfoList entryInfoList = dir.entryInfoList(nameFilters, filters); + const QFileInfoList entryInfoList = dir.entryInfoList(nameFilters, filters, sort); return Utils::transform(entryInfoList, &FilePath::fromFileInfo); } diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp index 82e0058f37c..51df879d9d8 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp @@ -357,6 +357,7 @@ QByteArray IDevice::fileContents(const FilePath &filePath, qint64 limit, qint64 { Q_UNUSED(filePath); Q_UNUSED(limit); + Q_UNUSED(offset); QTC_CHECK(false); return {}; } diff --git a/src/plugins/qmldesigner/components/propertyeditor/aligndistribute.cpp b/src/plugins/qmldesigner/components/propertyeditor/aligndistribute.cpp index 290edf309bd..f2cef3ead30 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/aligndistribute.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/aligndistribute.cpp @@ -631,7 +631,7 @@ void AlignDistribute::distributeSpacing(Dimension dimension, QTC_ASSERT(!modelNode.isRootNode(), continue); if (QmlItemNode::isValidQmlItemNode(modelNode)) { QmlItemNode qmlItemNode(modelNode); - qreal parentPos; + qreal parentPos = 0; QByteArray propertyName; switch (dimension) { case Dimension::X: { diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h index 444d25f6bd8..0627b314048 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h @@ -573,7 +573,7 @@ public: friend bool operator==(const ImportView &first, const ImportView &second) { return first.name == second.name - && first.version == second.version & first.sourceId == second.sourceId; + && first.version == second.version && first.sourceId == second.sourceId; } public: diff --git a/src/plugins/qmldesigner/settingspage.cpp b/src/plugins/qmldesigner/settingspage.cpp index 569cdb74d72..93a6fd566be 100644 --- a/src/plugins/qmldesigner/settingspage.cpp +++ b/src/plugins/qmldesigner/settingspage.cpp @@ -270,7 +270,7 @@ void SettingsPageWidget::apply() DesignerSettingsKey::ENABLE_TIMELINEVIEW }; - for (const QByteArray &key : restartNecessaryKeys) { + for (const char * const key : restartNecessaryKeys) { if (currentSettings.value(key) != newSettings.value(key)) { QMessageBox::information(Core::ICore::dialogParent(), tr("Restart Required"), tr("The made changes will take effect after a " diff --git a/src/plugins/webassembly/webassemblytoolchain.cpp b/src/plugins/webassembly/webassemblytoolchain.cpp index d0020cb6fde..c7755db21eb 100644 --- a/src/plugins/webassembly/webassemblytoolchain.cpp +++ b/src/plugins/webassembly/webassemblytoolchain.cpp @@ -162,6 +162,7 @@ QList WebAssemblyToolChainFactory::autoDetect( const IDevice::Ptr &device) { Q_UNUSED(alreadyKnown) + Q_UNUSED(device) const FilePath sdk = WebAssemblyEmSdk::registeredEmSdk(); if (!WebAssemblyEmSdk::isValid(sdk)) From 5b21b3bca587cd5c12f39daa2157e86831a22856 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 12 Jul 2021 15:10:23 +0200 Subject: [PATCH 17/40] Update qlitehtml to latest master Fixes local documentation links that refer to just an anchor. Change-Id: Ib84db2a1a78f31fb081e8c02df0ccdb5a00cae05 Reviewed-by: Jarek Kobus Reviewed-by: Qt CI Bot --- src/libs/qlitehtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/qlitehtml b/src/libs/qlitehtml index 44e15759b74..6af5648d120 160000 --- a/src/libs/qlitehtml +++ b/src/libs/qlitehtml @@ -1 +1 @@ -Subproject commit 44e15759b7400901bfdc6b69ffb1256c82cc1699 +Subproject commit 6af5648d1208ed5760d74bd060c74ffa2bcfef6b From d0172f80b4d5832b41abe2fbc1c46cbf73600fc8 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 12 Jul 2021 15:27:19 +0200 Subject: [PATCH 18/40] Docker: Guard against empty mounts Using empty mounts makes using the container fail. Change-Id: I65041eae3a1ebeec936861b4f85977981bbd84d3 Reviewed-by: hjk --- src/plugins/docker/dockerdevice.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index cffabe40ad4..d048f6e5167 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -354,7 +354,7 @@ public: m_pathsLineEdit->setText(data.mounts.join(';')); connect(m_pathsLineEdit, &QLineEdit::textChanged, this, [dockerDevice](const QString &text) { - dockerDevice->setMounts(text.split(';')); + dockerDevice->setMounts(text.split(';', Qt::SkipEmptyParts)); }); auto logView = new QTextBrowser; @@ -654,8 +654,10 @@ void DockerDevicePrivate::tryCreateLocalFileAccess() dockerRun.addArgs({"-u", QString("%1:%2").arg(getuid()).arg(getgid())}); #endif - for (const QString &mount : qAsConst(m_data.mounts)) - dockerRun.addArgs({"-v", mount + ':' + mount}); + for (const QString &mount : qAsConst(m_data.mounts)) { + if (!mount.isEmpty()) + dockerRun.addArgs({"-v", mount + ':' + mount}); + } dockerRun.addArg(m_data.imageId); dockerRun.addArg("/bin/sh"); From 3c1e7872154e296ac95c8b4212ed13b73145d991 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 12 Jul 2021 16:52:56 +0200 Subject: [PATCH 19/40] ClangCodeModel: Limit result count in clangd-based locator searches clangd memory usage explodes when the workspace/symbol result count hits the six-digit mark, so prevent that. Change-Id: Iefc2eeb3da7fe541e2b1d3105818126980fc3323 Reviewed-by: David Schulz --- src/libs/languageserverprotocol/workspace.h | 2 ++ src/plugins/clangcodemodel/clanggloballocatorfilters.cpp | 5 +++++ src/plugins/languageclient/locatorfilter.cpp | 2 ++ src/plugins/languageclient/locatorfilter.h | 3 +++ 4 files changed, 12 insertions(+) diff --git a/src/libs/languageserverprotocol/workspace.h b/src/libs/languageserverprotocol/workspace.h index 3b0b247b88b..0a745a984fd 100644 --- a/src/libs/languageserverprotocol/workspace.h +++ b/src/libs/languageserverprotocol/workspace.h @@ -188,6 +188,8 @@ public: QString query() const { return typedValue(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); } }; diff --git a/src/plugins/clangcodemodel/clanggloballocatorfilters.cpp b/src/plugins/clangcodemodel/clanggloballocatorfilters.cpp index 004b10a087d..e979c8928c2 100644 --- a/src/plugins/clangcodemodel/clanggloballocatorfilters.cpp +++ b/src/plugins/clangcodemodel/clanggloballocatorfilters.cpp @@ -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); } }; diff --git a/src/plugins/languageclient/locatorfilter.cpp b/src/plugins/languageclient/locatorfilter.cpp index b3abe0fc798..ce4fd5c9b5d 100644 --- a/src/plugins/languageclient/locatorfilter.cpp +++ b/src/plugins/languageclient/locatorfilter.cpp @@ -230,6 +230,8 @@ void WorkspaceLocatorFilter::prepareSearch(const QString &entry, WorkspaceSymbolParams params; params.setQuery(entry); + if (m_maxResultCount > 0) + params.setLimit(m_maxResultCount); QMutexLocker locker(&m_mutex); for (auto client : qAsConst(clients)) { diff --git a/src/plugins/languageclient/locatorfilter.h b/src/plugins/languageclient/locatorfilter.h index 58da2ddf9c2..6ef079ec45f 100644 --- a/src/plugins/languageclient/locatorfilter.h +++ b/src/plugins/languageclient/locatorfilter.h @@ -97,6 +97,8 @@ signals: protected: explicit WorkspaceLocatorFilter(const QVector &filter); + void setMaxResultCount(qint64 limit) { m_maxResultCount = limit; } + private: void prepareSearch(const QString &entry, const QVector &clients, bool force); void handleResponse(Client *client, @@ -106,6 +108,7 @@ private: QMap m_pendingRequests; QVector m_results; QVector m_filterKinds; + qint64 m_maxResultCount = 0; }; class LANGUAGECLIENT_EXPORT WorkspaceClassLocatorFilter : public WorkspaceLocatorFilter From 84befc2ae1b2f2be0541c65629fb911d0be013b4 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 9 Jul 2021 13:30:27 +0200 Subject: [PATCH 20/40] QtSupport: Catch some setup errors coming via stdout Some setups pass error messages via stdout, fooling the detection logic into believing everything is fine. We roughly know what to expect from qmake -query, so we can at least filter out some cases. Change-Id: I799a0bc708d44e062c8ad298c0d8fc576328e5b5 Reviewed-by: Christian Stenger --- src/plugins/qtsupport/baseqtversion.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index b670482729a..6165d543033 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -1813,6 +1813,15 @@ bool BaseQtVersionPrivate::queryQMakeVariables(const FilePath &binary, const Env QByteArray output; output = runQmakeQuery(binary, env, error); + if (!output.startsWith('Q')) { // Is it always "QT_SYSROOT="? + // Some setups pass error messages via stdout, fooling the logic below. + // Example with docker/qemu/arm "OCI runtime exec failed: exec failed: container_linux.go:367: + // starting container process caused: exec: "/bin/qmake": stat /bin/qmake: no such file or directory" + // Since we have a rough idea on what the output looks like we can work around this. + *error = QString::fromUtf8(output); + return false; + } + if (output.isNull() && !error->isEmpty()) { // Note: Don't rerun if we were able to execute the binary before. From 3f4d45532dc0d2df4cc92eb937c56281e76f04a2 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 12 Jul 2021 14:19:23 +0200 Subject: [PATCH 21/40] ProjectExplorer: Introduce a QString Toolchain::detectionSource Would be useful to link auto-detected items to the source of their detection and later automatic removal when the source vanishes. This is bit more fine grained than the existing detection() and mimics what QtVersion, Debugger and CMake have. Change-Id: I2fae95e7e3c2e8191e9ff4cc7f36dc3fde86cf18 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/toolchain.cpp | 14 ++++++++++++++ src/plugins/projectexplorer/toolchain.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp index 98df39036a9..ab53717e80c 100644 --- a/src/plugins/projectexplorer/toolchain.cpp +++ b/src/plugins/projectexplorer/toolchain.cpp @@ -44,6 +44,7 @@ using namespace Utils; static const char ID_KEY[] = "ProjectExplorer.ToolChain.Id"; static const char DISPLAY_NAME_KEY[] = "ProjectExplorer.ToolChain.DisplayName"; static const char AUTODETECT_KEY[] = "ProjectExplorer.ToolChain.Autodetect"; +static const char DETECTION_SOURCE_KEY[] = "ProjectExplorer.ToolChain.DetectionSource"; static const char LANGUAGE_KEY_V1[] = "ProjectExplorer.ToolChain.Language"; // For QtCreator <= 4.2 static const char LANGUAGE_KEY_V2[] = "ProjectExplorer.ToolChain.LanguageV2"; // For QtCreator > 4.2 @@ -82,6 +83,7 @@ public: Utils::Id m_typeId; Utils::Id m_language; Detection m_detection = ToolChain::UninitializedDetection; + QString m_detectionSource; ToolChain::MacrosCache m_predefinedMacrosCache; ToolChain::HeaderPathsCache m_headerPathsCache; @@ -173,6 +175,11 @@ ToolChain::Detection ToolChain::detection() const return d->m_detection; } +QString ToolChain::detectionSource() const +{ + return d->m_detectionSource; +} + QByteArray ToolChain::id() const { return d->m_id; @@ -252,6 +259,7 @@ QVariantMap ToolChain::toMap() const result.insert(QLatin1String(ID_KEY), idToSave); result.insert(QLatin1String(DISPLAY_NAME_KEY), displayName()); result.insert(QLatin1String(AUTODETECT_KEY), isAutoDetected()); + result.insert(QLatin1String(DETECTION_SOURCE_KEY), d->m_detectionSource); // int oldLanguageId = -1; if (language() == ProjectExplorer::Constants::C_LANGUAGE_ID) @@ -282,6 +290,11 @@ void ToolChain::setDetection(ToolChain::Detection de) d->m_detection = de; } +void ToolChain::setDetectionSource(const QString &source) +{ + d->m_detectionSource = source; +} + QString ToolChain::typeDisplayName() const { return d->m_typeDisplayName; @@ -353,6 +366,7 @@ bool ToolChain::fromMap(const QVariantMap &data) const bool autoDetect = data.value(QLatin1String(AUTODETECT_KEY), false).toBool(); d->m_detection = autoDetect ? AutoDetection : ManualDetection; + d->m_detectionSource = data.value(DETECTION_SOURCE_KEY).toString(); if (data.contains(LANGUAGE_KEY_V2)) { // remove hack to trim language id in 4.4: This is to fix up broken language diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h index 2c2a3c68b72..b3ad1484c58 100644 --- a/src/plugins/projectexplorer/toolchain.h +++ b/src/plugins/projectexplorer/toolchain.h @@ -100,6 +100,7 @@ public: bool isAutoDetected() const; Detection detection() const; + QString detectionSource() const; QByteArray id() const; @@ -165,6 +166,7 @@ public: void setLanguage(Utils::Id language); void setDetection(Detection d); + void setDetectionSource(const QString &source); static Utils::LanguageVersion cxxLanguageVersion(const QByteArray &cplusplusMacroValue); static Utils::LanguageVersion languageVersion(const Utils::Id &language, const Macros ¯os); From bb77053e6d58d651d6321e1b53beec02ca81372d Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 9 Jul 2021 16:10:31 +0200 Subject: [PATCH 22/40] Docker: Add a hint on what to do with "Paths to mount" Change-Id: I992e73f78ff18ac5ed89ff5ce6fb6e7f98e1cb2c Reviewed-by: Christian Stenger --- src/plugins/docker/dockerdevice.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index d048f6e5167..c4487a23a34 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -352,6 +352,7 @@ public: m_pathsLineEdit->setToolTip(tr("Paths in this semi-colon separated list will be " "mapped one-to-one into the Docker container.")); m_pathsLineEdit->setText(data.mounts.join(';')); + m_pathsLineEdit->setPlaceholderText(tr("List project source directories here")); connect(m_pathsLineEdit, &QLineEdit::textChanged, this, [dockerDevice](const QString &text) { dockerDevice->setMounts(text.split(';', Qt::SkipEmptyParts)); From 1e19786312a6fcae16af0a3fd38c00d67d65ba09 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 6 Jul 2021 11:37:38 +0200 Subject: [PATCH 23/40] CMake: Simplify CMakeConfigItem::sortOperator A simple function is faster and less code. Change-Id: Ibea38936bb0866bb7a8f884d44551e2c4d1bf6a3 Reviewed-by: Christian Kandeler --- src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp | 6 +++--- src/plugins/cmakeprojectmanager/cmakeconfigitem.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp index 7e30f661fb2..3aa957bbe5b 100644 --- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp @@ -203,9 +203,9 @@ QString CMakeConfigItem::expandedValue(const Utils::MacroExpander *expander) con return expander ? expander->expand(QString::fromUtf8(value)) : QString::fromUtf8(value); } -std::function 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::itemsFromFile(const Utils::FilePath &cac } } - Utils::sort(result, CMakeConfigItem::sortOperator()); + Utils::sort(result, &CMakeConfigItem::less); return result; diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.h b/src/plugins/cmakeprojectmanager/cmakeconfigitem.h index 7da405a48d8..73d31983d32 100644 --- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.h +++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.h @@ -62,7 +62,7 @@ public: QString expandedValue(const ProjectExplorer::Kit *k) const; QString expandedValue(const Utils::MacroExpander *expander) const; - static std::function sortOperator(); + static bool less(const CMakeConfigItem &a, const CMakeConfigItem &b); static CMakeConfigItem fromString(const QString &s); static QList itemsFromArguments(const QStringList &list); static QList itemsFromFile(const Utils::FilePath &input, QString *errorMessage); From 425353aa16f8fc226ff8cc43b1a6e4ca56b08fc7 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 12 Jul 2021 13:09:22 +0200 Subject: [PATCH 24/40] ProjectExplorer: add find support to Issues pane Change-Id: I8eff2f4da68b1a135c213d2f6f477af70e8877bf Reviewed-by: Eike Ziller Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/taskwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp index eabe4c2e181..a69011df64d 100644 --- a/src/plugins/projectexplorer/taskwindow.cpp +++ b/src/plugins/projectexplorer/taskwindow.cpp @@ -32,9 +32,12 @@ #include "taskhub.h" #include "taskmodel.h" +#include + #include #include #include +#include #include #include @@ -312,6 +315,10 @@ TaskWindow::TaskWindow() : d(std::make_unique()) d->m_filter = new Internal::TaskFilterModel(d->m_model); d->m_listview = new Internal::TaskView; + auto agg = new Aggregation::Aggregate; + agg->add(d->m_listview); + agg->add(new Core::ItemViewFind(d->m_listview, TaskModel::Description)); + d->m_listview->setModel(d->m_filter); d->m_listview->setFrameStyle(QFrame::NoFrame); d->m_listview->setWindowTitle(displayName()); From 9cd97e940b8fb4eadd6d42eaee79835b34d1804b Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 13 Jul 2021 12:33:32 +0200 Subject: [PATCH 25/40] EditorManager: Update current editor prior to deleting other editors Otherwise it may happen that destructor of an editor being deleted may trigger a call to EditorManager::currentEditor() before reaching the editor's QObject destructor. In this case the pointer to the editor (EditorManagerPrivate::m_currentEditor) isn't cleared yet by Qt and it may return the pointer to partially destructed object. Change-Id: I4f44dce8d680008148a73eb2a8ac13477d0fb825 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/editormanager/editormanager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 5213756975a..ce178bb2fbd 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1751,9 +1751,6 @@ bool EditorManagerPrivate::closeEditors(const QList &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 &editors, CloseFla setCurrentEditor(currentView->currentEditor()); } + foreach (IEditor *editor, acceptedEditors) + delete editor; + if (!EditorManager::currentEditor()) { emit m_instance->currentEditorChanged(nullptr); updateActions(); From a71d725e46cf694867400be2bd079b699e62301a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 22 Jun 2021 00:11:58 +0200 Subject: [PATCH 26/40] Add workarounds for running under Rosetta on macOS When Qt Creator is built as an Intel binary, and runs on an Apple Silicon (ARM) Mac, it will be run via the Rosetta translation layer. This means any process spawned by QtC, including qmake, CMake, and lldb, will launch as x86_64 binaries as well. For qmake and CMake, this affects their default choice of build architecture, resulting in x86_64 builds of user applications. We want to produce native arm64 apps, even if Qt Creator itself isn't one, so we explicitly detect the situation, and if Qt has an arm64 slice, we default to arm64 builds. The logic of adding CONFIG+=x86_64 to the qmake step has been disabled, as the assumption that a single qmake run and build will produce only a single architecture does no longer hold. The corresponding logic in Qt was removed in 2015 (qtbase f58e95f098c8d78a5f2db7729606126fe093cbdf). In the case of lldb, running it as an x86_64 binary fails to attach to the running application. We work around this by using the 'arch' tool to explicitly launch it as an arm64 binary. This works for debugging both arm64 and x86_64 applications. Change-Id: I65cc0f600223990f25c76cef18d927895e551260 Reviewed-by: Eike Ziller --- src/libs/utils/hostosinfo.cpp | 15 +++ src/libs/utils/hostosinfo.h | 2 + .../cmakebuildconfiguration.cpp | 64 ++++++++---- .../cmakekitinformation.cpp | 1 + src/plugins/debugger/lldb/lldbengine.cpp | 6 +- src/plugins/qmakeprojectmanager/qmakestep.cpp | 99 +++++++++++-------- src/plugins/qmakeprojectmanager/qmakestep.h | 1 - src/plugins/qtsupport/baseqtversion.cpp | 14 +++ src/plugins/qtsupport/baseqtversion.h | 1 + 9 files changed, 140 insertions(+), 63 deletions(-) diff --git a/src/libs/utils/hostosinfo.cpp b/src/libs/utils/hostosinfo.cpp index c5f313d5ce7..78ed7f22867 100644 --- a/src/libs/utils/hostosinfo.cpp +++ b/src/libs/utils/hostosinfo.cpp @@ -35,6 +35,10 @@ #include #endif +#ifdef Q_OS_MACOS +#include +#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; diff --git a/src/libs/utils/hostosinfo.h b/src/libs/utils/hostosinfo.h index 541419e432e..db2d77074b4 100644 --- a/src/libs/utils/hostosinfo.h +++ b/src/libs/utils/hostosinfo.h @@ -73,6 +73,8 @@ public: #endif } + static bool isRunningUnderRosetta(); + static QString withExecutableSuffix(const QString &executable) { return OsSpecificAspects::withExecutableSuffix(hostOs(), executable); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index 8ac33da098f..142e2bf6b92 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -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(); addAspect(); @@ -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 " 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 " 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) + "}"); } } diff --git a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp index 925c240942c..e058e11b8c0 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp +++ b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 421f6f2c26b..7b05e6f9efa 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -216,7 +216,11 @@ void LldbEngine::setupEngine() if (QFileInfo(runParameters().debugger.workingDirectory).isDir()) m_lldbProc.setWorkingDirectory(runParameters().debugger.workingDirectory); - m_lldbProc.setCommand(CommandLine(lldbCmd)); + if (HostOsInfo::isRunningUnderRosetta()) + m_lldbProc.setCommand(CommandLine("/usr/bin/arch", {"-arm64", lldbCmd.toString()})); + else + m_lldbProc.setCommand(CommandLine(lldbCmd)); + m_lldbProc.start(); if (!m_lldbProc.waitForStarted()) { diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index d24f190de7d..ef2ab71b06e 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -51,6 +51,8 @@ #include #include +#include + #include #include #include @@ -609,6 +611,13 @@ void QMakeStep::separateDebugInfoChanged() askForRebuild(tr("Separate Debug Information")); } +static bool isIos(const Kit *k) +{ + const Id deviceType = DeviceTypeKitAspect::deviceTypeId(k); + return deviceType == Ios::Constants::IOS_DEVICE_TYPE + || deviceType == Ios::Constants::IOS_SIMULATOR_TYPE; +} + void QMakeStep::abisChanged() { m_selectedAbis.clear(); @@ -618,20 +627,42 @@ void QMakeStep::abisChanged() m_selectedAbis << item->text(); } - if (isAndroidKit()) { - const QString prefix = "ANDROID_ABIS="; - QStringList args = m_extraArgs; - for (auto it = args.begin(); it != args.end(); ++it) { - if (it->startsWith(prefix)) { - args.erase(it); - break; + if (BaseQtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit())) { + if (qtVersion->hasAbi(Abi::LinuxOS, Abi::AndroidLinuxFlavor)) { + const QString prefix = "ANDROID_ABIS="; + QStringList args = m_extraArgs; + for (auto it = args.begin(); it != args.end(); ++it) { + if (it->startsWith(prefix)) { + args.erase(it); + break; + } } - } - if (!m_selectedAbis.isEmpty()) - args << prefix + '"' + m_selectedAbis.join(' ') + '"'; - setExtraArguments(args); + if (!m_selectedAbis.isEmpty()) + args << prefix + '"' + m_selectedAbis.join(' ') + '"'; + setExtraArguments(args); - buildSystem()->setProperty(Android::Constants::ANDROID_ABIS, m_selectedAbis); + buildSystem()->setProperty(Android::Constants::ANDROID_ABIS, m_selectedAbis); + } else if (qtVersion->hasAbi(Abi::DarwinOS) && !isIos(target()->kit())) { + const QString prefix = "QMAKE_APPLE_DEVICE_ARCHS="; + QStringList args = m_extraArgs; + for (auto it = args.begin(); it != args.end(); ++it) { + if (it->startsWith(prefix)) { + args.erase(it); + break; + } + } + QStringList archs; + for (const QString &selectedAbi : qAsConst(m_selectedAbis)) { + const auto abi = Abi::abiFromTargetTriplet(selectedAbi); + if (abi.architecture() == Abi::X86Architecture) + archs << "x86_64"; + else if (abi.architecture() == Abi::ArmArchitecture) + archs << "arm64"; + } + if (!archs.isEmpty()) + args << prefix + '"' + archs.join(' ') + '"'; + setExtraArguments(args); + } } updateAbiWidgets(); @@ -668,18 +699,6 @@ void QMakeStep::askForRebuild(const QString &title) question->show(); } -bool QMakeStep::isAndroidKit() const -{ - BaseQtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit()); - if (!qtVersion) - return false; - - const Abis abis = qtVersion->qtAbis(); - return Utils::anyOf(abis, [](const Abi &abi) { - return abi.osFlavor() == Abi::OSFlavor::AndroidLinuxFlavor; - }); -} - void QMakeStep::updateAbiWidgets() { if (!abisLabel) @@ -698,15 +717,23 @@ void QMakeStep::updateAbiWidgets() abisListWidget->clear(); QStringList selectedAbis = m_selectedAbis; - if (selectedAbis.isEmpty() && isAndroidKit()) { - // Prefer ARM for Android, prefer 32bit. - for (const Abi &abi : abis) { - if (abi.param() == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A) - selectedAbis.append(abi.param()); - } - if (selectedAbis.isEmpty()) { + if (selectedAbis.isEmpty()) { + if (qtVersion->hasAbi(Abi::LinuxOS, Abi::AndroidLinuxFlavor)) { + // Prefer ARM for Android, prefer 32bit. for (const Abi &abi : abis) { - if (abi.param() == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A) + if (abi.param() == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A) + selectedAbis.append(abi.param()); + } + if (selectedAbis.isEmpty()) { + for (const Abi &abi : abis) { + if (abi.param() == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A) + selectedAbis.append(abi.param()); + } + } + } else if (qtVersion->hasAbi(Abi::DarwinOS) && !isIos(target()->kit()) && HostOsInfo::isRunningUnderRosetta()) { + // Automatically select arm64 when running under Rosetta + for (const Abi &abi : abis) { + if (abi.architecture() == Abi::ArmArchitecture) selectedAbis.append(abi.param()); } } @@ -788,14 +815,6 @@ QMakeStepConfig::OsType QMakeStepConfig::osTypeFor(const Abi &targetAbi, const B QStringList QMakeStepConfig::toArguments() const { QStringList arguments; - if (archConfig == X86) - arguments << "CONFIG+=x86"; - else if (archConfig == X86_64) - arguments << "CONFIG+=x86_64"; - else if (archConfig == PowerPC) - arguments << "CONFIG+=ppc"; - else if (archConfig == PowerPC64) - arguments << "CONFIG+=ppc64"; // TODO: make that depend on the actual Qt version that is used if (osType == IphoneSimulator) diff --git a/src/plugins/qmakeprojectmanager/qmakestep.h b/src/plugins/qmakeprojectmanager/qmakestep.h index b439108436d..aecaaef04bd 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.h +++ b/src/plugins/qmakeprojectmanager/qmakestep.h @@ -185,7 +185,6 @@ private: void updateAbiWidgets(); void updateEffectiveQMakeCall(); - bool isAndroidKit() const; Utils::CommandLine m_qmakeCommand; Utils::CommandLine m_makeCommand; diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 6165d543033..d209dfa304d 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -840,6 +840,20 @@ Abis BaseQtVersion::detectQtAbis() const return qtAbisFromLibrary(d->qtCorePaths()); } +bool BaseQtVersion::hasAbi(ProjectExplorer::Abi::OS os, ProjectExplorer::Abi::OSFlavor flavor) const +{ + const Abis abis = qtAbis(); + return Utils::anyOf(abis, [&](const Abi &abi) { + if (abi.os() != os) + return false; + + if (flavor == Abi::UnknownFlavor) + return true; + + return abi.osFlavor() == flavor; + }); +} + bool BaseQtVersion::equals(BaseQtVersion *other) { if (d->m_qmakeCommand != other->d->m_qmakeCommand) diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h index 9ea9af4b1d9..7c333b63fad 100644 --- a/src/plugins/qtsupport/baseqtversion.h +++ b/src/plugins/qtsupport/baseqtversion.h @@ -119,6 +119,7 @@ public: virtual QString toHtml(bool verbose) const; ProjectExplorer::Abis qtAbis() const; + bool hasAbi(ProjectExplorer::Abi::OS, ProjectExplorer::Abi::OSFlavor flavor = ProjectExplorer::Abi::UnknownFlavor) const; void applyProperties(QMakeGlobals *qmakeGlobals) const; virtual void addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const; From 0420caa3ceebd32221d15f1c81b44b3033ae4391 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 13 Jul 2021 10:37:54 +0200 Subject: [PATCH 27/40] TextEditorWidgetPrivate: Disconnect more signals in d'tor After the TextEditorWidgetPrivate's d'tor has finished, compiler starts destructing all the member fields of TextEditorWidgetPrivate before calling base QObject d'tor. Some d'tors of some members may still emit signals which are connected to TextEditorWidgetPrivate's slots. In this case we may start operating on corrupted internals. Fixes: QTCREATORBUG-26001 Change-Id: I865cad16601b278fe7f7cf95145557310bb83126 Reviewed-by: David Schulz --- src/plugins/texteditor/texteditor.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index b98a5783056..188abfe20ad 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -854,8 +854,16 @@ TextEditorWidgetPrivate::TextEditorWidgetPrivate(TextEditorWidget *parent) TextEditorWidgetPrivate::~TextEditorWidgetPrivate() { - QObject::disconnect(m_document.data(), &TextDocument::markRemoved, - this, &TextEditorWidgetPrivate::markRemoved); + QTextDocument *doc = m_document->document(); + QTC_CHECK(doc); + auto documentLayout = qobject_cast(doc->documentLayout()); + QTC_CHECK(documentLayout); + QTC_CHECK(m_document.data()); + documentLayout->disconnect(this); + documentLayout->disconnect(m_extraArea); + doc->disconnect(this); + m_document.data()->disconnect(this); + q->disconnect(documentLayout); q->disconnect(this); delete m_toolBarWidget; delete m_highlightScrollBarController; From 453f4996db44c80c8dfdf9a3f07781f381226efa Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Mon, 12 Jul 2021 10:38:13 +0200 Subject: [PATCH 28/40] use "qml" as QML runtime Since Qt 6.2 qmlscene is deprecated by Qt. This patch also removes QMLViewer as a last QtQuick 1 artifact in external tools. Task-number: QDS-639 Task-number: QDS-4535 Task-number: QTCREATORBUG-22385 Change-Id: I5f67040954f8ef438961f7166a53bd96d5b73f4d Reviewed-by: Thomas Hartmann --- .../src/howto/creator-external-tools.qdoc | 11 ++++------- .../overview/creator-only/creator-advanced.qdoc | 7 +++---- .../qtquick/qtquick-live-preview-desktop.qdoc | 2 +- .../src/qtdesignstudio-advanced.qdoc | 7 +++---- .../projects/qtquickuiprototype/wizard.json | 2 +- share/share.qbs | 3 +-- .../projectexplorer/devicesupport/idevice.cpp | 16 ++++++++-------- .../projectexplorer/devicesupport/idevice.h | 4 ++-- src/plugins/qmlprojectmanager/qmlproject.cpp | 6 +++--- .../qmlprojectrunconfiguration.cpp | 16 ++++++++-------- src/plugins/qtsupport/baseqtversion.cpp | 7 ++++++- src/plugins/qtsupport/qtversions.cpp | 2 +- src/share/qtcreator/data.pro | 3 +-- src/share/qtcreator/externaltools/CMakeLists.txt | 2 +- .../externaltools/{qmlviewer.xml => qml.xml} | 10 +++++----- tests/system/shared/qtcreator.py | 2 +- .../system/suite_debugger/tst_qml_locals/test.py | 2 +- .../suite_qtquick/tst_qtquick_creation3/test.py | 2 +- 18 files changed, 51 insertions(+), 53 deletions(-) rename src/share/qtcreator/externaltools/{qmlviewer.xml => qml.xml} (85%) diff --git a/doc/qtcreator/src/howto/creator-external-tools.qdoc b/doc/qtcreator/src/howto/creator-external-tools.qdoc index 74128bed458..a5707b0dc35 100644 --- a/doc/qtcreator/src/howto/creator-external-tools.qdoc +++ b/doc/qtcreator/src/howto/creator-external-tools.qdoc @@ -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 diff --git a/doc/qtcreator/src/overview/creator-only/creator-advanced.qdoc b/doc/qtcreator/src/overview/creator-only/creator-advanced.qdoc index 7da29cd5d77..d383b808cf0 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-advanced.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-advanced.qdoc @@ -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 diff --git a/doc/qtcreator/src/qtquick/qtquick-live-preview-desktop.qdoc b/doc/qtcreator/src/qtquick/qtquick-live-preview-desktop.qdoc index 42ebca507d4..a87e833683b 100644 --- a/doc/qtcreator/src/qtquick/qtquick-live-preview-desktop.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-live-preview-desktop.qdoc @@ -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. diff --git a/doc/qtdesignstudio/src/qtdesignstudio-advanced.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-advanced.qdoc index 9f7ef447a8f..1b6222340c3 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-advanced.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-advanced.qdoc @@ -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) diff --git a/share/qtcreator/templates/wizards/projects/qtquickuiprototype/wizard.json b/share/qtcreator/templates/wizards/projects/qtquickuiprototype/wizard.json index d5642f0a987..764998e6f80 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickuiprototype/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtquickuiprototype/wizard.json @@ -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", diff --git a/share/share.qbs b/share/share.qbs index 0e9fe5a5cf8..a2114dad2d2 100644 --- a/share/share.qbs +++ b/share/share.qbs @@ -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"); diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp index 51df879d9d8..280d1fdea11 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp @@ -126,7 +126,7 @@ const char TimeoutKey[] = "Timeout"; const char HostKeyCheckingKey[] = "HostKeyChecking"; const char DebugServerKey[] = "DebugServerKey"; -const char QmlsceneKey[] = "QmlsceneKey"; +const char QmlRuntimeKey[] = "QmlsceneKey"; using AuthType = QSsh::SshConnectionParameters::AuthenticationType; const AuthType DefaultAuthType = QSsh::SshConnectionParameters::AuthenticationTypeAll; @@ -153,7 +153,7 @@ public: QSsh::SshConnectionParameters sshParameters; Utils::PortList freePorts; QString debugServerPath; - QString qmlsceneCommand; + QString qmlRunCommand; bool emptyCommandAllowed = false; QList deviceIcons; @@ -596,7 +596,7 @@ void IDevice::fromMap(const QVariantMap &map) d->version = map.value(QLatin1String(VersionKey), 0).toInt(); d->debugServerPath = map.value(QLatin1String(DebugServerKey)).toString(); - d->qmlsceneCommand = map.value(QLatin1String(QmlsceneKey)).toString(); + d->qmlRunCommand = map.value(QLatin1String(QmlRuntimeKey)).toString(); d->extraData = map.value(ExtraDataKey).toMap(); } @@ -627,7 +627,7 @@ QVariantMap IDevice::toMap() const map.insert(QLatin1String(VersionKey), d->version); map.insert(QLatin1String(DebugServerKey), d->debugServerPath); - map.insert(QLatin1String(QmlsceneKey), d->qmlsceneCommand); + map.insert(QLatin1String(QmlRuntimeKey), d->qmlRunCommand); map.insert(ExtraDataKey, d->extraData); return map; @@ -710,14 +710,14 @@ void IDevice::setDebugServerPath(const QString &path) d->debugServerPath = path; } -QString IDevice::qmlsceneCommand() const +QString IDevice::qmlRunCommand() const { - return d->qmlsceneCommand; + return d->qmlRunCommand; } -void IDevice::setQmlsceneCommand(const QString &path) +void IDevice::setQmlRunCommand(const QString &path) { - d->qmlsceneCommand = path; + d->qmlRunCommand = path; } void IDevice::setExtraData(Utils::Id kind, const QVariant &data) diff --git a/src/plugins/projectexplorer/devicesupport/idevice.h b/src/plugins/projectexplorer/devicesupport/idevice.h index 4bb77e4b00c..ad8588f3ce3 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.h +++ b/src/plugins/projectexplorer/devicesupport/idevice.h @@ -214,8 +214,8 @@ public: QString debugServerPath() const; void setDebugServerPath(const QString &path); - QString qmlsceneCommand() const; - void setQmlsceneCommand(const QString &path); + QString qmlRunCommand() const; + void setQmlRunCommand(const QString &path); void setExtraData(Utils::Id kind, const QVariant &data); QVariant extraData(Utils::Id kind) const; diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index 77481cdbaea..6b9d6f56396 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -375,7 +375,7 @@ Tasks QmlProject::projectIssues(const Kit *k) const if (version->type() == QtSupport::Constants::DESKTOPQT) { if (version->qmlsceneCommand().isEmpty()) { result.append(createProjectTask(Task::TaskType::Error, - tr("Qt version has no qmlscene command."))); + tr("Qt version has no QML utility."))); } } else { // Non-desktop Qt on a desktop device? We don't support that. @@ -383,8 +383,8 @@ Tasks QmlProject::projectIssues(const Kit *k) const tr("Non-desktop Qt is used with a desktop device."))); } } else { - // If not a desktop device, don't check the Qt version for qmlscene. - // The device is responsible for providing it and we assume qmlscene can be found + // If not a desktop device, don't check the Qt version for qml runtime binary. + // The device is responsible for providing it and we assume qml runtime can be found // in $PATH if it's not explicitly given. } diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index 94e6237b1d7..c7722051ca4 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -141,7 +141,7 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id) r.workingDirectory = bs->targetDirectory().toString(); }); - setDisplayName(tr("QML Scene", "QMLRunConfiguration display name.")); + setDisplayName(tr("QML Utility", "QMLRunConfiguration display name.")); update(); } @@ -154,10 +154,10 @@ QString QmlProjectRunConfiguration::disabledReason() const if (DeviceTypeKitAspect::deviceTypeId(kit()) == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE && !viewer.exists()) { - return tr("No qmlscene found."); + return tr("No QML utility found."); } if (viewer.isEmpty()) - return tr("No qmlscene binary specified for target device."); + return tr("No QML utility specified for target device."); return RunConfiguration::disabledReason(); } @@ -169,7 +169,7 @@ FilePath QmlProjectRunConfiguration::qmlScenePath() const Kit *kit = target()->kit(); BaseQtVersion *version = QtKitAspect::qtVersion(kit); - if (!version) // No Qt version in Kit. Don't try to run qmlscene. + if (!version) // No Qt version in Kit. Don't try to run QML runtime. return {}; const Id deviceType = DeviceTypeKitAspect::deviceTypeId(kit); @@ -180,10 +180,10 @@ FilePath QmlProjectRunConfiguration::qmlScenePath() const } IDevice::ConstPtr dev = DeviceKitAspect::device(kit); - if (dev.isNull()) // No device set. We don't know where to run qmlscene. + if (dev.isNull()) // No device set. We don't know where a QML utility is. return {}; - const QString qmlscene = dev->qmlsceneCommand(); + const QString qmlscene = dev->qmlRunCommand(); // If not given explicitly by device, try to pick it from $PATH. return FilePath::fromString(qmlscene.isEmpty() ? QString("qmlscene") : qmlscene); } @@ -237,10 +237,10 @@ QString QmlProjectRunConfiguration::mainScript() const // QmlProjectRunConfigurationFactory QmlProjectRunConfigurationFactory::QmlProjectRunConfigurationFactory() - : FixedRunConfigurationFactory(QmlProjectRunConfiguration::tr("QML Scene"), false) + : FixedRunConfigurationFactory(QmlProjectRunConfiguration::tr("QML Runtime"), false) { registerRunConfiguration - ("QmlProjectManager.QmlRunConfiguration.QmlScene"); + ("QmlProjectManager.QmlRunConfiguration.Qml"); addSupportedProjectType(QmlProjectManager::Constants::QML_PROJECT_ID); } diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index d209dfa304d..03a10483d43 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -1041,7 +1041,12 @@ FilePath BaseQtVersion::qmlsceneCommand() const if (!d->m_qmlsceneCommand.isEmpty()) return d->m_qmlsceneCommand; - const FilePath path = binPath() / HostOsInfo::withExecutableSuffix("qmlscene"); + FilePath path = binPath(); + if (qtVersion() >= QtVersionNumber(6, 2, 0)) + path = path / HostOsInfo::withExecutableSuffix("qml"); + else + path = path / HostOsInfo::withExecutableSuffix("qmlscene"); + d->m_qmlsceneCommand = path.isExecutableFile() ? path : FilePath(); return d->m_qmlsceneCommand; diff --git a/src/plugins/qtsupport/qtversions.cpp b/src/plugins/qtsupport/qtversions.cpp index 1426a61c630..9e62bbfc485 100644 --- a/src/plugins/qtsupport/qtversions.cpp +++ b/src/plugins/qtsupport/qtversions.cpp @@ -63,7 +63,7 @@ QStringList DesktopQtVersion::warningReason() const QStringList ret = BaseQtVersion::warningReason(); if (qtVersion() >= QtVersionNumber(5, 0, 0)) { if (qmlsceneCommand().isEmpty()) - ret << QCoreApplication::translate("QtVersion", "No qmlscene installed."); + ret << QCoreApplication::translate("QtVersion", "No QML utility installed."); } return ret; } diff --git a/src/share/qtcreator/data.pro b/src/share/qtcreator/data.pro index fc96289f3a4..cd973905e97 100644 --- a/src/share/qtcreator/data.pro +++ b/src/share/qtcreator/data.pro @@ -9,8 +9,7 @@ STATIC_INSTALL_BASE = $$INSTALL_DATA_PATH STATIC_FILES = \ $$PWD/externaltools/lrelease.xml \ $$PWD/externaltools/lupdate.xml \ - $$PWD/externaltools/qmlviewer.xml \ - $$PWD/externaltools/qmlscene.xml + $$PWD/externaltools/qml.xml unix { osx:STATIC_FILES += $$PWD/externaltools/vi_mac.xml else:STATIC_FILES += $$PWD/externaltools/vi.xml diff --git a/src/share/qtcreator/externaltools/CMakeLists.txt b/src/share/qtcreator/externaltools/CMakeLists.txt index dcd107ef354..5059fdcb00f 100644 --- a/src/share/qtcreator/externaltools/CMakeLists.txt +++ b/src/share/qtcreator/externaltools/CMakeLists.txt @@ -1,6 +1,6 @@ set(EXT_TOOLS_DIR "${IDE_DATA_PATH}/externaltools") -set(tools lrelease.xml lupdate.xml qmlscene.xml qmlviewer.xml) +set(tools lrelease.xml lupdate.xml qmlscene.xml qml.xml) if (WIN32) list(APPEND tools notepad_win.xml) diff --git a/src/share/qtcreator/externaltools/qmlviewer.xml b/src/share/qtcreator/externaltools/qml.xml similarity index 85% rename from src/share/qtcreator/externaltools/qmlviewer.xml rename to src/share/qtcreator/externaltools/qml.xml index 32a362d6b84..cffaf93ed70 100644 --- a/src/share/qtcreator/externaltools/qmlviewer.xml +++ b/src/share/qtcreator/externaltools/qml.xml @@ -26,14 +26,14 @@ ****************************************************************************/ --> - - Runs the current QML file with qmlviewer - Qt Quick 1 Preview (qmlviewer) + + Runs the current QML file with QML utility. + QML utility Qt Quick 1 - %{CurrentDocument:Project:QT_INSTALL_BINS}/qmlviewer - qmlviewer + %{CurrentProject:QT_INSTALL_BINS}/qml + qml %{CurrentDocument:FilePath} %{CurrentDocument:Path} QT_LOGGING_TO_CONSOLE%3D1 diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index 0419a4c7589..40982c5ccca 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -102,7 +102,7 @@ def waitForCleanShutdown(timeOut=10): shutdownDone = (str(appCtxt)=="") if platform.system() in ('Windows','Microsoft'): # cleaning helper for running on the build machines - checkForStillRunningQmlExecutable(['qmlviewer.exe', 'qmlscene.exe']) + checkForStillRunningQmlExecutable(['qmlscene.exe', 'qml.exe']) endtime = datetime.utcnow() + timedelta(seconds=timeOut) while not shutdownDone: # following work-around because os.kill() works for win not until python 2.7 diff --git a/tests/system/suite_debugger/tst_qml_locals/test.py b/tests/system/suite_debugger/tst_qml_locals/test.py index 5f89fc8942f..f3da6dee80d 100644 --- a/tests/system/suite_debugger/tst_qml_locals/test.py +++ b/tests/system/suite_debugger/tst_qml_locals/test.py @@ -52,7 +52,7 @@ def main(): "Verifying Run and Debug are enabled (Qt5 is available).") and test.compare(target, Targets.getStringForTarget(Targets.getDefaultKit()), "Verifying selected Target is Qt5.") - and test.compare(exe, "QML Scene", "Verifying selected executable is QML Scene.")): + and test.compare(exe, "QML Utility", "Verifying selected executable is QML Utility.")): earlyExit("Something went wrong opening Qml project - probably missing Qt5.") return switchViewTo(ViewConstants.PROJECTS) diff --git a/tests/system/suite_qtquick/tst_qtquick_creation3/test.py b/tests/system/suite_qtquick/tst_qtquick_creation3/test.py index 1b2613cda83..766205ded70 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation3/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation3/test.py @@ -56,7 +56,7 @@ def main(): __closeSubprocessByPushingStop__(True) appOutput = logApplicationOutput() test.verify(_exactlyOne_(map(lambda ver: ver in appOutput, available)), - "Does Creator use qmlscene from a checked kit?") + "Does Qt Creator use QML binary from a checked kit?") test.verify(projectName + ".qml:" not in appOutput, "Does the Application Output indicate QML errors?") invokeMenuItem("File", "Close All Projects and Editors") From be025cbc5e505f4141548523731a70adda58f4f6 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 13 Jul 2021 10:57:55 +0200 Subject: [PATCH 29/40] LSP: mark MessageIds created from undefined json values invalid Change-Id: I5f134c7302e01eadb1d99d71e4317c1c5f334fd7 Reviewed-by: Christian Kandeler --- src/libs/languageserverprotocol/icontent.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libs/languageserverprotocol/icontent.h b/src/libs/languageserverprotocol/icontent.h index ea19b25a92d..a19d9cc48c3 100644 --- a/src/libs/languageserverprotocol/icontent.h +++ b/src/libs/languageserverprotocol/icontent.h @@ -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(*this) || Utils::holds_alternative(*this)); if (auto id = Utils::get_if(this)) return *id; if (auto id = Utils::get_if(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 From 55082986e11b3ef7ee57befd171448fbd65d5c8b Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Tue, 13 Jul 2021 18:36:25 +0200 Subject: [PATCH 30/40] QmlDesigner: Introduce blocked state for labels * Create blocked states for PropertyLabel, ControlLabel and MultiIconLabel * Rename and cleanup the MCU blocked state properties * Add missing MCU related control blocked states * Remove majorQtQuickVersion usage * Add context for the translator * Fix a nested SecondColumnLayout * Add missing property control in Column- and RowLayout * Remove comments from EditableListView Task-number: QDS-4692 Change-Id: Icb93fe153241f015ced54409a953a3318c7763ae Reviewed-by: Thomas Hartmann --- .../ImageEditorTemplate.template | 26 +++--- .../QtQuick/AdvancedSection.qml | 16 ++-- .../QtQuick/AnimatedImageSpecifics.qml | 4 +- .../QtQuick/BorderImageSpecifics.qml | 28 +++--- .../Controls/AbstractButtonSection.qml | 4 +- .../QtQuick/Controls/ButtonSection.qml | 3 +- .../QtQuick/Controls/ControlSection.qml | 5 ++ .../QtQuick/Controls/InsetSection.qml | 88 +++++++++---------- .../QtQuick/Controls/PageSpecifics.qml | 6 +- .../QtQuick/Controls/PaneSection.qml | 6 +- .../QtQuick/Controls/ProgressBarSpecifics.qml | 2 +- .../QtQuick/Controls/RoundButtonSpecifics.qml | 3 +- .../QtQuick/Controls/ScrollViewSpecifics.qml | 6 +- .../QtQuick/Controls/SliderSpecifics.qml | 5 ++ .../QtQuick/Controls/TabBarSpecifics.qml | 6 +- .../QtQuick/GeometrySection.qml | 45 ++++++++-- .../QtQuick/GridViewSpecifics.qml | 14 ++- .../QtQuick/LayerSection.qml | 20 ++++- .../QtQuick/LayoutProperties.qml | 30 +++++-- .../QtQuick/Layouts/ColumnLayoutSpecifics.qml | 18 ++++ .../QtQuick/Layouts/RowLayoutSpecifics.qml | 18 ++++ .../QtQuick/ListViewSpecifics.qml | 24 ++--- .../QtQuick/MouseAreaSpecifics.qml | 12 +-- .../QtQuick/RectangleSpecifics.qml | 2 +- .../QtQuick/RowSpecifics.qml | 2 +- .../HelperWidgets/CharacterSection.qml | 6 +- .../imports/HelperWidgets/ControlLabel.qml | 11 +++ .../HelperWidgets/EditableListView.qml | 24 +---- .../FlickableGeometrySection.qml | 29 +++--- .../HelperWidgets/FlickableSection.qml | 14 +-- .../HelperWidgets/FontExtrasSection.qml | 10 +-- .../imports/HelperWidgets/FontSection.qml | 23 +++-- .../imports/HelperWidgets/ImageSection.qml | 28 +++--- .../imports/HelperWidgets/MultiIconLabel.qml | 12 +++ .../imports/HelperWidgets/PaddingSection.qml | 16 ++-- .../imports/HelperWidgets/PropertyLabel.qml | 29 +++--- .../HelperWidgets/StandardTextSection.qml | 26 +++--- .../HelperWidgets/TextExtrasSection.qml | 22 ++--- .../imports/StudioTheme/Values.qml | 1 + 39 files changed, 405 insertions(+), 239 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/ImageEditorTemplate.template b/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/ImageEditorTemplate.template index d7f931566f2..2bd1a3dacb3 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/ImageEditorTemplate.template +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/ImageEditorTemplate.template @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml index cb9c5bce84d..260c2507cdf 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimatedImageSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimatedImageSpecifics.qml index f2b0c16b8c9..e564588a4e4 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimatedImageSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimatedImageSpecifics.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/BorderImageSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/BorderImageSpecifics.qml index 1a21114083b..e339bf9d058 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/BorderImageSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/BorderImageSpecifics.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/AbstractButtonSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/AbstractButtonSection.qml index c5b574e18e8..f5fd2282f01 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/AbstractButtonSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/AbstractButtonSection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ButtonSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ButtonSection.qml index 4d9ca7d0e7c..63ed1b4436c 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ButtonSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ButtonSection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ControlSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ControlSection.qml index 80faf2f39e2..681f2357b79 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ControlSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ControlSection.qml @@ -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 {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/InsetSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/InsetSection.qml index 9f2da824c79..17e35771fef 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/InsetSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/InsetSection.qml @@ -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 {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PageSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PageSpecifics.qml index fab978e0b0d..e3cac6ca29b 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PageSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PageSpecifics.qml @@ -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.") } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PaneSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PaneSection.qml index dff744b02bc..78dcd1a9b53 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PaneSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PaneSection.qml @@ -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.") } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ProgressBarSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ProgressBarSpecifics.qml index 104803b72f2..205df61e8bf 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ProgressBarSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ProgressBarSpecifics.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/RoundButtonSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/RoundButtonSpecifics.qml index 85ddd4fab50..b3d316321cc 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/RoundButtonSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/RoundButtonSpecifics.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ScrollViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ScrollViewSpecifics.qml index 5de17cb387b..ce01026c80e 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ScrollViewSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/ScrollViewSpecifics.qml @@ -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.") } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/SliderSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/SliderSpecifics.qml index 4bc16353bc5..f3ff89f91ec 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/SliderSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/SliderSpecifics.qml @@ -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 {} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/TabBarSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/TabBarSpecifics.qml index 4d465955066..ad67f2b0b8c 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/TabBarSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/TabBarSpecifics.qml @@ -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.") } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/GeometrySection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/GeometrySection.qml index 275640af7bf..02f8459330d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/GeometrySection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/GeometrySection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/GridViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/GridViewSpecifics.qml index 70a18787eb9..314005b384f 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/GridViewSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/GridViewSpecifics.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayerSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayerSection.qml index 063a2bbb309..df9b6f00a62 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayerSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayerSection.qml @@ -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 {} } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayoutProperties.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayoutProperties.qml index 3e5ddc6fb2f..e7a1dcf44f3 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayoutProperties.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayoutProperties.qml @@ -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 {} } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml index 1caca948bd4..e19db2ffaaf 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml @@ -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 {} + } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml index 1cedc5465a8..d77b36d95d2 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml @@ -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 {} + } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ListViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ListViewSpecifics.qml index d6540e72d3d..26729a547c4 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ListViewSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ListViewSpecifics.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/MouseAreaSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/MouseAreaSpecifics.qml index b3eb942d4fb..1bdadb90164 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/MouseAreaSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/MouseAreaSpecifics.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml index 29697376016..18ec2bfd33f 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml @@ -58,7 +58,7 @@ Column { PropertyLabel { text: qsTr("Border width") - disabledState: !backendValues.border_width.isAvailable + blockedByTemplate: !backendValues.border_width.isAvailable } SecondColumnLayout { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RowSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RowSpecifics.qml index 6e51b523b27..99adfbe0645 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RowSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RowSpecifics.qml @@ -57,7 +57,7 @@ Column { PropertyLabel { text: qsTr("Layout direction") - disabledState: !backendValues.layoutDirection.isAvailable + blockedByTemplate: !backendValues.layoutDirection.isAvailable } SecondColumnLayout { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/CharacterSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/CharacterSection.qml index d88d50fa1a8..1df4a373d1b 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/CharacterSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/CharacterSection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ControlLabel.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ControlLabel.qml index ed1dc2d8cf9..62af6420bd8 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ControlLabel.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ControlLabel.qml @@ -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 + } + } + ] } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/EditableListView.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/EditableListView.qml index 7f34034246a..e77779e1444 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/EditableListView.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/EditableListView.qml @@ -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 } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableGeometrySection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableGeometrySection.qml index e95d38d42f5..12698c83707 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableGeometrySection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableGeometrySection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableSection.qml index a2ccf7209a3..764917bce1d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableSection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontExtrasSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontExtrasSection.qml index 913c86952a9..9084df11ab7 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontExtrasSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontExtrasSection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml index 8e688b84866..83f9a7e9c3b 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ImageSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ImageSection.qml index f3fe8885497..1dffa44c082 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ImageSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ImageSection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/MultiIconLabel.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/MultiIconLabel.qml index ffc3d0daf45..3a985ae685a 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/MultiIconLabel.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/MultiIconLabel.qml @@ -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 + } + } + ] } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PaddingSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PaddingSection.qml index d44c5a51799..379a1b99937 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PaddingSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PaddingSection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertyLabel.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertyLabel.qml index 723b06a58b3..5f44cf667e4 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertyLabel.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertyLabel.qml @@ -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 } } ] diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml index c739382f199..1d001ec15f5 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/TextExtrasSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/TextExtrasSection.qml index ce10809261d..234fea36f8a 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/TextExtrasSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/TextExtrasSection.qml @@ -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 { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml index c3e91a6584c..38034918fb5 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml @@ -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) From e8521e6fe11f59d0fc816d8b7fa6780dc6469af6 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 14 Jul 2021 07:41:23 +0200 Subject: [PATCH 31/40] Utils: Add/fix FilePath::isFile and FilePath::isDir In general, the more specific isReadableFile etc are preferred, but for porting a 1:1 match to QFileInfo functionality is helpful. Change-Id: I5b575ca9a5053f13f63c0fbe0e3dcc222494280f Reviewed-by: David Schulz --- src/libs/utils/fileutils.cpp | 26 +++++++++++---- src/libs/utils/fileutils.h | 5 ++- src/plugins/docker/dockerdevice.cpp | 32 +++++++++++++++++++ src/plugins/docker/dockerdevice.h | 2 ++ .../devicesupport/desktopdevice.cpp | 12 +++++++ .../devicesupport/desktopdevice.h | 2 ++ .../devicesupport/devicemanager.cpp | 12 +++++++ .../projectexplorer/devicesupport/idevice.cpp | 14 ++++++++ .../projectexplorer/devicesupport/idevice.h | 2 ++ 9 files changed, 100 insertions(+), 7 deletions(-) diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp index 95e935272c3..ca397b0c0d4 100644 --- a/src/libs/utils/fileutils.cpp +++ b/src/libs/utils/fileutils.cpp @@ -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 "../" diff --git a/src/libs/utils/fileutils.h b/src/libs/utils/fileutils.h index 20219dec280..3939b5e243b 100644 --- a/src/libs/utils/fileutils.h +++ b/src/libs/utils/fileutils.h @@ -77,6 +77,8 @@ public: std::function isReadableDir; std::function isWritableDir; std::function isWritableFile; + std::function isFile; + std::function isDir; std::function ensureWritableDir; std::function ensureExistingFile; std::function 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 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; diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index c4487a23a34..5c3e97e2a31 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -925,6 +925,38 @@ bool DockerDevice::isWritableDirectory(const FilePath &filePath) const return exitCode == 0; } +bool DockerDevice::isFile(const FilePath &filePath) const +{ + QTC_ASSERT(handlesFile(filePath), return false); + tryCreateLocalFileAccess(); + if (hasLocalFileAccess()) { + const FilePath localAccess = mapToLocalAccess(filePath); + const bool res = localAccess.isFile(); + LOG("IsFile? " << filePath.toUserOutput() << localAccess.toUserOutput() << res); + return res; + } + const QString path = filePath.path(); + const CommandLine cmd("test", {"-f", path}); + const int exitCode = d->runSynchronously(cmd); + return exitCode == 0; +} + +bool DockerDevice::isDirectory(const FilePath &filePath) const +{ + QTC_ASSERT(handlesFile(filePath), return false); + tryCreateLocalFileAccess(); + if (hasLocalFileAccess()) { + const FilePath localAccess = mapToLocalAccess(filePath); + const bool res = localAccess.isDir(); + LOG("IsDirectory? " << filePath.toUserOutput() << localAccess.toUserOutput() << res); + return res; + } + const QString path = filePath.path(); + const CommandLine cmd("test", {"-d", path}); + const int exitCode = d->runSynchronously(cmd); + return exitCode == 0; +} + bool DockerDevice::createDirectory(const FilePath &filePath) const { QTC_ASSERT(handlesFile(filePath), return false); diff --git a/src/plugins/docker/dockerdevice.h b/src/plugins/docker/dockerdevice.h index a0f504fd07e..35ba3f1c87f 100644 --- a/src/plugins/docker/dockerdevice.h +++ b/src/plugins/docker/dockerdevice.h @@ -81,6 +81,8 @@ public: bool isWritableFile(const Utils::FilePath &filePath) const override; bool isReadableDirectory(const Utils::FilePath &filePath) const override; bool isWritableDirectory(const Utils::FilePath &filePath) const override; + bool isFile(const Utils::FilePath &filePath) const override; + bool isDirectory(const Utils::FilePath &filePath) const override; bool createDirectory(const Utils::FilePath &filePath) const override; bool exists(const Utils::FilePath &filePath) const override; bool ensureExistingFile(const Utils::FilePath &filePath) const override; diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp b/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp index bb95f5100ba..bccc42db8af 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp @@ -225,6 +225,18 @@ bool DesktopDevice::isWritableDirectory(const FilePath &filePath) const return filePath.isWritableDir(); } +bool DesktopDevice::isFile(const FilePath &filePath) const +{ + QTC_ASSERT(handlesFile(filePath), return false); + return filePath.isFile(); +} + +bool DesktopDevice::isDirectory(const FilePath &filePath) const +{ + QTC_ASSERT(handlesFile(filePath), return false); + return filePath.isDir(); +} + bool DesktopDevice::createDirectory(const FilePath &filePath) const { QTC_ASSERT(handlesFile(filePath), return false); diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevice.h b/src/plugins/projectexplorer/devicesupport/desktopdevice.h index 39bc8176640..e8a41339c82 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevice.h +++ b/src/plugins/projectexplorer/devicesupport/desktopdevice.h @@ -66,6 +66,8 @@ public: bool isWritableFile(const Utils::FilePath &filePath) const override; bool isReadableDirectory(const Utils::FilePath &filePath) const override; bool isWritableDirectory(const Utils::FilePath &filePath) const override; + bool isFile(const Utils::FilePath &filePath) const override; + bool isDirectory(const Utils::FilePath &filePath) const override; bool ensureExistingFile(const Utils::FilePath &filePath) const override; bool createDirectory(const Utils::FilePath &filePath) const override; bool exists(const Utils::FilePath &filePath) const override; diff --git a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp index 85bb517f90e..41ca11cd90e 100644 --- a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp +++ b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp @@ -410,6 +410,18 @@ DeviceManager::DeviceManager(bool isInstance) : d(std::make_uniqueisWritableFile(filePath); }; + deviceHooks.isFile = [](const FilePath &filePath) { + auto device = DeviceManager::deviceForPath(filePath); + QTC_ASSERT(device, return false); + return device->isFile(filePath); + }; + + deviceHooks.isDir = [](const FilePath &filePath) { + auto device = DeviceManager::deviceForPath(filePath); + QTC_ASSERT(device, return false); + return device->isDirectory(filePath); + }; + deviceHooks.ensureWritableDir = [](const FilePath &filePath) { auto device = DeviceManager::deviceForPath(filePath); QTC_ASSERT(device, return false); diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp index 280d1fdea11..6999d714ca3 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp @@ -253,6 +253,20 @@ bool IDevice::isWritableDirectory(const FilePath &filePath) const return false; } +bool IDevice::isFile(const FilePath &filePath) const +{ + Q_UNUSED(filePath); + QTC_CHECK(false); + return false; +} + +bool IDevice::isDirectory(const FilePath &filePath) const +{ + Q_UNUSED(filePath); + QTC_CHECK(false); + return false; +} + bool IDevice::ensureWritableDirectory(const FilePath &filePath) const { if (isWritableDirectory(filePath)) diff --git a/src/plugins/projectexplorer/devicesupport/idevice.h b/src/plugins/projectexplorer/devicesupport/idevice.h index ad8588f3ce3..b6c75e07cb9 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.h +++ b/src/plugins/projectexplorer/devicesupport/idevice.h @@ -241,6 +241,8 @@ public: virtual bool isWritableFile(const Utils::FilePath &filePath) const; virtual bool isReadableDirectory(const Utils::FilePath &filePath) const; virtual bool isWritableDirectory(const Utils::FilePath &filePath) const; + virtual bool isFile(const Utils::FilePath &filePath) const; + virtual bool isDirectory(const Utils::FilePath &filePath) const; virtual bool ensureWritableDirectory(const Utils::FilePath &filePath) const; virtual bool ensureExistingFile(const Utils::FilePath &filePath) const; virtual bool createDirectory(const Utils::FilePath &filePath) const; From 076d1bf10a31177666a9576da71727657fecf493 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 9 Jul 2021 17:39:50 +0200 Subject: [PATCH 32/40] Docker: Fix debugger auto-detection Mark detected debuggers as such and give them some bonus to match, overriding other hacks. Change-Id: Iaf4d88fa22dd50e68124b61087d4c742f7a56d0f Reviewed-by: Christian Stenger --- src/plugins/debugger/debuggeritem.cpp | 10 ++++++--- src/plugins/debugger/debuggeritem.h | 4 ++++ src/plugins/debugger/debuggeritemmanager.cpp | 22 +++++++++++-------- src/plugins/debugger/debuggeritemmanager.h | 3 ++- .../debugger/debuggerkitinformation.cpp | 3 +++ src/plugins/debugger/debuggerplugin.cpp | 5 +++-- src/plugins/debugger/debuggerplugin.h | 2 +- src/plugins/docker/dockerdevice.cpp | 3 ++- 8 files changed, 35 insertions(+), 17 deletions(-) diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index 588445daad2..1fceaa59940 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -57,7 +57,8 @@ 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"; @@ -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(NoEngineType)).toInt()); @@ -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 = getConfigurationOfGdbCommand(m_command, sysEnv); + const QString gdbTargetAbiString = extractGdbTargetAbiStringFromGdbOutput(gdbConfiguration); if (!gdbTargetAbiString.isEmpty()) { m_abis.append(Abi::abiFromTargetTriplet(gdbTargetAbiString)); @@ -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); diff --git a/src/plugins/debugger/debuggeritem.h b/src/plugins/debugger/debuggeritem.h index fb1760f8f1f..5ae9c9a9f23 100644 --- a/src/plugins/debugger/debuggeritem.h +++ b/src/plugins/debugger/debuggeritem.h @@ -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; diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index 222e6e2a192..33a04cf7c41 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -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 diff --git a/src/plugins/debugger/debuggeritemmanager.h b/src/plugins/debugger/debuggeritemmanager.h index 1278da2b672..221ecf72bdb 100644 --- a/src/plugins/debugger/debuggeritemmanager.h +++ b/src/plugins/debugger/debuggeritemmanager.h @@ -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); diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index 90ea0ac89e4..12a085f905d 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -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) { diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 5fc046f8a96..e9a6c2d22ba 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -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() diff --git a/src/plugins/debugger/debuggerplugin.h b/src/plugins/debugger/debuggerplugin.h index 1d22225dc2c..8ef79ed48fd 100644 --- a/src/plugins/debugger/debuggerplugin.h +++ b/src/plugins/debugger/debuggerplugin.h @@ -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 createTestObjects() const override; }; diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index 5c3e97e2a31..91f359d9a76 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -570,7 +570,8 @@ void KitDetectorPrivate::autoDetectDebugger() const FilePath deviceRoot = m_device->mapToGlobalPath({}); const bool res = QMetaObject::invokeMethod(debuggerPlugin, "autoDetectDebuggersForDevice", - Q_ARG(Utils::FilePath, deviceRoot)); + Q_ARG(Utils::FilePath, deviceRoot), + Q_ARG(QString, m_sharedId)); QTC_CHECK(res); } From 1e20d4a4eed8fceaa21bb0a82c6b6a53775cf5e5 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Wed, 14 Jul 2021 11:38:54 +0300 Subject: [PATCH 33/40] Android: Add Android 12 to SDK Manager parsing Allow SDK Manager to parse packages from android-s as Android 12 properly. Pick-to: 4.15 Change-Id: I3feae845e5b8d98fe1a70988cf6e2ac1d9a5c16a Reviewed-by: Alessandro Portale --- src/plugins/android/androidmanager.cpp | 2 ++ src/plugins/android/androidsdkmanager.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index e82a7109ad6..53bc79cd1f7 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -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); } diff --git a/src/plugins/android/androidsdkmanager.cpp b/src/plugins/android/androidsdkmanager.cpp index c62dcbd2c85..18bed57f2d4 100644 --- a/src/plugins/android/androidsdkmanager.cpp +++ b/src/plugins/android/androidsdkmanager.cpp @@ -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; From 9c7b4f0a89bedca67d7dfe2bfe0a427c7f350a4f Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 13 Jul 2021 11:00:14 +0200 Subject: [PATCH 34/40] LanguageClient: improve the performance of the inspector ... by caching frequently accessed data of the massages. Change-Id: I0a0a70c404cbc2fd8d26340004a45aa364843055 Reviewed-by: Christian Kandeler --- src/plugins/languageclient/lspinspector.cpp | 116 +++++++++++--------- src/plugins/languageclient/lspinspector.h | 17 ++- 2 files changed, 83 insertions(+), 50 deletions(-) diff --git a/src/plugins/languageclient/lspinspector.cpp b/src/plugins/languageclient/lspinspector.cpp index bb2784ed220..ef112c1c5ec 100644 --- a/src/plugins/languageclient/lspinspector.cpp +++ b/src/plugins/languageclient/lspinspector.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -111,7 +112,7 @@ class MessageDetailWidget : public QGroupBox public: MessageDetailWidget(); - void setMessage(const BaseMessage &message); + void setMessage(const LspLogMessage &message); void clear(); private: @@ -206,24 +207,13 @@ public: private: void currentMessageChanged(const QModelIndex &index); - void selectMatchingMessage(LspLogMessage::MessageSender sender, const QJsonValue &id); + void selectMatchingMessage(const LspLogMessage &message); }; static QVariant messageData(const LspLogMessage &message, int, int role) { - if (role == Qt::DisplayRole) { - QString result = message.time.toString("hh:mm:ss.zzz") + '\n'; - if (message.message.mimeType == JsonRpcMessageHandler::jsonRpcMimeType()) { - QString error; - auto json = JsonRpcMessageHandler::toJsonObject(message.message.content, - message.message.codec, - error); - result += json.value(QString{methodKey}).toString(json.value(QString{idKey}).toString()); - } else { - result += message.message.codec->toUnicode(message.message.content); - } - return result; - } + if (role == Qt::DisplayRole) + return message.displayText(); if (role == Qt::TextAlignmentRole) return message.sender == LspLogMessage::ClientMessage ? Qt::AlignLeft : Qt::AlignRight; return {}; @@ -266,42 +256,33 @@ void LspLogWidget::currentMessageChanged(const QModelIndex &index) m_messages->clearSelection(); if (!index.isValid()) return; - LspLogMessage selectedMessage = m_model.itemAt(index.row())->itemData; - BaseMessage message = selectedMessage.message; - if (selectedMessage.sender == LspLogMessage::ClientMessage) + LspLogMessage message = m_model.itemAt(index.row())->itemData; + if (message.sender == LspLogMessage::ClientMessage) m_clientDetails->setMessage(message); else m_serverDetails->setMessage(message); - if (message.mimeType == JsonRpcMessageHandler::jsonRpcMimeType()) { - QString error; - QJsonValue id = JsonRpcMessageHandler::toJsonObject(message.content, message.codec, error) - .value(idKey); - if (!id.isUndefined()) { - selectMatchingMessage(selectedMessage.sender == LspLogMessage::ClientMessage - ? LspLogMessage::ServerMessage - : LspLogMessage::ClientMessage, - id); - } - } + selectMatchingMessage(message); } static bool matches(LspLogMessage::MessageSender sender, - const QJsonValue &id, + const MessageId &id, const LspLogMessage &message) { if (message.sender != sender) return false; if (message.message.mimeType != JsonRpcMessageHandler::jsonRpcMimeType()) return false; - QString error; - auto json = JsonRpcMessageHandler::toJsonObject(message.message.content, - message.message.codec, - error); - return json.value(QString{idKey}) == id; + return message.id() == id; } -void LspLogWidget::selectMatchingMessage(LspLogMessage::MessageSender sender, const QJsonValue &id) +void LspLogWidget::selectMatchingMessage(const LspLogMessage &message) { + MessageId id = message.id(); + if (!id.isValid()) + return; + LspLogMessage::MessageSender sender = message.sender == LspLogMessage::ServerMessage + ? LspLogMessage::ClientMessage + : LspLogMessage::ServerMessage; LspLogMessage *matchingMessage = m_model.findData( [&](const LspLogMessage &message) { return matches(sender, id, message); }); if (!matchingMessage) @@ -311,9 +292,9 @@ void LspLogWidget::selectMatchingMessage(LspLogMessage::MessageSender sender, co m_messages->selectionModel()->select(index, QItemSelectionModel::Select); if (matchingMessage->sender == LspLogMessage::ServerMessage) - m_serverDetails->setMessage(matchingMessage->message); + m_serverDetails->setMessage(*matchingMessage); else - m_clientDetails->setMessage(matchingMessage->message); + m_clientDetails->setMessage(*matchingMessage); } void LspLogWidget::addMessage(const LspLogMessage &message) @@ -508,23 +489,18 @@ MessageDetailWidget::MessageDetailWidget() layout->addRow("MIME Type:", m_mimeType); } -void MessageDetailWidget::setMessage(const BaseMessage &message) +void MessageDetailWidget::setMessage(const LspLogMessage &message) { - m_contentLength->setText(QString::number(message.contentLength)); - m_mimeType->setText(QString::fromLatin1(message.mimeType)); + m_contentLength->setText(QString::number(message.message.contentLength)); + m_mimeType->setText(QString::fromLatin1(message.message.mimeType)); QWidget *newContentWidget = nullptr; - if (message.mimeType == JsonRpcMessageHandler::jsonRpcMimeType()) { - QString error; - auto json = JsonRpcMessageHandler::toJsonObject(message.content, message.codec, error); - if (json.isEmpty()) - newContentWidget = new QLabel(error); - else - newContentWidget = createJsonTreeView("content", json); + if (message.message.mimeType == JsonRpcMessageHandler::jsonRpcMimeType()) { + newContentWidget = createJsonTreeView("content", message.json()); } else { auto edit = new QPlainTextEdit(); edit->setReadOnly(true); - edit->setPlainText(message.codec->toUnicode(message.content)); + edit->setPlainText(message.message.codec->toUnicode(message.message.content)); newContentWidget = edit; } auto formLayout = static_cast(layout()); @@ -542,4 +518,46 @@ void MessageDetailWidget::clear() formLayout->removeRow(2); } +LspLogMessage::LspLogMessage() = default; + +LspLogMessage::LspLogMessage(MessageSender sender, + const QTime &time, + const LanguageServerProtocol::BaseMessage &message) + : sender(sender) + , time(time) + , message(message) +{} + +MessageId LspLogMessage::id() const +{ + if (!m_id.has_value()) + m_id = MessageId(json().value(idKey)); + return *m_id; +} + +QString LspLogMessage::displayText() const +{ + if (!m_displayText.has_value()) { + m_displayText = time.toString("hh:mm:ss.zzz") + '\n'; + if (message.mimeType == JsonRpcMessageHandler::jsonRpcMimeType()) + m_displayText->append(json().value(QString{methodKey}).toString(id().toString())); + else + m_displayText->append(message.codec->toUnicode(message.content)); + } + return *m_displayText; +} + +QJsonObject &LspLogMessage::json() const +{ + if (!m_json.has_value()) { + if (message.mimeType == JsonRpcMessageHandler::jsonRpcMimeType()) { + QString error; + m_json = JsonRpcMessageHandler::toJsonObject(message.content, message.codec, error); + } else { + m_json = QJsonObject(); + } + } + return *m_json; +} + } // namespace LanguageClient diff --git a/src/plugins/languageclient/lspinspector.h b/src/plugins/languageclient/lspinspector.h index aa4f6702719..45ad8d206b0 100644 --- a/src/plugins/languageclient/lspinspector.h +++ b/src/plugins/languageclient/lspinspector.h @@ -37,11 +37,26 @@ namespace LanguageClient { -struct LspLogMessage +class LspLogMessage { +public: enum MessageSender { ClientMessage, ServerMessage } sender; + + LspLogMessage(); + LspLogMessage(MessageSender sender, + const QTime &time, + const LanguageServerProtocol::BaseMessage &message); QTime time; LanguageServerProtocol::BaseMessage message; + + LanguageServerProtocol::MessageId id() const; + QString displayText() const; + QJsonObject &json() const; + +private: + mutable Utils::optional m_id; + mutable Utils::optional m_displayText; + mutable Utils::optional m_json; }; struct Capabilities From 7b7fb9f6c78f969578abebb816e9160cb0d8d92b Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 14 Jul 2021 08:38:42 +0200 Subject: [PATCH 35/40] Debugger: Code cosmetics Namespaces, names, ... Change-Id: Id0b65585b8849e8bb47d63f6eba1c23b9db1a2c2 Reviewed-by: David Schulz --- src/plugins/debugger/debuggeritem.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index 1fceaa59940..5b83add671f 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -53,6 +53,8 @@ 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"; @@ -67,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; @@ -94,8 +96,6 @@ static QString extractGdbTargetAbiStringFromGdbOutput(const QString &gdbOutput) } -namespace Debugger { - // -------------------------------------------------------------------------- // DebuggerItem // -------------------------------------------------------------------------- @@ -151,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 @@ -212,7 +212,7 @@ void DebuggerItem::reinitializeFromFile(const Utils::Environment &sysEnv) const bool unableToFindAVersion = (0 == version); const bool gdbSupportsConfigurationFlag = (version >= 70700); if (gdbSupportsConfigurationFlag || unableToFindAVersion) { - const QString gdbConfiguration = getConfigurationOfGdbCommand(m_command, sysEnv); + const QString gdbConfiguration = getGdbConfiguration(m_command, sysEnv); const QString gdbTargetAbiString = extractGdbTargetAbiStringFromGdbOutput(gdbConfiguration); if (!gdbTargetAbiString.isEmpty()) { @@ -300,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(); } From f922d22ad4fd1c26921fab99a4226b2e8312bc96 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 8 Jul 2021 13:23:44 +0200 Subject: [PATCH 36/40] AutoTest: Fix constructing of source file path Changes in Utils::FilePath need some adjustments to fix the expected behavior. Fixes: QTCREATORBUG-25979 Change-Id: Ife35a68458db9ae7c08637687a3fc9acd7d058e9 Reviewed-by: David Schulz --- src/plugins/autotest/gtest/gtestoutputreader.cpp | 4 ++-- src/plugins/autotest/testoutputreader.cpp | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/plugins/autotest/gtest/gtestoutputreader.cpp b/src/plugins/autotest/gtest/gtestoutputreader.cpp index 8dfa0c0ef41..997e7d2ddc2 100644 --- a/src/plugins/autotest/gtest/gtestoutputreader.cpp +++ b/src/plugins/autotest/gtest/gtestoutputreader.cpp @@ -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; } diff --git a/src/plugins/autotest/testoutputreader.cpp b/src/plugins/autotest/testoutputreader.cpp index 403f086de5f..ada972d094a 100644 --- a/src/plugins/autotest/testoutputreader.cpp +++ b/src/plugins/autotest/testoutputreader.cpp @@ -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 &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()); } } From a4c05f585ffa6dd92cb1e9e1da9db6a45fb4f8e9 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 12 Jul 2021 14:23:06 +0200 Subject: [PATCH 37/40] Docker: Move some cmake detection logic to cmake plugin This make the code better re-usable from other places that wish to put a cmake version into a new kit. Change-Id: I1ef7770a7f8efa36e88b2f3862b011fecd38de98 Reviewed-by: Christian Stenger --- .../cmakeprojectmanager/cmaketoolmanager.cpp | 22 +++++++++++++++++++ .../cmakeprojectmanager/cmaketoolmanager.h | 8 ++++++- src/plugins/docker/dockerdevice.cpp | 20 +++++++---------- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp b/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp index 42beff4b932..348b1de7627 100644 --- a/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp @@ -32,6 +32,7 @@ #include #include +#include #include #include @@ -64,6 +65,8 @@ CMakeToolManager::CMakeToolManager() QTC_ASSERT(!m_instance, return); m_instance = this; + qRegisterMetaType(); + 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()); diff --git a/src/plugins/cmakeprojectmanager/cmaketoolmanager.h b/src/plugins/cmakeprojectmanager/cmaketoolmanager.h index 2f71ddf34c4..9497192873d 100644 --- a/src/plugins/cmakeprojectmanager/cmaketoolmanager.h +++ b/src/plugins/cmakeprojectmanager/cmaketoolmanager.h @@ -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 *) diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index 91f359d9a76..00353cd96c7 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -545,19 +545,15 @@ void KitDetectorPrivate::autoDetectCMake() return; emit q->logOutput('\n' + tr("Searching CMake binary...")); + const FilePath deviceRoot = m_device->mapToGlobalPath({}); QString error; - const QStringList candidates = {"cmake"}; - for (const QString &candidate : candidates) { - const FilePath cmake = m_device->searchExecutableInPath(candidate); - if (!cmake.isEmpty()) { - emit q->logOutput(tr("Found CMake binary: %1").arg(cmake.toUserOutput())); - const bool res = QMetaObject::invokeMethod(cmakeManager, - "registerCMakeByPath", - Q_ARG(Utils::FilePath, cmake), - Q_ARG(QString, m_sharedId)); - QTC_CHECK(res); - } - } + const bool res = QMetaObject::invokeMethod(cmakeManager, + "autoDetectCMakeForDevice", + Q_ARG(Utils::FilePath, deviceRoot), + Q_ARG(QString, m_sharedId), + Q_ARG(QString *, &error)); + QTC_CHECK(res); + emit q->logOutput(error); } void KitDetectorPrivate::autoDetectDebugger() From 22121885feb7c686eb640362025ce97e5fb1af08 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Tue, 13 Jul 2021 09:41:26 +0200 Subject: [PATCH 38/40] baseqtversion: commands are FilePathes also renamed the qmlscene* qmlRuntime* Change-Id: Ifd522e21f5ce30aaa54060fdcebee2cd8b9463c4 Reviewed-by: hjk Reviewed-by: Tim Jenssen --- .../cmakekitinformation.cpp | 2 +- src/plugins/docker/dockerdevice.cpp | 2 +- .../qbsprojectmanager/qbsprofilemanager.cpp | 2 +- .../qmakeprojectmanager/externaleditors.cpp | 4 +- .../qmakebuildconfiguration.cpp | 4 +- .../qmakeprojectmanager/qmakeproject.cpp | 2 +- src/plugins/qmakeprojectmanager/qmakestep.cpp | 6 +- .../designercore/instances/puppetcreator.cpp | 2 +- src/plugins/qmldesigner/generateresource.cpp | 4 +- src/plugins/qmljstools/qmljsmodelmanager.cpp | 2 +- src/plugins/qmlprojectmanager/qmlproject.cpp | 2 +- .../qmlprojectrunconfiguration.cpp | 14 +-- src/plugins/qtsupport/baseqtversion.cpp | 94 +++++++++---------- src/plugins/qtsupport/baseqtversion.h | 16 ++-- src/plugins/qtsupport/qscxmlcgenerator.cpp | 2 +- src/plugins/qtsupport/qtkitinformation.cpp | 2 +- src/plugins/qtsupport/qtoptionspage.cpp | 10 +- src/plugins/qtsupport/qtprojectimporter.cpp | 2 +- src/plugins/qtsupport/qtversionmanager.cpp | 8 +- src/plugins/qtsupport/qtversions.cpp | 2 +- src/plugins/qtsupport/uicgenerator.cpp | 2 +- 21 files changed, 92 insertions(+), 92 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp index e058e11b8c0..1a279e93adc 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp +++ b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp @@ -1095,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.")); diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index 00353cd96c7..67333f75229 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -510,7 +510,7 @@ QList KitDetectorPrivate::autoDetectQtVersions() const continue; qtVersions.append(qtVersion); QtVersionManager::addVersion(qtVersion); - emit q->logOutput(tr("Found Qt: %1").arg(qtVersion->qmakeCommand().toUserOutput())); + emit q->logOutput(tr("Found Qt: %1").arg(qtVersion->qmakeFilePath().toUserOutput())); } if (qtVersions.isEmpty()) emit q->logOutput(tr("No Qt installation found.")); diff --git a/src/plugins/qbsprojectmanager/qbsprofilemanager.cpp b/src/plugins/qbsprojectmanager/qbsprofilemanager.cpp index 96527ad3007..08e41558e82 100644 --- a/src/plugins/qbsprojectmanager/qbsprofilemanager.cpp +++ b/src/plugins/qbsprojectmanager/qbsprofilemanager.cpp @@ -181,7 +181,7 @@ void QbsProfileManager::addProfileFromKit(const ProjectExplorer::Kit *k) data = provider->properties(k, data); } if (const QtSupport::BaseQtVersion * const qt = QtSupport::QtKitAspect::qtVersion(k)) - data.insert("moduleProviders.Qt.qmakeFilePaths", qt->qmakeCommand().toString()); + data.insert("moduleProviders.Qt.qmakeFilePaths", qt->qmakeFilePath().toString()); if (QbsSettings::qbsVersion() < QVersionNumber({1, 20})) { const QString keyPrefix = "profiles." + name + "."; diff --git a/src/plugins/qmakeprojectmanager/externaleditors.cpp b/src/plugins/qmakeprojectmanager/externaleditors.cpp index 453ee727863..538740e0804 100644 --- a/src/plugins/qmakeprojectmanager/externaleditors.cpp +++ b/src/plugins/qmakeprojectmanager/externaleditors.cpp @@ -66,14 +66,14 @@ static inline QString msgAppNotFound(const QString &id) static QString linguistBinary(const QtSupport::BaseQtVersion *qtVersion) { if (qtVersion) - return qtVersion->linguistCommand().toString(); + return qtVersion->linguistFilePath().toString(); return QLatin1String(Utils::HostOsInfo::isMacHost() ? "Linguist" : "linguist"); } static QString designerBinary(const QtSupport::BaseQtVersion *qtVersion) { if (qtVersion) - return qtVersion->designerCommand().toString(); + return qtVersion->designerFilePath().toString(); return QLatin1String(Utils::HostOsInfo::isMacHost() ? "Designer" : "designer"); } diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp index b84aa0036bf..11a17c186ab 100644 --- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp @@ -547,8 +547,8 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF return MakefileIncompatible; } - if (version->qmakeCommand() != parse.qmakePath()) { - qCDebug(logs) << "**Different Qt versions, buildconfiguration:" << version->qmakeCommand().toString() + if (version->qmakeFilePath() != parse.qmakePath()) { + qCDebug(logs) << "**Different Qt versions, buildconfiguration:" << version->qmakeFilePath().toString() << " Makefile:"<< parse.qmakePath().toString(); return MakefileForWrongProject; } diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 83377bc987e..82a403bfd0d 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -831,7 +831,7 @@ QtSupport::ProFileReader *QmakeBuildSystem::createProFileReader(const QmakeProFi m_qmakeSysroot = SysRootKitAspect::sysRoot(k).toString(); if (qtVersion && qtVersion->isValid()) { - m_qmakeGlobals->qmake_abslocation = QDir::cleanPath(qtVersion->qmakeCommand().toString()); + m_qmakeGlobals->qmake_abslocation = QDir::cleanPath(qtVersion->qmakeFilePath().toString()); qtVersion->applyProperties(m_qmakeGlobals.get()); } m_qmakeGlobals->setDirectories(rootProFile()->sourceDir().toString(), diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index ef2ab71b06e..94adb3279df 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -104,7 +104,7 @@ QMakeStep::QMakeStep(BuildStepList *bsl, Id id) BaseQtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit()); if (!qtVersion) return tr("qmake: No Qt version set. Cannot run qmake."); - const QString program = qtVersion->qmakeCommand().fileName(); + const QString program = qtVersion->qmakeFilePath().fileName(); return tr("qmake: %1 %2").arg(program, project()->projectFilePath().fileName()); }; setSummaryUpdater(updateSummary); @@ -215,7 +215,7 @@ bool QMakeStep::init() else workingDirectory = qmakeBc->buildDirectory(); - m_qmakeCommand = CommandLine{qtVersion->qmakeCommand(), allArguments(qtVersion), CommandLine::Raw}; + m_qmakeCommand = CommandLine{qtVersion->qmakeFilePath(), allArguments(qtVersion), CommandLine::Raw}; m_runMakeQmake = (qtVersion->qtVersion() >= QtVersionNumber(5, 0 ,0)); // The Makefile is used by qmake and make on the build device, from that @@ -433,7 +433,7 @@ QString QMakeStep::makeArguments(const QString &makefile) const QString QMakeStep::effectiveQMakeCall() const { BaseQtVersion *qtVersion = QtKitAspect::qtVersion(kit()); - QString qmake = qtVersion ? qtVersion->qmakeCommand().toUserOutput() : QString(); + QString qmake = qtVersion ? qtVersion->qmakeFilePath().toUserOutput() : QString(); if (qmake.isEmpty()) qmake = tr(""); QString make = makeCommand().toUserOutput(); diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp index 7051164bb1a..25d1203590a 100644 --- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp +++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp @@ -573,7 +573,7 @@ QString PuppetCreator::qmakeCommand() const { QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit()); if (currentQtVersion) - return currentQtVersion->qmakeCommand().toString(); + return currentQtVersion->qmakeFilePath().toString(); return QString(); } diff --git a/src/plugins/qmldesigner/generateresource.cpp b/src/plugins/qmldesigner/generateresource.cpp index fdef3228eaa..ccf39af0cb6 100644 --- a/src/plugins/qmldesigner/generateresource.cpp +++ b/src/plugins/qmldesigner/generateresource.cpp @@ -185,7 +185,7 @@ void GenerateResource::generateMenuEntry() QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion( currentProject->activeTarget()->kit()); - FilePath rccBinary = qtVersion->rccCommand(); + FilePath rccBinary = qtVersion->rccFilePath(); Utils::QtcProcess rccProcess; rccProcess.setWorkingDirectory(projectPath); @@ -362,7 +362,7 @@ void GenerateResource::generateMenuEntry() QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion( currentProject->activeTarget()->kit()); - FilePath rccBinary = qtVersion->rccCommand(); + FilePath rccBinary = qtVersion->rccFilePath(); QtcProcess rccProcess; rccProcess.setWorkingDirectory(projectPath); diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp index c3092bf1cbb..341043dcf9c 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.cpp +++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp @@ -156,7 +156,7 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject( projectInfo.qmlDumpPath.clear(); const QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(activeKit); if (version && projectInfo.tryQmlDump) { - projectInfo.qmlDumpPath = version->qmlplugindumpCommand().toString(); + projectInfo.qmlDumpPath = version->qmlplugindumpFilePath().toString(); projectInfo.qmlDumpHasRelocatableFlag = version->hasQmlDumpWithRelocatableFlag(); } diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index 6b9d6f56396..bc830a28327 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -373,7 +373,7 @@ Tasks QmlProject::projectIssues(const Kit *k) const if (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { if (version->type() == QtSupport::Constants::DESKTOPQT) { - if (version->qmlsceneCommand().isEmpty()) { + if (version->qmlRuntimeFilePath().isEmpty()) { result.append(createProjectTask(Task::TaskType::Error, tr("Qt version has no QML utility."))); } diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index c7722051ca4..c9929d0158c 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -76,7 +76,7 @@ private: bool isEnabled() const final; QString mainScript() const; - FilePath qmlScenePath() const; + FilePath qmlRuntimeFilePath() const; QString commandLineArguments() const; StringAspect *m_qmlViewerAspect = nullptr; @@ -97,7 +97,7 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id) argumentAspect->setSettingsKey(Constants::QML_VIEWER_ARGUMENTS_KEY); setCommandLineGetter([this] { - return CommandLine(qmlScenePath(), commandLineArguments(), CommandLine::Raw); + return CommandLine(qmlRuntimeFilePath(), commandLineArguments(), CommandLine::Raw); }); m_qmlMainFileAspect = addAspect(target); @@ -150,7 +150,7 @@ QString QmlProjectRunConfiguration::disabledReason() const if (mainScript().isEmpty()) return tr("No script file to execute."); - const FilePath viewer = qmlScenePath(); + const FilePath viewer = qmlRuntimeFilePath(); if (DeviceTypeKitAspect::deviceTypeId(kit()) == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE && !viewer.exists()) { @@ -161,7 +161,7 @@ QString QmlProjectRunConfiguration::disabledReason() const return RunConfiguration::disabledReason(); } -FilePath QmlProjectRunConfiguration::qmlScenePath() const +FilePath QmlProjectRunConfiguration::qmlRuntimeFilePath() const { const QString qmlViewer = m_qmlViewerAspect->value(); if (!qmlViewer.isEmpty()) @@ -176,16 +176,16 @@ FilePath QmlProjectRunConfiguration::qmlScenePath() const if (deviceType == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { // If not given explicitly by Qt Version, try to pick it from $PATH. const bool isDesktop = version->type() == QtSupport::Constants::DESKTOPQT; - return isDesktop ? version->qmlsceneCommand() : FilePath::fromString("qmlscene"); + return isDesktop ? version->qmlRuntimeFilePath() : FilePath::fromString("qmlscene"); } IDevice::ConstPtr dev = DeviceKitAspect::device(kit); if (dev.isNull()) // No device set. We don't know where a QML utility is. return {}; - const QString qmlscene = dev->qmlRunCommand(); + const QString qmlRuntime = dev->qmlRunCommand(); // If not given explicitly by device, try to pick it from $PATH. - return FilePath::fromString(qmlscene.isEmpty() ? QString("qmlscene") : qmlscene); + return FilePath::fromString(qmlRuntime.isEmpty() ? QString("qmlscene") : qmlRuntime); } QString QmlProjectRunConfiguration::commandLineArguments() const diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 03a10483d43..b82e0e5783e 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -235,13 +235,13 @@ public: FilePath m_qmakeCommand; - FilePath m_rccCommand; - FilePath m_uicCommand; - FilePath m_designerCommand; - FilePath m_linguistCommand; - FilePath m_qscxmlcCommand; - FilePath m_qmlsceneCommand; - FilePath m_qmlplugindumpCommand; + FilePath m_rccPath; + FilePath m_uicPath; + FilePath m_designerPath; + FilePath m_linguistPath; + FilePath m_qscxmlcPath; + FilePath m_qmlRuntimePath; + FilePath m_qmlplugindumpPath; MacroExpanderWrapper m_expander; }; @@ -346,12 +346,12 @@ BaseQtVersion::~BaseQtVersion() QString BaseQtVersion::defaultUnexpandedDisplayName() const { QString location; - if (qmakeCommand().isEmpty()) { + if (qmakeFilePath().isEmpty()) { location = QCoreApplication::translate("QtVersion", ""); } else { // Deduce a description from '/foo/qt-folder/[qtbase]/bin/qmake' -> '/foo/qt-folder'. // '/usr' indicates System Qt 4.X on Linux. - QDir dir = qmakeCommand().toFileInfo().absoluteDir(); + QDir dir = qmakeFilePath().toFileInfo().absoluteDir(); do { const QString dirName = dir.dirName(); if (dirName == "usr") { // System-installed Qt. @@ -755,7 +755,7 @@ void BaseQtVersion::fromMap(const QVariantMap &map) updateDefaultDisplayName(); // Clear the cached qmlscene command, it might not match the restored path anymore. - d->m_qmlsceneCommand.clear(); + d->m_qmlRuntimePath.clear(); } QVariantMap BaseQtVersion::toMap() const @@ -769,7 +769,7 @@ QVariantMap BaseQtVersion::toMap() const if (!d->m_overrideFeatures.isEmpty()) result.insert(QTVERSION_OVERRIDE_FEATURES, Utils::Id::toStringList(d->m_overrideFeatures)); - result.insert(QTVERSIONQMAKEPATH, qmakeCommand().toVariant()); + result.insert(QTVERSIONQMAKEPATH, qmakeFilePath().toVariant()); return result; } @@ -780,7 +780,7 @@ bool BaseQtVersion::isValid() const d->updateVersionInfo(); d->updateMkspec(); - return !qmakeCommand().isEmpty() && d->m_data.installed && !binPath().isEmpty() + return !qmakeFilePath().isEmpty() && d->m_data.installed && !binPath().isEmpty() && !d->m_mkspecFullPath.isEmpty() && d->m_qmakeIsExecutable; } @@ -795,7 +795,7 @@ QString BaseQtVersion::invalidReason() const { if (displayName().isEmpty()) return QCoreApplication::translate("QtVersion", "Qt version has no name"); - if (qmakeCommand().isEmpty()) + if (qmakeFilePath().isEmpty()) return QCoreApplication::translate("QtVersion", "No qmake path set"); if (!d->m_qmakeIsExecutable) return QCoreApplication::translate("QtVersion", "qmake does not exist or is not executable"); @@ -821,7 +821,7 @@ QStringList BaseQtVersion::warningReason() const return ret; } -FilePath BaseQtVersion::qmakeCommand() const +FilePath BaseQtVersion::qmakeFilePath() const { return d->m_qmakeCommand; } @@ -1005,41 +1005,41 @@ FilePath BaseQtVersion::qtPackageSourcePath() const return d->m_data.qtSources; } -FilePath BaseQtVersion::designerCommand() const +FilePath BaseQtVersion::designerFilePath() const { if (!isValid()) return {}; - if (d->m_designerCommand.isEmpty()) - d->m_designerCommand = d->findHostBinary(Designer); - return d->m_designerCommand; + if (d->m_designerPath.isEmpty()) + d->m_designerPath = d->findHostBinary(Designer); + return d->m_designerPath; } -FilePath BaseQtVersion::linguistCommand() const +FilePath BaseQtVersion::linguistFilePath() const { if (!isValid()) return {}; - if (d->m_linguistCommand.isEmpty()) - d->m_linguistCommand = d->findHostBinary(Linguist); - return d->m_linguistCommand; + if (d->m_linguistPath.isEmpty()) + d->m_linguistPath = d->findHostBinary(Linguist); + return d->m_linguistPath; } -FilePath BaseQtVersion::qscxmlcCommand() const +FilePath BaseQtVersion::qscxmlcFilePath() const { if (!isValid()) return {}; - if (d->m_qscxmlcCommand.isEmpty()) - d->m_qscxmlcCommand = d->findHostBinary(QScxmlc); - return d->m_qscxmlcCommand; + if (d->m_qscxmlcPath.isEmpty()) + d->m_qscxmlcPath = d->findHostBinary(QScxmlc); + return d->m_qscxmlcPath; } -FilePath BaseQtVersion::qmlsceneCommand() const +FilePath BaseQtVersion::qmlRuntimeFilePath() const { if (!isValid()) return {}; - if (!d->m_qmlsceneCommand.isEmpty()) - return d->m_qmlsceneCommand; + if (!d->m_qmlRuntimePath.isEmpty()) + return d->m_qmlRuntimePath; FilePath path = binPath(); if (qtVersion() >= QtVersionNumber(6, 2, 0)) @@ -1047,23 +1047,23 @@ FilePath BaseQtVersion::qmlsceneCommand() const else path = path / HostOsInfo::withExecutableSuffix("qmlscene"); - d->m_qmlsceneCommand = path.isExecutableFile() ? path : FilePath(); + d->m_qmlRuntimePath = path.isExecutableFile() ? path : FilePath(); - return d->m_qmlsceneCommand; + return d->m_qmlRuntimePath; } -FilePath BaseQtVersion::qmlplugindumpCommand() const +FilePath BaseQtVersion::qmlplugindumpFilePath() const { if (!isValid()) return {}; - if (!d->m_qmlplugindumpCommand.isEmpty()) - return d->m_qmlplugindumpCommand; + if (!d->m_qmlplugindumpPath.isEmpty()) + return d->m_qmlplugindumpPath; const FilePath path = binPath() / HostOsInfo::withExecutableSuffix("qmlplugindump"); - d->m_qmlplugindumpCommand = path.isExecutableFile() ? path : FilePath(); + d->m_qmlplugindumpPath = path.isExecutableFile() ? path : FilePath(); - return d->m_qmlplugindumpCommand; + return d->m_qmlplugindumpPath; } FilePath BaseQtVersionPrivate::findHostBinary(HostBinaries binary) const @@ -1138,24 +1138,24 @@ FilePath BaseQtVersionPrivate::findHostBinary(HostBinaries binary) const return {}; } -FilePath BaseQtVersion::rccCommand() const +FilePath BaseQtVersion::rccFilePath() const { if (!isValid()) return {}; - if (!d->m_rccCommand.isEmpty()) - return d->m_rccCommand; - d->m_rccCommand = d->findHostBinary(Rcc); - return d->m_rccCommand; + if (!d->m_rccPath.isEmpty()) + return d->m_rccPath; + d->m_rccPath = d->findHostBinary(Rcc); + return d->m_rccPath; } -FilePath BaseQtVersion::uicCommand() const +FilePath BaseQtVersion::uicFilePath() const { if (!isValid()) return {}; - if (!d->m_uicCommand.isEmpty()) - return d->m_uicCommand; - d->m_uicCommand = d->findHostBinary(Uic); - return d->m_uicCommand; + if (!d->m_uicPath.isEmpty()) + return d->m_uicPath; + d->m_uicPath = d->findHostBinary(Uic); + return d->m_uicPath; } void BaseQtVersionPrivate::updateMkspec() @@ -1756,7 +1756,7 @@ Tasks BaseQtVersion::reportIssuesImpl(const QString &proFile, const QString &bui results.append(BuildSystemTask(Task::Error, msg)); } - FilePath qmake = qmakeCommand(); + FilePath qmake = qmakeFilePath(); if (!qmake.isExecutableFile()) { //: %1: Path to qmake executable const QString msg = QCoreApplication::translate("QmakeProjectManager::QtVersion", diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h index 7c333b63fad..b722b2fcb86 100644 --- a/src/plugins/qtsupport/baseqtversion.h +++ b/src/plugins/qtsupport/baseqtversion.h @@ -132,14 +132,14 @@ public: bool isInQtSourceDirectory(const Utils::FilePath &filePath) const; bool isQtSubProject(const Utils::FilePath &filePath) const; - Utils::FilePath rccCommand() const; + Utils::FilePath rccFilePath() const; // used by UiCodeModelSupport - Utils::FilePath uicCommand() const; - Utils::FilePath designerCommand() const; - Utils::FilePath linguistCommand() const; - Utils::FilePath qscxmlcCommand() const; - Utils::FilePath qmlsceneCommand() const; - Utils::FilePath qmlplugindumpCommand() const; + Utils::FilePath uicFilePath() const; + Utils::FilePath designerFilePath() const; + Utils::FilePath linguistFilePath() const; + Utils::FilePath qscxmlcFilePath() const; + Utils::FilePath qmlRuntimeFilePath() const; + Utils::FilePath qmlplugindumpFilePath() const; QString qtVersionString() const; QtVersionNumber qtVersion() const; @@ -151,7 +151,7 @@ public: bool hasDemos() const; // former local functions - Utils::FilePath qmakeCommand() const; + Utils::FilePath qmakeFilePath() const; /// @returns the name of the mkspec QString mkspec() const; diff --git a/src/plugins/qtsupport/qscxmlcgenerator.cpp b/src/plugins/qtsupport/qscxmlcgenerator.cpp index 98be1fd99e8..2705250b8e9 100644 --- a/src/plugins/qtsupport/qscxmlcgenerator.cpp +++ b/src/plugins/qtsupport/qscxmlcgenerator.cpp @@ -84,7 +84,7 @@ Utils::FilePath QScxmlcGenerator::command() const if (!version) return Utils::FilePath(); - return version->qscxmlcCommand(); + return version->qscxmlcFilePath(); } QStringList QScxmlcGenerator::arguments() const diff --git a/src/plugins/qtsupport/qtkitinformation.cpp b/src/plugins/qtsupport/qtkitinformation.cpp index 9cd3b949468..b66efe72bfd 100644 --- a/src/plugins/qtsupport/qtkitinformation.cpp +++ b/src/plugins/qtsupport/qtkitinformation.cpp @@ -320,7 +320,7 @@ void QtKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const expander->registerVariable("Qt:qmakeExecutable", tr("Path to the qmake executable"), [kit]() -> QString { BaseQtVersion *version = qtVersion(kit); - return version ? version->qmakeCommand().path() : QString(); + return version ? version->qmakeFilePath().path() : QString(); }); } diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp index f6d03ff19c6..ebc9a441746 100644 --- a/src/plugins/qtsupport/qtoptionspage.cpp +++ b/src/plugins/qtsupport/qtoptionspage.cpp @@ -112,7 +112,7 @@ public: if (column == 0) return m_version->displayName(); if (column == 1) - return m_version->qmakeCommand().toUserOutput(); + return m_version->qmakeFilePath().toUserOutput(); } if (role == Qt::FontRole && m_changed) { @@ -128,7 +128,7 @@ public: const QString row = "%1:%2"; return QString("" + row.arg(tr("Qt Version"), m_version->qtVersionString()) - + row.arg(tr("Location of qmake"), m_version->qmakeCommand().toUserOutput()) + + row.arg(tr("Location of qmake"), m_version->qmakeFilePath().toUserOutput()) + "
"); } @@ -619,7 +619,7 @@ void QtOptionsPageWidget::addQtDir() auto checkAlreadyExists = [qtVersion](TreeItem *parent) { for (int i = 0; i < parent->childCount(); ++i) { auto item = static_cast(parent->childAt(i)); - if (item->version()->qmakeCommand() == qtVersion) { + if (item->version()->qmakeFilePath() == qtVersion) { return std::make_pair(true, item->version()->displayName()); } } @@ -672,7 +672,7 @@ void QtOptionsPageWidget::removeQtDir() void QtOptionsPageWidget::editPath() { BaseQtVersion *current = currentVersion(); - QString dir = currentVersion()->qmakeCommand().toFileInfo().absolutePath(); + QString dir = currentVersion()->qmakeFilePath().toFileInfo().absolutePath(); FilePath qtVersion = FilePath::fromString( QFileDialog::getOpenFileName(this, tr("Select a qmake Executable"), @@ -770,7 +770,7 @@ void QtOptionsPageWidget::updateWidgets() BaseQtVersion *version = currentVersion(); if (version) { m_versionUi.nameEdit->setText(version->unexpandedDisplayName()); - m_versionUi.qmakePath->setText(version->qmakeCommand().toUserOutput()); + m_versionUi.qmakePath->setText(version->qmakeFilePath().toUserOutput()); m_configurationWidget = version->createConfigurationWidget(); if (m_configurationWidget) { m_versionUi.formLayout->addRow(m_configurationWidget); diff --git a/src/plugins/qtsupport/qtprojectimporter.cpp b/src/plugins/qtsupport/qtprojectimporter.cpp index 4ee36992938..2ed2a6ac6bb 100644 --- a/src/plugins/qtsupport/qtprojectimporter.cpp +++ b/src/plugins/qtsupport/qtprojectimporter.cpp @@ -55,7 +55,7 @@ QtProjectImporter::QtVersionData QtProjectImporter::findOrCreateQtVersion(const Utils::FilePath &qmakePath) const { QtVersionData result; - result.qt = QtVersionManager::version(Utils::equal(&BaseQtVersion::qmakeCommand, qmakePath)); + result.qt = QtVersionManager::version(Utils::equal(&BaseQtVersion::qmakeFilePath, qmakePath)); if (result.qt) { // Check if version is a temporary qt const int qtId = result.qt->uniqueId(); diff --git a/src/plugins/qtsupport/qtversionmanager.cpp b/src/plugins/qtsupport/qtversionmanager.cpp index f7fc7b94d55..7996bebf8bb 100644 --- a/src/plugins/qtsupport/qtversionmanager.cpp +++ b/src/plugins/qtsupport/qtversionmanager.cpp @@ -265,7 +265,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal) if (log().isDebugEnabled()) { qCDebug(log) << "======= Existing Qt versions ======="; for (BaseQtVersion *version : qAsConst(m_versions)) { - qCDebug(log) << version->qmakeCommand().toString() << "id:"<uniqueId(); + qCDebug(log) << version->qmakeFilePath().toString() << "id:"<uniqueId(); qCDebug(log) << " autodetection source:"<< version->autodetectionSource(); qCDebug(log) << ""; } @@ -341,7 +341,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal) if (log().isDebugEnabled()) { qCDebug(log) << "======= Before removing outdated sdk versions ======="; for (BaseQtVersion *version : qAsConst(m_versions)) { - qCDebug(log) << version->qmakeCommand().toString() << "id:"<uniqueId(); + qCDebug(log) << version->qmakeFilePath().toString() << "id:"<uniqueId(); qCDebug(log) << " autodetection source:"<< version->autodetectionSource(); qCDebug(log) << ""; } @@ -360,7 +360,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal) if (log().isDebugEnabled()) { qCDebug(log)<< "======= End result ======="; for (BaseQtVersion *version : qAsConst(m_versions)) { - qCDebug(log) << version->qmakeCommand().toString() << "id:" << version->uniqueId(); + qCDebug(log) << version->qmakeFilePath().toString() << "id:" << version->uniqueId(); qCDebug(log) << " autodetection source:"<< version->autodetectionSource(); qCDebug(log) << ""; } @@ -443,7 +443,7 @@ static void findSystemQt() continue; const auto isSameQmake = [qmakePath](const BaseQtVersion *version) { return Environment::systemEnvironment(). - isSameExecutable(qmakePath.toString(), version->qmakeCommand().toString()); + isSameExecutable(qmakePath.toString(), version->qmakeFilePath().toString()); }; if (contains(m_versions, isSameQmake)) continue; diff --git a/src/plugins/qtsupport/qtversions.cpp b/src/plugins/qtsupport/qtversions.cpp index 9e62bbfc485..98e028125e2 100644 --- a/src/plugins/qtsupport/qtversions.cpp +++ b/src/plugins/qtsupport/qtversions.cpp @@ -62,7 +62,7 @@ QStringList DesktopQtVersion::warningReason() const { QStringList ret = BaseQtVersion::warningReason(); if (qtVersion() >= QtVersionNumber(5, 0, 0)) { - if (qmlsceneCommand().isEmpty()) + if (qmlRuntimeFilePath().isEmpty()) ret << QCoreApplication::translate("QtVersion", "No QML utility installed."); } return ret; diff --git a/src/plugins/qtsupport/uicgenerator.cpp b/src/plugins/qtsupport/uicgenerator.cpp index 454dcad35fb..d7a9c90ef57 100644 --- a/src/plugins/qtsupport/uicgenerator.cpp +++ b/src/plugins/qtsupport/uicgenerator.cpp @@ -62,7 +62,7 @@ Utils::FilePath UicGenerator::command() const if (!version) return Utils::FilePath(); - return version->uicCommand(); + return version->uicFilePath(); } QStringList UicGenerator::arguments() const From b84c8cf892ed364d344f9142f15221a47938cd2a Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 14 Jul 2021 07:22:08 +0200 Subject: [PATCH 39/40] Utils: Allow remote paths in PathChooser At least for the red marking of valid/invalid. Change-Id: I91f856f93ba74f6b62a540322c2445691afbf170 Reviewed-by: David Schulz Reviewed-by: Qt CI Bot --- src/libs/utils/pathchooser.cpp | 44 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index cb7e15385e2..3f658ea4812 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -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; } From 40e87880fd81ce91dfdde0e5169eeb3795eea619 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 9 Jul 2021 14:50:41 +0200 Subject: [PATCH 40/40] CMake: Make it possible to run ts_* targets with Qt 6 Alias for lupdate for missing Change-Id: I8a9a68e6d3be54ab8e1d143d3611e9d8da6d760d Reviewed-by: Leena Miettinen Reviewed-by: Eike Ziller --- cmake/FindQt5.cmake | 2 +- cmake/QtCreatorTranslations.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/FindQt5.cmake b/cmake/FindQt5.cmake index dbbb07681f3..4fde452733d 100644 --- a/cmake/FindQt5.cmake +++ b/cmake/FindQt5.cmake @@ -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) diff --git a/cmake/QtCreatorTranslations.cmake b/cmake/QtCreatorTranslations.cmake index a674f37be6d..a9da1e52476 100644 --- a/cmake/QtCreatorTranslations.cmake +++ b/cmake/QtCreatorTranslations.cmake @@ -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()