Bug 513366 - Hard-coded OS name string in Discover
Summary: Hard-coded OS name string in Discover
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (other bugs)
Version First Reported In: 6.5.4
Platform: FreeBSD Ports FreeBSD
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2025-12-14 15:32 UTC by Augusto Fornitani
Modified: 2025-12-31 15:31 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Augusto Fornitani 2025-12-14 15:32:15 UTC
SUMMARY

When searching a package name, and Discover not finding it, a text like this appears:

```
"keepassxc" may be available on the web. Software acquired from the web has not been reviewed by your distributor for functionality or stability. Use with caution.
```

Underneath the text, there's a button: `Search the Web for "keepassxc"`.
Clicking it opens a search in DuckDuckGo, as follows: `https://duckduckgo.com/?q=Linux%20keepass&t=kde&ia=web`

As we can see, it implies Linux is in use, while FreeBSD is my current system.

STEPS TO REPRODUCE
1. Open Discover in FreeBSD
2. Search any term
3. Click "Search the Web" button.

OBSERVED RESULT

The Web search in DuckDuckGo defaults to "Linux" instead of the actual system.

EXPECTED RESULT

Dynamically get the current system, instead of using hard-coded values.

SOFTWARE/OS VERSIONS
user@freebsd ~> kinfo
Operating System: FreeBSD 15.0
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.20.0
Qt Version: 6.9.3
Kernel Version: 15.0-STABLE (64-bit)
Graphics Platform: Wayland
Memory: 15.9 GiB of usable RAM
Graphics Processor: AMD Radeon RX 580 Series


ADDITIONAL INFORMATION

Opening this very minor issue as a bug, as it might be happening elsewhere (e.g. right above this section in the bug report template, "SOFTWARE/OS VERSIONS" only suggests Windows/macOS/Linux, too).
Having such values dynamically populated might also help/interfere with localization.
Comment 1 White_Lucifer 2025-12-23 19:22:59 UTC
I want to take this issue and am submitting you my merge request shortly
Comment 2 Bug Janitor Service 2025-12-31 10:49:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/1225
Comment 3 Nate Graham 2025-12-31 15:29:02 UTC
Git commit ba9e95005a2256d2b993b51645484191a2c6c76b by Nate Graham, on behalf of Jaimukund Bhan.
Committed on 31/12/2025 at 15:28.
Pushed by ngraham into branch 'master'.

Fix hardcoded "Linux" in web search fallback

Previously, the "Search the Web" button hardcoded "Linux" into the
DuckDuckGo search query, which was inaccurate for users on FreeBSD.
This change uses Qt.platform.os to dynamically insert the operating
system name into the search query.
FIXED-IN: 6.5.5

M  +1    -1    discover/qml/ApplicationsListPage.qml

https://invent.kde.org/plasma/discover/-/commit/ba9e95005a2256d2b993b51645484191a2c6c76b
Comment 4 Nate Graham 2025-12-31 15:30:14 UTC
Git commit e3b109735df53e6c4ca196cbd292c0f99bded258 by Nate Graham.
Committed on 31/12/2025 at 15:30.
Pushed by ngraham into branch 'Plasma/6.5'.

Fix hardcoded "Linux" in web search fallback

Previously, the "Search the Web" button hardcoded "Linux" into the
DuckDuckGo search query, which was inaccurate for users on FreeBSD.
This change uses Qt.platform.os to dynamically insert the operating
system name into the search query.
FIXED-IN: 6.5.5


(cherry picked from commit ba9e95005a2256d2b993b51645484191a2c6c76b)

e332eb67 Fix hardcoded "Linux" in web search fallback
5f6e7c67 Make the change compact

Co-authored-by: Jaimukund Bhan <bhanjaimukund@gmail.com>

M  +1    -1    discover/qml/ApplicationsListPage.qml

https://invent.kde.org/plasma/discover/-/commit/e3b109735df53e6c4ca196cbd292c0f99bded258