BUG 406105
Details
Diff Detail
- Repository
- R260 Gwenview
- Branch
- B406105
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 17882 Build 17900: arc lint + arc unit
And if updating the current index takes longer than 250 msec it would fail again, wouldn't it?
Why is this timer even necessary? There already is a connection between the ThumbnailBarView::indexActivated signal and FullScreenContent::updateDocumentCountLabel. Shouldn't this serve this purpose?
Probably, I can't get to that case where it's so slow. But I am aware that it can happen.
Why is this timer even necessary? There already is a connection between the ThumbnailBarView::indexActivated signal and FullScreenContent::updateDocumentCountLabel. Shouldn't this serve this purpose?
I've seen this and the problem is that it *somehow* sets const int current to 0 when it gets called for the first time (as in the bug described).
I'll look a bit more into it and see if I can do something else than this delay approach.
Seems that the problem is in the index:
https://cgit.kde.org/gwenview.git/tree/app/viewmainpage.cpp#n369
Index may be invalid when Gwenview is started as
gwenview /foo/image.png because in this situation it loads image.png
// *before* listing /foo (because it matters less to the user)
Reverted the timer to 0.
Now it works when switching to fullscreen. Next step: make the counter work properly when -f for fullscreen is used.
Done, tested and working.
Give me a day or two and I hope I'll demystify why the counter is not working when gwenview is launched with -f.
Searching and debugging and I just can't find the reason why.
So currently the counter works fine when the first image of a folder is opened and THEN one goes into fullscreen. But if one goes directly into fullscreen with the first image loaded, than it sets the counter to 0.
gwenview -f first_image_in_folder.jpg results with counter set to 0 of x
gwenview -f any_other_image_in_folder.jpg results with counter always set to 1 of x
gwenview first_image_in_folder.jpg , then open fullscreen within gwenview - results with a proper counter set to 1 of x
gwenview any_other_image_in_folder.jpg , then open fullscreen within gwenview - results with a proper counter set to n of x (where n is the number of the file in that folder)
The -f launches gwenview into fullscreen with mMainWindow->actionCollection()->action("fullscreen")->trigger(); found here: https://cgit.kde.org/gwenview.git/tree/app/main.cpp#n102
Anyone with an idea/tip where I should look further?