Skip to content
Permalink
Browse files

Fix build, dox

  • Loading branch information
nyalldawson committed Jun 28, 2020
1 parent 005ac8a commit ac1591aa8c348f614577d9297955f5da749a3f7a
Showing with 11 additions and 4 deletions.
  1. +6 −3 src/core/qgsruntimeprofiler.cpp
  2. +5 −1 src/core/qgsruntimeprofiler.h
@@ -92,11 +92,11 @@ int QgsRuntimeProfilerNode::indexOf( QgsRuntimeProfilerNode *child ) const
return -1;
}

QgsRuntimeProfilerNode *QgsRuntimeProfilerNode::child( const QString &group, const QString &path )
QgsRuntimeProfilerNode *QgsRuntimeProfilerNode::child( const QString &group, const QString &name )
{
for ( auto &it : mChildren )
{
if ( it->data( Group ).toString() == group && it->data( Name ).toString() == path )
if ( it->data( Group ).toString() == group && it->data( Name ).toString() == name )
return it.get();
}
return nullptr;
@@ -507,10 +507,13 @@ void QgsRuntimeProfiler::setupConnections()

QgsRuntimeProfilerNode *QgsRuntimeProfiler::pathToNode( const QString &group, const QString &path ) const
{
QStringList parts = path.split( '/', Qt::SkipEmptyParts );
QStringList parts = path.split( '/' );
QgsRuntimeProfilerNode *res = mRootNode.get();
for ( const QString &part : parts )
{
if ( part.isEmpty() )
continue;

res = res->child( group, part );
if ( !res )
break;
@@ -90,7 +90,11 @@ class CORE_EXPORT QgsRuntimeProfilerNode
*/
int indexOf( QgsRuntimeProfilerNode *child ) const;

QgsRuntimeProfilerNode *child( const QString &group, const QString &path );
/**
* Finds the child with matching \a group and \a name. Returns NULLPTR if
* a matching child was not found.
*/
QgsRuntimeProfilerNode *child( const QString &group, const QString &name );

/**
* Returns the child at the specified \a index.

0 comments on commit ac1591a

Please sign in to comment.
You can’t perform that action at this time.