7#include <auth/policy-gen/policy-gen.h>
15 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
16 "<!DOCTYPE policyconfig PUBLIC\n"
17 "\"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN\"\n"
18 "\"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd\">\n"
21const char policy_tag[] =
24 " <allow_inactive>no</allow_inactive>\n"
25 " <allow_active>%1</allow_active>\n"
28const char dent[] =
" ";
37 for (
const Action &action : std::as_const(actions)) {
38 out << dent <<
"<action id=\"" << action.name <<
"\" >\n";
40 const auto lstKeys = action.descriptions.keys();
41 for (
const QString &lang : lstKeys) {
42 out << dent << dent <<
"<description";
44 out <<
" xml:lang=\"" << lang <<
'"';
46 out <<
'>' << action.messages.value(lang) <<
"</description>\n";
49 const auto lstMessagesKeys = action.messages.keys();
50 for (
const QString &lang : lstMessagesKeys) {
51 out << dent << dent <<
"<message";
53 out <<
" xml:lang=\"" << lang <<
'"';
55 out <<
'>' << action.descriptions.value(lang) <<
"</message>\n";
59 if (!action.persistence.isEmpty()) {
60 policy +=
"_keep_" + action.persistence;
65 out << dent <<
"</action>\n";
68 out <<
"</policyconfig>\n";
QString arg(Args &&... args) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:00 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.