Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/interfaces/iplugincontroller.h
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Line(s) | 68 | public: | |||
---|---|---|---|---|---|
149 | * @param extension The extension interface | 149 | * @param extension The extension interface | ||
150 | * @param pluginName The name of the plugin to load if multiple plugins for the extension exist, corresponds to the X-KDE-PluginInfo-Name | 150 | * @param pluginName The name of the plugin to load if multiple plugins for the extension exist, corresponds to the X-KDE-PluginInfo-Name | ||
151 | * @return Pointer to the extension interface or 0 if no plugin supports it | 151 | * @return Pointer to the extension interface or 0 if no plugin supports it | ||
152 | */ | 152 | */ | ||
153 | template<class Extension> Extension* extensionForPlugin( const QString &extension = {}, const QString &pluginName = {}) | 153 | template<class Extension> Extension* extensionForPlugin( const QString &extension = {}, const QString &pluginName = {}) | ||
154 | { | 154 | { | ||
155 | QString ext; | 155 | QString ext; | ||
156 | if( extension.isEmpty() ) { | 156 | if( extension.isEmpty() ) { | ||
157 | ext = qobject_interface_iid<Extension*>(); | 157 | ext = QString::fromUtf8(qobject_interface_iid<Extension*>()); | ||
158 | } else { | 158 | } else { | ||
159 | ext = extension; | 159 | ext = extension; | ||
160 | } | 160 | } | ||
161 | IPlugin *plugin = pluginForExtension(ext, pluginName); | 161 | IPlugin *plugin = pluginForExtension(ext, pluginName); | ||
162 | if (plugin) { | 162 | if (plugin) { | ||
163 | return plugin->extension<Extension>(); | 163 | return plugin->extension<Extension>(); | ||
164 | } | 164 | } | ||
165 | return nullptr; | 165 | return nullptr; | ||
Show All 35 Lines |