PluginManager: Small docs update

Change-Id: I0d0e021a272f818746d2482a5ba0c536bf125539
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Tobias Hunger
2013-08-30 12:30:04 +02:00
committed by hjk
parent f33a9813b1
commit 50945b0a18

View File

@@ -93,9 +93,9 @@ enum { debugLeaks = 0 };
Usually the application creates a PluginManager instance and initiates the loading.
\code
ExtensionSystem::PluginManager *manager = new ExtensionSystem::PluginManager();
manager->setPluginPaths(QStringList() << "plugins"); // 'plugins' and subdirs will be searched for plugins
manager->loadPlugins(); // try to load all the plugins
// 'plugins' and subdirs will be searched for plugins
ExtensionSystem::PluginManager::setPluginPaths(QStringList() << "plugins");
ExtensionSystem::PluginManager::loadPlugins(); // try to load all the plugins
\endcode
Additionally it is possible to directly access to the plugin specifications
(the information in the descriptor file), and the plugin instances (via PluginSpec),
@@ -122,7 +122,7 @@ enum { debugLeaks = 0 };
ExtensionSystem::PluginManager::instance()->addObject(handler);
// In plugin A:
QList<MimeTypeHandler *> mimeHandlers =
ExtensionSystem::PluginManager::instance()->getObjects<MimeTypeHandler>();
ExtensionSystem::PluginManager::getObjects<MimeTypeHandler>();
\endcode
@@ -159,8 +159,7 @@ enum { debugLeaks = 0 };
{
using namespace ExtensionSystem;
QObject *target = PluginManager::instance()
->getObjectByClassName("PluginA::SomeProvider");
QObject *target = PluginManager::getObjectByClassName("PluginA::SomeProvider");
if (target) {
// Some random argument.