mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
refs #900, filtered flag for containerOrFilteredContainer
more reliable than other approaches
This commit is contained in:
committed by
Mathew Sutcliffe
parent
6999a97f73
commit
30ef3eedf9
@@ -519,14 +519,16 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
template <typename ObjectType, typename ContainerType, bool UseCompare>
|
||||
const ContainerType &CListModelBase<ObjectType, ContainerType, UseCompare>::containerOrFilteredContainer() const
|
||||
const ContainerType &CListModelBase<ObjectType, ContainerType, UseCompare>::containerOrFilteredContainer(bool *filtered) const
|
||||
{
|
||||
if (this->hasFilter())
|
||||
{
|
||||
if (filtered) { *filtered = true; }
|
||||
return this->m_containerFiltered;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (filtered) { *filtered = false; }
|
||||
return this->m_container;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ namespace BlackGui
|
||||
const ContainerType &containerFiltered() const;
|
||||
|
||||
//! Full container or cached filtered container as approproiate
|
||||
const ContainerType &containerOrFilteredContainer() const;
|
||||
const ContainerType &containerOrFilteredContainer(bool *filtered = nullptr) const;
|
||||
|
||||
//! Simple set of data in container, using class is responsible for firing signals etc.
|
||||
//! \sa sendDataChanged
|
||||
|
||||
Reference in New Issue
Block a user