Skip to content

Commit

Permalink
fix build on Qt <5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Oct 1, 2018
1 parent 9af3c49 commit fc4c579
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/mesh/qgsmeshrendereractivedatasetwidget.cpp
Expand Up @@ -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 )
Expand Down

0 comments on commit fc4c579

Please sign in to comment.