/*! \internal */ void QDeclarativeGeoMap::pluginReady() { serviceProvider_ = plugin_->sharedGeoServiceProvider(); mappingManager_ = serviceProvider_->mappingManager(); if (!mappingManager_ || serviceProvider_->error() != QGeoServiceProvider::NoError) { qmlInfo(this) << QStringLiteral("Error: Plugin does not support mapping.\nError message:") << serviceProvider_->errorString(); return; } if (!mappingManager_->isInitialized()) connect(mappingManager_, SIGNAL(initialized()), this, SLOT(mappingManagerInitialized())); else mappingManagerInitialized(); // make sure this is only called once disconnect(this, SLOT(pluginReady())); }
/*! \internal */ void QDeclarativeGeoMap::pluginReady() { serviceProvider_ = plugin_->sharedGeoServiceProvider(); mappingManager_ = serviceProvider_->mappingManager(); if (!mappingManager_ || serviceProvider_->error() != QGeoServiceProvider::NoError) { QString msg = QCoreApplication::translate(CONTEXT_NAME, PLUGIN_DOESNOT_SUPPORT_MAPPING).arg(serviceProvider_->errorString()); qmlInfo(this) << msg; return; } if (!mappingManager_->isInitialized()) connect(mappingManager_, SIGNAL(initialized()), this, SLOT(mappingManagerInitialized())); else mappingManagerInitialized(); // make sure this is only called once disconnect(this, SLOT(pluginReady())); }
/*! \internal */ void QDeclarativeGeoMap::pluginReady() { m_serviceProvider = m_plugin->sharedGeoServiceProvider(); m_mappingManager = m_serviceProvider->mappingManager(); if (m_serviceProvider->error() != QGeoServiceProvider::NoError) { setError(m_serviceProvider->error(), m_serviceProvider->errorString()); return; } if (!m_mappingManager) { //TODO Should really be EngineNotSetError (see QML GeoCodeModel) setError(QGeoServiceProvider::NotSupportedError, tr("Plugin does not support mapping.")); return; } if (!m_mappingManager->isInitialized()) connect(m_mappingManager, SIGNAL(initialized()), this, SLOT(mappingManagerInitialized())); else mappingManagerInitialized(); // make sure this is only called once disconnect(this, SLOT(pluginReady())); }