diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2019-03-11 16:59:16 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2019-03-12 10:16:33 +0000 |
commit | 3aea3a13cb43053cf0675fee2dca2cef500cde11 (patch) | |
tree | ce4a4c73ec4eb9459ae6b1b257ab97f2f1944228 /src/plugins/projectexplorer/kitmanager.h | |
parent | 03d776a873860de71767aaf00bd13a01273afc96 (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.h | 2 |
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); |