Commit Graph

3443 Commits

Author SHA1 Message Date
Eike Ziller
3944162039 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
	src/plugins/cmakeprojectmanager/cmakebuildstep.h
	tests/auto/debugger/tst_namedemangler.cpp
	tests/auto/qml/codemodel/check/tst_check.cpp

Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
2020-08-10 15:56:54 +02:00
Robert Loehning
64a641ec6a Use IDE_DISPLAY_NAME
Change-Id: If8ae9399a40a460b535faeec2320d1450e5099c5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-08-03 09:13:52 +00:00
Christian Kandeler
21fbf36a5d Cmake: Fix compile output glitch
Using a dedicated OutputLineParser ensures that we only ever see
complete lines and thus prevents "partially red" lines in the compile
output pane.

Fixes: QTCREATORBUG-24209
Change-Id: I12b3de70b81789afe727b66e366facdcc81f8ab8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-07-31 08:12:54 +00:00
Alessandro Portale
7b6d44a90a Android: Introduce constants for Android ABIs
Avoiding string duplication prevents typo-related runtime errors and
allows an IDE to use find symbol rather than plain text search.

Change-Id: I7fba7c7c5cf90c0b371efce3b575537b2708dd0f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-26 05:49:49 +00:00
Asit Dhal
faa707e932 CMakePlugin: Make cmake build settings widget multi selectable
Fixes: QTCREATORBUG-22659
Change-Id: I5c2b88a30f35baa3a3f2b33e2722c4523a8abe44
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-07-21 13:28:09 +00:00
hjk
43b658e9e7 Utils: Drop Utils::SkipEmptyParts again
We require Qt 5.14 nowadays.

Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 12:42:27 +00:00
Christian Stenger
8b26bde438 CMakePM: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I295e2a9a92880b58b3f6103fe68824c379ab47a4
Reviewed-by: hjk <hjk@qt.io>
2020-07-13 12:08:52 +00:00
hjk
b60ab85c13 Android: Prevent crash in case there is no Qt version set
For CMake build.

Change-Id: I77946a5d7023a9cefc23baf243991949121e49ec
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 15:15:18 +00:00
Eike Ziller
b18711da91 Merge remote-tracking branch 'origin/4.12' into 4.13
Conflicts:
	share/qtcreator/debugger/lldbbridge.py

Change-Id: Ia444f6424fb35b9a539e157afcee868161535272
2020-07-06 16:23:13 +02:00
hjk
e1c88116b3 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:18 +00:00
Leena Miettinen
bced4a746c CMake: Fix UI text capitalization and punctuation
Change-Id: Id4adc0671357c646cbed5df3667addfc95130b73
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-02 11:20:05 +00:00
Eike Ziller
b684d4c827 CMake: Fix handling of setting for Ninja path
When Ninja is installed via the installer, it writes the full path to
the Ninja binary into the settings.

Change-Id: I95a19c8c1afbf980c899fb1eeb8656e7e86ad4a2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-30 10:33:31 +00:00
Christian Kandeler
a6098c6b2b CMake: Fix compiler warning about unused lambda capture
Change-Id: Ie95512a247997764d41ca5c5f8ba4cb576f634aa
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-26 11:08:32 +00:00
Artur Shepilko
5b53ac9661 Fix compiler warnings about several unused variables
Change-Id: Ic236efdfdfd997719187eec1c19ad2b7f6c044df
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-25 15:23:25 +00:00
Eike Ziller
c0770313f3 CMake: Fix changing build directory
It wasn't possible to change the build directory if the old directory
didn't already contain a build.

Amends 7e6e02eb08

Change-Id: I741f6981273a4e04cceabde5b15b5ad951535ef8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-25 13:07:22 +00:00
Aaron Barany
e5d9cb3779 CMake: Fix nested source groups
Sometimes source groups would start from the root directory rather than
having the correct folder specified in CMake. This was because the
incorrect path was being used to find the relative path. Forward
baseDirectory to the overrideBaseDir parameter of addNestedNodes() to
guarantee the proper directory is used as the base.

Fixes: QTCREATORBUG-23896
Change-Id: I213c02a3fff3c10e4b6a58211600dd16ac257bbc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-24 07:29:18 +00:00
Eike Ziller
ba5b1fc8ab Fix filtering in various hierarchical views
The intermediate "category" nodes where never filtered out.

CategorySortFilterModel was changed to use filterRegularExpression() and
setFilterFixedString does not set that (it only affects filterRegExp()
which we need to get rid off).
Set a regular expression directly instead of a fixed string.

Amends 47e576528e

Change-Id: I6f844027b83d66ca2d5088d83e6e84b01b9eda45
Reviewed-by: hjk <hjk@qt.io>
2020-06-22 12:23:12 +00:00
Tobias Hunger
b321f54186 CMake: Update log output of CMake Project Importer
Change-Id: I18c6890ecad58d6e078492af30c5509d9db766f9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-18 14:13:56 +00:00
Tobias Hunger
054f5617f8 CMake: Make import of build directories using Qt 6 work
Make import of build directories using Qt 6 work. This assumes that
Qt 6 will use the same layout as Qt 5 and that there is qmake (which
is assumed everywhere in Creator right now).

Change-Id: I37194b186127befb3df32ebacf86c032c71ef18a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-18 14:13:43 +00:00
Eike Ziller
1b431fe271 Move Id from Core to Utils
And add a compatibility wrapper for Core::Id, so we don't have to rename
all occurrences from Core::Id to Utils::Id.

This allows us to use Id also in Utils, which makes it possible to e.g.
move Core::InfoBar to Utils without work arounds.

Change-Id: I5555d05b4e52f09d501dbfe5d91252a982a97c61
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-06-18 05:58:23 +00:00
hjk
1c81a3b3e8 All: Use Utils::SkipEmptyParts
Task-number: QTCREATORBUG-24098
Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-17 05:55:25 +00:00
Christian Stenger
d8b1fcb9d3 CMakePM: Replace some QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: Ib40d97cf2b39105e7db9f886c125a2430119d14d
Reviewed-by: hjk <hjk@qt.io>
2020-06-16 12:09:21 +00:00
Christian Kandeler
48be20cf48 Fix clang warnings about copies in range-for constructs
Change-Id: If50553964483626e72a816b1d23fa81b45ed9ca7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-15 12:38:17 +00:00
Tobias Hunger
1bc3e2f0ba CMake: Be more paranoid about running several cmakes at the same time
Try to be more paranoid about having several cmake binaries run for the
same project at the same time.

Change-Id: I6ceca456e515c0beeff46e6912d15b2dd87283a2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-15 10:34:01 +00:00
Tobias Hunger
82555df811 CMake: Add some debug output
Change-Id: I2ae817c5c810b3c97fef2784fe1b5f25cab3c439
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-15 10:33:15 +00:00
Eike Ziller
8b8ecfa28f Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/cmakeprojectmanager/fileapiparser.cpp

Change-Id: I39f8c2be859be043f506bef77de9bb5b42d38165
2020-06-15 11:30:34 +02:00
Tobias Hunger
346b28f5f9 CMake: Add a command to trigger parsing of CMake reply file
Add a command to trigger the parsing of a given CMake file-api
reply file. This is important to have to help with debugging file-api
issues like QTCREATORBUG-24044.

Change-Id: Iadaa5cf01b9b6ddddf4e6ad669bb05928c6f29a5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-11 12:35:47 +00:00
Tobias Hunger
182c460a2b CMake: Do not treat project with the empty string as a name as invalid
CMake will happily accept the empty string as a project name, so do not
treat that is invalid in Creator. Apparently the empty project name will
get generated by CMake itself if no project() command is found in the
top level CMakeLists.txt file.

Make sure to set a sensible name if the top-level project has no name,
using the directory name of the source directory instead.

Change-Id: I3b861daa13c1d0fec31c294ef0ac15338310020d
Fixes: QTCREATORBUG-24044
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-11 12:34:25 +00:00
Tobias Hunger
8c830f79e7 CMake: Improve debugging output when parsing projects from file-api
Change-Id: Ifaed0e5a6566923052a4e2f00adbb3617cd42c8b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-11 12:34:01 +00:00
Tobias Hunger
443f2bae50 CMake: Filter out non-directories from LD_LIBRARY_PATH/PATH
Task-number: QTCREATORBUG-23997
Change-Id: I4b92cd484305614b30c70bbdbd8815b0d85b7d98
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-10 09:42:45 +00:00
hjk
30610b7991 CMake: Remove some now-unused code
Change-Id: I39dd5f8de0ca4e5461cd01885029e1c65ac8ec05
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-10 07:50:01 +00:00
Christian Stenger
ae0d913e2f CMakePM: Fix compile
Amends 01b0d4f8f5.

Change-Id: I05a65684c51b960eeb4803b5d764bc8ff5a22626
Reviewed-by: hjk <hjk@qt.io>
2020-06-10 06:53:28 +00:00
Tobias Hunger
01b0d4f8f5 CMake: Remove magic configuration from CMake
Get rid of magic configuration handling in the CMakeProjectManager.

* Use CMakeCache.txt as the sole source of truth, do not keep
  a shadow copy of configuration in the .user file
* Have initial CMake arguments that are easy to edit in batch
  (Fixes: QTCREATORBUG-18179) used whenever no CMakeCache.txt
  file is in the build directory. These allow for any thing that
  can be passed to CMake on the command line.
  (Fixes: QTCREATORBUG-16296)
* Ask when changes to CMake configuration were not applied
  (Fixes: QTCREATORBUG-18504)
* Run cmake with arguments effecting its configuration only when
  the CMake settings are changed in the UI, run CMake without any
  special arguments in all other cases.
* Get rid of the confusing dialog used to keep settings in sync between
  what is in CMakeCache.txt and Creator (Fixes: QTCREATORBUG-23218)

Change-Id: I26d55be7df733f084f5691ecf7d7b4352f58b8e7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-09 16:34:00 +00:00
Tobias Hunger
28c22ff57e CMake: Inject special build targets into list of extracted targets
Inject special targets like all, test and install into the list of
targets that get reported by CMake. This makes those available in
the locator again.

Task-number: QTCREATORBUG-24064
Change-Id: I08f1232d243afbe0800c1dc308a00917c98ccf8a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-03 09:46:45 +00:00
Tobias Hunger
2fea24fe6a CMake: Support building several targets with cmake --build
CMake supports this for a while now.

As a side effect this fixes QTCREATORBUG-23738, which was caused by the
radio button hack used to show that only one item could be selected at
a time.

Change-Id: I18cbe6c5ee3872edaf74b9d828bde1ac5bf63563
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-03 08:04:50 +00:00
Tobias Hunger
10b63683fc CMake: Add a way to provide options to CMake --build
Add a way to provide options to cmake --build in addition to the
already existing option to the build tool (separated by -- from the
cmake arguments).

I decided to have these two separate to ease upgrading from older
Creator versions.

Task-number: QTCREATORBUG-24088
Change-Id: If989f9942498055312ba0e11e7d80c2b5ece269d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-03 08:04:33 +00:00
Eike Ziller
5b364de168 Use dialogParent() instead of mainWindow()
There are very few reasons to use mainWindow() directly.
Especially for modal dialogs, using dialogParent() is important, since
that guarantees the stacking order in case of other dialogs currently
being open.

Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6
Reviewed-by: hjk <hjk@qt.io>
2020-06-02 11:44:53 +00:00
Christian Kandeler
301a388982 CMake: Split build output into lines before parsing
This amends commit b15d1951a2, where we moved the line splitting into
the output parsers, but overlooked that the CMakeBuildStep does
additional line-based parsing. As a result, the stdout -> stderr
redirection for ninja output was broken.

Change-Id: Iafbbce9a3f9c0383812a9e4c129c1d94fa907b73
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-26 13:11:01 +00:00
Tobias Hunger
7c985c14ad CMake: Move notification on outside cmake runs into FileApiReader
Move the detection of outside cmake runs into FileApiReader and
make the FileApiParser non-interactive.

Change-Id: I70afc1df35fcfe90e88822569579154aabbdb1cd
Fixes: QTCREATORBUG-24015
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-15 08:36:50 +00:00
Tobias Hunger
517cb05db0 CMake: Clean up API of FileApiParser
Clean up the API of FileApiParser in preparation of moving
the FileSystemWatcher out of that class and into FileApiReader.

Change-Id: I5618252dd98a39f6a70f56b50fb50327e8b43e84
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-15 08:36:37 +00:00
Christian Kandeler
b02f6b5d30 ProjectExplorer: Give the Task class an explicit summary
We'd like to create more useful tasks from compiler output, that is, try
harder to identify consecutive lines that refer to the same issue and
create one task for them, rather than one for each line. In such
"aggregate" tasks, the first line will not necessarily carry the main
information. Therefore, we make it explicit what this main information
is by introducing a dedicated summary member.
Also streamline the font handling for compile tasks.

Change-Id: I933f2643a13c710dab1ab548c56669b129026eb5
Reviewed-by: hjk <hjk@qt.io>
2020-05-14 08:23:59 +00:00
Orgad Shaneh
21e9947c21 CMake: Fix GCC warnings
warning: control reaches end of non-void function [-Wreturn-type]

https://stackoverflow.com/q/33607284/764870

Change-Id: Ia8d0a8d42d5db786c6800ab91a1ef790fe2387f1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-04 08:41:15 +00:00
Tobias Hunger
7e6e02eb08 CMake: Warn on build directory changes
Change-Id: I78c5e850e268f4d7d66e40961bca85ef61be0483
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-04-30 13:10:15 +00:00
Tobias Hunger
59473389b9 CMake: Remove BuildDirManager
The BuildDirManager was used to switch between different
BuildDirReaders. Now that only the FileApiReader is left, that
infrastructure is no longer needed.

Change-Id: I2d339a3407bb633cff6a8f7502b7b09094f63fef
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-04-30 12:08:08 +00:00
Tobias Hunger
0b9513f273 CMake: Simplify CMake Build System states a bit
Merge handleParsingSucceeded and handleParsingSuccess as well as
handleParsingFailed and handleParsingError.

Change-Id: If4f84bdfa2f59cfa0037a941372a1929996be3bd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-04-30 08:06:39 +00:00
Tobias Hunger
60064620c8 CMake: Document interactions around CMakeBuildSystem
Change-Id: Id4f379eefcccf2d0517e5c3b72c9b88957243651
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-04-30 08:06:28 +00:00
Tobias Hunger
902b1c3b9e CMake: Disable switching between different readers
Remove the code that switches between different types of
readers based on what the different CMake binaries support.

This is no longer needed since only file-api is supported now.

Change-Id: Ia86d143f5e2cecc2bcd68ab7d62503915a32d223
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-04-30 08:06:18 +00:00
Tobias Hunger
494b9f5287 CMake: Remove servermode support
Task-number: QTCREATORBUG-23915
Change-Id: I2a58e1d6d95c28e25787722fa37448d86c4aebc9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-04-29 14:30:16 +00:00
Eike Ziller
d79febdde9 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakekitinformation.cpp

Change-Id: I90ef0063ed24e23bcb3d73fff086f50324faa1e2
2020-04-24 13:58:05 +02:00
David Schulz
e3a0fe71e4 CMake: fixup env if jom is missing
Add the applitcation dir path to the path environment variable
if jom cannot be found there. This should fix the cannot find
jom error for binary releases since we ship jom with qc.

Fixes: QTCREATORBUG-22645
Change-Id: Ia3b55f794d3ac4b5fd6d2e85cf19f00bd8cddd2c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-04-23 12:59:51 +00:00