aboutsummaryrefslogtreecommitdiff
path: root/src/core/kdesktopfile.cpp
AgeCommit message (Collapse)Author
2021-12-18Complete fixing the Windows CIAhmad Samir
2021-12-17Fix build on WindowsAhmad Samir
Both GCC and Clang don't require a const integral value to be captured explicitly to be used in a lambda, but of course one compiler thinks otherwise... Thanks to Ömer Fadıl Usta for the heads up. GIT_SILENT
2021-12-15Minor code clean upAhmad Samir
NO_CHANGELOG
2021-11-26KDesktopFile: deprecate resource()Ahmad Samir
It is redundant since the parent class, KConfig, has locationType(). Add some API docs for fileName(), even though one could use KConfig::name() from the parent class, I think this would be confusing given a .desktop file has a Name= entry, so fileName() is less ambiguous. These seem to be leftovers from a previous refactor that happened a long time ago.
2021-10-20GIT_SILENT Remove a bit of dead codeAlexander Lohnau
2021-08-26KDesktopFile::isAuthorizedDesktopFile: reduce warning to info a logMéven Car
2021-04-18Deprecate KDesktopFile::readDevice()Ahmad Samir
Since the FSDevice .desktop template hasn't been installed for a long time, this method in KDesktopFile hasn't been useful. The whole FSDesktop concept seems to be redundant nowadays, since CDRom and Floppy drives have been replaced by USB sticks. See this KF6 taks for more details: https://phabricator.kde.org/T14295#253759
2021-03-06Minor code optimisationAhmad Samir
- Use more range-for loops where appropriate - Use auto instead of the usually-long iterator type names - Use cbegin/cend(), to match the std:: containers, less confusion - Use qDeleteAll instead of a for loop - Make a QRE with a long-ish pattern static NO_CHANGELOG
2021-02-22Run clang-format on all cpp/h filesAhmad Samir
NO_CHANGELOG
2020-09-14Use reverse order in KDesktopFile::locateLocal to iterate over generic ↵Jeremy Whiting
config paths. Since windows has some generic config paths that are parents of other generic config paths e.g. c:/CraftRoot/build/_/<hash>/build/bin followed by c:/CraftRoot/build/_/<hash>/build/bin/data we need to search for locations from the last location to the first.
2020-07-07Use camelcase include. (scripted)Laurent Montel
2020-03-22KConfig: Convert to SPDX license statementsAndreas Cord-Landwehr
Summary: Convert license headers to SPDX statements and add license files as required by REUSE specification. Reviewers: cgiboudeaux Reviewed By: cgiboudeaux Subscribers: ognarb, cgiboudeaux, kde-frameworks-devel Tags: #frameworks Maniphest Tasks: T11550 Differential Revision: https://phabricator.kde.org/D27601
2020-01-03Remove endl at the end of qdebugLaurent Montel
2019-10-18Use ECMGenerateExportHeader to manage deprecated API betterFriedrich W. H. Kossebau
Summary: Allows * projects linking to KConfigCore/Gui to hide deprecated API up to a given version or silence deprecation warnings after a given version, using * -DKCONFIGCORE_DISABLE_DEPRECATED_BEFORE_AND_AT * -DKCONFIGCORE_NO_DEPRECATED * -DKCONFIGCORE_DEPRECATED_WARNINGS_SINCE * -DKCONFIGCORE_NO_DEPRECATED_WARNINGS * -DKCONFIGGUI_DISABLE_DEPRECATED_BEFORE_AND_AT * -DKCONFIGGUI_NO_DEPRECATED * -DKCONFIGGUI_DEPRECATED_WARNINGS_SINCE * -DKCONFIGGUI_NO_DEPRECATED_WARNINGS or * -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT * -DKF_NO_DEPRECATED * -DKF_DEPRECATED_WARNINGS_SINCE * -DKF_NO_DEPRECATED_WARNINGS * to build KConfigCore/Gui optionally with deprecated API excluded from the build, using "EXCLUDE_DEPRECATED_BEFORE_AND_AT" cmake argument. Test Plan: Builds with EXCLUDE_DEPRECATED_BEFORE_AND_AT set to 0, 4.0.0, 5.0.0, 5.11.0, 5.24.0, 5.39.0, 5.42.0, CURRENT. Reviewers: #frameworks, mlaurent Reviewed By: mlaurent Subscribers: mlaurent, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D24496
2019-08-28GIT_SILENT: use QLatin1StringLaurent Montel
2019-08-14Add a logging category for logs warningsMéven Car
Summary: Disable logs unless the logging category kf5.kconfig.core is enabled Test Plan: ctest Reviewers: #frameworks, apol, cgiboudeaux Reviewed By: cgiboudeaux Subscribers: cgiboudeaux, mikeroyal, apol, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D22061
2019-03-03[Kconfig] Compile without foreachLaurent Montel
Summary: compile without foreach Test Plan: Unittest Ok as previously Reviewers: dfaure Reviewed By: dfaure Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D19326
2018-03-11Remove not necessary QtCore and coLaurent Montel
2017-12-06Deprecate KDesktopFile::sortOrder()Alexander Volkov
Summary: The SortOrder key is deprecated by the Desktop Entry Specification: https://standards.freedesktop.org/desktop-entry-spec/latest/apc.html Reviewers: dfaure, #frameworks Reviewed By: dfaure Subscribers: #frameworks Tags: #frameworks Differential Revision: https://phabricator.kde.org/D9224
2017-12-06Fix the result of KDesktopFile::sortOrder()Alexander Volkov
Summary: KDesktopFile::sortOrder() returns the value of SortOrder key as a string whithout parsing it as a list. But according to Desktop Entry Specification https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html it's type is "string(s)", i.e. the same type as the type of Actions and MimeType keys, and thus it should be read the same way. Reviewers: #frameworks, dfaure Reviewed By: dfaure Subscribers: dfaure, #frameworks Tags: #frameworks Differential Revision: https://phabricator.kde.org/D8689
2017-04-25Fix relativePath calculation in KDesktopFile::locateLocal()Wolfgang Bauer
The "dir" and "path" variables were obviously swapped here by mistake. This resulted in the relativePath always being empty, and made the function return "~/.local/share/" (or "~/.config/") instead of the correct path. BUG: 345100 FIXED-IN: 5.34.0 Differential Revision: https://phabricator.kde.org/D5502
2016-05-19Avoid skipping KAuthorized checkDavid Edmundson
Previously, if a .desktop file had a TryExec and a X-KDE-AuthorizeAction entry we would skip the KAuthorized check. This is clearly wrong. REVIEW: 127948
2015-10-05Minor optimizationsAlbert Astals Cid
Ran the clazy tool (http://www.kdab.com/use-static-analysis-improve-performance/) Mostly QStringLiteral/QLatin1String additions A few const & additions to non public methods Compiles, test pass REVIEW: 125106
2015-09-07[KDesktopFile] add readMimeTypesKai Uwe Broulik
CHANGELOG: KDesktopFile can now read mime types specified in the MimeType field REVIEW: 124746
2015-02-16at KDesktopFile::locateLocal, correct the expression of the if statement ↵Guy Maurel
which was always TRUE REVIEW: 122445
2014-12-25Simplify condition, endsWith is clever enough.David Faure
2014-04-26Adapt to changes in KDEInstallDirsAleix Pol
kde5/services is kservices5 kde5/servicetypes is kservicestypes5
2014-03-25Remove kde3 compatibility code for "DocPath" in desktop filesAlex Merry
LXR suggests nothing still sets that (everything is X-DocPath now). REVIEW: 117003
2014-03-24Better comment for why KDesktopFile::readPath uses readEntryAlex Merry
REVIEW: 116962
2014-03-01we use Qt5 now, so re-enable -DQT_NO_CAST_FROM_BYTEARRAYDavid Faure
2013-12-18Code reformatted using kde-dev-scripts/astyle-kdelibs.David Faure
Use git blame -w 867e7a5 to show authorship as it was before this commit.
2013-12-18Move kconfig code to the root directory.Jenkins CI