mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 14:50:05 +00:00 
			
		
		
		
	Fix backslash interpretation in IconFile and Image statements
This commit is contained in:
		
							parent
							
								
									c5a56680ea
								
							
						
					
					
						commit
						8326b2f2bf
					
				
					 3 changed files with 12 additions and 6 deletions
				
			
		|  | @ -765,8 +765,9 @@ PlacefileManager::Impl::LoadImageResources( | |||
|                   [&baseUrl](auto& iconFile) | ||||
|                   { | ||||
|                      // Resolve target URL relative to base URL
 | ||||
|                      QUrl fileUrl = | ||||
|                         QUrl(QString::fromStdString(iconFile->filename_)); | ||||
|                      QString filePath = | ||||
|                         QString::fromStdString(iconFile->filename_); | ||||
|                      QUrl fileUrl = QUrl(QDir::fromNativeSeparators(filePath)); | ||||
|                      QUrl resolvedUrl = baseUrl.resolved(fileUrl); | ||||
| 
 | ||||
|                      return resolvedUrl.toString().toStdString(); | ||||
|  | @ -783,7 +784,8 @@ PlacefileManager::Impl::LoadImageResources( | |||
|             std::static_pointer_cast<gr::Placefile::ImageDrawItem>(di) | ||||
|                ->imageFile_; | ||||
| 
 | ||||
|          QUrl        fileUrl     = QUrl(QString::fromStdString(imageFile)); | ||||
|          QString     filePath    = QString::fromStdString(imageFile); | ||||
|          QUrl        fileUrl     = QUrl(QDir::fromNativeSeparators(filePath)); | ||||
|          QUrl        resolvedUrl = baseUrl.resolved(fileUrl); | ||||
|          std::string urlString   = resolvedUrl.toString().toStdString(); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat