- Remove 'panel memory effect' when switching kits
Previously, each target entry memorized when its Build or
Run page was used, and when switching to the target, that
page came up.
Now, don't use that when switching targets, but instead
take the same page as is selected on the target we are
switching from.
- Disable selection of the Build&Run and Project Settings
"group entries"
Change-Id: I2214f8edc38be2e76a50f8984aa75d8f78b62026
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
It is still unclear what the original problem was. setRootIndex()
on changing model contents seems to be involved.
This patch works around the issue by splitting the original big tree
containing all projects into separate per-project trees.
Change-Id: I13295fc827d750d11300313ffb19cc085837f5bd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Parameter structs are convenient if they get passed around
a lot or are regularly changed. This isn't the case here,
so make the user code more compact instead.
Change-Id: Idd5e5cc1f70b1547607532cd3e6515c27983c169
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This fixes a regression introduced in the recent ProjectWindow
reorganization and keeps the active project, the target selector
and the active item in the project combobox synchronized again.
Change-Id: If2baf4336d5da5d74f1cbf8ddc4e8cb056d49369
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The PLUS icon was actually PLUS_TOOLBAR, so name it that way and add an
actual PLUS icon.
Remove the drawing of the branch indicators from the kit tree view by
overriding the method that does it.
Change-Id: I395e5187c1738faaee3e122b4f3f359261b514d7
Reviewed-by: hjk <hjk@qt.io>
Add a [+] icon for inactive kit entries, add a "Click to activate" to
the tool tip, and allow single click activation.
Change-Id: I1219eb54b4e3a077ef133afaf71134bb35e14fb7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This moves all non-Build&Run entries under a separate 'Project settings'
entry.
Internally, this mainly makes the information flow on what item a user
selected and in which direction in the tree information needs updated
a bit more explicit.
Change-Id: I4583151356ef50b244b1d05dd77f04de2355105f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
To shorten user code and hide the ugly const_cast.
Change-Id: I798bd105932004ea17cb95b243fc38ccfcda0a2c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The LeveledTreeModel case is general enough to cover
the UniformTreeModel case, so merge them and rename to
TreeModel. The former TreeModel is now BaseTreeModel.
BaseTreeModels should not be instantiated directly,
a tree model with non-uniform basic items is available
as TreeModel<>.
Done-with: Eike Ziller <eike.ziller@qt.io>
Change-Id: I64a65617ab68c0cde39cf65f4bc092ef808ee6fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The existing solution with the special-style horizontal
kit selector comes from a time when there was typically
one, at most four targets. Today's setup can easily
reach half a dozen targets with several toolchain versions
each and can't be sensibly handled with the overflowing
horizontal bar.
This here replaces the horizontal kit selector bar as
well as the top level project "tab bar" with a normal
tree view. All targets are visible (but possibly disabled)
at once, and can be enabled/disabled using the context
menu on the tree items.
Change-Id: I1ce7401ca96109bf34bc8c0ae19d265e5845aa88
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Use override where appropriate
* Use pragma once
* Make more constructors explicit
Change-Id: I2865fe10f288e3de570826058e43b70a0cb4ee37
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Removing a target setup widget might lead to removing a kit,
due to some kits being temporary for importers.
A kit removal then would lead to a target removal and this would
make the code recurse into the widget cache.
Fix that by ensuring that we disconnect from the project first in
ProjectWindow::deregisterProject. And also remove the clearing of
the project window, instead simply clear the widget cache as each
project is closed.
Change-Id: I278c43ef4ba77217428c5c36f0a07d0d96cb3022
Task-number: QTCREATORBUG-14694
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Rename to ProjectPanelFactory, hide list of factories from .h,
rename include guards.
Change-Id: I2e0befcaf847e5c3a0b493b58e7bcf3e9263f4f9
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
The only project manager that actually sometimes changes the displayname
is the cmake project manager. And that one failed to emit the right
signal. And since the signal was never emitted a few places handled the
signal wrongly.
Change-Id: I4aa75dc3032efe49263143dbadb7585a378b9be9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Since projects without targets are special, this code apparently tracked
if hasTarget() changed due to a kitUpdate. But we are already connected
to targetRemoved() and checks whether a project has no target anymore.
Thus this code is redundant and can be removed.
Change-Id: I245887075509ed4c0ecda383de0227ccbc58b9af
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
The indirection via a factory is no longer useful, since the
targetsettingspanel is hardcoded for a build and run panel.
Change-Id: I75543f777a4a7df4cadf12667652424056829689
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Instead hide it in a standard IProjectPanelFactory
Change-Id: I7e49b7be00e26c5f33e32d692079e2b82cbfe087
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This was the common base class of IProjectPanelFactory and
ITargetPanelFactory. Nothing was using the IPanelFactory interface, and
there's actually no common interface between those classes.
Of the old interface IPanelFactory:
id() => only used in ITargetPanelFactory
displayName() => only used in IProjectPanelFactory
priority() => only used in IProjectPanelFactory
This removes lots of boiler plate code for the unused functions.
Change-Id: I8488a4e5134fd451907f02c45b7847673e4dc714
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
The TargetSettingsPanelWidget wants to keep whether the Build or Run tab
is shown synchronized between projects. Moving the code to
TargetSettingsPanelWidget removes some of the special handling
ProjectWindow does.
Change-Id: Ic4e85b6458a1271ea2de4d8c5786e95d3a78fbbd
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
The ProjectWindow page gets all objects of type IProjectPanelFactory
from the object pool. Since ITargetPanelFactory is not derived from
IProjectPanelFactory, the removed qobject_cast can never work.
Change-Id: I52186e33e1992dc3556fcb2900719e9a8158da39
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
setPalette() does not replace the old one but rather adds the
difference. Thus a previous copy of the palette is unnecessary.
Change-Id: I5c06da456b76144efc4a984ccda13c7d2243a7bc
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Seems to be a improvement in resizing behavior.
Task-number: QTCREATORBUG-11286
Change-Id: Iac19a76265c98861e4da9d23c3e5fb3a36f0386e
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The SessionManager is disconnected at that point already, so we were
never told that projects were destructed already and were happily
calling into those.
This fixes the crash described in QTCREATORBUG-10354.
Task-number: QTCREATORBUG-10354
Change-Id: Ib8ce07d6db38dbff9154b127f5fb620a9961c742
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Use it instead of retrieving this information from the document.
Change-Id: I809fcb2daf59021cf503c371a5d40d75d7448796
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
That is what it actually is, wrt how Qt API calls it.
Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>