| Summary: | kio_desktop uses deprecated QDesktopServices method and fails to build | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | RJVB <rjvbertin> |
| Component: | general | Assignee: | David Edmundson <kde> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | bshah, plasma-bugs-null |
| Priority: | NOR | ||
| Version First Reported In: | 5.10.2 | ||
| Target Milestone: | 1.0 | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/plasma-workspace/a5a18f5ac709d03c63902b0e3c1d6b362b1551fa | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: |
possible fix
simpler fix |
||
Read the comment in the code next to where you edited it. Oh, sorry. I left the tab open and on second glance realise you did address that. The problem with your approach is it's perfectly valid to set the xdg-user-dirs desktop to /home/me the patch will always append "/desktop". 3rd time lucky. QDesktopServices::storageLocationImpl just returns writableLocation(QStandardPaths::DesktopLocation) with no changes, so worst case it's exactly the same as before. Also from my reading of qstandardpaths_unix it doesn't check the directory exists at all; so we don't need the if (path ==home()) check. Created attachment 106340 [details]
simpler fix
You mean like this?
Ship it. Git commit a5a18f5ac709d03c63902b0e3c1d6b362b1551fa by René J.V. Bertin. Committed on 03/07/2017 at 14:23. Pushed by rjvbb into branch 'master'. kio_desktop: don't use QDesktopServices::storageLocation The method is deprecated and using it can generate build failures (e.g. with Qt 5.8+ and GCC 7.1+). M +3 -6 kioslave/desktop/kio_desktop.cpp https://commits.kde.org/plasma-workspace/a5a18f5ac709d03c63902b0e3c1d6b362b1551fa |
Created attachment 106258 [details] possible fix kio_desktop from the plasma-workspace project uses QDesktopServices::storageLocation() which is long deprecated. Using it under Qt 5.8.0 with GCC 7.1.0 raises an error for me.