Commit Graph

381 Commits

Author SHA1 Message Date
Christian Kandeler
4cfaeb8b51 QbsProjectManager: Fix crash when calling QbsProject::files().
We can't do that during parsing, as qbs::Project::buildSystemFiles()
might run into a race condition.

Change-Id: Iae3fd3000fdc71fec50c82d50fb3b4e3888351bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-09-15 11:45:16 +02:00
Erik Verbruggen
7290c43da1 C++: update project info once after finishing adding all project parts.
So that recalculating the information is not O(n^2) but linear.

Change-Id: I69903e0b5ad321d071804d782ad634a3f300e71a
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-12 17:42:32 +02:00
Christian Kandeler
0c3eeab464 RemoteLinux: Create run configs by target name, not by project file.
The current approach fails for all build systems where one project file
can define more than one executable.

Change-Id: Ieda413975709fbd6e7ea87b185aa962f63cb7c1f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-09-09 17:53:14 +02:00
Eike Ziller
49db3a450a Merge remote-tracking branch 'origin/3.2'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/coreplugin/editormanager/editormanager.cpp
	src/plugins/cppeditor/cppeditor.cpp
	src/plugins/remotelinux/remotelinuxdebugsupport.cpp
	src/plugins/texteditor/basetexteditor.cpp

Change-Id: I0da7c1cf2506b12d0563795aa8177fc45e97050f
2014-09-03 16:08:02 +02:00
Thomas Epting
9d95afc803 QbsProjectManager: Write enable project files before adding/removing
Prevent failures in situations where Qbs project files are still write
protected, like e.g. in Perforce VCS.

Change-Id: I2828546adcc314b7c6b0b6720e1cf96733d62fa5
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-08-26 14:13:25 +02:00
Erik Verbruggen
2fa15f221f QbsProject: put different languages into separate project parts.
This is in preparation for changes to the ProjectParts, where one part
can only hold files for 1 language.

Change-Id: If8a64895847806677d5cd51344ae774313798e00
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-08-25 12:55:24 +02:00
Christian Kandeler
da4c7b2a81 QbsProjectManager: Don't leak the "Reading project" progress bar.
If a qbs project gets closed (e.g. due to a session switch) while the
project is being loaded, the corresponding QFuture does not get deleted
and the progress bar will be around forever. This patch fixes that.
Note: The project resolving by qbs was already correctly canceled; this
is about the visual effect only.

Change-Id: If00aed949505088cfdb87d08e26f3b62ccea5fd1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-08-22 11:08:06 +02:00
Nikolai Kosjar
6b5298faf9 CppTools: Move Project{Part,Info} to new cppprojects.{h,cpp}
Change-Id: Ieff216017b9da1e6a12121688ea9572bdd81fd9b
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-08-20 10:28:35 +02:00
Eike Ziller
d9d0aba1c4 Merge remote-tracking branch 'origin/3.2'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/coreplugin/editormanager/editormanager.cpp
	src/plugins/projectexplorer/editorconfiguration.cpp
	src/plugins/projectexplorer/projectfilewizardextension.cpp
	src/plugins/qmakeandroidsupport/createandroidmanifestwizard.cpp

Change-Id: I8de0f6fcdd8d214fbc14e79f74cb0206e6e2c6c1
2014-08-15 16:14:34 +02:00
Christian Kandeler
03b6e23d90 QbsProjectManager: Make sure run configs are available before a build.
This already works for Desktop run configurations, because they get
special treatment for historical reasons. But it does not currently work
for targets such as RemoteLinux.

Change-Id: Iba5191538314146909567bc7b5993dcc0b9d21cd
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-08-07 15:57:47 +02:00
Oswald Buddenhagen
f3a61e8bf7 Merge remote-tracking branch 'origin/3.2'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/android/androidglobal.h

Change-Id: I3367bf2ea47c088989175dddeed2210294346f4c
2014-08-05 14:24:23 +02:00
Christian Kandeler
f488c10c5a QbsProjectManager: Fix project node operations.
The qbsProjectData() member function always returned the top-level
project data, which messed up a couple of things, for instance
"build sub-projects" and the node tree updates.
Instead, return the project data corresponding to the node.

Change-Id: If40c441c62334f0069a5fe3cb4873cf973baf135
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-08-01 16:30:00 +02:00
Christian Kandeler
fb09f5cc01 QbsProjectManager: Re-retrieve project data after build.
This fixes the bug that the "run" action fails if the project has not
been built before (because the path to the executable is still unknown
after the build due to the missing project data update).

Change-Id: I953cbb85051a1de78fcb0490abf58ebc9fcec6e7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-28 12:00:25 +02:00
Fawzi Mohamed
6763352340 qmljs: move defaultProjectInfoForProject to the qmljs library
This removes qmakeprojectmanager and qmlprojectmanager dependency on
qmljstools.
Qmlprojectmanager still imports qmltoolsconstants.h for a constant
but that gives no runtime dependency.

Change-Id: Ifd2e76500a3b27a21937603925f03a70049900e1
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-24 16:54:42 +02:00
Christian Kandeler
cf9d12ed41 QbsProjectManager: Do not offer to add and remove files during a build.
The build graph is locked then. Disabling the action in the first place
is nicer than letting the respective qbs API call fail.

Change-Id: Icfb89b454a240253c9ddc7681b452d06ff0393dd
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-24 14:33:58 +02:00
Tobias Hunger
75ff5062d6 Qbs: Read systemIncludePath and make them available to the code model
Change-Id: Ie16501a78e95f9c50631e5af8e9e8857dfd65b2f
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-07-24 10:24:07 +02:00
Tobias Hunger
37f92acccb Qbs: Make qbs build system files accessible to Locator
Change-Id: I0bdfadbc24b38f86ad5ec668c44f7fe18b7619fe
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-07-22 17:44:12 +02:00
Christian Kandeler
f0b58a22ca QbsProjectManager: Clean-ups in QbsProject class.
- Remove unneeded forward declarations (the header file is included
already).
- Move QVariantMap include from header to cpp file.
- Remove pointless "const" in front of function return type.
- In projectData(), return the stored value instead of fetching it again
from the project.

Change-Id: I9c8f4e8eaea070833953cd4d65e3452bae37998d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-22 11:22:08 +02:00
Christian Kandeler
69649be5fc QbsProjectManager: No reparse after programmatic project file changes.
qbs knows the effect of adding and removing files. There is no need to
set up the project from scratch.

Change-Id: I8938c7cfb3e3ac2deb3fb0d2175f447391a669cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-21 13:08:36 +02:00
Christian Kandeler
e82a47e5af QbsProjectManager: No more "forced" vs "non-forced" parsing.
This differentiation complicates the code and duplicates checks
already done in qbs.
Just let the library reparse the project; if it turns out that nothing
has to be done, then the operation will be fast.

Change-Id: Ib6406f254e51541c69c948f275fff7877b65b4bd
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-17 13:11:02 +02:00
Christian Kandeler
35940f16e4 QbsProjectManager: Only update project nodes etc if necessary.
That is, if qbs::Project::projectData() has changed. There are still
some false positives left (e.g. the project nodes will also update if
only the file paths of executables have changed), but we can deal with
those later.

Change-Id: Ifa18903aba41c21769bfe4cd0e4f6004f1a94f11
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-17 13:10:45 +02:00
Christian Kandeler
e639455936 QbsProjectManager: Reparse project before building.
Otherwise, if "save before build" is enabled and the user presses Ctrl+B
with unsaved changes to a project file, these would get ignored due to
the delay (and also if the delay were not there, because the file system
watchers trigger later than the "Build" action).
If there are no actual changes to any build file, the overhead caused by
this operation consists of loading (and possibly storing) the build
graph file.

Task-number: QBS-596
Change-Id: I1f837cc0fcdc77a249b423834f4b6711f5c0bc87
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-16 14:05:38 +02:00
Christian Kandeler
20bfe889e9 QbsProjectManager: Fix handling of overlapping parse requests.
The current code simply asserts when a new parse request comes in while
parsing. However, that condition is easily triggered, for instance if a
project file is saved to disk during a parse operation. Such updates
currently have no effect at all (other than triggering an error
message).
Instead, we now cancel the old parse job and start a new one.

Change-Id: If2eeb93b85b5163dcea99785a0fc89a254d082db
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-14 11:23:46 +02:00
Christian Kandeler
473692aa23 QbsProjectManager: Do not reparse the project after every build.
While it is true that additional information about target
artifacts can appear during a build, this data is already
present in the qbs::Project object and can simply be retrieved.
No reparsing is necessary.
The exception is when reparsing was requested while the build
was going on. In that case, we really need to do it after
the build has finished.

Change-Id: Ief3797782ad0ca5651974d4b5d3d64e1199ca9a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-11 15:05:32 +02:00
Christian Kandeler
853497fb4b QbsProjectManager: Sanitize QbsProjectNode.
The current code keeps an instance of QbsProject and of qbs::Project in
every project node, with them being null/invalid everywhere except for
the top-level node. Instead, introduce a dedicated class for the root
node and hold a QbsProject only there. The qbs::Project is held in
QbsProject now.
As a nice side effect, this also fixes QBS-644, presumably because the
dubious-looking use of projectNode() has been removed.

Task-number: QBS-644
Change-Id: I5d36806745b9d67879db6f48aa56bc97868e4f17
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-11 11:33:58 +02:00
Erik Verbruggen
3d33886e53 C++: fix include/framework path handling.
Instead of having two lists of paths, now only one list is used where
both include paths and framework paths can be mixed. This reflects the
way the compiler is invoked, and retains the (correct) search order.

Task-number: QTCREATORBUG-11599
Change-Id: I373953e3e305df5b7a0d10920e12d146584adf9f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-07-04 13:51:36 +02:00
Tobias Hunger
21cccaa1c9 Qbs: Move updating of files from a project to own method
Change-Id: I88b41ff450dac4e0c2e5a34e3332e559c1919e6e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-06-24 16:14:16 +02:00
Tobias Hunger
ce324b8d28 Qbs: Factor parsing code out of QbsProject
Change-Id: I9b86baf964252e3d155cce533c79ca7a9dc9b315
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-06-20 13:02:33 +02:00
Tobias Hunger
e07ea93d89 Qbs: Simplify qbsmanager
Change-Id: I6755e28e1f75788203a0e734cd1b6dabd2308919
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-06-17 13:58:03 +02:00
Tobias Hunger
dc61b989ac Project: Use Utils::FileName as return type for projectDirectory(...)
Change-Id: I3ea10aa204b1ea41702edab09884b416cd6d9e06
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-05-06 11:48:10 +02:00
Tobias Hunger
7dfbb74d58 Qbs: Honor default build directory set up in Build & Run->General
Change-Id: I1e7d6cc97f2e8adb5956866205493d28d79887cb
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-05-02 11:54:30 +02:00
Tobias Hunger
4d302fa1a8 Qbs: Remove unused method
Change-Id: Ib25b5155ac267cee7146bca22ac599ad96e4580b
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-05-02 11:54:08 +02:00
Eike Ziller
063b95d970 Use more descriptive progress bar titles
Change-Id: I70450a2aa675d69f820de48dd75909f36051efe0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-04-28 14:32:25 +02:00
Joerg Bornemann
de99c7a6ed fix location of qbs plugins on OS X
Task-number: QTCREATORBUG-11866
Change-Id: I261fdabd100c6f6827d4195624d56343cd59fb81
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-03-28 16:27:49 +01:00
Tobias Hunger
7d2e5d54a1 Qbs: Send parsing done even if the parsing actually failed
Task-number: QTCREATORBUG-11876

Change-Id: I9c52df7d0ebcb7f779e22061e5cf7923c09dab14
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-03-27 15:45:58 +01:00
Tobias Hunger
40d6a2bf57 Qbs: Fix reparsing after building
Change-Id: Ic06718ddc6813fbe02078976e4bc571fb382d96a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-03-03 14:16:07 +01:00
Christian Kandeler
c8881e7ca2 Support configurable library location in qbs build.
And also in the qbs sub-project (for the qbs and qmake builds). This
becomes possible with the qbs submodule update that is part of this
patch.

Change-Id: I8347a8c04a52bcb0682f32d808fb61a90ef3ba72
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-28 17:38:41 +01:00
Tobias Hunger
bdce2abf1b Qbs: Do not re-parse projects while they are built
Qbs may update the buildgraph during the build, so this information
may be lost if we reparse at the same time.

Change-Id: Id52e42552736bbe842581cc87d837d0834ad0a2c
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-02-28 10:16:51 +01:00
Christian Kandeler
8a8092912b Fix location of qbs plugins.
They are not (arch-independent) resources.

Task-number: QTCREATORBUG-10074
Change-Id: If257dfc3a8a866003c84331409162699b162eb19
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-27 12:36:15 +01:00
Fawzi Mohamed
d24cb60d48 qml: moving most of ModelManager logic to ModelManageInterface
Currently ModelManager contains lot logic, but as it sits in QmlJSTools
it is not possible to use it in standalone tests.
Moving most of the logic to ModelManagerInterface (and cleanup)
to allow better testing, and refactoring.
This introduces a dependency of the qmljs lib on the cplusplus lib
Also a (small) part of the CppTool::ModelManagerInterface has been
moved to CPlusPlus::CppModelManagerBase to remove the dependency on
CppTools to gather the Qml types exposed from C++.

Change-Id: Icad7fe96dfd0f1a2b1058d82bd98c77c40aa5e9d
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-02-19 21:18:58 +01:00
Christian Kandeler
eaf75253b4 Update qbs submodule to HEAD of master branch.
Includes some necessary adaptations to the QbsProjectManager plugin,
namely:
    - Use the new library for setting up Qt profiles.
    - Use per-profile preferences.

Change-Id: I0a639bd291d790c6da9cb4ade53841314310d5ef
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-01-21 17:25:00 +01:00
Tobias Hunger
1131c11a11 Qbs: Fix casing in name of cxxFlags and cFlags
This fixes the problem of Qt Creator not getting the cxxFlags set in
Qbs.

Task-number: QBS-481
Change-Id: Ie233123d62bcf89f3b8ebee1367ca6447b9ade3a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-01-14 16:50:29 +01:00
Eike Ziller
236ea9efb9 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	share/qtcreator/debugger/dumper.cpp
	share/qtcreator/debugger/dumper_p.h
	share/qtcreator/debugger/test/main.cpp
	src/plugins/debugger/gdb/classicgdbengine.cpp
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.h
	src/plugins/debugger/lldblib/guest/main.cpp
	src/plugins/debugger/lldblib/ipcengineguest.cpp
	src/plugins/debugger/lldblib/ipcengineguest.h
	src/plugins/debugger/lldblib/ipcenginehost.cpp
	src/plugins/debugger/lldblib/ipcenginehost.h
	src/plugins/debugger/lldblib/lldbenginehost.cpp
	src/plugins/debugger/lldblib/lldboptionspage.cpp
	src/plugins/qbsprojectmanager/qbsstep.cpp
	src/plugins/qbsprojectmanager/qbsstep.h
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h
	src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
	src/plugins/qnx/blackberrycheckdevmodestep.cpp
	src/plugins/qtsupport/debugginghelper.cpp

Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
2014-01-08 11:01:06 +01:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Erik Verbruggen
ea1a92484a C++: split defines into project-defined and toolchain-defined.
So we can ignore possibly problematic toolchain-defines, while can still
unconditionally apply project-defines.

Change-Id: I7cb96f35a963d080011fe888ef71bfc098dd33ef
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-12-10 11:42:41 +01:00
Tobias Hunger
b9813b7c91 Qbs: Make "Reparse Qbs" force a reparsing
... even if Qt Creator thinks all is well.

Change-Id: I40fa61d51c8e18a389bedf7d8afb927bbb88acd5
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2013-12-04 13:15:17 +01:00
Eike Ziller
8fe04ce0ad Merge remote-tracking branch 'origin/3.0' 2013-11-19 07:41:47 +01:00
Tobias Hunger
127c99ff01 Qbs: Finish qbs evaluation future watcher
Looks like you need to do that after canceling it... This stops
"Evaluation" progress bars from sticking around.

Change-Id: Ie0a9f88ba96cba261939c210fddb11bc43779416
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-11-15 17:33:09 +01:00
Eike Ziller
4538ccb46c Merge remote-tracking branch 'origin/3.0'
Conflicts:
	share/qtcreator/debugger/gdbbridge.py

Change-Id: I32d8158c475f927b50ef06fde9ab8189ebdbcbbc
2013-11-15 10:26:57 +01:00
Tobias Hunger
3655917b9e Qbs: Always display clean build path
Task-number: QTCREATORBUG-10749

Change-Id: I1a2e79ffbd952dcc9fded07aca22c9a36f0a2ec4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-11-13 10:41:02 +01:00