MCPcopy Create free account
hub / github.com/KDE/krita / KisPlatformPluginInterfaceFactory

Method KisPlatformPluginInterfaceFactory

libs/ui/KisPlatformPluginInterfaceFactory.cpp:28–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26Q_GLOBAL_STATIC(KisPlatformPluginInterfaceFactory, s_instance)
27
28KisPlatformPluginInterfaceFactory::KisPlatformPluginInterfaceFactory()
29{
30#if KRITA_USE_SURFACE_COLOR_MANAGEMENT_API
31
32 auto fetchSurfaceColorManagedByOS = []() {
33 KPluginFactory *factory = KoPluginLoader::instance()->loadSinglePlugin(
34 std::make_pair("X-Krita-PlatformId", QApplication::platformName()),
35 "Krita/PlatformPlugin");
36
37 if (factory) {
38 QScopedPointer<KisSurfaceColorManagementInfo> interface(factory->create<KisSurfaceColorManagementInfo>());
39 return interface && interface->surfaceColorManagedByOS();
40 }
41
42 return false;
43 };
44
45 m_surfaceColorManagedByOS = fetchSurfaceColorManagedByOS();
46
47#endif /* KRITA_USE_SURFACE_COLOR_MANAGEMENT_API */
48}
49
50KisPlatformPluginInterfaceFactory* KisPlatformPluginInterfaceFactory::instance()
51{

Callers

nothing calls this directly

Calls 2

loadSinglePluginMethod · 0.80

Tested by

no test coverage detected