Changeset View
Changeset View
Standalone View
Standalone View
src/core/kexipartmanager.cpp
Show First 20 Lines • Show All 161 Lines • ▼ Show 20 Line(s) | 160 | cg.readEntry("Order", "org.kexi-project.table," | |||
---|---|---|---|---|---|
162 | "org.kexi-project.form," | 162 | "org.kexi-project.form," | ||
163 | "org.kexi-project.report," | 163 | "org.kexi-project.report," | ||
164 | "org.kexi-project.macro," | 164 | "org.kexi-project.macro," | ||
165 | "org.kexi-project.script").split(',')); | 165 | "org.kexi-project.script").split(',')); | ||
166 | QVector<Info*> orderedInfos(orderedPluginIds.count()); | 166 | QVector<Info*> orderedInfos(orderedPluginIds.count()); | ||
167 | QStringList serviceTypes; | 167 | QStringList serviceTypes; | ||
168 | serviceTypes << "Kexi/Viewer" << "Kexi/Designer" << "Kexi/Editor" | 168 | serviceTypes << "Kexi/Viewer" << "Kexi/Designer" << "Kexi/Editor" | ||
169 | << "Kexi/ModalDialog"; | 169 | << "Kexi/ModalDialog"; | ||
170 | const QList<QPluginLoader*> offers = KexiPartTrader_instance->query(serviceTypes); | 170 | QList<QPluginLoader*> offers = KexiPartTrader_instance->query(serviceTypes); | ||
171 | foreach(QPluginLoader *loader, offers) { | 171 | foreach(const QPluginLoader *loader, offers) { | ||
172 | QScopedPointer<Info> info(new Info(*loader)); | 172 | QScopedPointer<Info> info(new Info(*loader)); | ||
173 | if (info->id().isEmpty()) { | 173 | if (info->id().isEmpty()) { | ||
174 | qWarning() << "No plugin ID (X-KDE-PluginInfo-Name) specified for Kexi Part" | 174 | qWarning() << "No plugin ID (X-KDE-PluginInfo-Name) specified for Kexi Part" | ||
175 | << info->fileName() << "-- skipping!"; | 175 | << info->fileName() << "-- skipping!"; | ||
176 | continue; | 176 | continue; | ||
177 | } | 177 | } | ||
178 | // check version | 178 | // check version | ||
179 | if (info->majorVersion() != KEXI_PART_VERSION) { | 179 | if (info->majorVersion() != KEXI_PART_VERSION) { | ||
Show All 28 Lines | |||||
208 | } | 208 | } | ||
209 | else { | 209 | else { | ||
210 | // append now | 210 | // append now | ||
211 | d->partlist.append(info.data()); | 211 | d->partlist.append(info.data()); | ||
212 | } | 212 | } | ||
213 | d->partsByPluginId.insert(info->pluginId(), info.data()); | 213 | d->partsByPluginId.insert(info->pluginId(), info.data()); | ||
214 | info.take(); | 214 | info.take(); | ||
215 | } | 215 | } | ||
216 | qDeleteAll(offers); | ||||
217 | offers.clear(); | ||||
216 | 218 | | |||
217 | // fill the final list using computed order | 219 | // fill the final list using computed order | ||
218 | for (int i = 0; i < orderedInfos.size(); i++) { | 220 | for (int i = 0; i < orderedInfos.size(); i++) { | ||
219 | Info *info = orderedInfos[i]; | 221 | Info *info = orderedInfos[i]; | ||
220 | if (!info) { | 222 | if (!info) { | ||
221 | continue; | 223 | continue; | ||
222 | } | 224 | } | ||
223 | //qDebug() << "adding Kexi part info" << info->pluginId(); | 225 | //qDebug() << "adding Kexi part info" << info->pluginId(); | ||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |