A couple of tooltips in Qt Creator, contain rich text (HTML). These
tooltips tend to have line breaks in unfavorable places, making the
content sometimes hard to read.
This is fixed in this change by using: style="white-space:pre"
Another issue with some tooltips is that they show key/value definitions
in a <table>, which, especially with longer keys makes looking up the
value quite hard. Also the length of the key column is dependent on the
(translated) content.
This change implements an alternative: using "description lists" <dl>,
which indent the values nicely independent from the key length.
Fixes: QTCREATORBUG-27553
Change-Id: If047627193413f23d868c52f005f22aa9a0752a9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
When the user changes or adds new CMake Kit parameters, the changes
are reflected in the Initial Configuration.
Change-Id: Icca1c76749c772e946ff250f94b7965cf7cf9ee8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Previously all values coming from "Batch Edit..." would be considered
as user changed values and be displayed with bold font.
This means that if I had -DMY_VAR:BOOL=ON and do a Copy and paste
in "Batch Edit..." I would have it displayed as user changed and
it would be passed to CMake as changed value.
Also it should be possible to start with -DMY_VAR:BOOL=ON, click
the check box to make it OFF and then do a "Batch Edit..." with
-DMY_VAR:BOOL=ON to set the value back to original value.
Change-Id: I5f6cb915b32a3288c1339135dabfd182ca16feda
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
TextColorHighlight is a harsh "egineer red" #ff0000 in all themes except
one, where it is grey. Actually, TextColorHighlight was used in one
place, which now instead uses TextColorError.
Change-Id: Idcd61637edaa045fc718cf35a9d34ff1d5a64dad
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The CMake parameters QTreeView has now:
- alternating row colors
- row selection
Both key and value get the same font and foreground stylings.
- bold when the key is new or the value has been changed by user
- italic when the key has been inherited from kit or initial config
- red when there are differences between the inherited value and
the current value
Change-Id: If09bb2c3e25f59938c5f56e6dd0d6817dfe442cc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Now the "Initial Configuration" and "Current Configuration" displays
in red the mismatches between kit / initial value and respectively
initial and current configuration values.
By having a "Apply Kit / Initial Configuration Value" context menu
entry the user can resolve the mismatches if needed.
Change-Id: I2e272821c3ba396cd8a6b7c81e1437cb3fd4bbad
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Previously the reset button would only work on new items being removed.
User changes on existing items would not be reverted.
Change-Id: I8d9bde058487c9568bfb802f131a29ec32fc1f8c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
If you change the value of a CMake parameter in CMake settings the
new value was not displayed in the tooltip, the old value was.
Change-Id: Ie182ef42f8bf48651d170da8054d7f60f9080088
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The flush there was as a "hack" for the case:
1. failed initial configuration (CMAKE_GENERATOR as Ninja2)
2. successful configuration
The current configuration would get current items with unexpanded
values e.g.: QT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
But flush also removed the expanded values of the selected
initial parameters from CMakeBuildSystem::updateInitialCMakeExpandableVars
This is useful when CMAKE_CXX_COMPILER changes or
CMAKE_PROJECT_INCLUDE_BEFORE gets a new path to the new Qt Creator.
Change-Id: I480ce141d043d8ba6001fa47a54b066762b6a128
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
updateFromKit() is now called on parsingFinished and the configuration
values that differ from the ones in the Kit's CMake configuration
will be displayed in red.
The "Initial Configuration" page will display the mismatches between
kit's CMake configuration and initial parameters.
The "Current Configuration" page will display the mismatches between
the initial parameters and the current CMake parameters.
The Tooltip is displayed with a bit of more space between values
for more readability.
Change-Id: I6ebfa71951cf979ab08f097befed2d43b74e4d6e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Now we have "Initial Configuration" and "Current Configuration"
as tab bar buttons.
This way the UI can be shared between the two configuration states.
Task-number: QTCREATORBUG-26869
Change-Id: I8206032a2a5ac076629865057816edb99706f2ff
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Having groups made from the first underscore is not necessarily
helpful.
In some cases it creates empty groups, which can confuse users.
We have filter and search functionality in the list, which can
help with finding the right items.
Fixes: QTCREATORBUG-26218
Change-Id: I751a59b49184ea57f55d3832ef4edc8a3c33e0da
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Previously the "Force to ..." context menu entries were enabled
only for the items on the second column (values).
There is no reason not to have the same behavior for the items
on the first column (keys).
This way the user doesn't have the impression that something is
wrong if they trigger the context menu on the key and not on
the value in the list.
Change-Id: I02fcaf25340f2dbcbb808be8f27047acaaee5471
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Since CMake's file-api cache is the only source of truth for
CMake configuration, there is no need to keep track of such
a state.
Qt Creator will issue -D<var>=<value> -U<var> command line
parameters for CMake, which will update the file api json files.
Change-Id: I08e7041a95422549502eb7961f96570225e942fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
For the initial CMake parameters one can have an edit dialog. Now it's
possible to batch edit variables also after the project has been
configured.
Change-Id: I406b8e7db16147032a75c82fddf9b7acec85c4bf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
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>
* 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>
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>
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>
This allows editing values with misidentified types in Project Mode.
Change-Id: Ic74da2ca71cc9046cbbeb1202075976c9edd28b7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
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>
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>
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>
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>
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>