Commit Graph

60 Commits

Author SHA1 Message Date
Tobias Hunger
57662de841 CMake: Remove tealeaf reader mode
*** This removes support for CMake < 3.7 ***

Change-Id: Iddb0bab1a61b814adb4cb7ffa217284e96cb1140
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-19 14:05:42 +00:00
hjk
c75923756a Core: Provide empty implementation for IOptionPageWidget::finish()
Having it pure virtual only lead to a lot of unnecessary
re-implementation.

Change-Id: I37f71d1a160e21b93c7c73a6304b0eb6d5f0441d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-15 12:28:29 +00:00
hjk
fae66e781a CMake: Use IOptionPage convenience pattern
du -s .obj: 108344 -> 106748

Change-Id: I3c3ce0af0f0ba2e32e349d38e8a0a24feeb57485
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-14 11:01:29 +00:00
hjk
64380e1177 Cmake: Use new settings page convenience for CMakeSettings
Following the pattern introduced in 809e62e373.

Change-Id: I3fc42afcdfd71634bd0749cb970c4bf94ed7932a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-07 14:04:38 +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
Tobias Hunger
e38ccf16cd CMake: Make use of CMake-provided .qch files
* Have UI to select a .qch file location in CMake Tool setup
* Auto-detect CMake's .qch file in its default location (relative
  to the cmake executable)
* Register the .qch files with the HelpManager

Task-number: QTCREATORBUG-21338
Change-Id: I4057eec42c39535012d9f0daf788fc62ef20d544
Reviewed-by: hjk <hjk@qt.io>
2019-10-16 10:40:03 +00:00
Eike Ziller
dbfa55f5fc CMake: Do not run GUI CMake tool on macOS
We may neither run "/some/path/CMake.app" nor
"/some/path/CMake.app/Contents/MacOS/CMake",
so add a missing workaround for the latter, and use the "resolved"
executable path for the retrieval of version info and capabilities.

Change-Id: I6fed8cc478c0d0b9946a934fd83126e157bde992
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-08-12 13:52:25 +00:00
Eike Ziller
42ea10892c CMakeTool: Fix disabling of "Autorun" property
Could no longer unset "Autorun" for CMake tools. Broke in
de6faa0f15

Change-Id: I0b6e9e64de591e1128ff0dabf4eedb40e1a3748c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-08-12 12:54:39 +00:00
Eike Ziller
ff503740ce Run CMake via canonical path instead of warning
Running CMake via a non-canonical path (including '..' in the path, or
via a symlink) can result in funny errors.

de6faa0f15 added a warning for that
condition. Unfortunately the auto-detection of CMake can return a path
to a symlink (e.g. for CMake from brew on macOS). Also it is helpful to
use a symlink to e.g. manage different CMake versions.

Instead of warning about the condition, and forcing the user to resolve
it manually, simply run CMake via its canonical path when actually
running it from Qt Creator.

Change-Id: I95623b45c5436a6d61c1419b7aba23e2a73a0650
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-08-12 12:54:28 +00:00
Tobias Hunger
de6faa0f15 CMake: Better warnings for strange/invalid CMake binaries
Warn when cmake is configured to use a non-canonical path. This might
trigger problems in CMake itself.

Show this warning in the Kit as well as in the CMake options page.

Also complain other issues in the CMake options page.

Task-number: QTCREATORBUG-22583
Change-Id: I841341db8305f9152543487ce9ceeab2eca0b2b9
Reviewed-by: hjk <hjk@qt.io>
2019-08-05 15:13:40 +00:00
Tobias Hunger
0b493a351e CMake: Fix WS
Change-Id: I5bd56e994c5aacc0c4086c4eae1242b2d977a2ec
Reviewed-by: hjk <hjk@qt.io>
2019-08-05 15:11:24 +00:00
Tobias Hunger
b06f235989 CMake: Report extra information of cmake in tooltip
Report version information as well as support for fileapi and
server-mode in a tooltip you get by hovering a cmake version in
Tools->Options->Kits->CMake.

Change-Id: I2c4070b0b26eb4a056925ac5e10774e93ad62c46
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-07-25 12:15:51 +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
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
Alessandro Portale
ad474f5fcb Fix: member initializer for 'm_fooBar' is redundant
warning: member initializer for 'm_isValid' is redundant
[modernize-use-default-member-init]

Change-Id: Icd521e7d77054512bc0ed6b95cf08440320b0ce0
Reviewed-by: hjk <hjk@qt.io>
2018-07-12 08:19:00 +00:00
Tobias Hunger
58ebcbe0ec CMake: Use unique_ptr to store CMakeTools in CMakeToolManager
Change-Id: I4dfb76b40e22da745b80c359d544fa2b6d3dac52
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-07-10 09:00:06 +00:00
Tobias Hunger
9763851dc5 CMake: Fix SOFT-ASSERT on cmake tool removal
Change-Id: I721e71547976ecad57ed85080c67fb28fda4f8c4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-06-04 09:41:12 +00:00
Eike Ziller
d1ec4c1204 Clean up options page category display name and icon set up
In cases where plugins extend an existing settings category of a plugin
that they depend on anyhow, they do not need to specify the translated
display name and icon for that category.
Some options pages were already not setting the icon, but still the
translated name, which makes even less sense.
Clean up this mess, only setting display name and icon if that is
necessary.

Change-Id: I8bc9d0c51b11d48f1d847337838704d663e70b45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-04-23 11:12:26 +00:00
Eike Ziller
ab7960f6cf Move Project::makeUnique to Utils
This is more generic than projects

Change-Id: Ifdbc57ff48f9fd4a40e6149ba636e0a55cbac502
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-11 06:42:27 +00:00
Alessandro Portale
5915779e81 ProjectExplorer: Make the Options/Kits Category icon themable
Change-Id: I70c3fffd11b217937d6a85e88da1de688031b8e0
Reviewed-by: hjk <hjk@qt.io>
2018-02-28 18:36:00 +00:00
hjk
5afab6f018 ProjectExplorer: Create and populate 'Kits' settings category
Kits are a central concept and structure in anything build and run
related in Creator, their organization is crucial for the functionality
of Creator and deserve to be emphasized over other, often more cosmetic
settings.

This is the first step of two, the second step would be moving
the Device (list) page also in this category, possibly after some
reorganization in the Device category.

Change-Id: I4abc89472d0575c691fc9e5051397833126e5456
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-01-24 16:35:39 +00:00
Tobias Hunger
8fb3105e25 CMake: Add option to auto-create build directories
Add an option to CMakeTools to force auto-creation of build directories.
This does lead to cmake cluttering up the file system with directories, but
does not force users to go through the oftentimes long configuration process
twice (once in a temporary directory and once in the real location).

Task-number: QTCREATORBUG-16794
Change-Id: I68d92fc58638ad0a0a7622b7ef1621e055c9f2a7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:39:18 +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
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Tobias Hunger
9801472d33 CMake: Fix potential nullptr access
Change-Id: I08bcbde9702bb9bea5fe4f24247eb3856e79f339
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-05 18:36:10 +00:00
Tobias Hunger
5478be7676 CMake: Report cmake version
Report cmake version in CMakeTool options page.

Task-number: QTCREATORBUG-16089
Change-Id: I506f87bd7037394dc46e9772305c9f909bcc3548
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-09-27 08:48:28 +00:00
Alessandro Portale
e809594fae Core: Make IOptionsPage::categoryIcon a Utils::Icon
This is necessary for themable + HighDPI icons in the options dialog.

Change-Id: I8e3ff87a24591af40bb76b39cd970443d7678fae
Reviewed-by: hjk <hjk@qt.io>
2016-09-20 12:52:49 +00:00
Tobias Hunger
2e284db28d CMake: Add tooltip to autorun cmake checkbox
Task-number: QTCREATORBUG-16778
Change-Id: I94cdb9058943774007b406e29f5ca52251b5ab59
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2016-08-29 12:45:09 +00:00
Tobias Hunger
c0d1c0c587 CMake: Make Autorun CMake checkbox translateable
Change-Id: Ia2c5094e08efa8dffc9a7a843a65d825e3e95ff0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2016-08-29 12:45:05 +00:00
hjk
53415cece1 Utils: Streamline TreeModel API
The LeveledTreeModel case is general enough to cover
the UniformTreeModel case, so merge them and rename to
TreeModel. The former TreeModel is now BaseTreeModel.

BaseTreeModels should not be instantiated directly,
a tree model with non-uniform basic items is available
as TreeModel<>.

Done-with: Eike Ziller <eike.ziller@qt.io>
Change-Id: I64a65617ab68c0cde39cf65f4bc092ef808ee6fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-27 08:00:40 +00:00
hjk
e48451b0a3 TreeModel: Consolidate child()/childAt() and rowCount()/childCount()
We never used the possibility to overload the virtual child() and
rowCount() functions, it's unlikely to be needed in future.

Change-Id: I7ebdf4dfc70bb0bcadea9ef3fb88f16632a95696
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-07 13:39:15 +00:00
hjk
7b4c7d49a9 TreeModel: Introduce a destroyItem() convenience function
Shorthand for delete takeItem(...).

Change-Id: Icb7b60e5c19aa0d21650eefff65f7eb55e9f90b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-06 11:41:55 +00:00
Tobias Hunger
d8ed91c44f CMake: Add per-cmake option to not automatically run cmake
Task-number: QTCREATORBUG-15934
Change-Id: I54fdb505a451fb269c3747a370c8dfd7043c6c9d
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-28 09:09:10 +00:00
hjk
2536c2bfc7 TreeModel: Re-order template arguments for tree levels
More natural and easier to extend to use parameter packs later.

Adjust users.

Change-Id: Ic167196cc969d18bb1615084397e884f769d1e85
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-06-24 07:34:13 +00:00
hjk
fb482846fc TreeModel: Add a StaticTreeItem(QString) convenience constructor
Covers the common case and hopefully avoids the recurring MSVC
problem with initializer lists in this location.

Change-Id: I1b2bbb083f9fc86af3b51b8f52615fb70c832b95
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-17 08:09:48 +00:00
Tim Jenssen
96a3d49b07 msvc2013 can not handle 1 item initializer lists
Change-Id: I44b3c3888f15a6b68ddaed2777b90cf4057792b1
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-06-15 10:55:46 +00:00
hjk
b281d6dad7 TreeModel: Introduce a StaticTreeItem
This splits out the case of static string displays from the
TreeItem base class, making the base more lightweight.

Change-Id: If1f442011ec60094399a41b65d9b5015f432f82e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-06-15 08:55:16 +00:00
hjk
0c1cdc3a4a Decorate root items in debugger and cmake options pages
More consistent with Kits, Qt versions and Compilers.

Change-Id: I16bb497a9fb17f271ffbf89e746d478b3aecb6a9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-06-15 08:41:30 +00:00
hjk
b8b56659ed CMake: Use a LeveledTreeModel for settings page
Change-Id: I4ff30c260f7b106f65f070d83f929e901ec287d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-10 12:56:50 +00:00
hjk
639b372b3e CMake: Prevent creation of duplicated entries on apply()
Hitting 'apply' after adding a custom cmake in the setting
duplicated the entry.

Change-Id: Ibfaf35b4c9b44d98e90b812269c464da2019cea1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-10 12:48:22 +00:00
Mashrab Kuvatov
5ca8a921f6 cmakesettingspage: Update model on add/remove CMake tool
Connected signals on add and remove CMake tool from CMake manager to the
appropriate slots of the view's model. Now, the view is updated when CMake
tool added or removed using CMake manager's API.

Task-number: QTCREATORBUG-16396
Change-Id: I913546f7554b6c9baa70237835e5a7e3d9137af7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-09 08:20:20 +00:00
hjk
dee7ad3806 TreeModel: Rework tree iteration
Use function objects to apply directly during a depth-first
walk of the tree instead of faking a flat container of tree
nodes. Less code, and allows even some non-const operations.

Change-Id: I804ab11df358fe937b40809cbcb772e6f3ff8dc5
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-05-12 12:30:36 +00:00
Tobias Hunger
5c5e5a3aae CMake: Remove "Prefer Ninja" checkbox on CMake Tool page
This is no longer needed now that the generator is a property of the
Kit.

Change-Id: Ife35fd9207c805a4ead1e067603df1bfc77e6855
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-15 11:06:24 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Tobias Hunger
b2b6d3c526 CMake: Semi-automatic cleanups
* Shorten header guards
* Use override and auto where possible
* Remove useless destructors, etc.
* Remove private slots sections, unify private: sections
* Use member initialization where it makes sense

Change-Id: I00eaf6d706adc16859176d1b68c631d3336bb39f
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-01-08 12:17:41 +00:00
Leena Miettinen
2af989376b CMake: fix UI text
Change-Id: I6803aa799e495007358dbc5f5ee6b8e1d2c6e874
Reviewed-by: Benjamin Zeller <benjamin.zeller@canonical.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-23 12:53:28 +00:00
Benjamin Zeller
465722be78 CMakeProjectManager: Remember the preferNinja setting
There was a problem in the CMakeSettingsPage that prevented
the preferNinja setting to be remembered. This patch fixes
it.

Task-number: QTCREATORBUG-15162
Change-Id: I9ffaa67e05f2c99b5e9136f3c98004c68d03dede
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-09 15:43:57 +00:00
Christian Kandeler
8d3aa026e0 Utils: Rename PathChooser::changed() signal.
The name is overly generic, particularly with a pathChanged() signal
also present. Rename to "rawPathChanged", which adequately describes the
semantics.

Change-Id: Ia62b8b0a97a794cb6d5ad6b8ce0abcd36b5f5cdb
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-09-03 11:12:57 +00:00
Sergey Belyashov
007daabff5 Fix i18n problems
In the QmlEngine, a few tr() have been replaced by
QCoreApplication::translate().
In other files, Q_OBJECT has been added to the class definitions.

Change-Id: Ia0505c19934dc691cd3d67f4946293290c2fec68
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-07-23 19:19:06 +00:00
Eike Ziller
b1393d4778 TreeModel: takeItem should return the item
The usual Qt API for "takeXyz()" methods is to return the item that was
"taken".

Change-Id: Ie144051801487a301b3f13e2857735b65f58150b
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-10 08:05:32 +00:00