Commit Graph

220 Commits

Author SHA1 Message Date
Mathias Hasselmann
d6a84fe22c Use full Qt name for generated Android kits
Instead of "Android for armabi-v7a (GCC 4.9, Qt 5.7.1)" this gives
"Android for armabi-v7a (GCC 4.9, Qt 5.7.1 (android_armv7-project)"
which isn't exactly nice for the double parenthesis, but necessary
to maintain basic sanity with project specific Qt builds.

Change-Id: I2d41334a7f1ff28dc056d5967abe2b4b8697b63d
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-02-15 10:12:39 +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
Filippo Cucchetto
4b1f8f3609 ProjectExplorer: Added support for registering custom languages
Change-Id: I728a2ed1ef7d9f44d7c2b59d27d6e23444cd3bb5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-23 11:19:11 +00:00
Tobias Hunger
96c6033d39 QtVersionManager: Rename QtVersionManager::unsortedVersions(...)
Rename QtVersionManager::unsortedVersions(...) to QtVersionManager::versions(...).

This is what you should use, so make that the obvious choice.

Change-Id: Ice6e195d9aad7968ce87d378323627347b22bc74
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-18 10:40:12 +00:00
Tobias Hunger
a89100fe47 ToolChainManager: Allow for filtering of toolchains
Allow to provide a Predicate to ToolChainManager::toolChains and
add a ToolChainManager::toolChain method.

Change-Id: I0849f6fa67ffd8d5c6cfe4253cb0a326e1b023fa
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-17 13:13:53 +00:00
Tobias Hunger
6553c3c99e BaseQtVersion: Allow for a predicate when retrieving Qt versions
Make methods used to retrieve Qt versions from the Qt versions manager
take a predicate to select the interesting version.

Change-Id: I9218c57bae6d5033d49d618dfc0da41fe578444d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-01-17 13:13:48 +00:00
Vikas Pachdha
509657b6a1 Android: Fix file system name for Android kits not being sticky
Task-number: QTCREATORBUG-17567
Change-Id: I48a3b2f8486c63676bb18ff025ed6412f48e3873
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-13 14:58:06 +00:00
Tobias Hunger
ebf6acadbc Android: WS-only change
Change-Id: Id34bc1bb8a4d75fe53d10c7bc1ba22b6bd5c2011
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-13 12:36:51 +00:00
Tobias Hunger
de0cf4e92c Android: Simplify code and make sure all members are initialized
Change-Id: I873737d39865f9a920a5893c9630430e6803a6ee
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2016-12-06 10:18:54 +00:00
Tobias Hunger
4f374d4bbf Android: Clean up Kit updates
Change-Id: Iab45062012fb91a8f62ee227af8b6a7ab94a8fed
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-10-27 10:36:44 +00:00
Tobias Hunger
5a2001f730 Android: Add C toolchains
This should fix kits complaining about wrongly set C compilers and
ABI incompatibility between C and C++ compilers.

Task-number: QTCREATORBUG-17165
Task-number: QTCREATORBUG-17166
Change-Id: Ia002490b471e0f5306c3a76b27158869920452ed
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-10-27 10:36:02 +00:00
Alessandro Portale
59b7601c58 ProjectExplorer: default icons for IDevice
Enable devices to define their default themable icon.

Kit icons are now by default the Desktopdevice icon,
overridable by the device icon of the kit's device,
in turn overridable by an icon file path.

KitManagerConfigWidget: The browse button for the Kit
icon gets a "reset" action.

Change-Id: I6328ba7d640393aee2c324c592e76b4d5430586a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-26 11:52:00 +00:00
Orgad Shaneh
dd86735111 Android: Use QThread::sleep instead of STL
Change-Id: Ib16e8450732789e801f82e2d037b20868e444538
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-09-20 09:59:17 +00:00
Orgad Shaneh
88aa956bb7 Get rid of Utils::sleep
Replace with std::this_thread::sleep_for()

Change-Id: I3a02fa6d4fc1b41d8d7b01bb3ba0342ce49b8e61
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-09-13 10:04:55 +00:00
Eike Ziller
c56aa52b80 Merge remote-tracking branch 'origin/4.1'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/qmakeprojectmanager/makestep.cpp
	src/shared/qbs

Change-Id: If1787ed23afa786ed2cef57f53c1db642559cbe0
2016-08-31 14:40:38 +02:00
BogDan Vatra
1ca42e24cb Android: Make avd name extraction even more robust
The console output changed even more and now it add one more "OK", in
order to get the right avd name we should stop searching at last "OK".

Task-number: QTCREATORBUG-16783
Change-Id: I2b69763bba740b739e3573fdfae6b6ac9ed16e95
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-08-29 08:37:08 +00:00
Orgad Shaneh
670e54345c Remove use of deprecated Qt algorithms
Change-Id: Ib35cffa2d5762874feea9b1d4df7f569c0e5f496
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-09 13:41:25 +00:00
hjk
588443b259 Debugger: Use a StandardRunnable for the debugger process
One step further to separate the debugger environment from the
inferior environment and to make it possible to configure a
working directory. Guessing one from the inferior's working
directory is not always a good idea.

Change-Id: I33d139c0f228ec0870556b82bc6aecca0a8e62d6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-04 10:07:43 +00:00
Tobias Hunger
cb14fb0d71 Kits: Save several ToolChains per kit
BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS!

* Convert old ToolChainKitInformation to new version
* Store several toolchains in one kit (one per language)

Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:06 +00:00
Orgad Shaneh
88dfa84fc6 Android: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: Id09b62b7b9812d9c0981202c257d18387a8b09d9
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-07-04 09:35:58 +00:00
BogDan Vatra
26dd602785 Don't show wait cursor when doing lots of fast operations
Change-Id: I430530d78cadb09a2445ad146a7c644414e64587
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-10 14:10:18 +00:00
BogDan Vatra
ec80aa80bd Android: Skip empty lines
Otherwise AndroidConfig::connectedDevices will return unexisting devices.

Change-Id: I85e87ff48784bfeb37b591507408ace2656b08dc
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-10 10:39:36 +00:00
Tobias Hunger
5d3823ac47 Use SynchronousProcess::runBlocking
Use SynchronousProcess::runBlocking in favor of SychronousProcess::run.
This avoid nested event loops which can produce really strange crashes
if not use carefully.

This patch only converts those processes that have a timeout of less
than 5 seconds or use the default timeout.

Change-Id: I9de8899dcc946af7049ea357a91972996c0256a1
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-05-26 11:50:03 +00:00
Vikas Pachdha
399b93966a Fixed the issue where Android build SDK was not populated anymore
Task-number: QTCREATORBUG-16280
Change-Id: I35e174e8c9dca2475e2c7c8c858c17ad7e6141f1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-05-20 13:07:41 +00:00
hjk
10ca24347f Android: Minor code cosmetics
Connects, namespaces, includes, ...

Change-Id: I066a03e528df0e485f8ac473db94f17175277fb4
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-05-19 08:58:40 +00:00
Tobias Hunger
ddefe062c7 Fix up QProcess::waitForFinished()
waitForFinish returns false if the process is no longer running at
the time of the call. Handle that throughout the codebase.

Change-Id: Ia7194095454e82efbd4eb88f2d55926bdd09e094
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-11 10:04:38 +00:00
BogDan Vatra
d342623bb7 Don't wait too much to connect.
Some AVDs down't allow to connect to their console,
there is no point to wait 30s (which is the default connection timeout).

Change-Id: I3cb82b99f958787215f44b471abfc203d7633089
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-05-09 07:36:32 +00:00
hjk
bff8c3108d Android: Make avd name extraction more robust.
The output of the console seems to have changed lately and includes
some initial help hint now. Try to ignore that by always using the
output before the last OK in the the response.

Change-Id: I1cd5bfedd1aaea9de0d494b92d965ce0c60d1655
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
2016-05-02 09:09:48 +00:00
hjk
4dbb6ecd84 Android/Debugger: Always extract GDB version from binary
Change-Id: I19ab6e70a273e803b9755966e15253e006df3940
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-05-02 06:29:44 +00:00
Eike Ziller
6cecb7e4db Merge remote-tracking branch 'origin/3.6' into 4.0
Change-Id: Id86f31f52ed1d3f28745b2324b8af32283a24ded
2016-03-16 14:11:53 +01:00
BogDan Vatra
0fda5b6354 Android: Fix GDB location for NDK r11
In NDK r11 gdb was moved to <ndk_dir>/prebuilt/<host>/bin/gdb[.exe]

Change-Id: I8eebb552a92313c5f4f36611b26f54f7c9c6126f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-14 15:31:39 +00:00
Eike Ziller
8b4f14a8ad Android: Use Utils::runAsync
Change-Id: I632d165be4a7e1f35e6e3d7bf401d40817b17223
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-12 12:38:35 +00:00
Friedemann Kleint
97af238656 Preferably use QStringRef::toInt().
Avoid allocations for converting to int.

Change-Id: Id8c79334f4809ec075ffe7e6b7635be4873eafd8
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-04 07:56:58 +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
BogDan Vatra
957c0af570 Immediately return the default device if is found
Task-number: QTCREATORBUG-15422
Change-Id: I7be44fbe43c320c171ffb724ffd25414e184fd9a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-12-10 10:47:31 +00:00
Tobias Hunger
ac1d9abd07 ToolChainManager: Refactor toolchain restoration
This should be simpler to follow now.

Fix autodetection to return not only the newly detected toolchains,
but also those that are re-detected (taking their definition from
the alreadyKnown list passed to the autodetect method where possible).

This avoids running lots of toolchains during start-up, but still
enables us to fix QTCREATORBUG-12751

Task-number: QTCREATORBUG-12751
Change-Id: Ie74e7cffb2b014a6132cc8559db232397344f2f1
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-27 12:16:16 +00:00
Christian Strømme
7dd847404f Android: Get Java home location from the java_home tool on OS X.
If the java_home executable exists on OS X we can run it to get the
current JDK location.

Change-Id: I5d032d153cba4d7168931ab0f83723292d3d714a
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-02 14:10:04 +00:00
Daniel Teske
9f2f41e285 Android: Support non distro installations of JDK
The android tools expect to find java and javac in the PATH. Which
is the case on using the distro java, but isn't if the user
installs Oracle's binary jdk distribution.

Change-Id: Ib5f5448724f00b000a969c27d5aad6a420bfc1eb
Task-number: QTCREATORBUG-14155
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2015-09-25 14:02:26 +00:00
Tobias Hunger
52a52ca09f Android: Remove unused constants
Clang warns about these.

Change-Id: I002d97356dd7b6401edc577b69978d5d17a1e404
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-08-31 12:16:17 +00:00
Oswald Buddenhagen
ddea5994f3 Merge remote-tracking branch 'origin/3.5'
Conflicts:
	scripts/deployqtHelper_mac.sh

Change-Id: Ia0d5fef8c28e0bfb3b0c703ad3652e2d70d9e7d1
2015-07-17 17:25:26 +02:00
Daniel Teske
17c04dccc0 Android: Compare typeId() to the correct constant
Broken in e6d1141e1e,
which changed the code to use typeId() instead of type() but
didn't change to what it was compared.

Change-Id: I5b4f76395bd193ee30ee606023483d3bd0b062e8
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-07-15 15:55:22 +00:00
Tobias Hunger
e6d1141e1e ToolChain: Get rid of type() in favor of typeId()
Change-Id: I8fc68c266acb55a7c3e014697a7b526784914f7a
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-07-14 14:40:03 +00:00
Daniel Teske
5f9d991062 Add QtVersionManager::unsortedVersions()
To sort the list, we need to know the version number of all qt
versions. That requires running the qmake. Since in most cases
we don't need the sorted list at startup, add a method for that
and use it.

This prevents almost all calls to queryQmake for me, except for
a few for Android Qt Versions.

Change-Id: I6db89f214d68d07fee4b4dd15ee14c10d1248565
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-07-13 15:18:00 +00:00
Daniel Teske
2a049708e7 Android: Make api level M known
If we can't convert the string to an int value, than we are going to
read the settings file. If that fails, we fallback to  string
comparation.

Task-number: QTCREATORBUG-14537
Change-Id: I0c4c5811f246ef1835c80837879d815cfa27b5d7
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-06-12 14:06:39 +00:00
Daniel Teske
fa401b8fab AndroidDeviceDialog: Move default device selection into Dialog
Change-Id: Ib4a272eba1f1521c082ec519ef016ad5969eb527
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-05-18 09:35:30 +00:00
Daniel Teske
11bcc8efe2 Android: Increase timeout of android list avd to 20s
Now that every usage of that command is using it in a separate
thread we can do that without any problems.

Change-Id: If38a734ceb5c519cd3ed28357374c83843e67c8e
Task-number: QTCREATORBUG-13634
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-05-18 09:34:26 +00:00
Daniel Teske
597096312f Android: Fix deployment to wrong avd
We used to only identify the avd by api level and abi. That was
obviously incorrect, but at the time I didn't know how to get
the actual avd name from a running emulator.

Turns out this is reasonable easy via telnet on the emulator port.

Change-Id: I387901a5294674f44399c0726abcc9feea221e8d
Task-number: QTCREATORBUG-13095
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-05-18 09:33:38 +00:00
Daniel Teske
557bac136b Android: Don't remove all kits on changing the ndk
Instead compare the toolchain version (and abi) and replace the old
toolchain with the new toolchain.

This requires splitting up the updating into two parts, registering
the new toolchains first, then updating the kits and last removing
old toolchains.

Change-Id: Ida6aa27e84f683ef7a3159b69bb12f93cee4ec67
Task-number: QTCREATORBUG-14243
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-04-27 13:42:01 +00:00
Daniel Teske
2023489869 AndroidDeviceDialog: Move refreshing devices to a diffrent thread
Easy to do and makes the dialog feel marginally nicer.

Task-number: QTCREATORBUG-13123
Change-Id: I64098f1fd751100d40227c298a9e7eb358552bfb
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-04-16 10:36:18 +00:00
Daniel Teske
184abbac6a Android: For Emulators show if opengl is enabled or not
Change-Id: Ib20c1f425f91f34749bce837f14ef7a1e36273e3
Task-number: QTCREATORBUG-13615
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-04-14 15:24:13 +00:00