Bug 396508 - Discover doesn't build with an older snapd version
Summary: Discover doesn't build with an older snapd version
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Snap Backend (other bugs)
Version First Reported In: 5.13.3
Platform: Neon Linux
: NOR critical
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-14 15:35 UTC by Nate Graham
Modified: 2018-07-19 16:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2018-07-14 15:35:10 UTC
Can't build master in Neon, probably because the version of Snapd is old:

Scanning dependencies of target snap-backend
[ 78%] Building CXX object libdiscover/backends/SnapBackend/CMakeFiles/snap-backend.dir/SnapResource.cpp.o
/home/dev/repos/discover/libdiscover/backends/SnapBackend/SnapResource.cpp: In member function 'void SnapResource::setChannel(const QString&)':
/home/dev/repos/discover/libdiscover/backends/SnapBackend/SnapResource.cpp:351:30: error: 'class QSnapdClient' has no member named 'switchChannel'
     auto request = client()->switchChannel(m_snap->name(), channelName);
                              ^
/home/dev/repos/discover/libdiscover/backends/SnapBackend/SnapResource.cpp: In constructor 'Channels::Channels(SnapResource*, QObject*)':
/home/dev/repos/discover/libdiscover/backends/SnapBackend/SnapResource.cpp:386:26: error: 'class QSnapdSnap' has no member named 'channelCount'
         if (res->snap()->channelCount() == 0)
                          ^
/home/dev/repos/discover/libdiscover/backends/SnapBackend/SnapResource.cpp: In member function 'void Channels::refreshChannels()':
/home/dev/repos/discover/libdiscover/backends/SnapBackend/SnapResource.cpp:400:27: error: 'class QSnapdSnap' has no member named 'channelCount'
         for(int i=0, c=s->channelCount(); i<c; ++i) {
                           ^
/home/dev/repos/discover/libdiscover/backends/SnapBackend/SnapResource.cpp:401:40: error: no matching function for call to 'QSnapdSnap::channel(int&)'
             auto channel = s->channel(i);
                                        ^
In file included from /usr/include/snapd-qt/Snapd/Snap:1:0,
                 from /home/dev/repos/discover/libdiscover/backends/SnapBackend/SnapResource.h:26,
                 from /home/dev/repos/discover/libdiscover/backends/SnapBackend/SnapResource.cpp:21:
/usr/include/snapd-qt/Snapd/snap.h:84:13: note: candidate: QString QSnapdSnap::channel() const
     QString channel () const;
             ^
/usr/include/snapd-qt/Snapd/snap.h:84:13: note:   candidate expects 0 arguments, 1 provided
Comment 1 Aleix Pol 2018-07-19 16:36:11 UTC
Git commit b51f759b9e3666ce41491df714ae79e1c8ba0dbb by Aleix Pol.
Committed on 19/07/2018 at 16:35.
Pushed by apol into branch 'master'.

Fix build with older versions of Snap

M  +1    -1    libdiscover/backends/SnapBackend/CMakeLists.txt
M  +14   -1    libdiscover/backends/SnapBackend/SnapResource.cpp

https://commits.kde.org/discover/b51f759b9e3666ce41491df714ae79e1c8ba0dbb