Commit Graph

901 Commits

Author SHA1 Message Date
Jarek Kobus
bd170f3748 Ios: Don't call mutable expressions inside QTC_ASSERT
In order to conform to the theory: "Removing all
QTC_ASSERTs and QTC_CHECKs should not change anything".

Change-Id: Ieed804e44f4ca78a020444eb3f73d64d1bbdc916
Reviewed-by: hjk <hjk@qt.io>
2022-12-14 11:58:35 +00:00
Jarek Kobus
ac966d7bb9 IDevice: Provide default implementation for signalOperation()
Don't repeat implementation returning nullptr in derived classes.

Change-Id: I437f5d206464bf92706cd135d793438f46455ad6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-29 13:34:31 +00:00
Jarek Kobus
1a70403f94 Remove unused includes of QFormLayout
Change-Id: Ia877cb57037342f2a7b332b29d9cb45e9b01c4bc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-11-18 07:33:29 +00:00
Jarek Kobus
866a658b42 Get rid of unneeded includes of RunControl
Removed also some other includes that were marked
with yellow triangles. In some cases includes of
runcontrol.h were substituted with other includes,
like qtcassert.h.

Change-Id: Ica40f68198c7f8f70e6047acb2eddc8ef017e43d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-25 09:49:13 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
hjk
373032925d Utils: Use 'hr' for horizontal rule in layouts
More HTML-ish.

Change-Id: I45d2e474b2810f00422a03603aac125c6f845b81
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-30 11:21:23 +00:00
Alessandro Portale
912b016ab0 Utils: Add "Layouting::HorizontalRule" LayoutItem
We have many horizontal separator lines in the UI, which are each time
repetitively created from a QFrame with some flags set. With the .ui
inlining, we will have more of these separators coming.

This change intoduces a Layouting::HorizontalRule LayoutItem and
replaces various existing QFarme separators with it.

Change-Id: I60bad89e2a2b777fbd2f9d0cf872af81e41dcfd7
Reviewed-by: hjk <hjk@qt.io>
2022-08-29 15:30:25 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
hjk
fd84986973 iOS: inline iossettingswidget.ui
Change-Id: Ibed7608fa23fb147a8049a5701b233b3b802f894
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-25 14:29:29 +00:00
hjk
256b983d28 iOS: inline createsimulatordialog.ui
Change-Id: I40c6269a3d0ba61dfbdcc2ac55f4608b9c893e8c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-25 12:58:09 +00:00
hjk
ffd0558773 iOS: Inline simulatoroperationdialog.ui
Change-Id: I6b1e770a3882b156ea9061c7f2b370258a06a573
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-25 12:57:59 +00:00
Jarek Kobus
aabf9e4fef SimulatorOperationDialog: Avoid using sender()
Change-Id: Ib45839bfa7b5e62a9546643a4a94c975884ce8cd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-22 11:07:27 +00:00
Jarek Kobus
a98b185e90 Drop Qt5: Android, IOS & WASM: Get rid of QOverload
Add a context object into some lambdas.

Change-Id: I72631aeb36703f8f335f3819796fb52148f1b377
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-20 10:30:48 +00:00
hjk
d842862944 Utils: More porting.h related changes
Change-Id: I528a6950dfa6e09eb7f7ada265c8c41dba816bfd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-14 12:04:25 +00:00
hjk
802de0eb5e Utils: Collapse most of porting,h
Taking the Qt 6 branches, leaving some dummies until downstream
adapted.

Change-Id: Ib9b86568d73c341c8f740ba497c3cbfab830d8a1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-13 09:44:09 +00:00
Jarek Kobus
953a3abe92 IosSimulator: Get rid of call to waitForStarted()
This is unneeded when followed by waitForFinished().

Change-Id: Ief0e786290d590ed749dc2373bf53936e320b841
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-29 15:25:54 +00:00
Eike Ziller
f95a1eca34 Merge remote-tracking branch 'origin/8.0'
Change-Id: Icef5e28557701243e686d35cf885412eb341e75a
2022-06-28 11:35:16 +02:00
hjk
9e363c6421 Add plugintr.h files to all plugins
Except FakeVim, which had it before.

for i in [a-eg-z]*/*.json ; do
    upper=${i##*/}
    upper=${upper/.json/}
    lower=${i%/*}
    trfile=$lower/${lower}tr.h

    cat << EOT > $lower/${lower}tr.h
/****************************************************************************
**
** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/

namespace $upper {

struct Tr
{
    Q_DECLARE_TR_FUNCTIONS($upper)
};

} // namespace $upper
EOT

    git add $trfile

    perl -pi -e "s/(${lower}_global.h)/\1\n    ${lower}tr.h/"  $lower/CMakeLists.txt

    perl -pi -e "s/(\"${lower}_global.h\",)/\1 \"${lower}tr.h\",/"  $lower/$lower.qbs

done

Change-Id: I15ebbaaa9443c57b391b9e143f592d8a0c9208a9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-27 13:34:57 +00:00
Jarek Kobus
3a64f67f76 Remove reimplementation of AbstractProcessStep::doRun()
Remove those reimplementations that call parent implementation
and don't do anything more.

Change-Id: Ib74dd33b45c0027280de57b957c2f8f642f82d23
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-27 13:22:09 +00:00
Marcus Tillmanns
30f9f68b15 iostool: Cleanup and improve debug output
Replaced the custom command line arg parsing code
with QCommandLineParser

Change-Id: I14e8695b5ee327b1d111558271bf98afd0c942b0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-24 13:18:09 +00:00
Eike Ziller
69cbcb4cd5 Merge remote-tracking branch 'origin/8.0'
Change-Id: I3f218b52bf6904daca3779fb677e51f6f51f2f9f
2022-06-23 11:17:33 +02:00
David Schulz
153ff77a6b Utils: use cleaned stdout all over the place again
Amends 5ee880ce5e

Change-Id: Ie0202db7d8455372c3697087d9571db6706b45a1
Reviewed-by: hjk <hjk@qt.io>
2022-06-17 13:04:42 +00:00
Eike Ziller
016321f0c8 Merge remote-tracking branch 'origin/8.0'
Change-Id: I9f41e115adb25c08acc01110b6027020eff1a1e7
2022-06-17 11:29:14 +02:00
Marcus Tillmanns
e3fd840f98 iostool: Improve deployment speed using delta deploy
The iostool did always deploy the whole bundle, without taking
into account whether anything has actually changed. This meant
that for big bundles anytime the user starts the application
on his device, a full deployment was done.

For a ~1GB bundle this would take around a minute on a recent
Mac and iPhone 12.

This fix uses a new function from the mobiledevice framework
called AMDeviceSecureInstallApplicationBundle.
This function takes a new parameter "ShadowPathKey" which points
to a directory where the last deploy state is captured temporarily.

Before deploying to the device, the function compares
what is to be deployed against the last deploy state and
only deploys the parts that actually changed.

QtCreator provides a temporary folder for this. Due to this,
the initial deployment still does a complete deployment as
no state is available yet. All subsequent deployments
take the captured state into account.

For backwards compatibility, the old deployment method is left intact.

Fixes: QTCREATORBUG-24371
Change-Id: I4df6aa79d41b34c326d78be7952d7eeb23774648
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-17 07:09:45 +00:00
hjk
39b1e0009d iOS: Fix compiler warnings
warning: loop variable ‘extraArgument’ creates a copy from type ‘const QString’ [-Wrange-loop-construct]
  507 |         for (const QString extraArgument : extraArgs) {
      |                            ^~~~~~~~~~~~~

etc.

Amends 1241761035

Change-Id: I883f675bd42a38fb4547a6b1c06dba6c5db1938c
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-07 10:31:52 +00:00
Eike Ziller
d7ba5a84b0 Merge remote-tracking branch 'origin/8.0'
Change-Id: I024823b6667947895eff7570286cc11ee09d3e1d
2022-06-02 13:26:23 +02:00
hjk
9524a3f025 ProjectExplorer: Make target device for executable aspect explicit
Just run and host is not enough, build device is needed, too.

This fixes the MakeInstall step for remote linux.

Change-Id: I3ec797379b7d0d5842780d505d8b87a91286e460
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-02 10:55:23 +00:00
Artem Sokolovskii
1241761035 ios: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: If29d2960692c42456967025d60e6d6d7ddd09928
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-02 09:42:19 +00:00
hjk
17ee387756 ProjectExplorer: Dissolve a few uses of Runnable
Change-Id: I71b8f1b00e488360e7f9c136912bc64b5a76609a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-30 14:10:59 +00:00
hjk
d41fc4b329 Remove or replace a few unnecessary #includes
Change-Id: I0545533baab57a4383fda5fd680603fdc6459a01
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-20 16:57:26 +00:00
hjk
8dacb123e0 Utils: Pass MacroExpander to ArgumentsAspect constructor
In the past we wanted to keep the aspect constructor simple but
it turned out that exceptions were needed and accumulating, so those
are likely here to stay.

By passing also the MacroExpander to the ArgumentsAspect constructor
allows other single-purpose warts like the ProjectConfiguration::doPostInit()
machinery can be removed.

Change-Id: I148b0ca1ab0740270eecd0d3134620de65a86d4f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-20 07:06:10 +00:00
hjk
72a2083cd1 ProjectExplorer: Shift full FilePath creation into Executable aspect
Less need for correction: When a target is given, the executable
produced by the aspect will be on the target device.

Change-Id: I86c38e9f9fa5b4d4fe9b2ef7f21a0b3aa5b28670
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-18 09:50:40 +00:00
Eike Ziller
b4caecae3e Ios: Fix compiler warnings
- avoid deprecated API
- remove unused variable

Change-Id: I33850ea2dda523900ead191542eadf65338d5210
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-13 09:01:55 +00:00
hjk
6e5415e95f Ios: Move runControl's runConfiguration calls further up
The data is now pulled out of the runconfig directly instead of relying
on the indirection using the runconfig pointer inside RunControl.

This is only barely better, but gets rid of one direct user of
RunControl::runConfiguration().

Change-Id: If93576ba25ea9f3ddbeae2535217f5c2f361eaf6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-27 10:03:57 +00:00
Jarek Kobus
7fadaff5d4 IDevice: Make it possible to forward declare Ptr and ConstPtr
Most inclusions of idevice.h inside other headers are
required just because of IDevice::Ptr or IDevice::ConstPtr
was used there. Unfortunately, since these "using"
are defined inside a IDevice class, we just can't
forward declare IDevice::Ptr nor IDevice::ConstPtr.

Instead, create a separate header that defines
IDevicePtr and IDeviceConstPtr while having IDevice
forward declared. Redefine IDevice::Ptr/ConstPtr
inside IDevice to use IDevicePtr/IDeviceConstPtr.

Now, instead of forward declaring a IDevice::Ptr
it's sufficient to include the idevicefwd.h.

This drops the number of files being recompiled
after touching idevice.h from ~770 to ~210.

Change-Id: Ib6f2982aa0761fb4cd6593badb9c3c0c527ea535
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-14 12:27:04 +00:00
Marcus Tillmanns
2c4553366c docker: Correctly initialize Kit during autodetection
* Added returning the Id after detecting CMake so it can be set in the autodetected kit
* Trying to keep autodetect from adding the same Qt installation twice if qmake is linked in /bin and /usr/bin
* Added FIXME for RunControlPrivate::runConfiguration as it is used after free in rare cases
* Fixed IosCompilerDetector to not just run if a device is set
* Fixed QnxCompilerDetector to not just run if a device is set
* Fixed auto-detected debuggers not being set as auto-detected, as they now can be removed from the device screen

Change-Id: Ia7772c454d70e147e4326efacc4a6a888fa26782
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-12 14:15:45 +00:00
Jarek Kobus
8e0ae8ba96 QtcProcess: Limit the inclusion of qtcprocess.h
Move the rest of QtcProcess enums to processenums.h.
Move ExitCodeInterpreter into processenums.h.
Remove superfluous Utils:: prefix.

Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-02 13:30:39 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13:19 +00:00
Eike Ziller
9d8a419d10 Remove qmake build files
Removes qmake as a build system for building Qt Creator itself.
Keep them for some tests that are not completely moved to CMake yet.

Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-20 12:18:15 +00:00
hjk
e695109078 ProjectExplorer: Make ToolchainManager::toolchains() overloads explicit
Saves a few cycles for the plain access.

Also sprinkle a few 'const'.

Change-Id: I238dfd9352ee39caa3aa48cd04a9f1cf827b029e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-20 06:13:09 +00:00
hjk
5cfe69b049 ProjectExplorer: Use a struct for toolchain autodetection parameters
Also, make some functions const and use an alias for QList<ToolChain *>.

Change-Id: I6a1cbcb79bfaa9d252c4b69e00aa93e5d0dabe2f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-18 11:25:34 +00:00
Jarek Kobus
c3a5dc380d IDevice: Make fromMap() / toMap() protected
Change-Id: I9a8f1caddffaf4e0f446ccc4f08f1110b6c003d4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-08 14:44:38 +00:00
Jarek Kobus
910c71b59b Use QtcProcess in IosSimulator
Change-Id: I7e31a2702512802e7670e79ff096e4cc191d42a3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-04 14:20:43 +00:00
Jarek Kobus
c13d828c99 Remove unneeded includes of QProcess
Change-Id: I017e020c8b2a53d6f4a2422a0a0856044e768247
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-11-03 08:13:18 +00:00
Jarek Kobus
3562c5e96e Remove unneeded includes of QProcess from cpp files
QProcess wasn't used in these files.

Change-Id: I24900bcf312eb6ea1ca3bc0c753cebb505ec552b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-11-01 12:04:41 +00:00
Eike Ziller
c23b2ac7e6 iOS: Fix retrieval of developer teams with Qt 6
Qt 6 fixed the representation of certain plist file structures in
QSettings. This leads to a different layout of the QVariantMap that we
get for the information about developer teams.

Fixes: QTCREATORBUG-26111
Task-number: QTCREATORBUG-24098
Change-Id: I18514bda4d9a96bbbf13ed0b7159019778d0862d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-26 12:44:16 +00:00
Orgad Shaneh
3871e40f43 Fix qHash-related size compatibility warnings by MSVC
Change-Id: I3b7981ce78b67db4b996f99682284a0b911d8cd7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-20 15:03:51 +00:00
Vladimir Serdyuk
5d1d6c83a4 iOS/CMake: Fix running non-Xcode targets and targets in subdirectories
Improve support for running iOS bundle built with CMake introduced in
3a294f670d.
Currently it supports only Xcode generator and does not work if target is
created in a subdirectory.

This patch adds support for non-Xcode generators (tested with Ninja) and
targets created in a subdirectories with any generators.

The solution is not pretty due to the need to keep qmake compatibility.
Would be glad to refactor if there's more correct approach.

Change-Id: Ieaf7e3186ab55cadc643d9bd3d94442f9ac72228
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-10 15:23:27 +00:00
Artem Sokolovskii
90a9185137 iOS: Use QtcProcess
Change-Id: I758a5de16d51124eeaff15385abae094df548096
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-30 08:25:19 +00:00
Jarek Kobus
eca1247b95 Remove unused declarations of QProcess
Change-Id: I6c9b330317b80b7e1846e463c22b4a3a7ca2457f
Reviewed-by: hjk <hjk@qt.io>
2021-08-20 09:58:05 +00:00