Commit Graph

349 Commits

Author SHA1 Message Date
Tobias Hunger
0d10ce3834 CMake: Disable BC if there is an error during initial cmake run
* Disable the BC and give report the cmake error
* Show a warning label in the BC

Change-Id: If5737d033fa2682c264ab7ac1189c59947e3b28d
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:57:19 +00:00
Tobias Hunger
744008ccf0 CMake: Store CMake project configuration in CMakeBuildConfiguration
Store CMakeConfig in CMakeBuildConfiguration instead of the list of
initialArguments.

Update initialArguments to a list of settings on load.

Change-Id: If58fc38296a4627f40062dd407e684c8a9477f6e
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:57:15 +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
Tobias Hunger
761d480453 CMake: Do not ask to rebuild after editing CMakeLists.txt files
This happens automatically now, do not bother the user with that
anymore.

Change-Id: Icc411e74ea5de42037f3718c6b75cc15772a64b9
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:05:12 +00:00
Tobias Hunger
859bf2c5ce CMake: Do not run a cmake wizard all the time
Do not push the cmake running straight into the face of the user. Do it
in the background instead.

This needs some follow-up patches to become really useful.

Change-Id: I3457178b33e3f14bdeac25005a773d17abb73b65
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:04:45 +00:00
Tobias Hunger
fe944e47e7 CMake: Simplify code a little
Change-Id: Ifdfac9bb844c9ab201378a6047714ab64ccebd66
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-22 12:34:42 +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
Marco Bubke
ddd1d4c9cc CppTools: Remove cpptools/cppprojects.[h|cpp]
Change-Id: Ida0e8552d371972c141cf561b28667f4428c6fff
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-13 14:47:27 +00:00
Tobias Hunger
d144ea58e0 Project: Add setRootProjectNode method
Add setRootProjectNode method and a default implementation of
rootProjectNode to Project. Use that in all derived classes.

Change-Id: Id28cde04457a20a8963d43020785ef9d77fea57c
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-11 15:33:26 +00:00
Tobias Hunger
219b2d9c16 Project: Do not save filenames in derived classes
Change-Id: I23960c61676e96c429b59ad8f8247e1b88606b1a
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-11 15:33:11 +00:00
Tobias Hunger
21d204ad5c Project: Add setProjectManager method
Implement default projectManager method in Project and use
these two everywhere.

Change-Id: I27e011e6fdc17b36aff1b8b931527307320e347c
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-11 15:31:04 +00:00
Tobias Hunger
b386dd0e99 Project: Add setDocument method
Add setDocument method, implement document method, use this in all
projects.

Change-Id: I5018bf7c2739665c13eee340184ce7c41fd319bb
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-11 12:18:11 +00:00
Tobias Hunger
8146402e05 CMake: Use Qt5-style connects
Change-Id: I5ec451b55237fcceca86f0134ae081b435dab5c5
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-08 13:33:44 +00:00
Tobias Hunger
1d6c960f05 CMake: Avoid passing CMakeManager around
Change-Id: I96d7f3785767d1d56ca27a2d0af778edf98d63e1
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-01-08 12:50:26 +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
Tobias Hunger
e26617c3ed CMake: Simplify setup of CMakeOpenProjectWizard
The information is contained in the BuildInfo, so there is no
need to provide it a second time.

Change-Id: I512d148e36996130fab6d8e007dd16d5acebaebb
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-01-08 12:17:24 +00:00
Tobias Hunger
a456374088 CMake: Only offer kits with a cmake set up!
Change-Id: Icb4b539e009c9dc5bdf40f8d8b887bb65755b48b
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-01-08 10:12:08 +00:00
Tobias Hunger
4756fbbfec CMake: Do not bother to remember ninja support status
Do not bother to remember ninja support status now that it is no longer
used.

Change-Id: Ief24af8e39ad5e39633ccb6d31858fa003de5ce8
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-01-08 10:11:24 +00:00
Tobias Hunger
e4cdad309d CMake: Move MakeStep to CMakeBuildStep
Change-Id: I2a3432acd90cc27fb444ab30c3239497a51e01df
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-08 08:46:58 +00:00
Tobias Hunger
2b69693828 CMake: Store project name in root node
Store project name in root node and remove the member variable
that was used for this purpose from the CMakeProject.

Makes sure the same name is used more consistently.

Change-Id: I2b60a15143934bdeffe6c744fd300be7e81c674e
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-07 10:37:00 +00:00
Tobias Hunger
6a17eafa05 CMake: Use Utils::algorithm
Change-Id: I6d15c9e68c2e9680668509022d8a771e4c7c595a
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-07 10:15:40 +00:00
Tobias Hunger
5d7f5a2a32 ProjectNode: Rename path() to filePath()
Change-Id: I78bb73f8c9457fd74c470eacbf54eb9195ac9681
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-03 11:01:50 +00:00
Daniel Teske
1c38aa287a Simplify logic for showing UnconfiguredTargetPanel/TargetPanel
This doesn't change when the those panes are shown.

Change-Id: Ie5a2d27321e5268f59775892198999a8414a0adb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-09-18 17:44:33 +00:00
Daniel Teske
014a7b332b CMake: Rewrite logic for kit selection
Some time ago the all the wizards for the Plain C++ were coalesced into one wizard.

Since then the wizard asks first for the targets via a targetsetuppage and then
in the CMakeOpenProjectWizard asked for the kit again.

This patch clean thats up, by always using the TargetSetupPage for kit
selection and removing code from the CMakeOpenProjectWizard for kit selection.

It also adds more types of buildconfigurations

Offer: Debug, Release, ReleaseWithDebugInfo, MinSizeRelease with the
corresponding -DCMAKE_BUILD_TYPE parameters. That argument is saved
in the build configuration and used once for the first cmake run. (Subsequent
runs of cmake don't require passing that to cmake again.)

Also do not require running cmake on creating the buildconfiguraiton, instead
postpone that until the buildconfiguration is made active. With the current
cmake wizard, selecting multiple kits would show a dialog per buildconfiguration.

Change-Id: I3bb806113f4f529f8e291830647d2515a6c4df8a
Task-number: QTCREATORBUG-12219
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-09-16 10:08:52 +00:00
Eike Ziller
c868b9f3ed Merge remote-tracking branch 'origin/3.5'
Change-Id: Ife5fdcd71b0adc99d4297a28a64515e9e93d7864
2015-09-04 09:19:28 +02:00
Benjamin Zeller
4ffb6649ec CMakeProjectManager: Use factories to create runconfig
At the moment RC factories are ignored when creating
runconfigurations or updating them. This patch changes
the behavior so the RCs are first created/removed and
then updated to match the build targets. This way plugins
can provide custom factories and RCs for cmake projects.

Change-Id: I4a7797e7382784e33ecf016e322eab00e20c07e0
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-09-03 10:38:23 +00:00
Robert Loehning
0a1ad894d5 CMake: Fix project tree displaying "." folders
Task-number: QTCREATORBUG-14994
Change-Id: Iea5a820083b8fc1974a749992f937965285370b6
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-09-01 13:37:21 +00:00
Eike Ziller
3b1a966cc8 Merge remote-tracking branch 'origin/3.5'
Change-Id: Iebaabfc2f724cd493b7cab025406531cea5cd2dc
2015-09-01 12:57:51 +02:00
Daniel Teske
13c2c40636 Cmake: Read the build.ninja file only once
The first getCmakeCXXFlags that reads the build.ninja file
stores the contents in the inout parameter cachedBuildNinja.
Further calls to getCMakeCXXFlags just use this cached value.

This prevents excessive locking of this file while constructing
the code model information.

Change-Id: I81e1431194bed6913c69abb2d954068c999a5c1b
Task-number: QTCREATORBUG-14639
Reviewed-by: Tom Tanner
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-08-31 10:20:12 +00:00
Daniel Teske
edad1ba516 Project: Improve fromMap() error reporting interface
Instead of just a bool, return a tristate of: Ok, Error and UserAbort.
Also add a out parameter errorMessgge.

Change-Id: Icb076de49998e9372839d0631c2776e905e4a0f6
Task-number: QTCREATORBUG-13223
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-07-28 10:34:12 +00:00
Eike Ziller
4058ff6fe9 Merge remote-tracking branch 'origin/3.4'
Conflicts:
	src/libs/extensionsystem/pluginview.cpp

Change-Id: I410156c1003d5dc81e915110c6d432bcd71da010
2015-05-07 14:42:46 +02:00
Claus Steuer
81f64f85a0 CMakeProject: Fix CXX Flags parsing for ninja projects
For ninja projects the "build.ninja" file is parsed to extract the cxx
flags for each target. This file is located in the working directory
of the "all" target, however since commit "65c113bc" qtcreator searches
in the build directory of the current target. I have restored the
search behavior to the previous state and added some code to ensure
that the parsed flags really belong to the target

Change-Id: I7cc7f6dbd4f12aec698133206da889037131bb13
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-04-24 09:36:52 +00:00
Benjamin Zeller
255b5850e2 CMakeProjectManager: Support mapping chroot include paths
Provide a way for plugins to map include paths into a build chroot.
Plugins can register a path mapper if required, otherwise the paths
are not touched.

Change-Id: I621982831fa354d6d0f558a6c1dce4e014421f12
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-04-21 09:58:53 +00:00
Orgad Shaneh
4896bb41e9 ProjectManagers: Detect Qt by kit for code-model update
Change-Id: Idf5f8233e4457bb22437d442732432acf0ce313e
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-04-21 09:19:01 +00:00
Daniel Teske
763c4267e0 CMake: Tweak detecting of right project part
Don't consider targets that end in _unittest or _automoc. Also don't
read CMakeDirectoryInformation.cmake as that doesn't work with
add_subdirectory.

Change-Id: If06af60e1637e94cccd32d09fc26c6b87488671b
Task-number: QTCREATORBUG-12183
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-10 14:57:45 +00:00
Benjamin Zeller
cd3238cead CMakeProjectManager: Export CMakeProject
Export CMakeProject to make it possible for plugins
to inspect the BuildTargets of a cmake project.

Change-Id: Ia7eb94689afefee7789e32ec009579856746787a
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-03-10 13:32:01 +00:00
Benjamin Zeller
7ca9f1f277 CMakeProjectManager: Split up cmakeproject source files
Preparing for exporting the CMakeProject symbol. Removing all APIs
from the header file that will continue to be interal API.

Change-Id: I820ea0efb909e6a75be70ccb3b419f841a15cfb3
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-03-10 12:54:52 +00:00
Orgad Shaneh
831fb6181e CppTools: Remove assertions for CppModelManager::instance()
It cannot return null.

Change-Id: I3ac5f33e7e02554edc8df067c7b85518e58c1fc2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-17 10:11:29 +00:00
Orgad Shaneh
88e7f935f4 ProjectExplorer: Use FileName for Node::path
Change-Id: I4a41cfb629be8bb06b4b0616cd4475525e617a51
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-13 13:14:03 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Orgad Shaneh
98723e4557 De-noise some ProjectExplorer/Utils qualifications
Change-Id: Iaec01ca0e7a43592528bcaf4252540561e109919
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-02 13:04:03 +00:00
Orgad Shaneh
8b5dcc13c5 Replace QFileInfo::fileName() with FileName::fileName()
Change-Id: I4852ff215abf25649fc5eac1e922ae901839ca3d
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-29 11:15:43 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Orgad Shaneh
c6a983d271 Core: Use FileName for file path in IDocument
Change-Id: I85f7398aee59d0d36f0e5c3bf88ff3c96002e394
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-12 10:23:37 +01:00
Tom Deblauwe
a700e625ef cmake: Fix finding corresponding source directory from build directory
When trying to find the corresponding source directory for a build directory,
it is better to just read it out of the CMakeDirectoryInformation.cmake file
found in the CMakeFiles subdirectory of the build directory, instead of
guessing it using the relative paths.

Change-Id: Ie96b3255a27f46bcd7f0ab1566dfb91ac52f3be9
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-01-11 18:26:26 +01:00
Nikolai Kosjar
205170a9e5 CppTools: Create ProjectInfos explicitly
...instead of going through CppModelManager::projectInfo().

Now CppModelManager::projectInfo() returns an invalid ProjectInfo in
case there is no valid data for the given Project.

Change-Id: I11908bf2ddf865b1d3d71ff176eaf4139292b21c
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-19 10:16:37 +01:00
Volker Vogelhuber
779f38bded allow out of tree cmake deployment configurations
Change-Id: I78c7e46372ea7a5c1651c420f66c0ce6326d7297
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2014-12-16 16:19:46 +01:00
Eike Ziller
a47fbb8309 Merge remote-tracking branch 'origin/3.3'
Conflicts:
	src/plugins/coreplugin/coreplugin.cpp
	src/plugins/coreplugin/themesettingswidget.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.h
	src/plugins/qmlprofiler/qml/Overview.js
	src/shared/qbs

Change-Id: Ibe92c166fc5bfbcb4d6964e50ca7298d8459d60e
2014-11-24 15:43:48 +01:00
Daniel Teske
049f2dd35c CMake: Add logging output to file -> target mapping
The logic for mapping files to targets is a heuristic, and a pretty bad
one. Add some logging output, which can be enabled by setting the env
variable QT_LOGGING_RULES to
qtc.cmakeprojectmanager.filetargetmapping.debug=true . This will allow
easier debugging of problematic cases.

Change-Id: I17086a30beb8962333109fce9198edde4540d169
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2014-11-20 16:30:42 +01:00
Daniel Teske
0390ece761 CMake: Further fine tune file -> target mapping
Instead of requiring that the target's source directory is a parent of
all source files, use a distance between the source and directory and
the file. This will find the wrong CMakeLists.txt in more cases but also
is much more likely to lead to using the fallback target.

This makes code completion work for http://github.com/dream3d/dream3d/

Change-Id: Ic035454c5eabe361bc7c46bd943e9a9cdee730e3
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2014-11-20 16:30:38 +01:00