mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 10:22:15 -05: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:
1 parent
72fc47e003
commit
806a149809
75 files changed
+472
-206
No files matched your search
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "RifColorLegendData.h"
|
||||
|
||||
#include "RiaTextStringTools.h"
|
||||
#include "RigFormationNames.h"
|
||||
|
||||
#include "cafAssert.h"
|
||||
@@ -66,7 +67,7 @@ cvf::ref<RigFormationNames> RifColorLegendData::readLyrFormationNameFile( const
|
||||
while ( !stream.atEnd() )
|
||||
{
|
||||
QString line = stream.readLine();
|
||||
QStringList lineSegs = line.split( "'", QString::KeepEmptyParts );
|
||||
QStringList lineSegs = line.split( "'" );
|
||||
|
||||
if ( lineSegs.size() == 0 ) continue; // Empty line
|
||||
if ( lineSegs.size() == 1 ) continue; // No name present. Comment line ?
|
||||
@@ -84,16 +85,14 @@ cvf::ref<RigFormationNames> RifColorLegendData::readLyrFormationNameFile( const
|
||||
QString numberString = lineSegs[2];
|
||||
if ( commentMarkPos >= 0 ) numberString.truncate( commentMarkPos );
|
||||
|
||||
QString colorWord = numberString.split( " ", QString::SkipEmptyParts ).last(); // extract last word which may
|
||||
// contain formation color
|
||||
// extract last word which may contain formation color
|
||||
QString colorWord = RiaTextStringTools::splitSkipEmptyParts( numberString ).last();
|
||||
|
||||
if ( QColor::isValidColor( colorWord ) )
|
||||
numberString.remove( colorWord ); // remove color if present as last word on line
|
||||
|
||||
QStringList numberWords = numberString.split( QRegExp( "-" ), QString::SkipEmptyParts ); // extract words
|
||||
// containing
|
||||
// formation
|
||||
// number(s)
|
||||
// extract words containing formation number(s)
|
||||
QStringList numberWords = RiaTextStringTools::splitSkipEmptyParts( numberString, QRegExp( "-" ) );
|
||||
|
||||
if ( numberWords.size() == 2 ) // formation range with or without color at end of line
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user