| 26 | Q_GLOBAL_STATIC(KisPlatformPluginInterfaceFactory, s_instance) |
| 27 | |
| 28 | KisPlatformPluginInterfaceFactory::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 | |
| 50 | KisPlatformPluginInterfaceFactory* KisPlatformPluginInterfaceFactory::instance() |
| 51 | { |
nothing calls this directly
no test coverage detected