Remove use of QString::sprintf

This commit is contained in:
Gaute Lindkvist
2020-09-24 14:35:22 +02:00
parent 6dd3bd8c01
commit 8f5c38cb8e
3 changed files with 19 additions and 20 deletions

View File

@@ -218,11 +218,10 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
wellPathText += QString( "Well path name : %1\n" ).arg( wellPathSourceInfo->wellPath()->name() );
wellPathText += QString( "Measured depth : %1\n" ).arg( measuredDepth );
QString formattedText;
formattedText.sprintf( "Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]",
trueVerticalDepth.x(),
trueVerticalDepth.y(),
-trueVerticalDepth.z() );
QString formattedText = QString( "Intersection point : [E: %1, N: %2, Depth: %3]" )
.arg( trueVerticalDepth.x(), 5, 'f', 2 )
.arg( trueVerticalDepth.y(), 5, 'f', 2 )
.arg( -trueVerticalDepth.z(), 5, 'f', 2 );
wellPathText += formattedText;
RiuMainWindow::instance()->setResultInfo( wellPathText );