LeechCraft 0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
LC::Util::XDG::DesktopParser Class Reference

A parser for XDG .desktop files. More...

#include "desktopparser.h"

Public Types

using LangValue_t = QHash<QString, QStringList>
 Mapping from a language to the list of values for that language.
 
using Group_t = QHash<QString, LangValue_t>
 Mapping from a field name to the list of language-dependent values of that field.
 
using Result_t = QHash<QString, Group_t>
 Mapping from a group name to the group itself.
 

Public Member Functions

UTIL_XDG_API Result_t operator() (const QByteArray &data)
 Parses the XDG data.
 

Detailed Description

A parser for XDG .desktop files.

This parser does not produce any structured information. Instead, it only returns a hash from group name to corresponding group fields (see Result_t). A more structured representation is provided by the Item class.

See also
Item

Definition at line 26 of file desktopparser.h.

Member Typedef Documentation

◆ Group_t

Mapping from a field name to the list of language-dependent values of that field.

Definition at line 39 of file desktopparser.h.

◆ LangValue_t

Mapping from a language to the list of values for that language.

"No language" corresponds to a null string.

Definition at line 34 of file desktopparser.h.

◆ Result_t

Mapping from a group name to the group itself.

Definition at line 43 of file desktopparser.h.

Member Function Documentation

◆ operator()()

UTIL_XDG_API Result_t LC::Util::XDG::DesktopParser::operator() ( const QByteArray & data)

Parses the XDG data.

Parameters
[in]dataThe byte array containing XDG .desktop file data.
Returns
The set of groups in the XDG data.

The documentation for this class was generated from the following file: