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:
@@ -18,11 +18,10 @@
|
||||
|
||||
#include "RifEnsembleFractureStatisticsExporter.h"
|
||||
|
||||
// #include "RiaEclipseUnitTools.h"
|
||||
|
||||
// #include "RimStimPlanModel.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RigSlice2D.h"
|
||||
|
||||
#include "caf.h"
|
||||
#include "cafAssert.h"
|
||||
|
||||
#include <QFile>
|
||||
@@ -61,7 +60,7 @@ bool RifEnsembleFractureStatisticsExporter::writeAsStimPlanXml( const std::vecto
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEnsembleFractureStatisticsExporter::appendHeaderToStream( QTextStream& stream )
|
||||
{
|
||||
stream << "<?xml version=\"1.0\" ?>" << endl << "<contours>" << endl;
|
||||
stream << "<?xml version=\"1.0\" ?>" << caf::endl << "<contours>" << caf::endl;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -76,15 +75,15 @@ void RifEnsembleFractureStatisticsExporter::appendPropertiesToStream(
|
||||
{
|
||||
CAF_ASSERT( statistics.size() == properties.size() );
|
||||
|
||||
stream << "<properties>" << endl;
|
||||
stream << "<properties>" << caf::endl;
|
||||
|
||||
for ( size_t s = 0; s < statistics.size(); s++ )
|
||||
{
|
||||
QString propertyName = properties[s].first;
|
||||
QString propertyUnit = properties[s].second;
|
||||
|
||||
stream << QString( "<property name=\"%1\" uom=\"%2\">" ).arg( propertyName ).arg( propertyUnit ) << endl;
|
||||
stream << QString( "<time value=\"%1\">" ).arg( time ) << endl;
|
||||
stream << QString( "<property name=\"%1\" uom=\"%2\">" ).arg( propertyName ).arg( propertyUnit ) << caf::endl;
|
||||
stream << QString( "<time value=\"%1\">" ).arg( time ) << caf::endl;
|
||||
|
||||
CAF_ASSERT( statistics[s]->ny() == gridYs.size() );
|
||||
|
||||
@@ -92,19 +91,19 @@ void RifEnsembleFractureStatisticsExporter::appendPropertiesToStream(
|
||||
// in the reader (depths from <grid><ys> are used).
|
||||
for ( int i = static_cast<int>( gridYs.size() ) - 1; i >= 0; i-- )
|
||||
{
|
||||
stream << "<depth>" << gridYs[i] << "</depth>" << endl;
|
||||
stream << "<depth>" << gridYs[i] << "</depth>" << caf::endl;
|
||||
stream << "<data>[";
|
||||
for ( size_t x = 0; x < statistics[s]->nx(); x++ )
|
||||
{
|
||||
stream << statistics[s]->getValue( x, i ) << " ";
|
||||
}
|
||||
stream << "]</data>" << endl;
|
||||
stream << "]</data>" << caf::endl;
|
||||
}
|
||||
|
||||
stream << "</time>" << endl;
|
||||
stream << "</property>" << endl;
|
||||
stream << "</time>" << caf::endl;
|
||||
stream << "</property>" << caf::endl;
|
||||
}
|
||||
stream << "</properties>" << endl;
|
||||
stream << "</properties>" << caf::endl;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -116,7 +115,7 @@ void RifEnsembleFractureStatisticsExporter::appendOrientationToStream( QTextStre
|
||||
if ( orientation != RigStimPlanFractureDefinition::Orientation::UNDEFINED )
|
||||
{
|
||||
QString orientationString = getStringForOrientation( orientation );
|
||||
stream << QString( "<orientation>%1</orientation>" ).arg( orientationString ) << endl;
|
||||
stream << QString( "<orientation>%1</orientation>" ).arg( orientationString ) << caf::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,19 +129,19 @@ void RifEnsembleFractureStatisticsExporter::appendGridDimensionsToStream( QTextS
|
||||
{
|
||||
QString unitString = getStringForUnitSystem( unitSystem );
|
||||
stream << QString( "<grid xCount=\"%1\" yCount=\"%2\" uom=\"%3\">" ).arg( gridXs.size() ).arg( gridYs.size() ).arg( unitString )
|
||||
<< endl;
|
||||
<< caf::endl;
|
||||
|
||||
stream << "<xs>[";
|
||||
for ( auto x : gridXs )
|
||||
stream << x << " ";
|
||||
stream << "]</xs>" << endl;
|
||||
stream << "]</xs>" << caf::endl;
|
||||
|
||||
stream << "<ys>[";
|
||||
for ( auto y : gridYs )
|
||||
stream << y << " ";
|
||||
stream << "]</ys>" << endl;
|
||||
stream << "]</ys>" << caf::endl;
|
||||
|
||||
stream << "</grid>" << endl;
|
||||
stream << "</grid>" << caf::endl;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -150,7 +149,7 @@ void RifEnsembleFractureStatisticsExporter::appendGridDimensionsToStream( QTextS
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEnsembleFractureStatisticsExporter::appendFooterToStream( QTextStream& stream )
|
||||
{
|
||||
stream << "</contours>" << endl;
|
||||
stream << "</contours>" << caf::endl;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user