Commit 674c8861 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

MediaLibraryModel: Fix rowCount method

parent 5c24588c
......@@ -70,8 +70,12 @@ bool MediaLibraryModel::removeMedia( int64_t mediaId )
return true;
int MediaLibraryModel::rowCount( const QModelIndex& ) const
int MediaLibraryModel::rowCount( const QModelIndex& index ) const
// A valid index is any row, which doesn't have child
// An invalid index is the root node, which does have children
if ( index.isValid() == true )
return 0;
return m_rowCount.load( std::memory_order_relaxed );
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment