Changeset View
Changeset View
Standalone View
Standalone View
src/services/kplugininfo.h
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | 46 | public: | |||
---|---|---|---|---|---|
78 | * | 78 | * | ||
79 | * @param filename The filename of the .desktop file. | 79 | * @param filename The filename of the .desktop file. | ||
80 | * @param resource If filename is relative, you need to specify a resource type | 80 | * @param resource If filename is relative, you need to specify a resource type | ||
81 | * (e.g. "service", "apps"... KStandardDirs). Otherwise, | 81 | * (e.g. "service", "apps"... KStandardDirs). Otherwise, | ||
82 | * resource isn't used. | 82 | * resource isn't used. | ||
83 | */ | 83 | */ | ||
84 | explicit KPluginInfo(const QString &filename /*, QStandardPaths::StandardLocation resource = ...? GenericDataLocation + services ? Is this used? */); | 84 | explicit KPluginInfo(const QString &filename /*, QStandardPaths::StandardLocation resource = ...? GenericDataLocation + services ? Is this used? */); | ||
85 | 85 | | |||
86 | #if KSERVICE_ENABLE_DEPRECATED_SINCE(5, 0) | ||||
86 | /** | 87 | /** | ||
87 | * Read plugin info from a KService object. | 88 | * Read plugin info from a KService object. | ||
88 | * | 89 | * | ||
89 | * The .desktop file should look like this: | 90 | * The .desktop file should look like this: | ||
90 | * \verbatim | 91 | * \verbatim | ||
91 | [Desktop Entry] | 92 | [Desktop Entry] | ||
92 | Icon=mypluginicon | 93 | Icon=mypluginicon | ||
93 | Type=Service | 94 | Type=Service | ||
Show All 11 Lines | |||||
105 | 106 | | |||
106 | Name=User Visible Name | 107 | Name=User Visible Name | ||
107 | Comment=Description of what the plugin does | 108 | Comment=Description of what the plugin does | ||
108 | \endverbatim | 109 | \endverbatim | ||
109 | * In the first three entries the Icon entry is optional. | 110 | * In the first three entries the Icon entry is optional. | ||
110 | * @deprecated since 5.0, use (Q|K)PluginLoader instead and build the | 111 | * @deprecated since 5.0, use (Q|K)PluginLoader instead and build the | ||
111 | * metadata into the plugin using K_PLUGIN_CLASS_WITH_JSON( ..., "mypluginmetadata.json") | 112 | * metadata into the plugin using K_PLUGIN_CLASS_WITH_JSON( ..., "mypluginmetadata.json") | ||
112 | */ | 113 | */ | ||
113 | #ifndef KSERVICE_NO_DEPRECATED | 114 | KSERVICE_DEPRECATED_VERSION(5, 0, "Use (Q|K)PluginLoader") | ||
114 | explicit KSERVICE_DEPRECATED KPluginInfo(const KService::Ptr service); | 115 | explicit KPluginInfo(const KService::Ptr service); | ||
115 | #endif | 116 | #endif | ||
116 | 117 | | |||
117 | /** | 118 | /** | ||
118 | * Read plugin info from arguments passed to the plugin. These arguments should contain | 119 | * Read plugin info from arguments passed to the plugin. These arguments should contain | ||
119 | * the plugin's metadata (as read from QPluginLoader::metaData(). This constructor uses | 120 | * the plugin's metadata (as read from QPluginLoader::metaData(). This constructor uses | ||
120 | * the metadata read from the QVariantList. It reads the first QVariantMap it finds in a | 121 | * the metadata read from the QVariantList. It reads the first QVariantMap it finds in a | ||
121 | * field called "MetaData". | 122 | * field called "MetaData". | ||
122 | * | 123 | * | ||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
177 | * Creates an invalid plugin. | 178 | * Creates an invalid plugin. | ||
178 | * | 179 | * | ||
179 | * \see isValid | 180 | * \see isValid | ||
180 | */ | 181 | */ | ||
181 | KPluginInfo(); | 182 | KPluginInfo(); | ||
182 | 183 | | |||
183 | ~KPluginInfo(); | 184 | ~KPluginInfo(); | ||
184 | 185 | | |||
186 | #if KSERVICE_ENABLE_DEPRECATED_SINCE(5, 0) | ||||
185 | /** | 187 | /** | ||
186 | * @return A list of KPluginInfo objects constructed from a list of | 188 | * @return A list of KPluginInfo objects constructed from a list of | ||
187 | * KService objects. If you get a trader offer of the plugins you want | 189 | * KService objects. If you get a trader offer of the plugins you want | ||
188 | * to use you can just pass them to this function. | 190 | * to use you can just pass them to this function. | ||
189 | * | 191 | * | ||
190 | * @param services The list of services to construct the list of KPluginInfo objects from | 192 | * @param services The list of services to construct the list of KPluginInfo objects from | ||
191 | * @param config The config group where to save/load whether the plugin is enabled/disabled | 193 | * @param config The config group where to save/load whether the plugin is enabled/disabled | ||
192 | * @deprecated since 5.0, use (Q|K)PluginLoader instead and build the | 194 | * @deprecated since 5.0, use (Q|K)PluginLoader instead and build the | ||
193 | * metadata into the plugins using K_PLUGIN_CLASS_WITH_JSON( ..., "mypluginmetadata.json") | 195 | * metadata into the plugins using K_PLUGIN_CLASS_WITH_JSON( ..., "mypluginmetadata.json") | ||
194 | */ | 196 | */ | ||
195 | #ifndef KSERVICE_NO_DEPRECATED | 197 | KSERVICE_DEPRECATED_VERSION(5, 0, "Use (Q|K)PluginLoader") | ||
196 | static KSERVICE_DEPRECATED KPluginInfo::List fromServices(const KService::List &services, const KConfigGroup &config = KConfigGroup()); | 198 | static KPluginInfo::List fromServices(const KService::List &services, const KConfigGroup &config = KConfigGroup()); | ||
197 | #endif | 199 | #endif | ||
198 | 200 | | |||
199 | /** | 201 | /** | ||
200 | * @return A list of KPluginInfo objects constructed from a list of | 202 | * @return A list of KPluginInfo objects constructed from a list of | ||
201 | * filenames. If you make a lookup using, for example, | 203 | * filenames. If you make a lookup using, for example, | ||
202 | * KStandardDirs::findAllResources() you pass the list of files to this | 204 | * KStandardDirs::findAllResources() you pass the list of files to this | ||
203 | * function. | 205 | * function. | ||
204 | * | 206 | * | ||
▲ Show 20 Lines • Show All 288 Lines • Show Last 20 Lines |