#13126 RiaLogging: Take std::string_view for logElapsedTime message

Switch the message parameter from const QString& to std::string_view so
callers with std::string in hand no longer need a QString::fromStdString
wrapper. The internal duration formatting still uses QString::arg, fed
from a single QString::fromUtf8 conversion.

Callers passing QString locals are updated with .toStdString() at the
call site.
This commit is contained in:
Kristian Bendiksen committed 2026-05-08 10:11:09 +02:00
1 parent bb0afbf962
commit 4957bf5a8b
7 files changed
+21 -20

No files matched your search

@@ -301,7 +301,7 @@ void RimEnsembleStatisticsCase::calculate( const std::vector<RimSummaryCase*>& s
bool showDebugTiming = false;
if ( showDebugTiming )
{
QString timingText = "RimEnsembleStatisticsCase::calculate" + QString::fromStdString( inputAddress.toEclipseTextAddress() );
std::string timingText = "RimEnsembleStatisticsCase::calculate" + inputAddress.toEclipseTextAddress();
RiaLogging::logElapsedTime( timingText, startTime );
}
}
@@ -201,7 +201,8 @@ std::unique_ptr<RifSummaryReaderInterface> RimFileSummaryCase::findRelatedFilesA
}
bool isLoggingEnabled = RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( "OpmSummaryImport" );
if ( isLoggingEnabled ) RiaLogging::logElapsedTime( "Searched for restart files for " + headerFileName, startTime );
if ( isLoggingEnabled )
RiaLogging::logElapsedTime( ( "Searched for restart files for " + headerFileName ).toStdString(), startTime );
if ( !restartFileNames.empty() )
{