[Differential] [Commented On] D4836: Indicate that a port is unavailable

Kai Uwe Broulik noreply at phabricator.kde.org
Tue Feb 28 09:49:41 UTC 2017


broulik added a comment.


  Would it make sense to disable (in the ContextMenu) and/or filter out those ports instead? Or is this so you can configure it to play on headphones and once you plug them in it will work? Not sure about the "unavailable" prefix.

INLINE COMMENTS

> DeviceListItem.qml:84
> +
> +                model: ListModel {
> +                    id: portModel

You could also just use a JS Array for this since you're not making use of `ListModel`'s binding capabilities (you always clear and re-populate the model)

> DeviceListItem.qml:91
> +                    for (var i = 0; i < ports.length; ++i) {
> +                        var t = ports[i].description;
> +                        if (ports[i].availability == Port.Unavailable) {

Better cache port as variable:

  var port = ports[i];
  ...

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D4836

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: drosca, #plasma
Cc: broulik, plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170228/200a2d16/attachment-0001.html>


More information about the Plasma-devel mailing list