commit pulseaudio-qt for openSUSE:Factory
Hello community, here is the log from the commit of package pulseaudio-qt for openSUSE:Factory checked in at 2019-05-20 10:28:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pulseaudio-qt (Old) and /work/SRC/openSUSE:Factory/.pulseaudio-qt.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "pulseaudio-qt" Mon May 20 10:28:44 2019 rev:2 rq:703882 version:1.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/pulseaudio-qt/pulseaudio-qt.changes 2019-04-11 08:49:07.784611996 +0200 +++ /work/SRC/openSUSE:Factory/.pulseaudio-qt.new.5148/pulseaudio-qt.changes 2019-05-20 10:28:46.301908813 +0200 @@ -1,0 +2,13 @@ +Fri May 17 18:57:15 UTC 2019 - Wolfgang Bauer <wbauer@tmo.at> + +- Update to 1.1.0 + * mapstest: add missing include_directories for pulseaudio & glib2 + * Don't delete profiles and ports on update + * Use override + * [StreamRestore] Don't mess with channels + * [Context] Update StreamRestore before inserting it + * Export StreamRestore + * Export stream and sinkinput + * Depend on Qt 5.10 + +------------------------------------------------------------------- Old: ---- pulseaudio-qt-1.0.1.tar.xz pulseaudio-qt-1.0.1.tar.xz.sig New: ---- pulseaudio-qt-1.1.0.tar.xz pulseaudio-qt-1.1.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pulseaudio-qt.spec ++++++ --- /var/tmp/diff_new_pack.kyDU09/_old 2019-05-20 10:28:47.505908414 +0200 +++ /var/tmp/diff_new_pack.kyDU09/_new 2019-05-20 10:28:47.541908402 +0200 @@ -16,10 +16,10 @@ # %bcond_without lang -%define soversion 1 +%define soversion 2 Name: pulseaudio-qt -Version: 1.0.1 +Version: 1.1.0 Release: 0 Summary: Qt bindings for PulseAudio License: LGPL-2.1-or-later @@ -78,8 +78,8 @@ %files -n libKF5PulseAudioQt%{soversion} %license COPYING.LIB -%{_kf5_libdir}/libKF5PulseAudioQt.so.%{soversion}.* %{_kf5_libdir}/libKF5PulseAudioQt.so.%{soversion} +%{_kf5_libdir}/libKF5PulseAudioQt.so.%{version} %files devel %dir %{_includedir}/KF5/ ++++++ pulseaudio-qt-1.0.1.tar.xz -> pulseaudio-qt-1.1.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/CMakeLists.txt new/pulseaudio-qt-1.1.0/CMakeLists.txt --- old/pulseaudio-qt-1.0.1/CMakeLists.txt 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/CMakeLists.txt 2019-05-16 18:35:00.000000000 +0200 @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.0) -project(PulseAudioQt VERSION 1.0.1) +project(PulseAudioQt VERSION 1.1.0) include(FeatureSummary) find_package(ECM 5.44.0 NO_MODULE) @@ -28,9 +28,9 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX PULSEAUDIOQT VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/pulseaudioqt_version.h" PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5PulseAudioQtConfigVersion.cmake" - SOVERSION 1) + SOVERSION 2) -set(REQUIRED_QT_VERSION 5.7.0) +set(REQUIRED_QT_VERSION 5.10.0) find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Gui DBus) find_package(Qt5Test ${REQUIRED_QT_VERSION} CONFIG) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/autotests/CMakeLists.txt new/pulseaudio-qt-1.1.0/autotests/CMakeLists.txt --- old/pulseaudio-qt-1.0.1/autotests/CMakeLists.txt 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/autotests/CMakeLists.txt 2019-05-16 18:35:00.000000000 +0200 @@ -1,5 +1,7 @@ include(ECMAddTests) +include_directories(${PULSEAUDIO_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR}) + ecm_add_test( ${CMAKE_SOURCE_DIR}/src/maps.h ${CMAKE_SOURCE_DIR}/src/module.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/src/CMakeLists.txt new/pulseaudio-qt-1.1.0/src/CMakeLists.txt --- old/pulseaudio-qt-1.0.1/src/CMakeLists.txt 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/src/CMakeLists.txt 2019-05-16 18:35:00.000000000 +0200 @@ -59,6 +59,7 @@ SinkInput Source SourceOutput + Stream StreamRestore VolumeObject REQUIRED_HEADERS PulseAudioQt_HEADERS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/src/card.cpp new/pulseaudio-qt-1.1.0/src/card.cpp --- old/pulseaudio-qt-1.0.1/src/card.cpp 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/src/card.cpp 2019-05-16 18:35:00.000000000 +0200 @@ -60,26 +60,48 @@ Q_EMIT q->nameChanged(); } - qDeleteAll(m_profiles); - m_profiles.clear(); + QStringList newProfiles; for (auto **it = info->profiles2; it && *it != nullptr; ++it) { - Profile *profile = new Profile(q); + const QString name = QString::fromUtf8((*it)->name); + newProfiles << name; + if (!m_profiles.contains(name)) { + m_profiles[name] = new Profile(q); + } + Profile *profile = m_profiles[name]; profile->d->setInfo(*it); - m_profiles.append(profile); if (info->active_profile2 == *it) { - m_activeProfileIndex = m_profiles.length() - 1; + m_activeProfileIndex = m_profiles.size() - 1; } } + + const QList<QString> profileKeys = m_profiles.keys(); + for (const QString &profileKey : profileKeys) { + if (!newProfiles.contains(profileKey)) { + delete m_profiles.take(profileKey); + } + } + Q_EMIT q->profilesChanged(); Q_EMIT q->activeProfileIndexChanged(); - qDeleteAll(m_ports); - m_ports.clear(); + QStringList newPorts; for (auto **it = info->ports; it && *it != nullptr; ++it) { - CardPort *port = new CardPort(q); + const QString name = QString::fromUtf8((*it)->name); + newPorts << name; + if (!m_ports.contains(name)) { + m_ports[name] = new CardPort(q); + } + CardPort *port = m_ports[name]; port->update(*it); - m_ports.append(port); } + + const QList<QString> portKeys = m_ports.keys(); + for (const QString &portKey : profileKeys) { + if (!newPorts.contains(portKey)) { + delete m_ports.take(portKey); + } + } + Q_EMIT q->portsChanged(); } @@ -90,7 +112,7 @@ QVector<Profile*> Card::profiles() const { - return d->m_profiles; + return QVector<Profile*>::fromList(d->m_profiles.values()); } quint32 Card::activeProfileIndex() const @@ -104,9 +126,9 @@ context()->setCardProfile(index(), profile->name()); } -QVector<Port*> Card::ports() const +QVector<CardPort*> Card::ports() const { - return d->m_ports; + return QVector<CardPort*>::fromList(d->m_ports.values()); } } // PulseAudioQt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/src/card.h new/pulseaudio-qt-1.1.0/src/card.h --- old/pulseaudio-qt-1.0.1/src/card.h 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/src/card.h 2019-05-16 18:35:00.000000000 +0200 @@ -28,7 +28,7 @@ namespace PulseAudioQt { -class Port; +class CardPort; class Profile; class Card : public PulseObject @@ -37,7 +37,7 @@ Q_PROPERTY(QString name READ name NOTIFY nameChanged) Q_PROPERTY(QVector<Profile*> profiles READ profiles NOTIFY profilesChanged) Q_PROPERTY(quint32 activeProfileIndex READ activeProfileIndex WRITE setActiveProfileIndex NOTIFY activeProfileIndexChanged) - Q_PROPERTY(QVector<Port*> ports READ ports NOTIFY portsChanged) + Q_PROPERTY(QVector<CardPort*> ports READ ports NOTIFY portsChanged) public: ~Card(); @@ -46,7 +46,7 @@ QVector<Profile*> profiles() const; quint32 activeProfileIndex() const; void setActiveProfileIndex(quint32 profileIndex); - QVector<Port*> ports() const; + QVector<CardPort*> ports() const; Q_SIGNALS: void nameChanged(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/src/card_p.h new/pulseaudio-qt-1.1.0/src/card_p.h --- old/pulseaudio-qt-1.0.1/src/card_p.h 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/src/card_p.h 2019-05-16 18:35:00.000000000 +0200 @@ -22,7 +22,9 @@ #include "card.h" #include "profile.h" +#include "cardport.h" #include <QVector> +#include <QHash> #include <pulse/introspect.h> namespace PulseAudioQt @@ -40,9 +42,9 @@ void update(const pa_card_info *info); QString m_name; - QVector<Profile*> m_profiles; + QHash<QString, Profile*> m_profiles; quint32 m_activeProfileIndex; - QVector<Port*> m_ports; + QHash<QString, CardPort*> m_ports; }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/src/context.cpp new/pulseaudio-qt-1.1.0/src/context.cpp --- old/pulseaudio-qt-1.0.1/src/context.cpp 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/src/context.cpp 2019-05-16 18:35:00.000000000 +0200 @@ -588,10 +588,11 @@ props.insert(QStringLiteral("application.icon_name"), QStringLiteral("preferences-desktop-notification")); obj = new StreamRestore(eventRoleIndex, props, q); + obj->d->update(info); m_streamRestores.insert(obj); + } else { + obj->d->update(info); } - - obj->d->update(info); } void ContextPrivate::serverCallback(const pa_server_info *info) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/src/device.cpp new/pulseaudio-qt-1.1.0/src/device.cpp --- old/pulseaudio-qt-1.0.1/src/device.cpp 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/src/device.cpp 2019-05-16 18:35:00.000000000 +0200 @@ -50,7 +50,7 @@ QVector<Port*> Device::ports() const { - return d->m_ports; + return QVector<Port*>::fromList(d->m_ports.values()); } quint32 Device::activePortIndex() const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/src/device_p.h new/pulseaudio-qt-1.1.0/src/device_p.h --- old/pulseaudio-qt-1.0.1/src/device_p.h 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/src/device_p.h 2019-05-16 18:35:00.000000000 +0200 @@ -23,6 +23,7 @@ #include <pulse/proplist.h> #include <QVector> +#include <QHash> #include "device.h" #include "port.h" @@ -44,7 +45,7 @@ QString m_description; QString m_formFactor; quint32 m_cardIndex = -1; - QVector<Port*> m_ports; + QHash<QString, Port*> m_ports; quint32 m_activePortIndex = -1; Device::State m_state = Device::UnknownState; @@ -75,20 +76,27 @@ m_cardIndex = info->card; Q_EMIT q->cardIndexChanged(); - // TODO: this rebuilds the entire port list on every update. would be - // nicer if it actually removed what needs removing updates what needs - // updating and adds what needs adding. Alas, this is a tad more - // involved. - qDeleteAll(m_ports); - m_ports.clear(); - for (auto **ports = info->ports; ports && *ports != nullptr; ++ports) { - Port *port = new Port(q); - port->d->setInfo(*ports); - m_ports.append(port); - if (info->active_port == *ports) { - m_activePortIndex = m_ports.length() - 1; + QStringList newPorts; + for (auto **it = info->ports; it && *it != nullptr; ++it) { + const QString name = QString::fromUtf8((*it)->name); + newPorts << name; + if (!m_ports.contains(name)) { + m_ports[name] = new Port(q); + } + Port *port = m_ports[name]; + port->d->setInfo(*it); + if (info->active_port == *it) { + m_activePortIndex = m_ports.size() - 1; } } + + const QList<QString> keys = m_ports.keys(); + for (const QString &portKey : keys) { + if (!newPorts.contains(portKey)) { + delete m_ports.take(portKey); + } + } + Q_EMIT q->portsChanged(); Q_EMIT q->activePortIndexChanged(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/src/models.h new/pulseaudio-qt-1.1.0/src/models.h --- old/pulseaudio-qt-1.0.1/src/models.h 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/src/models.h 2019-05-16 18:35:00.000000000 +0200 @@ -45,10 +45,10 @@ }; ~AbstractModel() override; - QHash<int, QByteArray> roleNames() const final; - int rowCount(const QModelIndex &parent = QModelIndex()) const final; + QHash<int, QByteArray> roleNames() const final override; + int rowCount(const QModelIndex &parent = QModelIndex()) const final override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - bool setData(const QModelIndex &index, const QVariant &value, int role) final; + bool setData(const QModelIndex &index, const QVariant &value, int role) final override; int role(const QByteArray &roleName) const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/src/sinkinput.h new/pulseaudio-qt-1.1.0/src/sinkinput.h --- old/pulseaudio-qt-1.0.1/src/sinkinput.h 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/src/sinkinput.h 2019-05-16 18:35:00.000000000 +0200 @@ -28,7 +28,7 @@ namespace PulseAudioQt { -class SinkInput : public Stream +class KF5PULSEAUDIOQT_EXPORT SinkInput : public Stream { Q_OBJECT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/src/stream.h new/pulseaudio-qt-1.1.0/src/stream.h --- old/pulseaudio-qt-1.0.1/src/stream.h 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/src/stream.h 2019-05-16 18:35:00.000000000 +0200 @@ -33,7 +33,7 @@ class StreamPrivate; -class Stream : public VolumeObject +class KF5PULSEAUDIOQT_EXPORT Stream : public VolumeObject { Q_OBJECT Q_PROPERTY(QString name READ name NOTIFY nameChanged) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/src/streamrestore.cpp new/pulseaudio-qt-1.1.0/src/streamrestore.cpp --- old/pulseaudio-qt-1.0.1/src/streamrestore.cpp 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/src/streamrestore.cpp 2019-05-16 18:35:00.000000000 +0200 @@ -118,8 +118,9 @@ void StreamRestore::setVolume(qint64 volume) { pa_cvolume vol = d->m_cache.valid ? d->m_cache.volume : d->m_volume; - vol.channels = 1; - vol.values[0] = volume; + for (int i = 0; i < vol.channels; ++i) { + vol.values[i] = volume; + } if (d->m_cache.valid) { d->writeChanges(vol, d->m_cache.muted, d->m_cache.device); @@ -202,8 +203,7 @@ pa_ext_stream_restore_info info; info.name = nameData.constData(); - info.channel_map.channels = 1; - info.channel_map.map[0] = PA_CHANNEL_POSITION_MONO; + info.channel_map = m_channelMap; info.volume = volume; info.device = deviceData.isEmpty() ? nullptr : deviceData.constData(); info.mute = muted; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pulseaudio-qt-1.0.1/src/streamrestore.h new/pulseaudio-qt-1.1.0/src/streamrestore.h --- old/pulseaudio-qt-1.0.1/src/streamrestore.h 2019-03-25 15:48:30.000000000 +0100 +++ new/pulseaudio-qt-1.1.0/src/streamrestore.h 2019-05-16 18:35:00.000000000 +0200 @@ -28,7 +28,7 @@ namespace PulseAudioQt { -class StreamRestore : public PulseObject +class KF5PULSEAUDIOQT_EXPORT StreamRestore : public PulseObject { Q_OBJECT Q_PROPERTY(QString name READ name NOTIFY nameChanged)
participants (1)
-
root