Go to the documentation of this file.
28 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
29 "<!DOCTYPE policyconfig PUBLIC\n"
30 "\"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN\"\n"
31 "\"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd\">\n"
36 " <allow_inactive>%1</allow_inactive>\n"
37 " <allow_active>%2</allow_active>\n"
44 QTextStream out(stdout);
45 out.setCodec(
"UTF-8");
51 blacklist.insert(QLatin1Char(
'&'), QLatin1String(
"&"));
53 if (domain.contains(QLatin1String(
"vendor"))) {
55 QString vendor = domain[QLatin1String(
"vendor")];
56 for (blI = blacklist.constBegin(); blI != blacklist.constEnd(); ++blI) {
57 vendor.replace(blI.key(), blI.value());
59 out <<
"<vendor>" << vendor <<
"</vendor>\n";
61 if (domain.contains(QLatin1String(
"vendorurl"))) {
62 out <<
"<vendor_url>" << domain[QLatin1String(
"vendorurl")] <<
"</vendor_url>\n";
64 if (domain.contains(QLatin1String(
"icon"))) {
65 out <<
"<icon_name>" << domain[QLatin1String(
"icon")] <<
"</icon_name>\n";
68 foreach (
const Action &action, actions) {
69 out <<
dent <<
"<action id=\"" << action.
name <<
"\" >\n";
73 out <<
dent <<
dent <<
"<description";
74 if (i.key() != QLatin1String(
"en")) {
75 out <<
" xml:lang=\"" << i.key() <<
'"';
79 QString description = i.value();
80 for (blI = blacklist.constBegin(); blI != blacklist.constEnd(); ++blI) {
81 description.replace(blI.key(), blI.value());
84 out <<
'>' << description <<
"</description>\n";
92 if (i.key() != QLatin1String(
"en")) {
93 out <<
" xml:lang=\"" << i.key() <<
'"';
98 for (blI = blacklist.constBegin(); blI != blacklist.constEnd(); ++blI) {
99 message.replace(blI.key(), blI.value());
102 out <<
'>' << message <<
"</message>\n";
107 if (!action.
persistence.isEmpty() && policy != QLatin1String(
"yes") && policy !=
108 QLatin1String(
"no")) {
109 policy += QLatin1String(
"_keep");
111 if (!action.
persistence.isEmpty() && policyInactive != QLatin1String(
"yes") && policyInactive !=
112 QLatin1String(
"no")) {
113 policyInactive += QLatin1String(
"_keep");
118 out <<
dent <<
"</action>\n";
121 out <<
"</policyconfig>\n";
void output(QList< Action > actions, QHash< QString, QString > domain)
QHash< QString, QString > messages
QHash< QString, QString > descriptions
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.