mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix several deprecation warnings (#8657)
* Use constructor instead of nullptr for WindowFlags * Use constructor instead of nullptr for Alignment * Disable deprecation warning for QProcess * Add string split method to RaTextStringTools * Add caf.cpp used to manage Qt function deprecations * Use position()
This commit is contained in:
@@ -210,6 +210,18 @@ QDateTime RiaQDateTimeTools::subtractPeriod( const QDateTime& dt, RiaQDateTimeTo
|
||||
return subtractSpan( dt, timeSpan( period ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QDateTime RiaQDateTimeTools::createDateTime( const QDate& date )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 )
|
||||
return date.startOfDay();
|
||||
#else
|
||||
return QDateTime( date, QTime( 0, 0 ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -239,7 +251,7 @@ QDateTime RiaQDateTimeTools::createUtcDateTime()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QDateTime RiaQDateTimeTools::createUtcDateTime( const QDate& date )
|
||||
{
|
||||
auto qdt = QDateTime( date );
|
||||
auto qdt = createDateTime( date );
|
||||
qdt.setTimeSpec( currentTimeSpec() );
|
||||
return qdt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user