コード例 #1
0
void QGeoTileFetcher::updateTileRequests(const QSet<QGeoTileSpec> &tilesAdded,
                                                  const QSet<QGeoTileSpec> &tilesRemoved)
{
    Q_D(QGeoTileFetcher);

    QMutexLocker ml(&d->queueMutex_);

    cancelTileRequests(tilesRemoved);

    d->queue_ += tilesAdded.toList();

    if (d->enabled_ && !d->queue_.isEmpty() && !d->timer_.isActive())
        d->timer_.start(0, this);
}
コード例 #2
0
void QGeoTileFetcher::updateTileRequests(const QSet<QGeoTileSpec> &tilesAdded,
                                                  const QSet<QGeoTileSpec> &tilesRemoved)
{
    Q_D(QGeoTileFetcher);

    QMutexLocker ml(&d->queueMutex_);

    if (d->stopped_)
        return;

    cancelTileRequests(tilesRemoved);

    d->queue_ += tilesAdded.toList();

    if (!d->queue_.empty())
        d->timer_->start();
}