Version: unspecified (using KDE 4.5.4) OS: Linux This bug relative to bug 248205. The symptoms are the same. I have 2 tabs: All torrents and Active torrents. The checked chunks line and small left aligned copy in upper corner of windows are displayed. In every tab: All torrents and Active torrents. Reproducible: Always Git version of KTorrent OS: Linux (x86_64) release 2.6.36-gentoo-r1 Compiler: x86_64-pc-linux-gnu-gcc
Screenshot ?
The following screenshots were created at one time.
Created attachment 54463 [details] Active Torrents screenshot
Created attachment 54464 [details] All Torrents screenshot
Can't seem to reproduce
Hmm... Just try the following steps: 1. Make tab 1: show All torrents 2. Make tab 2: show Active torrents 3. Choose tab 1 4. Add torrent, start download 5. Minimize to system tray 6. Wait until torrent will be downloaded (and finish checking chunks) 7. Restore KTorrent window 8. Now you on the tab 1. Choose tab 2. 9. Now you can see the incorrect chunks line If it is helpful I attache my ktorrentrc file below. Qt-4.7.1
Created attachment 54527 [details] My ktorrentrc
I can observe the same phenomenon. The important point is that the KTorrent window is closed and ktorrent is only visible as an icon in the system tray. Then a check has to be executed. Now, when opening the main window again, you will see the misplaced torrent check. If several checks have been performed, the output of all of them is on the same place, so you absolutely can not read any of the numbers.
I opened new bug 264215 is might be related to this. As bug 248205 is depend on several opened tabs think this may depend on the several opend tabs situation too.
Is this actually still reproducible with the latest code from git ?
Yes. Confirm this with latest git. For small torrents, the chunk bar invalid only in tab 2. But for big (over 1 GiB, not tested the real size level) the bug appears in both tab 1 and tab 2. The problem with tab 2 is a problem due the bug 264215.
Git commit 24928b6fdaab272752308f2804ebb908dde33a77 by Joris. Pushed by guisson into branch 'master'. Update view tab when switching to it, fixes data scan widget showing in the wrong place BUG: 259483 M +1 -0 ChangeLog M +1 -0 ktorrent/view/viewmanager.cpp http://commits.kde.org/e79f3103/24928b6fdaab272752308f2804ebb908dde33a77
Git commit bb942105d72a8b096573f7dc687d1af2a778137b by Joris. Pushed by guisson into branch '4.1'. Backport to 4.1: Update view tab when switching to it, fixes data scan widget showing in the wrong place CCBUG: 259483 M +1 -0 ChangeLog M +1 -0 ktorrent/view/viewmanager.cpp http://commits.kde.org/e79f3103/bb942105d72a8b096573f7dc687d1af2a778137b
The bug exists in latest Git. Don't understand how update() will hide chunk bar. In the bug 248205 you create method View::extend(bt::TorrentInterface* tc,Extender* widget). Think this method should be applied in ViewManager::onCurrentTabChanged() or call tree.
update() will hide all widgets of items which are not visible
Ok. I try to clarify the problem. You expect that extenders will hide in ViewModel::update(ViewDelegate* delegate,bool force_resort):382. Callback: ViewManager::onCurrentTabChanged(QWidget* tab):264 View::update():140 They are not. The situation when in tab 2 (Active torrents) there are no torrent actually active. Local variable "hidden" is true for discussed torrent because the group "Active torrents" has no torrents. Also Item::hidden is true. So the result of expression at 376 is false. And hide action isn't executed at 382. Also I noticed that the torrent in tab 2 (from ViewModel::torrents) hasn't been updated (it's been updated in tab 1), beacsue has wrong status "bt::ALLOCATING_DISKSPACE", and not updated info (bytes_downloaded, bytes_uploaded, etc). So, the problem I think is: we start torrent in tab 1, the torrent became visible in tab 2 (because it will be downloaded and active). The torrent in tab 2 didn't change hidden value, but the extender started. Then KTorrent didn't change the value because expect that the torrent already changed status to hidden and hide extender. There are 2 solutions: 1. Try to hide extenders for all torrents (otside "if" statement at 376-383) 2. Correctly update actual infromation (Item object) for torrents after changing tab.
In addition, if behavior will be this: after changed to tab 2 (Active torrents), the torrent still was active, but seconds later peers were disconected and the torrent became not active. The update() function still be executed every timer tick, so the problem will be gone because the hidden status will be changed.
--- ktorrent/view/viewmodel.cpp +++ ktorrent/view/viewmodel.cpp @@ -376,13 +376,14 @@ if (hidden != i->hidden) { i->hidden = hidden; resort = true; - // hide the extender if there is one shown - if (hidden && delegate->extended(i->tc)) - delegate->hideExtender(i->tc); } - + + // hide the extender if there is one shown + if (hidden && delegate->extended(i->tc)) + delegate->hideExtender(i->tc); + if (!i->hidden) num_visible++; row++; } This solves the problem.
Git commit c87d260837e264f25f4edc45e118caa55d23e954 by Joris. Committed on 10/02/2011 at 18:41. Pushed by guisson into branch 'master'. Fix scanextenders showing when they are not supposed to. Big thanks for Alexey Shildyakov for finding the solution. BUG: 259483 M +1 -0 ChangeLog M +4 -3 ktorrent/view/viewmodel.cpp http://commits.kde.org/ktorrent/c87d260837e264f25f4edc45e118caa55d23e954
Git commit a65290ddb5768b30e4f1a26a90bf28864ba41c66 by Joris. Committed on 10/02/2011 at 18:41. Pushed by guisson into branch '4.1'. Backport to 4.1: Fix scanextenders showing when they are not supposed to. Big thanks for Alexey Shildyakov for finding the solution. CCBUG: 259483 M +1 -0 ChangeLog M +4 -3 ktorrent/view/viewmodel.cpp http://commits.kde.org/ktorrent/a65290ddb5768b30e4f1a26a90bf28864ba41c66