void QGeoTiledMappingManagerEngine::setTileFetcher(QGeoTileFetcher *fetcher)
{
    Q_D(QGeoTiledMappingManagerEngine);

    d->fetcher_ = fetcher;
    d->fetcher_->init();

    d->thread_ = new QThread;

    qRegisterMetaType<QGeoTileSpec>();

    connect(d->fetcher_,
            SIGNAL(tileFinished(QGeoTileSpec,QByteArray,QString)),
            this,
            SLOT(engineTileFinished(QGeoTileSpec,QByteArray,QString)),
            Qt::QueuedConnection);
    connect(d->fetcher_,
            SIGNAL(tileError(QGeoTileSpec,QString)),
            this,
            SLOT(engineTileError(QGeoTileSpec,QString)),
            Qt::QueuedConnection);

    d->fetcher_->moveToThread(d_ptr->thread_);

    connect(d->thread_,
            SIGNAL(started()),
            d->fetcher_,
            SLOT(threadStarted()));

    connect(d->thread_,
            SIGNAL(finished()),
            d->fetcher_,
            SLOT(threadFinished()));

    connect(d->fetcher_,
            SIGNAL(destroyed()),
            d->thread_,
            SLOT(deleteLater()));

    engineInitialized();

    QTimer::singleShot(0, d->thread_, SLOT(start()));
}
void QGeoTiledMappingManagerEngine::setTileFetcher(QGeoTileFetcher *fetcher)
{
    Q_D(QGeoTiledMappingManagerEngine);

    d->fetcher_ = fetcher;

    qRegisterMetaType<QGeoTileSpec>();

    connect(d->fetcher_,
            SIGNAL(tileFinished(QGeoTileSpec,QByteArray,QString)),
            this,
            SLOT(engineTileFinished(QGeoTileSpec,QByteArray,QString)),
            Qt::QueuedConnection);
    connect(d->fetcher_,
            SIGNAL(tileError(QGeoTileSpec,QString)),
            this,
            SLOT(engineTileError(QGeoTileSpec,QString)),
            Qt::QueuedConnection);

    engineInitialized();
}