GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DESKTOPTOJSON(8) KDE Frameworks: KService DESKTOPTOJSON(8)

desktoptojson - Converts a .desktop file to a .json file.

desktoptojson --input DESKTOP-FILE --output JSON-FILE

desktoptojson {--version | --help}

The KService framework uses information contained in .desktop files to locate services, including plugins for Qt5-based applications and libraries. The Qt5 plugin system, however, uses JSON data embedded in the plugin itself. desktoptojson allows the information contained in a .desktop file to also be used as the embedded data for a Qt5 plugin by converting the .desktop file entries into JSON data.

The generated JSON data is a JSON object that maps the entries from the [Desktop Entry] group of the .desktop file. Any other groups are ignored. Most entries are just converted to JSON strings, but certain entries (such as Hidden and X-KDE-PluginInfo-EnabledByDefault) are known to be boolean values and converted as such, and similarly some (such as X-KDE-ServiceTypes and X-KDE-PluginInfo-Depends) are always converted to arrays of strings.

--input DESKTOP-FILE
The .desktop file to convert.

--output JSON-FILE

The file to write the generated JSON data to.

--help

Show a brief help text.

--version

Show version information.

Most users of this utility will use the CMake macro kservice_desktop_to_json as part of the process of building a plugin.

add_library(myplugin MODULE ${myplugin_SRCS})
kservice_desktop_to_json(myplugin myplugin.desktop)

This will produce the JSON file myplugin.json, which can be referenced from the K_PLUGIN_FACTORY_WITH_JSON or Q_PLUGIN_METADATA macros.

Please use KDE's bugtracker[1] to report bugs.

Scarlett Clark <scarlett@scarlettgatelyclark.com>
Wrote the original documentation.

Alex Merry <alexmerry@kde.org>

Edited the documentation.

1.
KDE's bugtracker
https://bugs.kde.org
2014-04-02 KDE Frameworks Frameworks 5.0

Search for    or go to Top of page |  Section 8 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.