10namespace swift::misc::db
auto findFirstByOrDefault(Predicate p, const Value &def) const
bool containsBy(Predicate p) const
bool contains(const T &object) const
const_reference frontOrDefault() const
CSequence findBy(Predicate p) const
void push_back(const T &value)
Appends an element at the end of the sequence.
reference front()
Access the first element.
reference back()
Access the last element.
Distributions for channel.
bool isRestricted() const
Restricted channel?
const QString & getChannel() const
Version channel (Alpha, Beta, Stable ..).
int getStability() const
Stability (higher is more stable).
bool isStabilitySameOrBetter(const CDistribution &otherDistribution) const
"this" having same or better stability than other distribution?
static CDistribution fromDatabaseJson(const QJsonObject &json, const QString &prefix={})
Object from database JSON format.
bool containsUnrestricted() const
Contains any unrestricted.
CDistribution getMostStableOrDefault() const
Most stable or default.
CSequence()=default
Default constructor.
CDistributionList()=default
Empty constructor.
CDistribution findFirstByChannelOrDefault(const QString &channel) const
Find by channel.
QStringList getChannels() const
All channels.
void sortByStability(Qt::SortOrder order=Qt::AscendingOrder)
Stability.
CDistributionList findByRestriction(bool restricted) const
Find by restriction flag.
bool containsChannel(const QString &channel) const
Contains channel?
CDistribution getLeastStableOrDefault() const
Least stable or default.
static CDistributionList fromDatabaseJson(const QJsonArray &array)
From database JSON by array.
bool containsEqualOrMoreStable(CDistribution &distribution) const
Contains distributions considered of same stability or more stable.
QJsonArray jsonArrayFromString(const QString &json)
JSON Array from string.
bool isEmpty() const const
#define SWIFT_DEFINE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template definition of mixins for a CSequence subclass.