LeechCraft  0.6.70-3565-g2d86529
Modular cross-platform feature rich live environment.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LeechCraft::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

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

Definition at line 64 of file desktopparser.h.

using LeechCraft::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.

Mapping from a group name to the group itself.

Definition at line 68 of file desktopparser.h.

Member Function Documentation

auto LeechCraft::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.

Definition at line 168 of file desktopparser.cpp.


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