equal
deleted
inserted
replaced
17 |
17 |
18 #include <QPluginLoader> |
18 #include <QPluginLoader> |
19 #include <QtGui> |
19 #include <QtGui> |
20 #include <cntuiextensionfactory.h> |
20 #include <cntuiextensionfactory.h> |
21 #include "cntextensionmanager.h" |
21 #include "cntextensionmanager.h" |
|
22 |
|
23 const char *CNT_UI_EXTENSION_PLUGIN_DIRECTORY = "/resource/qt/plugins/contacts/extensions/"; |
22 |
24 |
23 CntExtensionManager::CntExtensionManager( QObject* aParent ): |
25 CntExtensionManager::CntExtensionManager( QObject* aParent ): |
24 mPluginsLoaded(false) |
26 mPluginsLoaded(false) |
25 { |
27 { |
26 setParent(aParent); |
28 setParent(aParent); |
79 // Also framework should provide means to load new plugins |
81 // Also framework should provide means to load new plugins |
80 // in runtime. It is very likely use case that new plugins will be |
82 // in runtime. It is very likely use case that new plugins will be |
81 // installed in runtime while contacts is running => new plugin should |
83 // installed in runtime while contacts is running => new plugin should |
82 // be loaded when it is added to file system (assuming that this |
84 // be loaded when it is added to file system (assuming that this |
83 // extension API will be open for 3rd party plugins) |
85 // extension API will be open for 3rd party plugins) |
84 |
86 |
85 QDir pluginsDir(QLibraryInfo::location(QLibraryInfo::PluginsPath)); |
87 QDir pluginsDir(CNT_UI_EXTENSION_PLUGIN_DIRECTORY); |
86 foreach (QString fileName, pluginsDir.entryList(QDir::Files)) |
88 foreach (QString fileName, pluginsDir.entryList(QDir::Files)) |
87 { |
89 { |
88 // Create plugin loader |
90 // Create plugin loader |
89 QPluginLoader* pluginLoader = new QPluginLoader( |
91 QPluginLoader* pluginLoader = new QPluginLoader( |
90 pluginsDir.absoluteFilePath(fileName)); |
92 pluginsDir.absoluteFilePath(fileName)); |