Enables re-using existing functionality.
The "Make mutable" functionality is still oddly placed. I doubt people
find and use it actively.
Change-Id: Ic6aae17e3a7df093f0f5f234f1e6e1afc196a087
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Creating QIcons elsewhere is not safe because of image reader plugin
loading and the pixmap cache.
Fixes: QTCREATORBUG-25301
Change-Id: Ia22a0cd571f808d7f5c639353fdf2e548743f8ca
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Build related menu items are sorted by tasks, then configurations.
e.g.
+ Build
+ Build All Projects
+ Build All Projects for All Configurations
...
+ Rebuild All Projects
+ Rebuild All Projects for All Configurations
...
+ Clean All Projects
+ Clean All Projects for All Configurations
...
This patch changes the order to configuration > task like below
+ Build
+ ...
+ qmake / cmake
+ -
+ Build All Projects
+ Deploy
+ Rebuild
+ Clean
+ -
+ Build Project
+ Deploy
+ Rebuild
+ Clean
+ -
+ Build Subproject
+ Deploy
+ Rebuild
+ Clean
+ -
+ Build File
+ -
+ Build All Projects for All Configurations
+ Rebuild
+ Clean
+ -
+ Build Project for All Configurations
+ Rebuild
+ Clean
+ -
+ ...
Change-Id: I95844e51d2ae164ed9f29fdb1c51509611c514fe
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
In most cases, the layout constructed in the builder was set
on a widget which in turn was put into a vbox in the actual
widget. This is not necessary, but needs some re-ordering.
Also make sure that using not-yet-parented widgets during
layout construction does not cause visible artifacts.
Change-Id: I75727a571da093d3131ea6fba467c2c646cdb6f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This was a workaround from a time where BaseAspect didn't know about
subwidgets created by derived aspects. That's not the case anymore.
Subwidgets registered with registerSubWidget() get their visibility
adjusted by BaseAspect::setVisibility() nowadays.
Subwidgets not registered with registerSubWidget() should not exist.
Change-Id: I8cdf72e5ea1f93c519f606913e084c78afecb56f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If the target is android and the qt version has more than one abi
then display a widget to select them in the build configuration.
Change-Id: I9d3ab60a0a1f4aba2e1250c495fa25917b254287
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The CMakeCache.txt file has CMAKE_HOME_DIRECTORY pointing to the
project source directory used to configure the project.
When importing a cmake build the CMAKE_HOME_DIRECTORY from
CMakeCache.txt might not point to the same CMakeLists.txt that was
opened as a project.
qt-cmake-standalone-test from Qt6 uses a CMake template project which
does a add_subdirectory with the test source directory, which will not
work if opened standalone.
Normally this is a user error though, so ask the user if this was
intended, before actually importing the build.
Task-number: QTBUG-88776
Change-Id: Ifdd5e1d1cb8a1ef9955d22493eba3a1a55dc689f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Except on direct user action. Use more evocative message manager API.
Task-number: QTCREATORBUG-24430
Change-Id: I44c6088904b2018baccb72cd3651e2ab62dc1358
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
If the default libs path doesn't exist (which is the case for qbs) then
try to get the abis using the current project node data method using
the Android::Constants::ANDROID_ABIS flag.
Because in multiplex (multi arch) mode dynamic libraries are compiled in
different products, library paths must be gathered from those
sibling products using the "dependencies" json array.
Change-Id: I9409a6a12fd9f304f427ed7868a7060c8f985a0b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Once we parsed the project initially, subsequent parses typically do not
change things in a major way, so we can expect e.g. run configurations to
stay intact.
It therefore makes sense to allow users to schedule an
application run not only during a build (see 4b92b7ac60), but also
during a parse. Arguably, this is even more relevant, as parsing is
usually not triggered directly by the user, but happens as a side effect
of editing a document or switching a branch. It is then annoying for
users to have to wait until the respective buttons get enabled again.
Fixes: QTCREATORBUG-24986
Change-Id: I1081ccde668eee794c39b96cd0bad5c3aaa580bc
Reviewed-by: hjk <hjk@qt.io>
I have some products which export c++20, some c++17 (not yet ported) and
some which do not specify the language itself. And sometimes I end up
with too much errors from the code model, because it sets the language
to C++11 or C++17.
Also adapted the C language.
Change-Id: I0056c8d873191d49164c3e7f3e4fdb24ccc1fb9b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Use QbsSettings to get qbs executable file path.
Change-Id: Ie8e9dc85712a2a51ee14b5715cf5529ecd3b44c0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This way we silence the clang warnings about calling
virtual methods from c'tor or from d'tor:
[clang-analyzer-optin.cplusplus.VirtualCall]
Change-Id: I8d6318b490152133da4833bda2ba28622bce30dd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This changeset only goes half-way, by introducing and using
aspects for the easy cases (five bools and the job count int).
Change-Id: Idb3a050f8bdd0c2c4eaf1c1d1cb4d71a5343321e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Retrieving the run environment for a qbs product can fail if the qbs
session is busy at the time of the call. In such a case, caching the
result will cause subsequent accesses to retrieve an incomplete
environment. This patch fixes the latter problem.
Task-number: QTCREATORBUG-24599
Change-Id: Ia0c6831cf371995ac8399d15e4dd93b8bb6e4f3b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
After the previous changes it was only an empty wrapper around QWidget.
Change-Id: I58dcd82d8342c7de5e2df537044f6cf3de878a67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The step is the source of information anyway, and available at the
only place of use. No need to copy that over to the widget, neither
for keeping it up-to-date there when the mechanism is already
available in the step itself.
This creates quite some potential for the simplification of
the various createConfigWidget implementations in follow-up patches.
Change-Id: I4474665f194a1ff7c5792ad086ed53c8d3ce13e6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
It's not needed centrally anymore.
Keep it in the only remaining user, QbsBuildStepConfigWidget. Also
there it will not be needed after aspectification anymore.
Change-Id: Ia29e1e1f5226832ecb62ca79675ce717c9e5ef9a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
- the var args template for addItems was overkill creating a lot of
instantiations. Use a temporary list instead.
- allow default constructed LayoutItems to be used for an empty cell,
avoiding the use of a QLabel with empty text
- add an addRow({...}) overload as convenience shortcut for
.startNewRow().addItems({...}
- rename startNewRow() to finishRow()
Change-Id: I6d49dacbac3d7acf140ca526884ba1ceeeca2e0d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Classes involved are BaseAspect and some derived classes,
LayoutBuilder and VariableChooser.
This is mostly mechanical, with various include/using changes
to make it compile.
Change-Id: I624a457f3555f102e541c4c71e33a9423af32250
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We got the install command name wrong, which caused the installation to
fail. In addition, we forgot to add handling for the "protocol-error"
message from qbs, so the step was hanging, rather than aborting.
Finally, we triggered a number of assertions in
BuildStep::buildConfiguration().
This went all unnoticed for a while, because the install step is not
enabled by default these days.
Change-Id: I906e7e472563d4ad8fc7557bd706a7cb67f9f2ba
Reviewed-by: hjk <hjk@qt.io>
This basically continues / amends work done
with e1c88116b3.
Change-Id: Ia8b3a4694e7fea4c15e344839f87c11fbe8fbbf4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Special QbsInstallStepWidget can be dropped.
Change-Id: I9040bbaa59c9da201c66a60a6ce9285cd53cf607
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
In most cases they are used directly, so there's not much Base* in that.
Added the old name as alias as porting help for a while.
Change-Id: I494a8a560b8996bcf74915ea3570b504df6a6b4c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The qbs-specific actions such as "build file", "build product" and
"clean product" were not properly updated on parse status changes, so
they would stay enabled during a parse, leading to user confusion about
why nothing happened when clicking them.
Fixes: QTCREATORBUG-24129
Change-Id: Ia19052e287f0ce1d965332e8ccd9efb46c8d005e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The coreplugin/id.h header is kept for downstream for now.
Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The coreplugin/id.h header is kept for downstream for now.
Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... and pass them to the code model.
Fixes: QTCREATORBUG-24162
Change-Id: I4f33bba659fca957c56f2fcb4b8adce28533074b
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
The ClangTools and the AutoTest plugins use an internal
mechanism to load and configure a project when performing
their integrated unit tests.
Both assumed to have exactly one kit present for these
tests.
Make it possible to have more kits present when starting
with existing settings or if more kits get automatically
generated when starting with clean settings.
Change-Id: If2bc66320c4854f1d34a19d17107e8f0b7d64d39
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Prefer source files from contexts where we know that they actually get
built and thus should have includes and compiler flags properly set up.
Also fix the qmake and qbs project managers to not mislabel any non-
application products as libraries.
Fixes: QTCREATORBUG-23394
Change-Id: I0d122c7b58e12d14d68a1ca7337df83074299cd7
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
There are very few reasons to use mainWindow() directly.
Especially for modal dialogs, using dialogParent() is important, since
that guarantees the stacking order in case of other dialogs currently
being open.
Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6
Reviewed-by: hjk <hjk@qt.io>