Bug 392255 - icons moved on start is resolved ? 47177 still occur in 5.36.0 version
Summary: icons moved on start is resolved ? 47177 still occur in 5.36.0 version
Status: RESOLVED DUPLICATE of bug 354802
Alias: None
Product: plasmashell
Classification: Plasma
Component: Folder (show other bugs)
Version: 5.8.0
Platform: OpenMandriva Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-24 07:50 UTC by Robert Laney
Modified: 2020-01-23 18:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Laney 2018-03-24 07:50:46 UTC
problem (horripilating ! ;-)):
on logging, icons position on desktop changed since last logoff.
Mainly some (but not all) icons moved from their position somewhere in the screen to the first top line, aligned in sequence.
plasma desktop appearance is on "display directory"

Of course, no manual icons moves where done before logon/logoff and icons where "locked" and desktop graphic components also

analysis :

- modification of "~/.config/plasma-org.kde.plasma.desktop-appletsrc" in the [Containments][1][General] section has occured
- further analysis in the KDE 5.36.0 sources locates usage of this file by :
	/KDE5/src/kactivities-5.36.0/src/imports/activitymodel.cpp
class BackgroundCache {
    public:
        BackgroundCache             ()
            : initialized(false), plasmaConfig("plasma-org.kde.plasma.desktop-appletsrc")
        {
        
I suspect a copy/paste typo in emitActivityUpdated () the preceding function in the cpp listing ;
but maybe its correct because I haven't done in-deep code review.

    template <typename _Model, typename _Container>
    static inline
    void emitActivityUpdated(_Model *model,
                             const _Container &container,
                             const QString &activity, int role)
    {
        auto position = Private::activityPosition(container, activity);

        if (position) {
            emit model->dataChanged(
                model->index(position->first),model->index(position->first),
                role == Qt::DecorationRole ? QVector<int> {role, ActivityModel::ActivityIcon} : QVector<int> {role}
            );
        }
    }
maybe should be modified as follows :
            emit model->dataChanged(
                model->index(position->first),model->index(position->last),

I don't want to recompile KDE to check if this can solve the problem because I don't have a development platform.
But please let me know if this is the answer ...
Comment 1 Ivan Čukić 2018-03-24 18:40:35 UTC
Hi Robert,

Icon positions have absolutely nothing to do with the activities library. appletsrc file is mainly used by plasmashell where the layout is handled. I'm assigning this to folderview which is the component which does the icon handing on the desktop.

As for the suggested typo, it is not - it is just a peculiarity of Qt's API - you can not say that one thing has changed, you need to tell it that things from this one to this one changed - position->first is repeated because of that.
Comment 2 Nate Graham 2020-01-23 18:40:07 UTC

*** This bug has been marked as a duplicate of bug 354802 ***