Skip to content

Commit fc4c579

Browse files
committedOct 1, 2018
fix build on Qt <5.8
1 parent 9af3c49 commit fc4c579

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/app/mesh/qgsmeshrendereractivedatasetwidget.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,14 @@ void QgsMeshRendererActiveDatasetWidget::updateMetadata()
251251
QString QgsMeshRendererActiveDatasetWidget::timeToString( double val )
252252
{
253253
// time val should be in hours
254+
#if QT_VERSION >= 0x050800
254255
qint64 seconds = static_cast<qint64>( val * 3600.0 );
255256
return QDateTime::fromSecsSinceEpoch( seconds ).toString( "hh:mm:ss" );
257+
#else
258+
QDateTime t;
259+
t.setTime_t( static_cast<uint>( val * 3600.0 ) );
260+
return t.toString( "hh:mm:ss" );
261+
#endif
256262
}
257263

258264
QString QgsMeshRendererActiveDatasetWidget::metadata( QgsMeshDatasetIndex datasetIndex )

0 commit comments

Comments
 (0)
Please sign in to comment.