Commit Graph

3443 Commits

Author SHA1 Message Date
Tobias Hunger
ba8e7d1156 CMake: Report more cmake errors in server mode
Handle more kinds of errors in CMake server-mode.

Task-number: QTCREATORBUG-18318
Change-Id: I43fff7f3cfbd86d01ff05a0936261b8d91aa5d70
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-06-20 12:52:34 +00:00
Tobias Hunger
7e81d330d9 CMake: Hide INTERNAL and STATIC configuration entries in Project UI
Task-number: QTCREATORBUG-18403
Change-Id: I6b69305ff0dc337da1d8b20e0321be5ce1b1f595
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-20 12:03:15 +00:00
Orgad Shaneh
687466ac47 Merge remote-tracking branch 'origin/4.3'
Change-Id: I126f3a05212a3d5df78812e66285bc9e8078360b
2017-06-20 11:32:02 +03:00
Christian Stenger
cce1e130d7 AutoTest: Fix handling of multiple build targets
If project files are not mapped 1:1 to targets the result
of the chosen executable was more or less random.
Try to handle multiple targets as correct as possible by
checking for build targets already where we still know
which files are part of the respective test cases.

Task-number: QTCREATORBUG-17783
Task-number: QTCREATORBUG-18357
Change-Id: I82dcc26bf52c9918e2727b439a719af08879ef49
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-19 08:14:55 +00:00
Tobias Hunger
210b9aa227 CMake: Provide more information in server-mode
Provide more information about what is happening in server mode.

Change-Id: I69cbf0b2cb197789231499ac601a08af33ed6b6e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-06-15 13:28:41 +00:00
Christian Stenger
f16339f18d CMakePM: Ensure buildSystemTarget is initialized correctly
This ensures the buildSystemTarget will not set to an empty
string and not contains path elements.

Change-Id: Ib993fb3a64a277490e6596cc0662a781d89a4c49
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-15 05:17:24 +00:00
Tobias Hunger
460e1d7e93 CMake: Add "test" target to cmake builds
Always show a test target for cmake projects. This will show even
if there are no tests in the project. But I think it is more annoying
*not* to be able to run tests via the locator when tests are available
than getting an error message when attempting that with a project that
does not have tests.

Task-number: QTCREATORBUG-18323
Change-Id: Iba85aa868cb9bfe6c3f44a7ffff620d081d3082f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-13 12:47:44 +00:00
Eike Ziller
247639d9c3 Remove 1-1 dependency between locator and locator input widget
Add possibility for filters to set a new search text when accepting
an entry.
Move placeholder text update from locator manager to widget.
Propagate filter update through signal-slot connection instead of directly.
LocatorManager::show is the only place left that directly references the locator widget.

Change-Id: Id61354d9f166c2af8c9d5528ad8998c7c6b8e1ab
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-13 12:42:13 +00:00
Orgad Shaneh
70ff6eb2cc CMake: Add a missing break
Detected by GCC7

Change-Id: Ia9a76df63c28d4f4ebf3e20f70ab39224115b5a1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-06 10:05:33 +00:00
Orgad Shaneh
89057b552b Merge remote-tracking branch 'origin/4.3'
Change-Id: I56004e3ec9dc9d92d33bdae438c4f7e069eccc45
2017-06-02 15:13:51 +03:00
Christian Stenger
ec3015663a CMakePM: Fix compile for Qt5.6
Change-Id: I5febf1af38062b2d5e5c59e984ae97e6fb1168f5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-02 10:42:03 +00:00
Tobias Hunger
25d984eb6f CMake: Improve generator setup dialog
Task-number: QTCREATORBUG-18259
Change-Id: I2807fa5f2ca837d4a0026b0aaf13e344221fc702
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-06-01 11:31:15 +00:00
Orgad Shaneh
b272bf3dc0 CMake: Remove unneeded filter
The TODO was done in 1b2fc1c815.

Change-Id: I9b1ff1aeccdaa71f7ea4d75d935dd09182e39def
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-24 08:57:36 +00:00
Orgad Shaneh
8430da3bf7 Merge remote-tracking branch 'origin/4.3' into master
Change-Id: I01ab8c85ea3372b6dce4142ddb9cf92d903ffca6
2017-05-23 23:41:40 +03:00
Tobias Hunger
6886b59fe6 CMake: Filter duplicate files from tree in tealeaf mode
Task-number: QTCREATORBUG-17955
Change-Id: Ibd19c7a0d398f3f26d63983ec024722933485513
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-19 08:01:50 +00:00
Felix Kälberer
accac479e0 CMake: Filter CMake variables
Add a text field to filter CMake variables in the CMake project
configuration view. As in the cmake-gui, the filter does a simple
string search over all variable names and values.

Task-number: QTCREATORBUG-17973
Change-Id: Id7219c16509c620c39978cb05c5e0e62cf9c19df
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-17 20:29:23 +00:00
Eike Ziller
64b19af7dd Merge remote-tracking branch 'origin/4.3'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I6d89ea588de955f5d878500b59285d3adde6c77d
2017-05-15 15:31:55 +02:00
Orgad Shaneh
689aa3891d CMake: Ignore dirty signal on server-mode on Windows
CMake sends false signals on Windows. Until this is fixed, ignore them.

Task-number: QTCREATORBUG-17944
Change-Id: If59f04fd68a899069ecc02df592d3105e531f5bb
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-15 13:23:30 +00:00
Tobias Hunger
112254dc67 CMake: Improve detection of build directory in server-mode
Detect both build directories next to the sources as well as below the source
directory properly. Without this patch all files that normally go into "Build
Directory" node were listed below "Source Directory" when the build directory
was a child of the source directory.

Task-number: QTCREATORBUG-18196
Change-Id: Ib8674489cfe04958f76df24904107bb7aa093162
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 13:15:32 +00:00
Tobias Hunger
4e6fd0a2c0 CMake: Improve handling of CMAKE_RUNTIME_OUTPUT_DIRECTORY
Set the working directory of binaries which got moved from the
build directory using CMAKE_RUNTIME_OUTPUT_DIRECTORY to the directory
the binay is actualy in.

Task-number: QTCREATORBUG-18158
Change-Id: I059d55a6c408799f3220bd90c271a6d743e6cd82
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 11:17:47 +00:00
Eike Ziller
6e8ee7479e Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/debugger/cdb/cdbengine.cpp

Change-Id: Ib9aeccc4162c43e9ee3d85847d96678045625dd0
2017-05-09 15:07:30 +02:00
Tobias Hunger
0a3409112b ProjectNodes: add listInProject() to Node
Add a setter/getter for listInProject to Node and make the project
list all nodes with this property set in Project::files.

Task-number: QTCREATORBUG-18132
Change-Id: I334e627856d1bc0d033e13c5d629f6657d8d7fee
Reviewed-by: hjk <hjk@qt.io>
2017-05-04 09:16:56 +00:00
Tobias Hunger
175643fd7e ProjectNodes: Do not define a copy constructor for FileNode
Nodes are QObjects (still), so they should not have a copy constructor.

Change-Id: I1b20663ee0ec121cda4d39ced7a9f204fb4621a1
Reviewed-by: hjk <hjk@qt.io>
2017-05-04 09:16:27 +00:00
Eike Ziller
105b69836c Merge remote-tracking branch 'origin/4.3'
Conflicts:
	tests/auto/debugger/tst_dumpers.cpp

Change-Id: Id8b53b000f94a1b5ab923db79f67bad3276d09dc
2017-05-04 10:03:50 +02:00
Tobias Hunger
ccdf335425 CMake: Fix possible nullptr dereference
Change-Id: Iadb62b671e115b2348dbe1d927212fd79a7fdf33
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-03 11:53:01 +00:00
Christian Stenger
10c285db86 CMakePM: Fix compile using Qt5.6 and gcc4.9
Change-Id: I192a213a8825c636dc42702a32a065ad541bd2af
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-28 06:30:29 +00:00
Tobias Hunger
f0d14da7b9 Revert "CMake: Use canonical source directory when talking to cmake server-mode"
This reverts commit b2fe7c9ad1.

QTCREATORBUG-18105 reports that this makes cmake work, but then in later stages files get filtered from the project tree as paths no longer match up.

Change-Id: I9484c7311a15a0397d9078ed60c8a65ef82f8449
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-27 09:51:45 +00:00
Tobias Hunger
11c87bd918 CMake: Unify setup of default build target in CMakeBuildStep
Change-Id: I3d087356a4dd5a3b8ab07d5b64cd5aeb93ae0f47
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-27 09:51:16 +00:00
Tobias Hunger
10d6a3bc3d CMake: Fix signal emission from CMakeBuildStep
This fixes the summary in the UI.

Change-Id: I8eb93a1785d8788d9021e06b75a10cb36f119f0f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-27 09:51:10 +00:00
Tobias Hunger
d8d2dc6adb CMake: Report special utility targets in BuildDirManager::buildTargets
Report special utility targets like "all", "clean" and "install" from
the BuildDirManager and update UI accordingly.

Change-Id: I01d0dcfa23d5bddc124c8f9ee1040475184c9c1e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-27 09:51:01 +00:00
Tobias Hunger
e7b4e91fec CMake: Define an "install" target
Change-Id: I036ddc3bfb91fc3a5a9e8923db2befbf60e89a77
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-27 09:50:54 +00:00
Eike Ziller
531fba61f0 Merge remote-tracking branch 'origin/4.3'
Change-Id: Ie18d823d0940113e8a78c81204b7a7ca07a060ba
2017-04-26 10:16:38 +02:00
Eike Ziller
73f2c0f4e8 Allow giving TextEditorFactory custom CommentDefinition
It was not possible to set custom comment styles.
Also simplifies the code for the predefined styles.

Change-Id: Id7f345d65b747bfac5a15e3eb15cd2beb106b281
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-04-26 07:34:29 +00:00
Tobias Hunger
b2fe7c9ad1 CMake: Use canonical source directory when talking to cmake server-mode
Use the canonical form of the source directory when talking to cmake.

Cmake will save the canonical source directory in its settings and will
fail if that is not passed in again.

Change-Id: I1ea578053c8d5136d09b3f503443bd0188ebca4f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-25 15:31:21 +00:00
Tobias Hunger
eb8075f569 CMake: Compare canonical paths when checking source directory
Compare the CMAKE_HOME_DIRECTORY to the canonical project paths during
cmake project import. CMake makes sure to store the canonical path
there.

Change-Id: I4ae3ad1f8fab66a50ba98d4266c78cdb4d21f2ea
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-25 15:31:06 +00:00
Eike Ziller
56233f67e1 Merge remote-tracking branch 'origin/4.3'
Change-Id: I01d7d8aa282f2bca94f85f55c832c76672e229f7
2017-04-25 16:15:04 +02:00
Eike Ziller
9443f7104b Remove the need to create ISnippetProvider subclasses
Change-Id: I1810aaa945136d9726a66dad41377429a6adc8e1
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-04-25 12:03:08 +00:00
Tobias Hunger
1e178915df AbstractProcessStep: Free output parser chain in error case
Change-Id: Ie0dc094068bfa56f728d84ee13e70efbc980f8b3
Reviewed-by: hjk <hjk@qt.io>
2017-04-25 09:23:21 +00:00
Tobias Hunger
b5ab98dfd5 CMake: Simplify code
Use defined helper method instead of duplicating code.

Change-Id: I1eec61f99875ccd28e6e64bd5ad2bfd7e6e21eb3
Reviewed-by: hjk <hjk@qt.io>
2017-04-25 09:22:33 +00:00
Tobias Hunger
79f5a27568 CMake: Use RCs buildSystemTarget when deciding what to build
Use the RCs buildSystemTarget property when deciding what to build
with the "build current executable only" property set. This makes
the selection more robust.

Change-Id: I0dbcd764a06428b441084e6e4dc680e106c6d3bd
Reviewed-by: hjk <hjk@qt.io>
2017-04-25 09:22:17 +00:00
Tobias Hunger
cad16c4bee CMake: Fix up file group information in server-mode
Server-mode reports a filegroup for all the listed headers and will
provide that without any information on the files (no language, include
paths, etc.).

Fix up file groups like these by using the best (with that being the
settings that effect the most other files) possible information for
these files.

CMake has no idea what headers are, so it has no way to provide any
better information, so Creator has to fix things up again:-/

Task-number: QTCREATORBUG-17971
Change-Id: Ib5ddab23cf725c7e03717b577cc9f9edc5bbfc61
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-25 09:21:16 +00:00
Tobias Hunger
ff46e67971 CMake: Use for instead of foreach
Change-Id: I4e2c929414cf1f7b052ae9f6846f43ae20fcee4c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-25 09:20:38 +00:00
Tobias Hunger
7a388e7b4b CMake: Improve emission of enabledChanged signals of build configurations
Change-Id: I542b93512466727ac4ee66a8ca41e503106ebdcb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2017-04-25 09:20:16 +00:00
Alessandro Portale
3624a663d8 Reduce usage of qApp in favor of static function calls
Q*Application classes have unusually many static functions. In many
cases in our code, these functions are unnecessarily called as instance
functions, using the qApp helper.

This patch replaces many occurencies of qApp with the according
Q*Application classname.

Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124
Reviewed-by: hjk <hjk@qt.io>
2017-04-24 18:36:28 +00:00
Eike Ziller
88897f3a87 Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/genericprojectmanager/genericproject.cpp
	src/plugins/genericprojectmanager/genericproject.h
	src/plugins/genericprojectmanager/genericprojectnodes.cpp
	src/plugins/genericprojectmanager/genericprojectnodes.h

Change-Id: Ie0c870f68c8d200a75489b75860987655b2f6175
2017-04-19 09:56:14 +02:00
Tobias Hunger
598100c765 CMake: Do not try to update project data when an error occurred
Do not try to update project data when an error occurred in server-mode.

Change-Id: I6a1cf4b6e79fd6ddf5329195861f34cd7f1ca44d
Reviewed-by: Florian Apolloner <florian@apolloner.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-04-11 14:46:14 +00:00
Tobias Hunger
0951589420 Project: Unify handling of displayName
Unify the handling of displayName with a proper changed signal across
all projects.

Change-Id: I7e503528854b85f6f38de4b0943775f82a0d6123
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-04-07 14:49:51 +00:00
Tobias Hunger
5972f7fac6 CMake: Deduplicate targets in server-mode
CMake server-mode does report targets for each "PROJECT" that was
encountered before the target was defined. So it reports several
copies of the same data all the time. Deduplicate that information.

This fixes files being duplicated in the code model and the project
tree.

Task-number: QTCREATORBUG-17955
Change-Id: I95daa0f48e37587234d7e04e9bed6d20884f8be0
Reviewed-by: hjk <hjk@qt.io>
2017-04-07 11:45:06 +00:00
Tobias Hunger
06ccc35b3b CMake: Clear error flag in CmakeBuildConfiguration
Remove/refresh the error message in the CMake build configuration when the enabled
state changes.

Task-number: QTCREATORBUG-17948
Change-Id: I0f210fc572dde40a9adfee7ec2d934926d576d61
Reviewed-by: hjk <hjk@qt.io>
2017-04-07 11:43:45 +00:00
Tobias Hunger
fd48d1fc02 CMake: Do not add empty "<Headers>" folder
Do not show a "<Headers>" folder if that is empty.

Change-Id: Ife37691600accb176b69eba9bc7e323fa1a01ae6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-06 09:48:25 +00:00