/* SPDX-FileCopyrightText: 2008 Nicola Gigante SPDX-License-Identifier: LGPL-2.1-or-later */ #include #include #include #include const char header[] = "" "\n" "\n" "\n"; const char policy_tag[] = "" " \n" " no\n" " %1\n" " \n"; const char dent[] = " "; void output(const QList &actions, const QMap &domain) { Q_UNUSED(domain) QTextStream out(stdout); out << header; for (const Action &action : std::as_const(actions)) { out << dent << "\n"; const auto lstKeys = action.descriptions.keys(); for (const QString &lang : lstKeys) { out << dent << dent << "' << action.messages.value(lang) << "\n"; } const auto lstMessagesKeys = action.messages.keys(); for (const QString &lang : lstMessagesKeys) { out << dent << dent << "' << action.descriptions.value(lang) << "\n"; } QString policy = action.policy; if (!action.persistence.isEmpty()) { policy += "_keep_" + action.persistence; } out << QString(policy_tag).arg(policy); out << dent << "\n"; } out << "\n"; }