Bug 419003 - unable to compile ktorrent (master :5b57d8cb02 ) failed : ‘TrackersStatusInfo’ is not a member of ‘bt’
Summary: unable to compile ktorrent (master :5b57d8cb02 ) failed : ‘TrackersStatusInfo...
Status: RESOLVED NOT A BUG
Alias: None
Product: ktorrent
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-18 21:07 UTC by bdouxx
Modified: 2020-04-10 07:35 UTC (History)
1 user (show)

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 bdouxx 2020-03-18 21:07:01 UTC
SUMMARY


STEPS TO REPRODUCE
1. git clone
2. compilation
3. 

OBSERVED RESULT
compilation failed

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  
(available in About System)
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.67.0
Qt Version: 5.13.2

ADDITIONAL INFORMATION




/home/me/ktorrent/ktorrent/view/viewmodel.cpp: In member function ‘virtual QVariant kt::ViewModel::data(const QModelIndex&, int) const’:
/home/me/ktorrent/ktorrent/view/viewmodel.cpp:562:21: error: ‘TrackersStatusInfo’ is not a member of ‘bt’
  562 |                 bt::TrackersStatusInfo tsi = item->tc->getTrackersList()->getTrackersStatusInfo();
      |                     ^~~~~~~~~~~~~~~~~~
/home/me/ktorrent/ktorrent/view/viewmodel.cpp:564:22: error: ‘tsi’ was not declared in this scope
  564 |                 if ((tsi.errors + tsi.warnings) == tsi.trackers_count)
      |                      ^~~
/home/me/ktorrent/ktorrent/view/viewmodel.cpp: In member function ‘virtual void kt::ViewModel::sort(int, Qt::SortOrder)’:
/home/me/ktorrent/ktorrent/view/viewmodel.cpp:809:83: warning: ‘void qStableSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = QTypedArrayData<kt::ViewModel::Item*>::iterator; LessThan = kt::ViewModelItemCmp]’ is deprecated: Use std::stable_sort [-Wdeprecated-declarations]
  809 |         qStableSort(torrents.begin(), torrents.end(), ViewModelItemCmp(col, order));
      |                                                                                   ^
In file included from /usr/include/qt5/QtCore/qlist.h:43,
                 from /usr/include/qt5/QtCore/qvariant.h:45,
                 from /usr/include/qt5/QtCore/qabstractitemmodel.h:43,
                 from /usr/include/qt5/QtCore/QAbstractTableModel:1,
                 from /home/me/ktorrent/ktorrent/view/viewmodel.h:25,
                 from /home/me/ktorrent/ktorrent/view/viewmodel.cpp:22:
/usr/include/qt5/QtCore/qalgorithms.h:206:53: note: declared here
  206 | QT_DEPRECATED_X("Use std::stable_sort") inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
      |                                                     ^~~~~~~~~~~
/home/me/ktorrent/ktorrent/view/viewmodel.cpp:809:83: warning: ‘void qStableSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = QTypedArrayData<kt::ViewModel::Item*>::iterator; LessThan = kt::ViewModelItemCmp]’ is deprecated: Use std::stable_sort [-Wdeprecated-declarations]
  809 |         qStableSort(torrents.begin(), torrents.end(), ViewModelItemCmp(col, order));
      |                                                                                   ^
In file included from /usr/include/qt5/QtCore/qlist.h:43,
                 from /usr/include/qt5/QtCore/qvariant.h:45,
                 from /usr/include/qt5/QtCore/qabstractitemmodel.h:43,
                 from /usr/include/qt5/QtCore/QAbstractTableModel:1,
                 from /home/me/ktorrent/ktorrent/view/viewmodel.h:25,
                 from /home/me/ktorrent/ktorrent/view/viewmodel.cpp:22:
/usr/include/qt5/QtCore/qalgorithms.h:206:53: note: declared here
  206 | QT_DEPRECATED_X("Use std::stable_sort") inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
      |                                                     ^~~~~~~~~~~
make[2]: *** [ktorrent/CMakeFiles/ktorrent_app.dir/build.make:627: ktorrent/CMakeFiles/ktorrent_app.dir/view/viewmodel.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1895: ktorrent/CMakeFiles/ktorrent_app.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Comment 1 george fb 2020-03-18 22:04:21 UTC
Just checkout to the version of Ktorrent in your distro's repo.

git checkout tags/v5.1.2
Comment 2 Christoph Feck 2020-04-09 20:17:49 UTC
Did you also compile and install libktorrent from master branch?
Comment 3 bdouxx 2020-04-10 04:26:16 UTC
Thank you, that’s the problem...
Sorry for the noise
Comment 4 Christoph Feck 2020-04-10 07:35:32 UTC
Thanks for the update; changing status.