diff options
Diffstat (limited to 'tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp')
-rw-r--r-- | tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp b/tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp index 3843ed8f..5da6b4d4 100644 --- a/tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp +++ b/tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp @@ -1,11 +1,11 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the @@ -14,24 +14,13 @@ ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -119,6 +108,7 @@ void tst_QGeoTiledMap::initTestCase() m_map.reset(static_cast<QGeoTiledMapTest*>(mappingManager->createMap(this))); QVERIFY(m_map); m_map->setViewportSize(QSize(256, 256)); + m_map->setActiveMapType(m_map->m_engine->supportedMapTypes().first()); m_fetcher = static_cast<QGeoTileFetcherTest*>(m_map->m_engine->tileFetcher()); m_tilesCounter.reset(new FetchTileCounter()); connect(m_fetcher, SIGNAL(tileFetched(const QGeoTileSpec&)), m_tilesCounter.data(), SLOT(tileFetched(const QGeoTileSpec&))); @@ -139,6 +129,8 @@ void tst_QGeoTiledMap::fetchTiles() //prev_visible camera.setZoomLevel(zoomLevel-1); + // Delay needed on slow targets (e.g. Qemu) + QTest::qWait(10); m_map->clearData(); m_tilesCounter->m_tiles.clear(); m_map->setCameraData(camera); @@ -147,6 +139,8 @@ void tst_QGeoTiledMap::fetchTiles() //visible + prefetch camera.setZoomLevel(zoomLevel); + // Delay needed on slow targets (e.g. Qemu) + QTest::qWait(10); m_map->clearData(); m_tilesCounter->m_tiles.clear(); m_map->setCameraData(camera); @@ -160,6 +154,8 @@ void tst_QGeoTiledMap::fetchTiles() //next visible camera.setZoomLevel(zoomLevel + 1); + // Delay needed on slow targets (e.g. Qemu) + QTest::qWait(10); m_map->clearData(); m_tilesCounter->m_tiles.clear(); m_map->setCameraData(camera); |