Bug 455375 - Possible regression in mimetype handling for recent files
Summary: Possible regression in mimetype handling for recent files
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.25.0
Platform: Gentoo Packages Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-16 03:34 UTC by Joshua Goins
Modified: 2023-05-03 03:46 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Goins 2022-06-16 03:34:02 UTC
SUMMARY
In 5.25 (I have not yet tested in earlier versions, but someone on 5.24.5 confimed in #kde that they can't reproduce) Okular fails to list it's own "Recent Files" in your typical places, such as right-clicking a pinned task on the task manager applet. The menu is also missing in your typical app launcher widget. However, Okular seems to still correctly track these, so I suspect it's something to do with how plasmashell calculates which recent files are relevant, based on the .desktop MimeTypes. For example, Okular's main .desktop file only lists "application/vnd.kde.okular-archive".

Note: I mention Okular a lot in this bug report, but this might apply to other applications too. It's just the easiest to reproduce with :-)

STEPS TO REPRODUCE
1. Open a couple of PDF's in Okular.
2. Notice how they are recorded correctly in Okular itself, and inside of the "Recent Files" menu located in any other Plasma widget.
3. The same menu (for relevant Okular documents) seem to be missing.

OBSERVED RESULT
No recent files can be found when right-clicking Okular.

EXPECTED RESULT
The relevant document types associated with Okular should show up, but no "Recent Files" menu even appears.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.17.1
KDE Plasma Version: 5.25.0
KDE Frameworks Version:  5.95.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION
Please move this into it's relevant category if possible, I'm not exactly sure which part of the KDE stack actually deals with this specifically.
Comment 1 Joshua Goins 2022-06-16 03:54:03 UTC
I found a possibly relevant commit, 02d6d0a4 in plasma-workspace called "RecentUsageModel: propagate mimeType to KFileItem ctor" that might be the cause. I'm going to try reverting that to see if is the issue.
Comment 2 Joshua Goins 2022-06-16 04:07:28 UTC
(In reply to Joshua Goins from comment #1)
> I found a possibly relevant commit, 02d6d0a4 in plasma-workspace called
> "RecentUsageModel: propagate mimeType to KFileItem ctor" that might be the
> cause. I'm going to try reverting that to see if is the issue.

No that didn't seem to be the case, but I noticed there were a lot of commits touching mimetype handling in several KDE frameworks. I wonder if this should instead be fixed in Okular, like should it list all of it's supported MimeTypes in it's main .desktop file ala Krita?
Comment 3 Méven Car 2023-04-01 15:03:33 UTC
I believe the main is how the file is opened: if it is opened from dolphin by double clicking the files will be visible in plasma widgets but files opened in okular through CTRL+O for instance won't be present in plasma activity history (what is used in plasma and dolphin's recent files).

Can you confirm Joshua ?
Comment 4 Nate Graham 2023-04-03 15:59:43 UTC
.
Comment 5 Bug Janitor Service 2023-04-18 03:45:36 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2023-05-03 03:46:18 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!