Commit Graph

1245 Commits

Author SHA1 Message Date
Christian Kandeler
56a4865b2f QbsProjectManager: Fix potential null pointer access
We retrieved the watcher result from the wrong pointer.

Fixes: QTCREATORBUG-23924
Change-Id: I876d8adc0aef011deb3f5827f3e50c43a8d92dfc
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-12 10:52:31 +00:00
Christian Kandeler
ce428cfeef QmakeProjectManager: Differentiate between different types of projects
... by using different icons in the tree.
So far, Qmake project nodes looked annoyingly uniform, which was a
hindrance to understanding their structure. We now use the same
differentiation as in qbs, that is "project" (SUBDIRS pro file),
"product" (app/lib/other) and "group" (pri file), which conveys much
more information at a quick glance.

Change-Id: I04ca2aeccb9240876c0fb5cd1310e0b199eb3e97
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-04-30 07:56:31 +00:00
Christian Kandeler
1c6e4fbd32 Merge output formatters and output parsers
Now only one piece of code needs to be written to both linkify output in
an output pane and create tasks for it in the issues pane.
The calling sites are also simplified. For instance, until now, build
steps had to feed their output parsers manually and then push the
created tasks up the signal stack in parallel with the actual output,
which the build manager relied upon for cross-linking the output pane
content. Afterwards, the output would get forwarded to the formatter
(and parsed for ANSI escape codes a second time). In contrast, a build
step now just forwards the process output, and task parsing as well as
output formatting is done centrally further up the stack.
Concrete user-visible improvements so far:
    - File paths in compiler/linker messages are clickable links now.
    - QtTest applications now create clickable links also when run
      as part of a build step, not just in the app output pane.

Task-number: QTCREATORBUG-22665
Change-Id: Ic9fb95b2d97f2520ab3ec653315e9219466ec08d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-23 08:47:08 +00:00
Eike Ziller
602d690bab Merge remote-tracking branch 'origin/4.12'
Change-Id: Ie35e9959693b6f6f78509eea5b259d6493ef87f2
2020-04-17 08:09:55 +02:00
Christian Kandeler
6f32538c5d ProjectExplorer: Split up the IOutputParser class
For symmetry with Utils::OutputFormatter.

Task-number: QTCREATORBUG-22665
Change-Id: I148fed69dba042ad3ef26e080829c31cd3f357fd
Reviewed-by: hjk <hjk@qt.io>
2020-04-16 10:40:33 +00:00
Christian Kandeler
6c32656a21 QbsProjectManager: Fix crash when unloading a building project
Note that unloading a building project is generally broken in that the
build manager waits indefinitely for the build step's finished() signal,
but that's a general problem which needs to get addressed in a different
patch. This one fixes a qbs-specific crash.

Fixes: QTCREATORBUG-23851
Change-Id: I93e254acd1c73fe7495d01fcad04ea9301130dd0
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-14 15:15:27 +00:00
Eike Ziller
deb0eaf795 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp

Change-Id: I34c3d1fd5be90537e37d15e00b1a0d455d1bf81d
2020-04-14 09:47:38 +02:00
hjk
79b680e7f0 Utils: Rename PathChooser::{f,setF}ileName() to {f,setF}ilePath()
It's returning a FilePath, so it's a better fit.

Keep the old versions as inline function now to ease downstream migration.

Change-Id: I535887928018f42b92895c8b0c82527f0d55e5ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-04-09 17:30:23 +00:00
Christian Kandeler
45ba9fcd53 Output parsers: Replace the chaining approach
Use "flat" aggregation instead.
This is another step towards the formatter/parser merger.
Along the way, also fix some some subclasses (mostly in BareMetal) that
erroneously forwarded handled output to other parsers.

Task-number: QTCREATORBUG-22665
Change-Id: I12947349ca663d2e6bbfc99efd069d69e2b54969
Reviewed-by: hjk <hjk@qt.io>
2020-04-09 14:49:32 +00:00
Christian Kandeler
fb56c82abf QbsProjectManager: Fix one more build key inconsistency
Amends 26e4a2a758.

Fixes: QTCREATORBUG-23841
Change-Id: Ie297f8e2b6a79f6bafa709bf3a0285c9ce6e03ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-09 14:48:58 +00:00
Christian Kandeler
7745eacc7a Output parsers: Generalize the search directory concept
All parsers can now have search directories, not just the GnuMakeParser.
This allows us to get rid of the "task mangling", removing another
instance where the order of parsers in the chain mattered.

Task-number: QTCREATORBUG-22665
Change-Id: Id0d55522ae6800afd9f50ff36546224b0d8bb382
Reviewed-by: hjk <hjk@qt.io>
2020-04-07 15:20:22 +00:00
Christian Kandeler
b22bb5a9a7 QbsProjectManager: Remove the QbsParser class
It serves no purpose.

Change-Id: I92e700ed5c1d2b72398f4c7b88dab0cea9404e4d
Reviewed-by: hjk <hjk@qt.io>
2020-04-07 11:38:15 +00:00
Christian Kandeler
b15d1951a2 ProjectExplorer: Let IOutputParser handle newlines
This makes IOutputParser structurally more similar to
Utils::OutputFormatter, which makes it simpler to explore possibilities
of somehow uniting these two related classes.

Task-number: QTCREATORBUG-22665
Change-Id: Ibb12ab6c8c785d863b9a921102a929864d0a5251
Reviewed-by: hjk <hjk@qt.io>
2020-04-07 08:13:58 +00:00
Christian Kandeler
cddaecfe21 ProjectExplorer: Clean up IOutputParser interface
- Remove unneeded/unused functions.
- De-virtualize where possible.

In particular, after untangling a number of self-referential
redirections, it became apparent that the outputAdded()
infrastructure was entirely unused.

Change-Id: I51e1beed008df2727b42494b087efa476342397e
Reviewed-by: hjk <hjk@qt.io>
2020-04-03 10:57:06 +00:00
Eike Ziller
897abf24e2 Merge remote-tracking branch 'origin/4.12'
Change-Id: I79083060dfc3bc4408123acd3b7305b9701650fd
2020-04-03 08:12:52 +02:00
Christian Kandeler
3b740fccc8 QbsProjectManager: Ensure project data update on target switch
... if necessary.

Fixes: QTCREATORBUG-23767
Change-Id: I9a79eebcab348fe0b37d76b31dcbf088d56fc3ca
Reviewed-by: hjk <hjk@qt.io>
2020-04-01 13:51:08 +00:00
Eike Ziller
9a149e295b Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/tools/qml2puppet/CMakeLists.txt

Change-Id: Id6243b0f725a68075d789bf35e771113b742645b
2020-03-30 17:27:55 +02:00
Christian Kandeler
29488fbdaf Qbs: Suppress spurious warnings about mismatching compiler paths
Apparently, MSVC toolchains set their compiler paths asynchronously, so
don't complain if it's empty initially.

Fixes: QTCREATORBUG-23725
Change-Id: Id800fa01d6368d244ec879181d12f6f7c7f1bf0a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-03-30 10:00:04 +00:00
Eike Ziller
c8a2ea5433 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp

Change-Id: I2a0ccb84560174c5170d5baaff526c0e095f0ba0
2020-03-19 09:35:50 +01:00
Christian Stenger
4fefbbcb66 QbsPM: Pass enabled information to code model
If a project part is not enabled let the code model know
about it as others may refer to this information as well.
Fixes an issue with the AutoTest plugin when it tries
to run a test for which no build targets will be generated
at all as it is disabled by some condition.

Change-Id: I342e8dde0a171084894ec59fdb462d7e9526c8db
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-03-18 09:28:41 +00:00
Denis Shienkov
3ad7ef4796 QbsPM: Fix wrong {GCC|Clang} compiler name and prefix handling
When the GCC or Clang compiler name ends with the version sub-string
(f.e. arm-none-eabi-gcc-8.2.1.exe), this leads to the wrong cCompilerName
detection, that causes the project parsing errors and disables the project:

  The following properties are not set. Set them in your profile or product:
  cpp.compilerIncludePaths
  cpp.compilerFrameworkPaths
  cpp.compilerLibraryPaths

  Product 'xyz' had errors and was disabled.

Now we return a proper prefix (e.g. arm-none-eabi-) and cCompilerName
with a version (e.g. 'gcc-8.2.1.exe')

Change-Id: I5dd42a343a0982326ed0f23b821e5016b8df39f1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-03-16 18:37:18 +00:00
Eike Ziller
22cdc47077 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/baremetal/debugservers/uvsc/uvtargetdevicemodel.cpp

Change-Id: I4a90920e52dbbe9eb46aef3437ee3c5a6e7b31c6
2020-03-16 08:30:33 +01:00
Christian Kandeler
c679a3ac72 QbsProjectManager: Make more use of base class infrastructure
No need to duplicate the timer. Now BuildSystem::isWaitingForParse()
returns the correct result.

Change-Id: Iab754b2c488c48302039988bd36e51f00e0f1196
Reviewed-by: hjk <hjk@qt.io>
2020-03-12 11:57:38 +00:00
Leena Miettinen
5290660932 Qbs: Fix UI text according to the guidelines
https://doc.qt.io/qtcreator-extending/qtcreator-ui-text.html

Task-number: QTCREATORBUG-23683
Change-Id: I33dd13019dfd73912b10abd05e95f257fa52e8e0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-03-11 12:00:23 +00:00
Eike Ziller
95d41fa23e Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/qmldesigner/designmodewidget.cpp

Change-Id: I94a94a15df433d6caa8922fccaa69918b5e4e365
2020-03-11 07:29:47 +01:00
Christian Kandeler
233c438a2d QbsProjectManager: Consider cpp.platformDefines for the code model
Fixes: QTCREATORBUG-19537
Change-Id: Ia51441491913da0f7b31c2ff02e2552ff58147f3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-03-10 08:47:11 +00:00
Eike Ziller
8f89c9a846 Merge remote-tracking branch 'origin/4.12'
Change-Id: I04d9cc69a07d4d07b1bf1df57681d6a68587d7ba
2020-03-06 09:44:11 +01:00
Christian Kandeler
cb2f5520d9 QbsProjectManager: Fix default install root
We forgot to append the "/install-root" directory at the end.

Change-Id: I1ad0d547f097a6b9c954603d394a5182368633a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-05 13:35:33 +00:00
Eike Ziller
995ba78fae Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/cmakeprojectmanager/tealeafreader.cpp
	src/plugins/cmakeprojectmanager/tealeafreader.h
	src/plugins/projectexplorer/miniprojecttargetselector.cpp

Change-Id: I88d85be3903f57a55fddb7901e771a4822db1b85
2020-03-04 08:15:50 +01:00
hjk
b0b50257ec ProjectExplorer: Pass extra project files as QSet
They are available in some cases as such, and consumed as such.

Change-Id: I9866c7d7bd817fb19a8b11a0efbe583ed55fe393
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-03-03 09:17:20 +00:00
Christian Stenger
26e4a2a758 Qbs: Fix build target key of project part
The build target key is the basic mapping of project
part to run configuration and this went out of sync
with the latest refactorings of the Qbs project
manager.
This fixes execution of tests inside the AutoTest
plugin for qbs based projects.

Change-Id: I7d7a703a341df98a015f9c83d3c2a320d46779c3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-03-02 10:12:32 +00:00
hjk
fbd1574a85 ProjectExplorer: Fix use of build step list preamble messages
The step list names are computed separately anyway, having an
extra preamble consisting of concatenated build list names on
one line looks unnecessary.

Change-Id: If754c6363042927210dfd09c23f2f494081f8c47
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-28 11:48:35 +00:00
Eike Ziller
61dc14b67f Merge remote-tracking branch 'origin/4.12'
Change-Id: I3e7049da2c3da6f784e3cb3407c22ada556e5d24
2020-02-26 08:35:05 +01:00
Christian Kandeler
61932b5d4b QbsProjectManager: Use the same build key as in previous versions
We changed the build key derivation method in commit 6913947986 under
the assumption that it doesn't really matter as long as it's unique.
However, this value gets serialized, so the change broke restoring
existing qbs run configurations.
As we don't want users to lose all their run configs when upgrading to
4.12, we switch back to the old pattern.

Change-Id: Ia4a353af08cca33dbc3c60bd9fc0e28f42dcfe20
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 15:49:12 +00:00
Christian Kandeler
65e244b238 Qbs: Use more sensible build step summaries
It makes no sense to use the "equivalent command line" value as the step
summary. It's much too long and will never fit into that label.

Change-Id: I55f291c370c97481d37e9f9ba9baec48d7215774
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 15:35:22 +00:00
hjk
6033c31e23 ProjectExplorer: Un-export BuildEnvironmentWidget
Apparently not needed anymore outside.

Change-Id: I9f4f1a65f56a86ba75a37a9b96db71472b3e0af2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 12:10:22 +00:00
hjk
3fe1911d46 ProjectExplorer: Introduce some BuildStep convenience accessors
... and use in ProcessStep and related classes.

Change-Id: Ie6f1403d0aa2b9f5bcde06e994809466700b1357
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 16:11:05 +00:00
hjk
3f68292dbe ProjectExplorer: Introduce ToolChainKitAspect::{c,cxx}ToolChain
Special accessors to the repeatedly used C and C++ cases to denoise
and slim down user code.  Plus some code cosmetics nearby.

Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 15:59:12 +00:00
Tobias Hunger
39cddf5d03 DebuggerAspect: Simplify handling of Qml debugging
There should not be a need to have the linkQmlDebuggingLibrary Q_PROPERTY
anymore. The property is added for the benefit of the DebuggerAspect, which
can just check relevant BuildConfigurationAspect directly.

Change-Id: Ic47ca9e26911e096564fe77bd14bebe959b4f116
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 12:58:40 +00:00
Christian Kandeler
faf7e8f49a QbsProjectManager: Do not store expanded qbs executable path
... unless it was explicitly set by the user.
Otherwise, e.g. the derived Creator-internal path will end up verbatim
in the settings, and this value will be wrong when switching the build
dir etc.

Change-Id: I89818e683f403e28855934e42b56f59892f260cc
Reviewed-by: hjk <hjk@qt.io>
2020-02-19 09:00:21 +00:00
hjk
a7bd6864c1 Qbs: Avoid a FilePath<->QString roundtrip in QbsInstallStep
Change-Id: I8366fc694ba899bf74e0fea8e85aa99e709a57b4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-14 15:50:16 +00:00
hjk
1f5a089f24 Qbs: Pass related info directly to command line creation function
Saves a few casts and otherwise unneeded accessors.

Change-Id: I7a6ff1e8348a24690f35e69d300463a6c5c18867
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-14 15:48:38 +00:00
hjk
a44bfdd779 Provide an empty default IPlugin::extensionsInitialized()
And remove all empy re-implementations.

Change-Id: I19f0b4e55c042c96693ecb89766f97f0a97b54ae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-07 10:21:34 +00:00
Christian Kandeler
beed0c7396 CMake/Qbs: Do not emit Project::fileListChanged()
...explicitly.
This is already done as part of Project::setRootProjectNode(), and the
signal is connected to some rather expensive operations.

Task-number: QTCREATORBUG-18533
Change-Id: I96ea2f49c866f2b60f599748c4d5b82c790ed2ca
Reviewed-by: hjk <hjk@qt.io>
2020-02-07 09:39:19 +00:00
Christian Kandeler
a6e6a53e82 QbsProjectManager: Build up the project tree in a dedicated thread
... and only switch the root node in the UI thread.
Creating the project tree can take some time for larger projects; no
need to block the UI for that.

Task-number: QTCREATORBUG-18533
Change-Id: I093dc9fb8f3454011a3c64bcc0f785e8b7753b4e
Reviewed-by: hjk <hjk@qt.io>
2020-02-06 17:00:56 +00:00
Christian Kandeler
cd9571b4f7 CppTools: Optionally move raw project parts creation into thread
... by letting callers pass in a generator function.
This takes some load off the UI thread for larger projects.
For now only used by the QbsProjectManager, which can provide a thread-
safe generator function due to the project data existing in "value"
form.

Task-number: QTCREATORBUG-18533
Change-Id: I525dea36a4c4079bd1bd5a4fff844617547d56f1
Reviewed-by: hjk <hjk@qt.io>
2020-02-06 15:53:46 +00:00
Christian Kandeler
faa56b1965 QbsProjectManager: Fix setting up extra compilers
There were a couple of typos breaking the functionality.
Also separate updating extra compilers and the code model.

Change-Id: Ie8f7bbf62d4b7817af3a26298401ad99c011b6e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-06 09:53:17 +00:00
Igor Sidorov
a9e40ad14c Add final specifies to classes
Warning -Wfinal-dtor-non-final-class in clang trunk

Change-Id: I2bf17064bf8898eab10b82b69583a283157766d0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-05 09:33:55 +00:00
Christian Kandeler
6355796f11 QbsProjectManager: Improve interactive build config creation
- Offer Debug and Release.
- Make sure the qbs config names for two build configs of
  the same type do not clash.

Change-Id: Ia3bcb3243abfc64d71d20344e3bb16f00ba28c0d
Reviewed-by: hjk <hjk@qt.io>
2020-01-27 16:52:55 +00:00
Christian Kandeler
d2d560c63b QbsProjectManager: Make BuildInfo::typeName unique
... per build type.
This is required these days by the target setup page

Fixes: QTCREATORBUG-23523
Change-Id: I8f00ffaf1401cd91ad7d4a550adcaf26b401fe52
Reviewed-by: hjk <hjk@qt.io>
2020-01-27 16:12:23 +00:00