[frameworks-kio] [Bug 450898] New: After editing a symlinked .desktop file, KFileItem::linkDest returns an empty string

2022-02-26 Thread Roman Nikonov
https://bugs.kde.org/show_bug.cgi?id=450898

Bug ID: 450898
   Summary: After editing a symlinked .desktop file,
KFileItem::linkDest returns an empty string
   Product: frameworks-kio
   Version: git master
  Platform: Other
OS: Linux
Status: REPORTED
  Severity: normal
  Priority: NOR
 Component: Properties dialog
  Assignee: kio-bugs-n...@kde.org
  Reporter: c...@nic11.xyz
CC: kdelibs-b...@kde.org
  Target Milestone: ---

SUMMARY
After editing a symlinked .desktop file, `KFileItem::linkDest()` returns an
empty string, but `isLink()` still returns `true`.

See also: https://bugs.kde.org/show_bug.cgi?id=450727

STEPS TO REPRODUCE
0. Add a log line to
https://invent.kde.org/frameworks/kio/-/blob/972a91a7588730303371cdcff32b15c916d0606d/src/widgets/kpropertiesdialog.cpp#L1545:
qDebug() << "Symlink target check: isLink=" << item.isLink() << ",
linkDest=" << item.linkDest() << ", newtarget=" << newTarget;
1. Install a package that contains a symlink from /usr/share/applications. For
example, Discord package on Arch/Manjaro: `pacman -S discord`
2. Open Application Launcher
3. Right-click on an app installed on step 1, select 'Edit application'
4. Change something and click 'OK'


OBSERVED RESULT
Log output looks like this:
Symlink target check: isLink= true , linkDest= "" , newtarget=
"/opt/discord/discord.desktop"


EXPECTED RESULT
Probably isLink should be false and linkDest still an empty string.


SOFTWARE/OS VERSIONS
Linux distro: Manjaro stable
KDE Plasma Version: master
KDE Frameworks Version: master with kio patch:
https://invent.kde.org/frameworks/kio/-/merge_requests/768
Qt Version: 5.15.2

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kcoreaddons] [Bug 387663] Dolphin doesn't update view (doesn't show new files)

2022-02-22 Thread Roman Nikonov
https://bugs.kde.org/show_bug.cgi?id=387663

Roman Nikonov  changed:

   What|Removed |Added

 CC||c...@nic11.xyz

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 450728] New: After editing application, second time one opens properties, it still shows older desktop entry

2022-02-22 Thread Roman Nikonov
https://bugs.kde.org/show_bug.cgi?id=450728

Bug ID: 450728
   Summary: After editing application, second time one opens
properties, it still shows older desktop entry
   Product: plasmashell
   Version: master
  Platform: Manjaro
OS: Linux
Status: REPORTED
  Severity: normal
  Priority: NOR
 Component: Application Menu (Kicker)
  Assignee: plasma-b...@kde.org
  Reporter: c...@nic11.xyz
  Target Milestone: 1.0

SUMMARY
After editing application, second time one opens properties, it still shows
older desktop entry


STEPS TO REPRODUCE
1. Open Application Launcher
2. Right click any application (e.g., Dolphin) and choose 'Edit Application'
3. Change something there and click 'OK'

OBSERVED RESULT
Changed `org.kde.dolphin.desktop` appears in `~/.local/share/applications/`,
but if you try to redo steps 1 and 2, you'll still see
`/usr/share/applications` in 'Location' without your changes. After plasmashell
restart, it picks up the edit desktop entry from user's directory.

EXPECTED RESULT
After repeating steps 1 and 2, you immediately see
`/home//.local/share/applications` in 'Location' and something that
you've changed.

SOFTWARE/OS VERSIONS
Linux distro: Manjaro stable
KDE Plasma Version: 5.23.5, master
KDE Frameworks Version: 5.90.0, master
Qt Version: 5.15.2

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmenuedit] [Bug 394476] Can't edit applications that are installed through flatpak

2022-02-22 Thread Roman Nikonov
https://bugs.kde.org/show_bug.cgi?id=394476

Roman Nikonov  changed:

   What|Removed |Added

 CC||c...@nic11.xyz

--- Comment #6 from Roman Nikonov  ---
(In reply to Patrick Silva from comment #4)
> I can reproduce this bug even with some non-flatpak apps.
> Discord from Arch repos, for example.

The bug is similar, but, according to the screenshot by Patrick Silva, the
source of the problem is different. With Flatpak (current issue), there's
already a file at `~/.local/share/applications/whatever.desktop`. The Discord
case is a bit different. It has a symlink in system-wide directory instead:
$ ls -lh /usr/share/applications/discord.desktop
lrwxrwxrwx 1 root root 28 фев 18 13:34 /usr/share/applications/discord.desktop
-> /opt/discord/discord.desktop

I've created a separate bug for this:
https://bugs.kde.org/show_bug.cgi?id=450727
I'll also attach a merge request that potentially fixes this issue there.

P.S. Sorry if I don't understand some concepts of Flatpaks correctly, as I
don't actually use them.

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kio] [Bug 450727] New: Can't edit an application's desktop entry which is a symlink

2022-02-22 Thread Roman Nikonov
https://bugs.kde.org/show_bug.cgi?id=450727

Bug ID: 450727
   Summary: Can't edit an application's desktop entry which is a
symlink
   Product: frameworks-kio
   Version: git master
  Platform: Manjaro
OS: Linux
Status: REPORTED
  Severity: normal
  Priority: NOR
 Component: Properties dialog
  Assignee: kio-bugs-n...@kde.org
  Reporter: c...@nic11.xyz
CC: kdelibs-b...@kde.org
  Target Milestone: ---

Created attachment 147067
  --> https://bugs.kde.org/attachment.cgi?id=147067=edit
Error when trying to change Discord's desktop entry

SUMMARY
If user tries to edit a desktop entry in /usr/share/applications that is a
symlink to some file without write access, this results in an error.


STEPS TO REPRODUCE
1. Install a package that contains a symlink from /usr/share/applications. For
example, Discord package on Arch/Manjaro: `pacman -S discord`
2. Open Application Launcher
3. Right-click on an app installed on step 1, select 'Edit application'
4. Change something and click 'Save'

OBSERVED RESULT
Error:
Could not save properties due to insufficient write access to:
‘/home/roma/.local/share/applications/discord.desktop’.

~/.local/share/applications/discord.desktop is a symlink to
/opt/discord/discord.desktop.

EXPECTED RESULT
~/.local/share/applications/discord.desktop is successfully saved and is an
arbitrary file owned by the current user.

SOFTWARE/OS VERSIONS
Linux distro: Manjaro stable
KDE Plasma Version: 5.23.5, master
KDE Frameworks Version: 5.90.0, master
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Similar bug: https://bugs.kde.org/show_bug.cgi?id=394476
But it needs to be resolved separately IMO, since it involves editing a file
that's already in `~/.local/share/applications/` but is unwriteable for the
current user.

-- 
You are receiving this mail because:
You are watching all bug changes.