Commit Graph

288 Commits

Author SHA1 Message Date
Tobias Hunger
2a34f2177c ProjectExplorer: Hide build page for projects that do not build
Change-Id: I56feaab67690b5ece7379a9c1f676392230de107
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-04-19 13:21:52 +00:00
Tobias Hunger
460fdc02e0 ProjectExplorer: Report project-specific kit errors/warnings
Report project-specific warnings about the kit used in Project Mode.
E.g. a python project should not complain about missing toolchains,
while a qmake project should.

Change-Id: I5ce6742683cdeffc7ff3f1a3e8f0b89aee9aa0b4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-04-19 13:21:45 +00:00
Tim Jenssen
e0c8ec8f79 QmlProject: simplify code
Change-Id: I3cfee42b63bf840bf2ecde54c5f2d277d7a32e7c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-04-06 17:23:30 +00:00
Tobias Hunger
97ede133a9 QmlProject: Fix selection of supported kits
This now fixes the auto-selection of kits for me.

Task-number: QTCREATORBUG-19717
Change-Id: I39581ab2471211e9553c345164bb3ce788242dad
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-09 10:56:24 +00:00
Tobias Hunger
8ae505f30e QmlProject: Unify selection of supported kits
Change-Id: Ic33e9688d823bd09664e5dc74fe5253cb5fcbc58
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-09 10:56:17 +00:00
Thomas Hartmann
0474216e2f QmlProject: Fix import paths for code model
This fixes a regression introduced by
30638df441.

Custom import paths have to be absolute for the code model.

Change-Id: I232229fa58c3900fe684ca4529b2ed08bf93e8be
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-02-26 13:31:23 +00:00
Thomas Hartmann
ef9ac8f2f4 QmlProject: Add support for setting the environment
This allows setting arbitrary environment variables
in the .qmlproject.
This is required for example qtquickcontrols2.conf
and QT_AUTO_SCREEN_SCALE_FACTOR.

Task-number: QTCREATORBUG-19513
Change-Id: I8421a9fc7f85d24b3564f1b60f383be3838f2af4
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-02-02 07:18:20 +00:00
Ulf Hermann
e44504371c QmlProjectManager: Prepare for running on remote devices
We add a "targetDirectory" property to the file format and fill in the
deployment data.

(cherry picked from commit fba61c5b55)
Change-Id: If207cd5c77175c54cffdb5df92ea85c425cd3191
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-29 09:04:45 +00:00
Ulf Hermann
8964de84d3 Remove qmlsceneCommand() and qmlViewerCommand() from BaseQtVersion
qmlviewer is QtQuick1 and not supported anymore.

The qmlscene command is in general not a property of the Qt version but
of the target device, as we generally assume Qt binaries to be
preinstalled on the target and qmlscene is executed on the target.

DesktopQtVersion retains a method to retrieve the qmlscene path as there
target == host and having the method available enables us to warn if the
binary is missing.

Also, QmlProjectManager needs to pick the qmlscene command from the Qt
version if it's a desktop Qt.

Change-Id: I2ee0f993e60b96d672080db2db0a6abe5ca933e3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-01-08 09:13:56 +00:00
hjk
8e92c28573 QmlProject: Remove unneeded reimplementation of rootProjectNode
Change-Id: I0ffd72ae6be2cc94daf3e84a713c55088d463ab1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-01-03 10:35:37 +00:00
Ulf Hermann
544ac85191 QmlProject: Avoid error messages about missing build configurations
Override the target setup, so that we don't try to initialize build
configurations.

Change-Id: I8f8022c705ea54dd66df828fdb4837d4a41bc96e
Reviewed-by: hjk <hjk@qt.io>
2017-12-21 08:44:23 +00:00
hjk
b2a16190e8 Use project id uniformly as project context
The possibly intented flexibility e.g. to have different project types
share the same idea of a common context was never used, in all cases
we had a 1:1 relation ship between project ids and ids that were used
as context. This led to oversights like the one fixed in 60fb35a2.

This patch here uses the project id unconditionally as context and
drops all context ids. If we'll ever have the situation where the
original flexibility was needed, Project::projectContext() could be
made virtual and overridden were needed.

Also, the context was never modified for any given project, so the
updating machinery is not needed.

Change-Id: I3f7fac0ed5e4704e126558987c48577f26082dfd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-20 12:35:14 +00:00
hjk
4a66cae854 ProjectExplorer: Use ids in RunConfigFactory:: setSupportedProjectType
More similar to what build/deploy uses.

Change-Id: Icf8bd7031d00a6e2831f8c1f3b1bdcaa8bf259b4
Reviewed-by: hjk <hjk@qt.io>
2017-12-19 09:42:01 +00:00
Tobias Hunger
8cd2c234db QmlProjectManager: Fix warning about unused lambda capture
Change-Id: I3fd8f89dc3f5f54a7479c7e1d118766fedd66ba7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 13:16:26 +00:00
Ulf Hermann
8c504dc61e QmlProjectManager: Drop support for QtQuick1
Change-Id: Id60c9768d8fad03f588207af07bba676dbfc76fc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-11-30 15:57:53 +00:00
Ulf Hermann
b2c2c7d642 QmlProjectManager: Detect file types correctly
Just calling everything "Source" is not very helpful.

Change-Id: I74a19e46782aa301c5726130200aeb16ef916d78
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-11-23 11:15:27 +00:00
Tobias Hunger
131c7a1c4e ProjectExplorer: Introduce base class for enabled/disabled project configuration
... and use this as a base for all RunConfigurations.

Clean out code in the individual run configurations dealing with their
enabled/disabled state.

Change-Id: Icc2ea136b056f7aea7ce96480b4402459d7ac0ce
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-28 17:26:03 +00:00
Tobias Hunger
09b127f9f1 Project: Move signalling of parsing state into Project
Get rid of duplicated code to do such signaling in derived Project types.

Change-Id: I26914a1d751d72ee65c15a7943e0e7f34978f042
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-26 09:29:21 +00:00
Tobias Hunger
8793d0f0fa QmlProject: List .qmlproject file in project tree
Task-number: QTCREATORBUG-18057
Change-Id: I6a38093d1b6fdaeac7920746395cfbebc595d062
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-04-24 07:48:35 +00:00
Tobias Hunger
0951589420 Project: Unify handling of displayName
Unify the handling of displayName with a proper changed signal across
all projects.

Change-Id: I7e503528854b85f6f38de4b0943775f82a0d6123
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-04-07 14:49:51 +00:00
Tobias Hunger
b0c7bb0f7b Project: Move ProjectDocument setup into Project class
Change-Id: I5c0ec79ddf066e37660fb9a6b24f9d882355d511
Reviewed-by: hjk <hjk@qt.io>
2017-03-29 11:53:24 +00:00
Tobias Hunger
348aa12eaa ProjectExplorer: Provide ProjectDocument and use it in all projects
Change-Id: I6e054ebf1043bd1f6748f1567f35c68394bd6528
Reviewed-by: hjk <hjk@qt.io>
2017-03-29 11:03:34 +00:00
Tobias Hunger
fc5ce1e710 ProjectExplorer: Handle project file list globally
Handle the generation of the list of files in a project globally, based
on the project tree.

Creator now has the concept of TreeManagers which can enrich the project
tree with additional data (e.g. the files found in a resource file), which
the project does not necessarily know about. So use that tree to find
the files that belong to a project instead of implementing similar features
in each project.

Change-Id: Ia375a914a1f2c0adaa427f9eda834eec2db07f68
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-03-27 15:32:13 +00:00
hjk
df73d57295 QmlProject: Simplify interface a bit
Remove unneeded code and don't repeately fetch a singleton value.

Change-Id: I718a44c28be7ef8718f813f987f45b32cbcd7ad5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-15 06:57:31 +00:00
Orgad Shaneh
da7cb91446 Merge remote-tracking branch 'origin/4.2' into 4.3
Change-Id: I4931dcc81be872d7712e67123e94d15ee696459f
2017-03-14 16:20:14 +02:00
hjk
4d8352a6c1 ProjectExplorer: Add a FolderNode::addNestedNode() function
Also, rename buildTree() to addNestedNodes(), it's really
adding things, not recompletely (re-)building the subtree.

Use it whenever possible to avoid intermediate lists of items
to insert.

Change-Id: I5fde41e5b164a8a292410bd381a85f5efadf3471
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-14 12:26:22 +00:00
Samuel Gaist
4033471aa9 QRegExp include cleanup
This patch adds the missing include statements for QRegExp.

Change-Id: Ibb03b929940adb84ae190b5090cb6b88653cc14c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-03-13 22:05:30 +00:00
Tobias Hunger
49fef0ae24 ProjectExplorer: Create initial project tree
Create an initial project tree with a ProjectNode and a FileNode for
the project file itself.

Fix the Projects to not implement their own tree before they have
better data.

Change-Id: I147ccd5603d22d1d60880a97f30fd8c271eac88c
Reviewed-by: hjk <hjk@qt.io>
2017-03-10 16:22:31 +00:00
Tobias Hunger
2fde3fffa9 Make all projects generate a fresh project tree
Do not update the existing project tree anymore: Start a fresh one
and throw the old one away.

Change-Id: Ifabe293b6ca668b0672516a6d81acd5346d98fe5
Reviewed-by: hjk <hjk@qt.io>
2017-03-10 16:22:26 +00:00
hjk
c1bfc5d8ec ProjectExplorer: Follow up on too-much-magic in IProjectManager
Use a ProjectManager::registerProjectType<Project>(MimeType) function,
removing cryptic IProjectManager object ownership.

Change-Id: I212cd25bd4ee757022a8cb0decb4b8de3a112d12
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-09 10:41:33 +00:00
Tobias Hunger
5693a291e3 QmlProject: Move project tree generation out of the ProjectNodes
Change-Id: Ic0dbd0762f92191ee7d7eac47cb5385e1d3b9575
Reviewed-by: hjk <hjk@qt.io>
2017-03-01 13:51:12 +00:00
hjk
8fd17a84b5 ProjectManagers: Cleanup
Remove unused class members, declarations, includes, unneeded
::projectManager overloads etc.

Change-Id: I0f4ae87414faca226554722e2a9147cb5512495d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-28 16:15:03 +00:00
hjk
6c8c624450 QmlProject: Minor code cleanup
Whitespace, namespace, inline trivial functions, ....

Change-Id: Idf7d8c120b54367c8ea98171c21506e2b3f5346b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-28 14:43:29 +00:00
Ulf Hermann
c70b689526 Unify projectexplorer language IDs
We don't need two IDs for C++ and the QmlJS ID should look the same as
as the others.

Change-Id: Ib9747f6b36a90bb652951d85eec69666615670c4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-30 15:34:46 +00:00
Tobias Hunger
25fbcca96b KitManager: Get rid of KitMatcher class
Use std::function instead. Clean up API while at it.

Change-Id: I6e401ab57f5375e36710c30508c596af3f4b3385
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-01-18 10:39:16 +00:00
Nikolai Kosjar
6e6d5b5309 ClangStaticAnalyzer: Tests: Rely on projects telling when they finished parsing
We relied on the CppModelManager to tell us whether a project was reparsed
after a kit change. While this worked, it was not guaranteed that the project
is really finished (and ready for e.g. building) after pushing new ProjectInfos
to the CppModelManager.

Rely on the projects telling when they are finished with parsing. This is more
accurate and future-proof.

The introduced signals in Project and SessionManager are (at the moment)
only for tests.

Change-Id: I1b368ec4585ffa8755eb28fac6d187cce31243ee
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-10-31 15:09:01 +00:00
Orgad Shaneh
32ea9a644d QmlPM: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I8fe343c8e7cfc9b0e620afe4ae947f9e997899f9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-04 10:37:57 +00:00
Tobias Hunger
f4296d7504 ProjectExplorer: Modernize
* Use override where appropriate
* Use pragma once
* Make more constructors explicit

Change-Id: I2865fe10f288e3de570826058e43b70a0cb4ee37
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-03 08:29:08 +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
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
661f436e71 QmlProject: Simplify project node
Change-Id: I370fdb2e6bda67fb4ee5c77d736971460a28a68c
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-11-02 10:32:37 +00:00
Daniel Teske
41f5f5357f QmlProject: Fix restoring/opening of projects
Change-Id: I9e3327c360f76a920a55fc0e59ae19693a19f117
Task-number: QTCREATORBUG-15046
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-09-09 10:14:54 +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
Christian Stenger
9ed467e5c2 QmlProjectManager: Fix connects
Issue was introduced with 063251ebbc.

Change-Id: Id867e2a50f43f6d4e90a9ad3ba618295db96fd35
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-31 11:07:43 +00:00
Orgad Shaneh
b6de2d1bd8 QmlDesigner: Remove unneeded qualifications
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
  next if file =~ %r{src/shared/qbs|/qmljs/}
  s = File.read(file)
  s.scan(/^using namespace (.*);$/) {
    ns = $1
    t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
      before = $1
      char = $2
      if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
        m
      else
        before + char
      end
    }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  }
}

Change-Id: I492792bb9e5655c55795e938031efc557c9a462f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2015-02-18 09:53:25 +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