Commit Graph

100 Commits

Author SHA1 Message Date
hjk
881b59c36e ProjectExplorer: Replace ToolChainFactory::supportedLanguange
... by a member-based approach.

Change-Id: I5c7fef196df6c37fd26c60a58c774426eca562a0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-09 14:43:23 +00:00
hjk
78fd99f5d3 ProjectExplorer: Replace ToolChainFactory::canRestore
... by a member-based check.

Change-Id: Id7d19e488695e76ea17cf2d02c7b6eb2cd0246cc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-09 14:36:41 +00:00
Vikas Pachdha
ce9081f340 Android: Find triple from predefined targets
Task-number: QTCREATORBUG-21780
Change-Id: Ic6e94a0ef94fc253f8a60383b2d060851b135d9f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-09 12:38:25 +00:00
Eike Ziller
8d19b306ed Android: Detect clang and gdb from older NDK
Get some minimal compatibility with the older NDK that is used for
Qt < 5.12 back.
This detects clang-3.6 and gdb from NDK 10e.
For building, the android-g++ mkspec continues to be used for Qt < 5.12
(it uses Qt's default mkspec, regardless of toolchain in the kit,
because the toolchain reports to support both).

Task-number: QTCREATORBUG-21595
Change-Id: I3487c38093f43ccae2418fb28807a50fbda101a8
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-11-29 14:28:59 +00:00
Ivan Donchevskii
e164717108 Android: Fix clang executable suffix on Windows
Change-Id: I78e8e49efd52d33f9f26f554a3400fabbe74d9ed
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-16 12:07:51 +00:00
Christian Stenger
2cf2cebfc9 Avoid enabling all message types by default
Passing no QtMsgType parameter ends up in enabling all
message types by default.
Follow the common pattern of only enabling the warnings
by default.

Change-Id: Ic7ec0420089c95f716a86feb9791d9cb13f4dd90
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-06 09:40:05 +00:00
Vikas Pachdha
de97b8cf3e Android: Auto detect clang toolchains
Remove GCC auto detection
Make Clang toochain default for Android
Remove auto detected toolchains from old NDK

Task-number: QTCREATORBUG-11846
Change-Id: I618e6f8eda4f24f498260b8de778ef543311acd1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-11-02 15:10:50 +00:00
Christian Kandeler
5bf9ac7d56 Android: Prevent invalid assertions in toolchain detection code
NDK r17 removed the MIPS toolchains, but kept the respective
directories, which was enough for us to assume the compiler binaries
were also present.
Instead, we now explicitly check for the presence of the compiler
binaries.

Change-Id: Ice68cf497a66f5e8b900e29634a988547fdee0d8
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-10-17 12:46:46 +00:00
BogDan Vatra
25264d9bd9 Fix debugging on Android arm64/x86_64
On Android 64, there is no lib/ symlink anymore, so we need to upload
gdbserver from QtCreator.

Change-Id: Ib6f6d9b623dc61b72dd434ce1b3b409e880bdeaa
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-10-04 15:36:35 +00:00
Ivan Donchevskii
0bd095aa45 ProjectExplorer: Rename compiler includes from System to BuiltIn
System include are those used with -isystem keyword, built-in
includes on the other hand come from compiler and always
follow in the end of the include list (after system includes).

Change-Id: I95c2fec36d2e5b43f014fe0a88d59c6769edfa1f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-09-17 11:24:32 +00:00
Tobias Hunger
11245564da ProjectExplorer: Consistently use HeaderPaths
Use HeaderPaths over QList<HeaderPath>.

Change-Id: I8f78b0a44e0160f1a2e7a78d9db4d04fcaa22f82
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-09-13 11:32:51 +00:00
Tobias Hunger
1df553a683 ProjectExplorer: Rename IncludePathType to HeaderPathType
It is the type used by the HeaderPath class, so reflect that in
the name.

I also considered to rename HeaderPath to IncludePath, but
that name is reflected in a lot of users, which would also need
to be adjusted for consistency. That would blow up the patch size
for little value IMHO.

Change-Id: I51421dbd3ab8b2874dc32fc82dc394c9b93ce5e9
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-09-13 11:32:31 +00:00
Marco Bubke
3abaf647d0 Add system include path to HeaderPath and merge ProjectPartHeaderPath
System include paths are appended after other includes by the compiler. So
we should set them as system includes and not as normal includes. Otherwise
we change the include order. Headers in system include paths are not
cluttering the screen with unwanted warning and by the way improve
performance too.

ProjectPartHeaderPath was a dopperganger of HeaderPath, so we merged them.

Change-Id: I7c394b4098b697de79761499ffcd5913cc02d652
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-10 09:31:32 +00:00
Ivan Donchevskii
2c0554c187 ProjectExplorer: Fix memory leaks in tree models
Fix widgets being leaked by the ToolChainOptionsPage.
This page created widgets and stored them in the tree node
and never deleted them.

The fix is to put all the widgets into one QStackedWidget, so
that this will clean up once the page is destroyed.

Change-Id: Ic02824a4c52771d8962dc594176077c2e139fb84
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:25:51 +00:00
Alessandro Portale
be5c228e5b Android: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-equals-default
modernize-use-transparent-functors

Change-Id: I6c9e567edf16cf436c0e0c1239b40f74574a1096
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-07-26 08:26:21 +00:00
Eike Ziller
ccefc5cf47 Merge remote-tracking branch 'origin/4.6' into 4.7
Conflicts:
	src/plugins/qnx/qnxplugin.cpp

Change-Id: I8ede5fa9c8daf3001e41fcba7cbee68edb9db3a6
2018-05-16 10:09:15 +02:00
Vikas Pachdha
23ac1d18e1 Android: Fix the android include path
Task-number: QTCREATORBUG-20340
Change-Id: Ie1d7c15bf8b38b5141868149684e026ba9666630
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-16 06:37:57 +00:00
Vikas Pachdha
02c7e76762 Android: Fix memory leak
Delete the toolchain instance if not used

Change-Id: I213f11d6f5e9ab3ffa98641d0a774a19e11849b3
Reviewed-by: hjk <hjk@qt.io>
2018-05-09 06:39:48 +00:00
Vikas Pachdha
56b6972994 Android: create a new toolchain when missing target triple
Though it should not happen that a toolchain is missing the triple
but in case the detection fails a new toolchain shall be created and
the misbehaving toolchain should be deleted

Task-number: QTCREATORBUG-20217
Change-Id: Iaa86331730f82b8e5abd37f1184a53d1e1312979
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-10 07:31:59 +00:00
Christian Stenger
c738198185 Android: Fix compile with Qt5.6 and gcc4.9
Change-Id: Id353723112bb3086e695f483c3ce4ec53ba425d8
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-11-22 12:04:48 +00:00
Ivan Donchevskii
08e3d8f011 Clang: Android: fix clang code model errors
Add missing gcc include directories in Android toolchain.
This introduces the similar "magic" that we have in qmake
(*qtsource*/qtbase/mkspecs/common/android-base-head.conf)
but allows us to have those paths wherever we use android
toolchain.

Change-Id: I5740f1f2339fd30670567f24db2be2454f665f41
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-22 10:56:10 +00:00
Ivan Donchevskii
ebdeb87241 Android: fix make command for latest NDK
Change-Id: I8c54ac146a96c11d6df5a7e5c791314799119b5f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-11-20 11:08:56 +00:00
Tobias Hunger
3d8be750b9 Environment: Use Utils::FileName for path() and related methods
Update users accordingly.

Change-Id: I9432e82308e9d0630514c6c8632aeb6b6ee0cf90
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-27 07:37:26 +00:00
Tobias Hunger
899c518c6d Android: Fix ma-make detection
Broken by 71b56d2b9c

Change-Id: I8d92cb1f0ecfcb401f063ba49c357acac8cc832c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-20 11:49:01 +00:00
BogDan Vatra
3a16aaa639 Android: Add android-clang to suggestedMkspecList
It is needed for android-clang qt builds

Task-number: QTBUG-60455
Change-Id: Ice1c552754214fe4ec47b970da86087d03e30530
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-08-17 08:18:16 +00:00
Jake Petroules
3158c125c1 Recognize mips64 toolchains from the Android NDK
Adapt a couple mips64-related tests at the same time.

Change-Id: I9313419cfe561c7e949f343d2008f7b370ad2b39
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-29 23:17:56 +00:00
Orgad Shaneh
da7cb91446 Merge remote-tracking branch 'origin/4.2' into 4.3
Change-Id: I4931dcc81be872d7712e67123e94d15ee696459f
2017-03-14 16:20:14 +02:00
Samuel Gaist
4033471aa9 QRegExp include cleanup
This patch adds the missing include statements for QRegExp.

Change-Id: Ibb03b929940adb84ae190b5090cb6b88653cc14c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-03-13 22:05:30 +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
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
82c1488bcc ToolChains: Make language part of the default toolchain name
Change-Id: I9f8a4ad79316d0cb6e0de40fa4a8b9dd4fa6e33d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-21 14:21:39 +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
Tobias Hunger
ca04c4c264 ToolChainFactory: Add support for different languages
* Add a pure virtual method to get supportedLanguges with

Change-Id: Ida4445ca045c90fb9f7656a661af83e5b6801b30
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:33:40 +00:00
Tobias Hunger
1304b250eb ToolChain: Make sure all ToolChains have a language set
* Add code to toolchains
* Assert that this is the case in the toolchainmanager

Change-Id: I82452689e83279fd9d1afb3140b0070bef9b6cd8
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:33:33 +00:00
Tobias Hunger
4ac80fe3a0 ToolChains: Trigger ToolChainManager::toolChainChanged signal
Trigger ToolChainManager::toolChainChanged signal when something
changes. This was apparently missing in quite a few places of
some of the tool chains.

Change-Id: Ic94c6559e6267f4ff22dc74cc5b0865fb7aeac63
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-06 12:53:52 +00:00
Nikolai Kosjar
5c030a4336 ProjectExplorer: Retain original target triple for gcc toolchains
The target triple will be used by the Clang Static Analyzer.

Change-Id: Ibf33fef286a4d3ad3f40be4d6d5c9f35881d3d46
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 10:40:32 +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
Eike Ziller
fa227a4eef Merge remote-tracking branch 'origin/3.6'
Conflicts:
	src/libs/qmldebug/qmldebugclient.cpp
	src/libs/qmldebug/qmldebugclient.h
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp

Change-Id: I9594b4e9befc78f8138deb121f0bfc4212f7edbf
2015-11-26 13:01:20 +01:00
Tobias Hunger
8345ba2d2d Android: Set JDK path for builds
Without it the build may fail.

Task-number: QTCREATORBUG-15382
Change-Id: Ie7f823746516d17e8e32a367953cf491378f00c1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-24 12:59:51 +00:00
Tobias Hunger
ca29cbfc8a Consistently use Utils::FileNameList
Consistently use Utils::FileNameList in favor of QList<Utils::FileName>

Change-Id: Iafbb466c882bfd91c25c9e78f107d401bfdb6d55
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-11-16 08:33:02 +00:00
Tobias Hunger
88bbf4d126 ToolChains: Check typeId first before doing expensive checks
This should speed up toolchain auto-detection a lot.

Change-Id: Id732ed359a4c9de1d49cb658cc91c2e7c9d1b7a6
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-30 14:35:37 +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
Orgad Shaneh
941d23a206 ProjectExplorer: Avoid execution of g++ on startup
Change-Id: I53719f58714b3dd0fcf21d8c7b1deb8d86190408
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-14 10:47:49 +00:00
Tobias Hunger
a004cfbdd0 ToolchainFactory: Remove unused typeid
Change-Id: Id13787d549312251fbe806076b9ad594ab16c2d2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-08 09:38:30 +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
Tobias Hunger
6eec39c308 ToolChainFactory: Rename id() to typeId()
This is the same as ToolChain::typeId(), so it should have the same
name.

Change-Id: Ifd344825be801aff3dab96bfe924a1984a77bbee
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-07-14 14:00:32 +00:00
Tobias Hunger
6d81730764 ToolChainFactory: Add typeIdFromMap and use it in factories
Change-Id: Id3254bcb3a5c426540bbab49dc61545031af6826
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-07-14 13:27:31 +00:00
Tobias Hunger
cbf302893d ToolChain: Turn id into a QByteArray
That should take a couple of bytes less to store. Make sure this
change is invisible to the configuration files.

Change-Id: If5e73b52493c9164de9e342021d8153d274b350f
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-07-09 11:07:12 +00:00