Changeset View
Changeset View
Standalone View
Standalone View
src/formeditor/widgetlibrary.cpp
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Line(s) | 132 | if (m_lookupDone) { | |||
---|---|---|---|---|---|
133 | return m_lookupResult; | 133 | return m_lookupResult; | ||
134 | } | 134 | } | ||
135 | m_lookupDone = true; | 135 | m_lookupDone = true; | ||
136 | m_lookupResult = false; | 136 | m_lookupResult = false; | ||
137 | q->clearResult(); | 137 | q->clearResult(); | ||
138 | 138 | | |||
139 | QStringList serviceTypes; | 139 | QStringList serviceTypes; | ||
140 | serviceTypes << "Kexi/FormWidgets"; | 140 | serviceTypes << "Kexi/FormWidgets"; | ||
141 | const QList<QPluginLoader*> offers = KexiFormWidgetsPluginTrader_instance->query(serviceTypes); | 141 | QList<QPluginLoader*> offers = KexiFormWidgetsPluginTrader_instance->query(serviceTypes); | ||
142 | foreach(const QPluginLoader *loader, offers) { | 142 | foreach(const QPluginLoader *loader, offers) { | ||
143 | QScopedPointer<KexiFormWidgetsPluginMetaData> metaData(new KexiFormWidgetsPluginMetaData(*loader)); | 143 | QScopedPointer<KexiFormWidgetsPluginMetaData> metaData(new KexiFormWidgetsPluginMetaData(*loader)); | ||
144 | if (metaData->id().isEmpty()) { | 144 | if (metaData->id().isEmpty()) { | ||
145 | qWarning() << "No plugin ID (X-KDE-PluginInfo-Name) specified for Kexi Form Widgets plugin" | 145 | qWarning() << "No plugin ID (X-KDE-PluginInfo-Name) specified for Kexi Form Widgets plugin" | ||
146 | << metaData->fileName() << "-- skipping!"; | 146 | << metaData->fileName() << "-- skipping!"; | ||
147 | continue; | 147 | continue; | ||
148 | } | 148 | } | ||
149 | // check version | 149 | // check version | ||
Show All 17 Lines | 165 | qDebug() << "Factory group" << metaData->group() | |||
167 | << metaData->id() << metaData->fileName() | 167 | << metaData->id() << metaData->fileName() | ||
168 | << "is not supported -- skipping!"; | 168 | << "is not supported -- skipping!"; | ||
169 | continue; | 169 | continue; | ||
170 | } | 170 | } | ||
171 | 171 | | |||
172 | m_pluginsMetaData.insert(metaData->id(), metaData.data()); | 172 | m_pluginsMetaData.insert(metaData->id(), metaData.data()); | ||
173 | metaData.take(); | 173 | metaData.take(); | ||
174 | } | 174 | } | ||
175 | qDeleteAll(offers); | ||||
176 | offers.clear(); | ||||
175 | if (m_pluginsMetaData.isEmpty()) { | 177 | if (m_pluginsMetaData.isEmpty()) { | ||
176 | q->m_result = KDbResult(i18n("Could not find any form widget plugins.")); | 178 | q->m_result = KDbResult(i18n("Could not find any form widget plugins.")); | ||
177 | m_couldNotFindAnyFormWidgetPluginsErrorDisplayed = true; | 179 | m_couldNotFindAnyFormWidgetPluginsErrorDisplayed = true; | ||
178 | return false; | 180 | return false; | ||
179 | } | 181 | } | ||
180 | m_lookupResult = true; | 182 | m_lookupResult = true; | ||
181 | return true; | 183 | return true; | ||
182 | } | 184 | } | ||
▲ Show 20 Lines • Show All 586 Lines • Show Last 20 Lines |