Created attachment 116301 [details] Duplicated icon SUMMARY When I create a new folder between two existing adjacent icons the one I just created is duplicated like in BUG#398864 STEPS TO REPRODUCE 1. Create a new user 2. Log in 3. Create a new folder between existing icons OBSERVED RESULT The icon just created is duplicated but I can iteract with only one copy of it (see attachment) EXPECTED RESULT Icon should not be duplicated SOFTWARE/OS VERSIONS Linux: 4.19.1-un-def-alt1 KDE Plasma Version: 5.12.7 KDE Frameworks Version: 5.51.0 Qt Version: 5.11.2 ADDITIONAL INFORMATION I successfully reproduced that error in master branch and the NEON Developer Edition
It's the same issue, it's just that the fix isn't released yet. It'll be fixed in 5.12.8, but you still have 5.12.7, because 5.12.8 isn't released yet. If you need relief now, ask your distro to backport the fix. *** This bug has been marked as a duplicate of bug 398864 ***
It's not the same issue. I already patched my 5.12.7 against #398864 and _this_ issue still reproduces, while 398864 is fixed.
Darn. Eike or Kai, any ideas?
Created attachment 116377 [details] Reproduction of the issue I just accidentally reproduced and confirmed the issue by copying four items to the desktop. Thereafter, duplicates of all four are created, and interacting with one also modified its phantom copy. It's really weird.
Reproduced this on Plasma 5.14.3 + Qt 5.9.6
Found a possible clue: it happens every time I create an icon when ~/.config/plasma-org.kde.plasma.desktop-appletsrc is missing
Found a typo in 98d56d913: @@ -547,6 +566,8 @@ void Positioner::sourceRowsAboutToBeInserted(const QModelIndex &parent, int star } } else { emit beginInsertRows(parent, start, end); + beginInsertRows(parent, start, end); + m_beginInsertRowsCalled = true; } } Is it intentional or committer forgot to remove emit in that patch?
Oleg, does changing that fix the issue?
(In reply to Nate Graham from comment #9) > Oleg, does changing that fix the issue? Unfortunately, no
Commented out the whole connect at foldermodel.cpp:157 and it fixes the issue O_o
>Is it intentional or committer forgot to remove emit in that patch? emit is a #define for "" it does nothing, it's just a nice hint if you read the code that we're releasing flow control and other things might run.
(In reply to David Edmundson from comment #12) > >Is it intentional or committer forgot to remove emit in that patch? > > emit is a #define for "" > > it does nothing, it's just a nice hint if you read the code that we're > releasing flow control and other things might run. that's not the point. The point is calling the function twice. Is it ok?
(In reply to Oleg Solovyov from comment #11) > Commented out the whole connect at foldermodel.cpp:157 and it fixes the > issue O_o also commented out the connect ap positioner.cpp:912 and it fixes the issue again. Looks like the slots were invoked by the same signal are doing the same job
Oh, I misunderstood. It certainly doesn't look intentional.
Indeed, looks like a bona-fide bug. David, since you're currently working on this code, can you roll it into your other patch or so?
The bug is related somehow with setSortMode(int) function in lambda I mentioned abvoe
meh, it's very complex to find out where's the problem. Noticed that there are two separated dirlisters working on the desktop log file: https://pastebin.com/xSAxYQqp patch with my own debug messages: https://pastebin.com/0nMdDZci
Any good ideas how to create config after first init of FolderModel it config is not exist (after first login)? Tried to write config at onCompleted, but it's too early. It might fix the problem
Created attachment 117009 [details] patch
Finally! I accidently fixed the problem patch attached, can't create a revision unless I know why it works
You can create a Phab revision and put [RFC] in the title. I think that would make sense.
(In reply to Nate Graham from comment #22) > You can create a Phab revision and put [RFC] in the title. I think that > would make sense. Done https://phabricator.kde.org/D17689
Git commit 4a3fbf9116f588f6f2dedfd9481ec7298528dafd by Eike Hein. Committed on 01/02/2019 at 11:07. Pushed by hein into branch 'Plasma/5.12'. Fix new file creation leading to dupe items on a fresh view Summary: This was a regression caused by the code attempting to insert new items at drop position, if available. `setSortMode` was being called in a slot connected to the dir model's rowsInserted, but the Positioner has to be initialized earlier as a proxy needs to handle `sourceRowsAboutToBeInserted` as well. Thanks to an investigation and patch by Oleg Solovyov in D17689 for helping to get to the bottom of this. This is aimed at 5.12+. Reviewers: #plasma, McPain, davidedmundson Reviewed By: #plasma, davidedmundson Subscribers: ngraham, davidedmundson, fvogt, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D18182 M +10 -6 containments/desktop/plugins/folder/foldermodel.cpp https://commits.kde.org/plasma-desktop/4a3fbf9116f588f6f2dedfd9481ec7298528dafd