Commit 6cce95e7 authored by Milian Wolff's avatar Milian Wolff
Browse files

Cache the lookup of the IDefinesAndIncludesManager.

parent 99722cba
......@@ -168,10 +168,13 @@ public:
inline IDefinesAndIncludesManager* IDefinesAndIncludesManager::manager()
{
auto manager = KDevelop::ICore::self()->pluginController()->pluginForExtension( "org.kdevelop.IDefinesAndIncludesManager" );
static QPointer<IPlugin> manager;
if (!manager) {
manager = ICore::self()->pluginController()->pluginForExtension( QStringLiteral("org.kdevelop.IDefinesAndIncludesManager") );
}
Q_ASSERT(manager);
auto extension = manager->extension<KDevelop::IDefinesAndIncludesManager>();
auto extension = manager->extension<IDefinesAndIncludesManager>();
return extension;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment