Bug 312538 - Does not build with libktorrent master
Summary: Does not build with libktorrent master
Status: RESOLVED FIXED
Alias: None
Product: kget
Classification: Applications
Component: torrent (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KGet authors
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-03 14:52 UTC by Christoph Feck
Modified: 2013-01-05 17:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2013-01-03 14:52:12 UTC
It's API breaking time again :)

Review request: https://svn.reviewboard.kde.org/r/7053/
Please test

Error is:

-- Build files have been written to: /local/build/KDE/kdenetwork
/local/svn/kde/trunk/KDE/kdenetwork/kget/transfer-plugins/bittorrent/bttransfer.cpp: In member function 'void BTTransfer::updateTorrent()':
/local/svn/kde/trunk/KDE/kdenetwork/kget/transfer-plugins/bittorrent/bttransfer.cpp:314:86: warning: operation on '((BTTransfer*)this)->BTTransfer::<anonymous>.Transfer::m_downloadedSize' may be undefined [-Wsequence-point]
/local/svn/kde/trunk/KDE/kdenetwork/kget/transfer-plugins/bittorrent/bttransfer.cpp: In member function 'void BTTransfer::btTransferInit(const KUrl&, const QByteArray&)':
/local/svn/kde/trunk/KDE/kdenetwork/kget/transfer-plugins/bittorrent/bttransfer.cpp:455:136: error: no matching function for call to 'bt::TorrentControl::init(int, QString, QStringBuilder<QString, QString>, QString)'
/local/svn/kde/trunk/KDE/kdenetwork/kget/transfer-plugins/bittorrent/bttransfer.cpp:455:136: note: candidate is:
In file included from /local/svn/kde/trunk/KDE/kdenetwork/kget/transfer-plugins/bittorrent/bttransfer.h:15:0,
                 from /local/svn/kde/trunk/KDE/kdenetwork/kget/transfer-plugins/bittorrent/bttransfer.cpp:12:
/local/kde4/include/libktorrent/torrent/torrentcontrol.h:87:8: note: void bt::TorrentControl::init(bt::QueueManagerInterface*, const QByteArray&, const QString&, const QString&)
/local/kde4/include/libktorrent/torrent/torrentcontrol.h:87:8: note:   no known conversion for argument 2 from 'QString' to 'const QByteArray&'
make[2]: *** [kget/transfer-plugins/bittorrent/CMakeFiles/kget_bittorrentfactory.dir/bttransfer.o] Error 1
make[2]: Target `kget/transfer-plugins/bittorrent/CMakeFiles/kget_bittorrentfactory.dir/build' not remade because of errors.
make[1]: *** [kget/transfer-plugins/bittorrent/CMakeFiles/kget_bittorrentfactory.dir/all] Error 2
automoc4: empty source file: /local/svn/kde/trunk/KDE/kdenetwork/kopete/protocols/sms/ui/empty.cpp
make[1]: Target `all' not remade because of errors.
make: *** [all] Error 2
make: Target `default_target' not remade because of errors.
-- Failed: KDE/kdenetwork
Comment 1 David E. Narvaez 2013-01-04 03:15:11 UTC
I happen to have both masters checked out so I did the testing and it works. I added the specific tests to the reviewboard. Still, I'd wait for Lukas to give it a go.
Comment 2 Lukas Appelhans 2013-01-04 12:18:36 UTC
Hey! :)

Nice to see a patch here already. I wonder though if we should support the old version in the code as well, there might be distributions who use an old libktorrent. This has been done in a few cases in this codebase already. 
http://websvn.kde.org/trunk/KDE/kdenetwork/kget/transfer-plugins/bittorrent/bttransferhandler.cpp?view=markup (line 82)

Lukas
Comment 3 David E. Narvaez 2013-01-04 12:27:17 UTC
True. I actually forgot to ask if there was going to be any version bump for libKTorrent after this API breakage. Still, I don't see any way to match versions in the CMakeList.txt for kdnetwork yet - that should probably be fixed.
Comment 4 Lukas Appelhans 2013-01-04 13:47:52 UTC
Yes, a version bump is necessary from the libktorrent side, although I would suggest then doing the if-thing inside the code not the CMakeLists.txt :)

Lukas
Comment 5 Christoph Feck 2013-01-04 18:28:04 UTC
I may be wrong, but I think it should compile with older libktorrent, too. As far as I see, Joris only removed one of two similar functions.
Comment 6 Lukas Appelhans 2013-01-04 19:07:23 UTC
You are right even :) https://projects.kde.org/projects/extragear/network/libktorrent/repository/revisions/749a4c5532d68b879a1dc37adf7faecd2e11bda4 That is the commit and it just removes this method and keeps the other one.

Then I'd say +1 for commiting!

Lukas
Comment 7 David E. Narvaez 2013-01-05 16:53:15 UTC
Confirmed, I built with a previous version of libktorrent. So, will this change go to 4.10 too?
Comment 8 Lukas Appelhans 2013-01-05 16:54:31 UTC
I would support that. It seems like a rather trivial fix. :)

Lukas
Comment 9 David E. Narvaez 2013-01-05 17:06:14 UTC
SVN commit 1330900 by narvaez:

Switching to an equivalent init call to libKTorrent to prevent future API breakage.

CCMAIL: christoph@maxiom.de
FIXED-IN: 4.10

 M  +2 -2      bttransfer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1330900