Bug 457348 - Python Plugin Manager shows duplicates of local plugins
Summary: Python Plugin Manager shows duplicates of local plugins
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resource Management (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-31 17:55 UTC by Freya Lupen
Modified: 2022-08-25 16:29 UTC (History)
1 user (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 Freya Lupen 2022-07-31 17:55:21 UTC
(This has been reported on the forum before but I haven't seen a bug report for it, so I'm making one.)
Issue: The Python Plugin Manager shows locally installed plugins twice (probably only on Windows).

Explanation:
In KoResourcePaths::findAllResourcesInternal() "extraResourceDirs" uses ":" as a split character:
 ":C:/Users/myhomedir/AppData/Roaming/krita" gets turned into "", "C", "/Users/myhomedir/AppData/Roaming/krita".
Here "/Users/myhomedir/AppData/Roaming/krita/pykrita/brushes_fixer_special.desktop" is found and added.
Then later when checking "aliases", 
 "C:/Users/myhomedir/AppData/Roaming/krita/pykrita/brushes_fixer_special.desktop" is found and because they are not the same path it is not considered a duplicate and it gets added as well.

Version: 5.2.0 prealpha, git hash: e747146f1b6e0e425c73ad125793a19411e3017b
Comment 1 Halla Rempt 2022-07-31 18:11:46 UTC
This might nor might not have been fixed in https://invent.kde.org/graphics/krita/-/merge_requests/1499 -- but I'll have to check, and I need to check Tiar's questions, too...
Comment 2 Halla Rempt 2022-08-09 09:20:35 UTC
Git commit eff1fe311c2a3dd323a3cf4bac75840caef07c45 by Halla Rempt.
Committed on 09/08/2022 at 09:13.
Pushed by rempt into branch 'master'.

Fix duplicate entries in the Python plugin manager

Don't build a string separated by ':' and split it later on, but
just use a QStringList

M  +1    -1    KoTestConfig.h.cmake
M  +22   -20   libs/resources/KoResourcePaths.cpp
M  +2    -0    libs/resources/KoResourcePaths.h

https://invent.kde.org/graphics/krita/commit/eff1fe311c2a3dd323a3cf4bac75840caef07c45
Comment 3 Halla Rempt 2022-08-09 11:46:21 UTC
Git commit 985ba60efb40f0cf46f50ab3803943d27c0dec55 by Halla Rempt.
Committed on 09/08/2022 at 11:45.
Pushed by rempt into branch 'krita/5.1'.

Fix duplicate entries in the Python plugin manager

Don't build a string separated by ':' and split it later on, but
just use a QStringList
(cherry picked from commit eff1fe311c2a3dd323a3cf4bac75840caef07c45)

M  +1    -1    KoTestConfig.h.cmake
M  +22   -20   libs/resources/KoResourcePaths.cpp
M  +2    -0    libs/resources/KoResourcePaths.h

https://invent.kde.org/graphics/krita/commit/985ba60efb40f0cf46f50ab3803943d27c0dec55
Comment 4 Bug Janitor Service 2022-08-23 13:03:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1550
Comment 5 amyspark 2022-08-25 16:05:16 UTC
Git commit 99644fa7bee1f2ae1b6787a4b5c2ee79a7b528e2 by L. E. Segovia.
Committed on 25/08/2022 at 15:01.
Pushed by lsegovia into branch 'master'.

KoResourcePaths: fix regression when enumerating resource directories

Before commit 985ba60efb40f0cf46f50ab3803943d27c0dec55, all checks
for extra resource directories were made via QString::split with
SkipEmptyParts. This behaviour was removed, which means that if
EXTRA_RESOURCE_VARIABLES has an empty value, the resource loader will
try to hit an UNC network path for every non-empty folder.
Related: bug 458188

M  +6    -4    libs/resources/KoResourcePaths.cpp

https://invent.kde.org/graphics/krita/commit/99644fa7bee1f2ae1b6787a4b5c2ee79a7b528e2
Comment 6 amyspark 2022-08-25 16:29:21 UTC
Git commit f9eb1c6e8165063eba7293f91c728777439040b8 by L. E. Segovia.
Committed on 25/08/2022 at 16:29.
Pushed by lsegovia into branch 'krita/5.1'.

KoResourcePaths: fix regression when enumerating resource directories

Before commit 985ba60efb40f0cf46f50ab3803943d27c0dec55, all checks
for extra resource directories were made via QString::split with
SkipEmptyParts. This behaviour was removed, which means that if
EXTRA_RESOURCE_VARIABLES has an empty value, the resource loader will
try to hit an UNC network path for every non-empty folder.
Related: bug 458188
(cherry picked from commit 99644fa7bee1f2ae1b6787a4b5c2ee79a7b528e2)

M  +6    -4    libs/resources/KoResourcePaths.cpp

https://invent.kde.org/graphics/krita/commit/f9eb1c6e8165063eba7293f91c728777439040b8