D20871: Don't delete profiles and ports on update

David Rosca noreply at phabricator.kde.org
Mon May 6 16:34:24 BST 2019


drosca accepted this revision.
drosca added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> card.cpp:78
> +    const QList<QString> profileKeys = m_profiles.keys();
> +    for (const QString& profileKey : profileKeys) {
> +        if (!newProfiles.contains(profileKey)) {

`const QString &profileKey`

> card.cpp:99
> +    const QList<QString> portKeys = m_ports.keys();
> +    for (const QString& portKey : profileKeys) {
> +        if (!newPorts.contains(portKey)) {

coding style

> device.cpp:53
>  {
> -    return d->m_ports;
> +    return QVector<Port*>::fromList(d->m_ports.values());
>  }

This is not ideal, but other than keeping and updating the vector with the hash there is no other way.

> device_p.h:94
> +        const QList<QString> keys = m_ports.keys();
> +        for (const QString& portKey : keys) {
> +            if (!newPorts.contains(portKey)) {

coding style

REPOSITORY
  R994 Pulseaudio Qt Bindings

BRANCH
  keep

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

To: nicolasfella, drosca
Cc: apol, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190506/b1b05e12/attachment-0001.html>


More information about the Plasma-devel mailing list