mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	cleanup: explicitly cast to int to silence a compiler warning
In DivelogsDeWebServices::updateProgress() QProgressBar::setRange() and QProgressBar::setValue() were passed floats even though they expect ints. To silence a compiler warning, cast by hand. Use the lrint() function, since we generally do it this way. However, it is not clear whether this is necessary here. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									2a802721f4
								
							
						
					
					
						commit
						d7d01ab8a6
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -430,8 +430,8 @@ void DivelogsDeWebServices::downloadError(QNetworkReply::NetworkError)
 | 
			
		|||
 | 
			
		||||
void DivelogsDeWebServices::updateProgress(qreal current, qreal total)
 | 
			
		||||
{
 | 
			
		||||
	ui.progressBar->setRange(0, total);
 | 
			
		||||
	ui.progressBar->setValue(current);
 | 
			
		||||
	ui.progressBar->setRange(0, lrint(total));
 | 
			
		||||
	ui.progressBar->setValue(lrint(current));
 | 
			
		||||
	ui.status->setText(tr("Transferring data..."));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue