|
Krita Source Code Documentation
|
#include <KoJsonTrader.h>
Classes | |
| struct | Plugin |
| struct | PluginCacheEntry |
Public Member Functions | |
| KoJsonTrader () | |
| QList< Plugin > | query (const QString &servicetype, const QString &mimetype) |
| ~KoJsonTrader () | |
Static Public Member Functions | |
| static KoJsonTrader * | instance () |
Private Member Functions | |
| void | initializePluginLoaderCache () |
Private Attributes | |
| QMutex | m_mutex |
| QList< PluginCacheEntry > | m_pluginLoaderCache |
| QString | m_pluginPath |
Support class to fetch a list of relevant plugins
Static singleton
Definition at line 25 of file KoJsonTrader.h.
| KoJsonTrader::KoJsonTrader | ( | ) |
Definition at line 31 of file KoJsonTrader.cpp.
References dbgPlugins, initializePluginLoaderCache(), and m_pluginPath.
| KoJsonTrader::~KoJsonTrader | ( | ) |
Definition at line 121 of file KoJsonTrader.cpp.
|
private |
Definition at line 133 of file KoJsonTrader.cpp.
References dbgPlugins, KoJsonTrader::PluginCacheEntry::filePath, KIS_SAFE_ASSERT_RECOVER_RETURN, KoJsonTrader::PluginCacheEntry::loader, m_mutex, m_pluginLoaderCache, m_pluginPath, KoJsonTrader::PluginCacheEntry::mimeTypes, KoJsonTrader::PluginCacheEntry::serviceTypes, and toQShared().
|
static |
Returns the instance of this class.
Definition at line 128 of file KoJsonTrader.cpp.
| QList< KoJsonTrader::Plugin > KoJsonTrader::query | ( | const QString & | servicetype, |
| const QString & | mimetype ) |
The main function in the KoJsonTrader class. It tries to automatically locate the base path containing Krita plugins. It attempts to do so in the current application directory qApp->applicationDirPath().
The environment variable KRITA_PLUGIN_PATH overrides the automatic search path when the algorithm is insufficient. Try setting this if the "LittleCMS color management plugin is not installed" error appears.
A better algorithm or another solution could be a welcome alternative. One thing that might help would be to build all Krita plugins in a single plugins folder, so that an installation step is unnecessary to put them together in a single folder here. Another solution might be to construct several QPluginLoaders.
| servicetype | A service type like 'KMyApp/Plugin' or 'KFilePlugin'. |
| mimetype | A MimeType to constrain the search. |
Definition at line 183 of file KoJsonTrader.cpp.
References KoJsonTrader::PluginCacheEntry::loader, m_mutex, m_pluginLoaderCache, KoJsonTrader::PluginCacheEntry::mimeTypes, and KoJsonTrader::PluginCacheEntry::serviceTypes.
|
mutableprivate |
Definition at line 81 of file KoJsonTrader.h.
|
private |
Definition at line 85 of file KoJsonTrader.h.
|
private |
Definition at line 80 of file KoJsonTrader.h.