mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-06 00:05:02 -05:00
fix build on Qt <5.8
This commit is contained in:
parent
9af3c49651
commit
fc4c5794d2
@ -251,8 +251,14 @@ void QgsMeshRendererActiveDatasetWidget::updateMetadata()
|
||||
QString QgsMeshRendererActiveDatasetWidget::timeToString( double val )
|
||||
{
|
||||
// time val should be in hours
|
||||
#if QT_VERSION >= 0x050800
|
||||
qint64 seconds = static_cast<qint64>( val * 3600.0 );
|
||||
return QDateTime::fromSecsSinceEpoch( seconds ).toString( "hh:mm:ss" );
|
||||
#else
|
||||
QDateTime t;
|
||||
t.setTime_t( static_cast<uint>( val * 3600.0 ) );
|
||||
return t.toString( "hh:mm:ss" );
|
||||
#endif
|
||||
}
|
||||
|
||||
QString QgsMeshRendererActiveDatasetWidget::metadata( QgsMeshDatasetIndex datasetIndex )
|
||||
|
Loading…
x
Reference in New Issue
Block a user