aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/kitmanager.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2019-03-11 16:59:16 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2019-03-12 10:16:33 +0000
commit3aea3a13cb43053cf0675fee2dca2cef500cde11 (patch)
treece4a4c73ec4eb9459ae6b1b257ab97f2f1944228 /src/plugins/projectexplorer/kitmanager.h
parent03d776a873860de71767aaf00bd13a01273afc96 (diff)
ProjectExplorer: Refactor KitManager::registerKit()
The interface of this function was rather unfortunate. In particluar, the fact that it took ownership of the std::unique_ptr that was passed in required some weird boiler plate code at all the calling sites. Instead, it now becomes a proper factory function. Change-Id: Iecdc6f6345232fc0f0a08bffaf8f1780edb57201 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/kitmanager.h')
-rw-r--r--src/plugins/projectexplorer/kitmanager.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/kitmanager.h b/src/plugins/projectexplorer/kitmanager.h
index 4b031846a0..180e71b025 100644
--- a/src/plugins/projectexplorer/kitmanager.h
+++ b/src/plugins/projectexplorer/kitmanager.h
@@ -173,7 +173,7 @@ public:
static const QSet<Core::Id> irrelevantAspects();
static void setIrrelevantAspects(const QSet<Core::Id> &aspects);
- static bool registerKit(std::unique_ptr<Kit> &&k);
+ static Kit *registerKit(const std::function<bool(Kit *)> &init, Core::Id id = {});
static void deregisterKit(Kit *k);
static void setDefaultKit(Kit *k);