Commit Graph

21 Commits

Author SHA1 Message Date
Alessandro Portale
17f169c291 CMakeProjectManager: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using

Change-Id: I6a272bc3b75835840b3d6cbe83be6f50f94bbedb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-11-25 07:50:15 +00:00
Orgad Shaneh
7d3a79c696 Utils: Purge asConst
Replace by qAsConst.

Change-Id: I3301366f73c066c86f08df7188d70dc3b613c55c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-04-09 09:04:00 +00:00
Tobias Hunger
3f73f3a4f4 CMake: Fix "CMake settings have changed on disk"
* Improve the UI by showing settings in CMake and the project
* Fix setting CMake configuration to project

Change-Id: I6e127344551fa00f3f7e6170465cb3dda2e4a634
Task-number: QTCREATORBUG-17555
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-24 11:10:30 +00:00
Leena Miettinen
f4cd9cdb6a CMake: Fix UI text
Change-Id: I3587084925089c7bb7ffb9cfb09f6b822b215cd8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-24 08:47:52 +00:00
Tobias Hunger
b1157e4e63 CMake: Allow to unset configuration values
Change-Id: I649323e3c2cc51ea69dd7e216f30eeb653f3873b
Reviewed-by: hjk <hjk@qt.io>
2017-10-17 08:21:07 +00:00
Tobias Hunger
02533e61cf CMake: Fix project parsing notification
This builds on top of 08677c0b01 and
fixes one more code path to go through a common entry/exit point.

Change-Id: I1d00fa9242f247028e5d3b0ef3b5fe1d3f4cb03d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-06 09:53:40 +00:00
Tobias Hunger
be376ae706 CMake: Enable type forcing for CMake configuation values
Allow to force the type for CMake configuration values, now that
this type changes how you can edit the values.

Change-Id: Id89e0ec8547b778fc0aff9a2e00c0d7406cbcac1
Reviewed-by: hjk <hjk@qt.io>
2017-09-19 13:17:50 +00:00
Tobias Hunger
f4ff420036 CMake: Improve delegates for CMake configuration
Change-Id: Ib1d2bfca1b2faafd36c53f24c6649e73ee0af190
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 08:42:20 +00:00
Tobias Hunger
dfec256dff CMake: Allow CMake configuration to be forced to string type
This allows editing values with misidentified types in Project Mode.

Change-Id: Ic74da2ca71cc9046cbbeb1202075976c9edd28b7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-18 11:36:51 +00:00
Tobias Hunger
df22d2c717 CMake: Do not lose value when renaming key in config model
Do not lose the value when the key gets changed in the CMake configuration
view in Project mode.

Task-number: QTCREATORBUG-17926
Change-Id: I7c55f815bc918da0267eed57385c2d641568dc8c
Reviewed-by: hjk <hjk@qt.io>
2017-09-15 12:10:29 +00:00
Tobias Hunger
63ce81db5e CMake: Sort Project CMake configuration via the Proxy model
Makes renaming items feel more natural as they do no longer stick to the
top (note that currently you can only rename newly added items!).

Change-Id: I89d0dc7cb73e08d8b60900a96ffd2ab1c2b490c2
Reviewed-by: hjk <hjk@qt.io>
2017-09-15 12:10:19 +00:00
Tobias Hunger
cacb6b17d0 CMake: Group entries in project configuration
Change-Id: I6aa797f5ff49a5cc33dfbdf0b25dcd78abbff66e
Reviewed-by: hjk <hjk@qt.io>
2017-09-12 12:55:51 +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
Tobias Hunger
087d6d7472 CMake: Mark changes to CMake configuration that contradicts a kit
Mark changes in the project that override configuration settings from the kit.

Task-number: QTCREATORBUG-17244
Change-Id: I3452116ad5f4626ffcd85dfcc86715b6946d6572
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-20 12:48:22 +00:00
Tobias Hunger
df62701801 CMake: Mark configuration items that were taken from the CMakeCache.txt file
Change-Id: Id9e707d7b07d35ade44959955db61810e34f7b30
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-19 16:05:11 +00:00
Tobias Hunger
5a88e4c9ad CMake: Fix the config model merging data
Old user-settings used to get lost.

Change-Id: I5197c3b57b12d94e7464a86261a1364dd9aca266
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-02 12:00:03 +00:00
Tobias Hunger
aa118539a4 CMake: Fix warnings about cmake configuration model
The index was handled wrongly.

Change-Id: I8a98c7a16e32798a9b7662c6c5c1683d248580da
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-10-27 15:01:53 +00:00
Alexander Drozdov
76b76f2723 CMakeProjectManager: Support drop down selector for options
CMake provides "hack" for cmake-gui, that allows set options variants
and select then from drop down list. Allows Qt Creator re-use this
solution.

See:
- https://blog.kitware.com/constraining-values-with-comboboxes-in-cmake-cmake-gui/
- http://blog.bethcodes.com/cmake-tips-tricks-drop-down-list

Drop down values can be added to option via:
 SET_PROPERTY(CACHE OptionName PROPERTY STRINGS Option1 Option2 Option3)

This solution should not restrict to provide any other value, it
provides only suggestion for user to select one of prdefined values.

Change-Id: I8fc52155775f1e04979db8206bb42363df9359e8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-10 15:07:30 +00:00
Stanislav Ionascu
c1d735503b CMake: make it possible to insert new vars in project settings
Task-number: QTCREATORBUG-16238
Change-Id: If98acc4f27cabbb606b2fc1017096da626ba1144
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-05-24 08:44:57 +00:00
Tobias Hunger
b910b36458 CMake: Also treat "yes" as true for boolean settings
Change-Id: I78426ec5b6b2cf0a1d4cca26202632b27e2036e9
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-05-20 11:55:19 +00:00
Tobias Hunger
28e4306865 CMake: Add UI to display and edit cmake configuration
Change-Id: I95944dcd58dc86023c2757068979f92b8989011b
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:57:11 +00:00