summaryrefslogtreecommitdiff
path: root/src/plugins/clangcodemodel/clangcodemodelplugin.cpp
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2016-07-22 15:53:01 +0200
committerhjk <hjk@qt.io>2016-07-26 10:00:09 +0000
commit245965223450e6936d9a6b250bff777e633bbcc6 (patch)
treed2c029881338cc3ad34046284dcbbdc73b54afba /src/plugins/clangcodemodel/clangcodemodelplugin.cpp
parentd258d47b426dcf3e58dab8e46456bc4e396890b7 (diff)
downloadqt-creator-245965223450e6936d9a6b250bff777e633bbcc6.tar.gz
ProjectExplorer: Rework mode main window
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>
Diffstat (limited to 'src/plugins/clangcodemodel/clangcodemodelplugin.cpp')
-rw-r--r--src/plugins/clangcodemodel/clangcodemodelplugin.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/clangcodemodel/clangcodemodelplugin.cpp b/src/plugins/clangcodemodel/clangcodemodelplugin.cpp
index 285042cc31..1b435f95a8 100644
--- a/src/plugins/clangcodemodel/clangcodemodelplugin.cpp
+++ b/src/plugins/clangcodemodel/clangcodemodelplugin.cpp
@@ -58,7 +58,9 @@ void addProjectPanelWidget()
auto panelFactory = new ProjectExplorer::ProjectPanelFactory();
panelFactory->setPriority(60);
panelFactory->setDisplayName(ClangProjectSettingsWidget::tr("Clang Code Model"));
- panelFactory->setSimpleCreateWidgetFunction<ClangProjectSettingsWidget>(QIcon());
+ panelFactory->setCreateWidgetFunction([](ProjectExplorer::Project *project) {
+ return new ClangProjectSettingsWidget(project);
+ });
ProjectExplorer::ProjectPanelFactory::registerFactory(panelFactory);
}