Commit Graph

80 Commits

Author SHA1 Message Date
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
Eike Ziller
fcf9c42e40 iOS: Make SimulatorControl static
It already contained only static members, so creating instances didn't
serve a purpose.

Change-Id: I261503b606c21cf498dcd8470d5645d92d97c325
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-25 11:46:23 +00:00
Jarek Kobus
69b3c6c1fd Use Utils::FutureSynchronizer in IosSimulatorToolHandlerPrivate
Add a new method: void FutureSynchronizer::cancelAllFutures().

Change-Id: I5a4e1ea3230ac3c0ce9d3f26b751b2c05fe3dfd4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-25 10:13:11 +00:00
hjk
c23cdd9262 Utils: Merge {synchronous,qtc}process.{h,cpp} file pairs
Mechanical to prepare merging the actual classes.
Adapting #includes.

Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-10 09:47:51 +00:00
hjk
8e352af0ec Core: Add a default parameter to various ICore::*path functions
Saves some code on the user side.

Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-04-27 06:52:05 +00:00
Eike Ziller
c1f90aeca2 ICore: Change some path API to use FilePath
Change-Id: Id841d6177206a021c9e606ce560b47d1ae6e52b9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-04-26 08:03:47 +00:00
Jarek Kobus
48c2afe157 Decorate some classes and methods with final keyword
This way we silence the clang warnings about calling
virtual methods from c'tor or from d'tor:
[clang-analyzer-optin.cplusplus.VirtualCall]

Change-Id: I8d6318b490152133da4833bda2ba28622bce30dd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-19 09:45:53 +00:00
Jarek Kobus
34c97ac868 Fix a build with Qt 6
In Qt 6 implicit conversion between QFuture and other types
is forbidden. Make it explicit instead.
See ff0ba7e2d7b91fd5809cb314935a1ca1a436f6c9.

Change-Id: Ie42e6b9b5047ba5eeec9f63fd03179e73f95314d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-05 08:46:43 +00:00
Eike Ziller
3f42c989ee Fix Qt 6 build of ProjectExplorer and targets & build systems
QStringRef is gone.
qsizetype vs int.
QMultiHash::insertMulti is gone.
QXmlStreamWriter writes UTF-8 by default.

Task-number: QTCREATORBUG-24098
Change-Id: Id217e40a1f17993a84fc725976e9cb84618b0580
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-21 11:31:54 +00:00
hjk
251287f0d3 Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.

Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 11:55:59 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
hjk
274bbefeff iOS: Remove remaining FileName::appendPath uses
Change-Id: Ia550151bbcad696a3bd59e630e80a8f89a908e08
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-24 07:32:17 +00:00
hjk
6f37348b4c Replace static_casts by QOverload where possible
Mainly to get rid of the QProcess::finished deprecation warning.

Also adjust coding style in the surrounding connects when needed.

Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-26 15:18:14 +00:00
Alessandro Portale
616e19ff9e Fix warning: "Missing emit keyword on signal call"
[-Wclazy-incorrect-emit]

Change-Id: I93bdc6e23cdaccf35c9899ae16870ccc65a54f80
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-01-17 15:54:56 +00:00
Alessandro Portale
eef5131962 Fix: Emit keyword being used with non-signal
-Wclazy-incorrect-emit

Change-Id: I02e54b1170fdd812f3bfee97e9b7ecd6b0560270
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-15 08:53:29 +00:00
Christian Kandeler
c6a6c12f05 Canonicalize some includes
Our canonical style is
    #include <utils/fileutils.h>
rather than
    #include "utils/fileutils.h"
Which makes sense, as such headers will never be found in the local
directory.

Change-Id: I4ca46e90d6c4d19d4b1f235f4c79caad864ef222
Reviewed-by: hjk <hjk@qt.io>
2019-01-10 09:04:46 +00:00
Alessandro Portale
39400381b3 iOS: Modernize
modernize-*

Change-Id: I64d2bb4320c9b444bc13e90099600628eac1f5a6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-11-13 15:44:34 +00:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +00:00
Vikas Pachdha
4d082b9500 iOS: Use stdout of smctl commands
Avoid MessageTracer logs being fed to the device listing json document

Change-Id: Ia35b39d787d2df27e6f743e0b6dc401799c383db
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-23 07:03:11 +00:00
Orgad Shaneh
eea6a7c3b3 Utils: Purge qtcfallthrough.h
No longer needed.

Change-Id: I9b0bee014df89d4c567f1d2431b5ff9404f5f925
Reviewed-by: hjk <hjk@qt.io>
2018-04-09 09:04:13 +00:00
Robert Loehning
300041cc6e ios: Initialize members
Change-Id: I01cbbbfa9e8906768cc71d1c5b0d366d99924c7f
Reviewed-by: hjk <hjk@qt.io>
2017-12-13 13:35:24 +00:00
Leena Miettinen
6c25c67b98 iOS: Write "error" and "simulator" in lower case in messages
Change-Id: I20d2266b2f40dc19b367e7704b72977a84814c3c
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-07-28 08:06:35 +00:00
Christian Kandeler
be2b3c91ae Add Q_FALLTHROUGH for Qt < 5.8
... and make use of it.
With gcc 7, the new option -Wimplicit-fallthrough is introduced and
added to the -Wextra set, triggering dozens of warnings in our sources.
Therefore, we annotate all obviously intended fall-throughs. The ones
that are still left are unclear and need to be checked by the respective
maintainer.

Change-Id: I44ead33cd42a4b41c28ee5fcb5a31db272710bbc
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-17 07:51:23 +00:00
Thiago Macieira
80bdcb95de Add unnecessary break to switch statements that don't fall through
GCC 7 can't tell that it's unnecessary, so it complained.

 registerhandler.cpp:528:13: warning: this statement may fall through [-Wimplicit-fallthrough=]

Change-Id: Ia3e896da908f42939148fffd14c6a15f3ec05524
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-12 16:19:49 +00:00
Christian Stenger
a86c28f4d5 iOS: Fix compile
Change-Id: I0a7d7f7a40762dfc260eed65f51ee93ecb3d61f5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-06-06 05:45:17 +00:00
Vikas Pachdha
f9350a5dbd iOS: Fix isRunning state of the app running on Simulator
Refactored IostoolHandler code and fixed isRunning(..)
for Simulator

Change-Id: Ib24431fc8e66f8d1be983c2e41d36df2169a9cb4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-02 12:51:43 +00:00
Vikas Pachdha
9b44c6ea4f iOS: Stop ios-tool gracefully before killing
Task-number: QTCREATORBUG-18147
Change-Id: Ic6b4c179fca5f51f5052dcffffefd1079a686233
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-10 11:24:18 +00:00
Vikas Pachdha
a4a78ae8b1 iOS: Fix run without deploy on iOS simulator
Task-number: QTCREATORBUG-18107
Change-Id: Ie847cdab672ff2df7af0c2fee742901de0783861
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-02 10:32:07 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
hjk
56409f5afa Replace a few occurrences of QStringList() << ...
... by something shorter.

Change-Id: I363b4e509adb07997517b2d233246a333aea4aea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-08 11:21:45 +00:00
Vikas Pachdha
7beb5d5c24 iOS: Reverting Utils::TemporaryFile changes
Temporary files are created to redirect the console output of the
running app and the files must be created in the simulator's file
system

Change-Id: Ib0f1d8366ca1606b2988b028b0aac944e0fe3432
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-01-23 14:37:17 +00:00
Tobias Hunger
c6f90e575e Utils: Introduce a TemporaryDirectory and TemporaryFile class
Both wrap the corresponding Qt class, but make sure all temporary files
or directories are created inside a "master temporary directory".

Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-20 12:17:10 +00:00
Thomas Hartmann
824fc105c5 Fixing warning
Change-Id: I92236680f34b6620c2371a1d9f1d1dcde8ba9282
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-01-13 13:43:35 +00:00
Vikas Pachdha
6c83981ee6 iOS: Use kill system call instead of shell command
Change-Id: Ic1d327ca2ed83ee91f78434cc1974ec247751483
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-01-10 11:30:06 +00:00
Vikas Pachdha
54677f4985 iOS: Capture console output of launched app on iOS simulator
Task-number: QTCREATORBUG-17483
Change-Id: Id18c51e20cf8b396fc610918610f04d39ead28b0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-01-10 09:34:31 +00:00
Vikas Pachdha
ccc5359c42 iOS: Remove the step to spawn the app before launch on iOS
This causes timing issues on certain devices resulting in
app startup failure

Task-number: QTCREATORBUG-17336
Change-Id: I190b5415bdef1fc80a415b0cb872b95b883db5d8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-12-20 16:09:14 +00:00
Vikas Pachdha
f28cefce8c iOS: Make iOS simulator usage asynchronous
Change-Id: I5770b372542690560680ef3208a284c7f0cf6670
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
(cherry picked from commit aa355b4f70)
2016-11-16 08:50:45 +00:00
Christian Stenger
993c18197b iOS: Fix invalid static_cast
Change-Id: I44184a8054ff0a80b9f65c3ccc227b4a6453ba8b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-10-18 05:53:47 +00:00
Vikas Pachdha
2b0daf42ce iOS: Replaces ios_sim tool with simctl
Task-number: QTCREATORBUG-16947
Change-Id: Ia28d5e4f9f220d566bd64da73989e8c24ef3eb37
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-10-17 13:46:34 +00:00
Vikas Pachdha
cf3afe885a iOS: Fixes a random crash in Qt creator while closing
The Qt creator crashed randomly while closing. Fixed the iostool process
termination

Task-number: QTCREATORBUG-14862
Change-Id: Ib356020095fe23f277389ebe30d8dedf4380ec28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-09-21 10:38:15 +00:00
Orgad Shaneh
3410fee65f Ios: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I1b25f0108939d87e859d0407a35f75b88fa0edc3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-30 12:12:09 +00:00
Ulf Hermann
385237dbbd Use Utils::Port where possible
This solves the ambiguity between 0 and -1 being the "invalid" port.

Change-Id: I3bac11dd4117bb1820fbd58186699925b73df1c5
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-20 11:06:34 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Jake Petroules
3fbd210b2a Make iostool arguments closer to phonegap ios-deploy.
phonegap's ios-deploy tool is probably the most widely known command
line tool for deploying and debugging iOS applications. Make several
arguments identical to theirs with the eventual goal of making iostool
and ios-deploy command lines interchangeable.

This is a libexec (private) tool only used internally by Qt Creator,
so the changes should not impact anyone.

Change-Id: I51f25f9c466570ca65b415d4ea94c78285cff1c2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-20 15:41:39 +00:00
hjk
77661e378a Utils: Remove qPidToPid() adapter function
Since Qt 5.3, there's a QProcess::processId() providing direct access.

Change-Id: Ia9c143c7a92ec61d1aa36ff3f4670ba72a509634
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-09-16 12:08:16 +00:00
Christian Stenger
5d326c523e iOS: Fix detection of device information for older Xcode
Task-number: QTCREATORBUG-14072
Change-Id: Ia69aebcb4183ccca7ce8d2332b1482cbefba00a7
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-04-21 08:02:09 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Fawzi Mohamed
a1076c209a ios: fix kill when running on device
Change-Id: I2bd9a461c055ef8aa5f5ed9facc879def0078f6f
Task-number: QTCREATORBUG-13259
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2014-12-03 13:39:29 +01:00
Fawzi Mohamed
e757643690 iOS: fix simulator selection
get simulator type and SDK version dynamically from the available ones,
and let the user choose which one to use.
This fixes the static solution that did break with Xcode 6

Change-Id: I5cb2be68b9ea8736fc880cf3dd9d39d77f030293
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2014-11-25 17:36:58 +01:00
hjk
9477ed0a3f Introduce and use FileName::exists()
This can use the faster route through QFileInfo::exist now.

Change-Id: Idb41b5d5185d7f02eacba498fb01f483d95e8d57
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-11-03 10:23:09 +01:00