LeechCraft  0.6.70-13729-g7046a9d2a7
Modular cross-platform feature rich live environment.
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. More...
 
using Group_t = QHash< QString, LangValue_t >
 Mapping from a field name to the list of language-dependent values of that field. More...
 
using Result_t = QHash< QString, Group_t >
 Mapping from a group name to the group itself. More...
 

Public Member Functions

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

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 51 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 64 of file desktopparser.h.

◆ LangValue_t

using LC::Util::XDG::DesktopParser::LangValue_t = QHash<QString, QStringList>

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

"No language" corresponds to a null string.

Definition at line 59 of file desktopparser.h.

◆ Result_t

Mapping from a group name to the group itself.

Definition at line 68 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: