mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 06:30:05 +00:00 
			
		
		
		
	QMapLibre test refactoring
This commit is contained in:
		
							parent
							
								
									e23c6c2624
								
							
						
					
					
						commit
						16c2fae408
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		|  | @ -3,10 +3,10 @@ | |||
| #include <scwx/util/logger.hpp> | ||||
| 
 | ||||
| #include <QCoreApplication> | ||||
| #include <QMapLibreGL/QMapLibreGL> | ||||
| #include <QTimer> | ||||
| 
 | ||||
| #include <gtest/gtest.h> | ||||
| #include <qmaplibre.hpp> | ||||
| #include <re2/re2.h> | ||||
| 
 | ||||
| namespace scwx | ||||
|  | @ -45,22 +45,22 @@ TEST_P(ByMapProviderTest, MapProviderLayers) | |||
|    // Configure map provider
 | ||||
|    const MapProviderInfo& mapProviderInfo = GetMapProviderInfo(mapProvider); | ||||
| 
 | ||||
|    // Configure QMapLibreGL
 | ||||
|    QMapLibreGL::Settings mapSettings {}; | ||||
|    mapSettings.resetToTemplate(mapProviderInfo.settingsTemplate_); | ||||
|    // Configure QMapLibre
 | ||||
|    QMapLibre::Settings mapSettings {}; | ||||
|    mapSettings.setProviderTemplate(mapProviderInfo.providerTemplate_); | ||||
|    mapSettings.setApiKey(QString::fromStdString(apiKey)); | ||||
| 
 | ||||
|    QMapLibreGL::Map map(nullptr, mapSettings, QSize(1, 1)); | ||||
|    QMapLibre::Map map(nullptr, mapSettings, QSize(1, 1)); | ||||
|    application.processEvents(); | ||||
| 
 | ||||
|    // Connect style load completion signal
 | ||||
|    QObject::connect( | ||||
|       &map, | ||||
|       &QMapLibreGL::Map::mapChanged, | ||||
|       [&](QMapLibreGL::Map::MapChange mapChange) | ||||
|       &QMapLibre::Map::mapChanged, | ||||
|       [&](QMapLibre::Map::MapChange mapChange) | ||||
|       { | ||||
|          if (mapChange == | ||||
|              QMapLibreGL::Map::MapChange::MapChangeDidFinishLoadingStyle) | ||||
|              QMapLibre::Map::MapChange::MapChangeDidFinishLoadingStyle) | ||||
|          { | ||||
|             application.exit(); | ||||
|          } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat