20 mGroupStack.push( name );
21 if ( !name.isEmpty() )
24 mGroupPrefix += QLatin1Char(
'/' );
30 if ( mGroupStack.isEmpty() )
32 qWarning(
"QgsSettings::endGroup: No matching beginGroup()" );
36 QString group = mGroupStack.pop();
37 int len = group.size();
39 mGroupPrefix.truncate( mGroupPrefix.size() - ( len + 1 ) );
44 mProfileTime.restart();
50 QString name = mCurrentName;
51 name.prepend( mGroupPrefix );
52 double timing = mProfileTime.elapsed() / 1000.0;
53 mProfileTimes.append( QPair<QString, double>( name, timing ) );
54 QgsDebugMsg( QStringLiteral(
"PROFILE: %1 - %2" ).arg( name ).arg( timing ) );
59 mProfileTimes.clear();
65 QList<QPair<QString, double> >::const_iterator it = mProfileTimes.constBegin();
66 for ( ; it != mProfileTimes.constEnd(); ++it )
68 total += ( *it ).second;
void endGroup()
End the current active group.
double totalTime()
The current total time collected in the profiler.
void beginGroup(const QString &name)
Begin the group for the profiler.
void clear()
clear Clear all profile data.
void start(const QString &name)
Start a profile event with the given name.
void end()
End the current profile event.