mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
CListModelBase and CViewBase: reduce the number of template parameters
by relying on what can easily be deduced from the first parameter(s).
This commit is contained in:
@@ -29,10 +29,16 @@ namespace BlackGui
|
||||
namespace Models
|
||||
{
|
||||
//! List model for callsign based objects (callsign is unique key)
|
||||
template <typename ObjectType, typename ContainerType, bool UseCompare = false> class CListModelCallsignObjects :
|
||||
public CListModelBase<ObjectType, ContainerType, UseCompare>
|
||||
template <typename T, bool UseCompare = false> class CListModelCallsignObjects :
|
||||
public CListModelBase<T, UseCompare>
|
||||
{
|
||||
public:
|
||||
//! Container type
|
||||
using ContainerType = T;
|
||||
|
||||
//! Container element type
|
||||
using ObjectType = typename T::value_type;
|
||||
|
||||
//! Destructor
|
||||
virtual ~CListModelCallsignObjects() {}
|
||||
|
||||
@@ -46,7 +52,7 @@ namespace BlackGui
|
||||
virtual void clearHighlighting() override
|
||||
{
|
||||
this->clearHighlightedCallsigns();
|
||||
CListModelBase<ObjectType, ContainerType, UseCompare>::clearHighlighting();
|
||||
CListModelBase<ContainerType, UseCompare>::clearHighlighting();
|
||||
}
|
||||
|
||||
//! Set color for highlighting
|
||||
|
||||
Reference in New Issue
Block a user