diff --git a/src/kcm/package/contents/ui/CardListItem.qml b/src/kcm/package/contents/ui/CardListItem.qml --- a/src/kcm/package/contents/ui/CardListItem.qml +++ b/src/kcm/package/contents/ui/CardListItem.qml @@ -55,7 +55,7 @@ ComboBox { Layout.fillWidth: true model: Profiles.filter(function (profile) { - return profile.availability === Profile.Available; + return profile.availability !== Profile.Unavailable; }) // NOTE: model resets (i.e. profiles property changes) will reset // the currentIndex, so force it to be set on model changes, otherwise diff --git a/src/profile.h b/src/profile.h --- a/src/profile.h +++ b/src/profile.h @@ -24,6 +24,8 @@ #include #include +#include + namespace QPulseAudio { @@ -37,9 +39,9 @@ public: enum Availability { - Unknown, - Available, - Unavailable + Unknown = PA_PORT_AVAILABLE_UNKNOWN, + Available = PA_PORT_AVAILABLE_YES, + Unavailable = PA_PORT_AVAILABLE_NO }; Q_ENUM(Availability) @@ -68,7 +70,7 @@ emit priorityChanged(); } - Availability newAvailability = info->available ? Available : Unavailable; + Availability newAvailability = Availability(info->available); if (m_availability != newAvailability) { m_availability = newAvailability; emit availabilityChanged();