Commit Graph

11 Commits

Author SHA1 Message Date
Tobias Hunger
5350288e45 CMake: Fix includes all over the CMake plugin
Keep internals internal, remove some unnecessary includes, add
some that should have been there.

This reduces the number of files that get rebuild when working
on CMake internals from over 1000 to about 200.

This patch also moves some code around that ended up being
in the wrong file.

Change-Id: Icd7366ac760dc85031040720418fbb16336dce9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-20 10:05:24 +00:00
hjk
79b680e7f0 Utils: Rename PathChooser::{f,setF}ileName() to {f,setF}ilePath()
It's returning a FilePath, so it's a better fit.

Keep the old versions as inline function now to ease downstream migration.

Change-Id: I535887928018f42b92895c8b0c82527f0d55e5ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-04-09 17:30:23 +00:00
Eike Ziller
0f30adcc8c Merge remote-tracking branch 'origin/4.11'
Change-Id: I949f4f63abe12e11c4598c98295bfccc82e0ebdb
2020-01-09 11:18:44 +01:00
Christian Stenger
04b3c56a2b CMakePM: Fix license header
QC uses GPL nowadays.

Change-Id: I6229deb09fadb1f7b1b210ba17ac4d0f3858023d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-08 14:10:13 +00:00
hjk
84d0e3dda8 Utils: Use FilePath for PathChooser::m_baseDirectory
... and collapse the two accessor versions to one.

Change-Id: I282753a0092601cff073684053ff914016452645
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-12-19 07:59:13 +00:00
Cristian Adam
f930fb2b75 CMakeProjectManager: Do not convert PATHS to user output
CMake works natively with / for paths, if we convert them to \ on
Windows, and then give back to CMake, we end up having bad paths.

Change-Id: I44da27ba4927ec5b83c8e381a8c65ca3fca3505b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-11-07 13:52:35 +00:00
hjk
251287f0d3 Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.

Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 11:55:59 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +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
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
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