Changeset View
Changeset View
Standalone View
Standalone View
src/core/engine.cpp
Show First 20 Lines • Show All 173 Lines • ▼ Show 20 Line(s) | |||||
174 | void Engine::loadProviders() | 174 | void Engine::loadProviders() | ||
175 | { | 175 | { | ||
176 | if (m_providerFileUrl.isEmpty()) { | 176 | if (m_providerFileUrl.isEmpty()) { | ||
177 | // it would be nicer to move the attica stuff into its own class | 177 | // it would be nicer to move the attica stuff into its own class | ||
178 | qCDebug(KNEWSTUFFCORE) << "Using OCS default providers"; | 178 | qCDebug(KNEWSTUFFCORE) << "Using OCS default providers"; | ||
179 | delete d->m_atticaProviderManager; | 179 | delete d->m_atticaProviderManager; | ||
180 | d->m_atticaProviderManager = new Attica::ProviderManager; | 180 | d->m_atticaProviderManager = new Attica::ProviderManager; | ||
181 | connect(d->m_atticaProviderManager, &Attica::ProviderManager::providerAdded, this, &Engine::atticaProviderLoaded); | 181 | connect(d->m_atticaProviderManager, &Attica::ProviderManager::providerAdded, this, &Engine::atticaProviderLoaded); | ||
182 | connect(d->m_atticaProviderManager, &Attica::ProviderManager::failedToLoad, this, &Engine::slotProvidersFailed); | ||||
182 | d->m_atticaProviderManager->loadDefaultProviders(); | 183 | d->m_atticaProviderManager->loadDefaultProviders(); | ||
183 | } else { | 184 | } else { | ||
184 | qCDebug(KNEWSTUFFCORE) << "loading providers from " << m_providerFileUrl; | 185 | qCDebug(KNEWSTUFFCORE) << "loading providers from " << m_providerFileUrl; | ||
185 | emit signalBusy(i18n("Loading provider information")); | 186 | emit signalBusy(i18n("Loading provider information")); | ||
186 | 187 | | |||
187 | XmlLoader *loader = s_engineProviderLoaders()->localData().value(m_providerFileUrl); | 188 | XmlLoader *loader = s_engineProviderLoaders()->localData().value(m_providerFileUrl); | ||
188 | if (!loader) { | 189 | if (!loader) { | ||
189 | qCDebug(KNEWSTUFFCORE) << "No xml loader for this url yet, so create one and temporarily store that" << m_providerFileUrl; | 190 | qCDebug(KNEWSTUFFCORE) << "No xml loader for this url yet, so create one and temporarily store that" << m_providerFileUrl; | ||
▲ Show 20 Lines • Show All 536 Lines • Show Last 20 Lines |