From kde-commits Fri Jul 23 13:44:46 2010 From: Jonathan Michael Thomas Date: Fri, 23 Jul 2010 13:44:46 +0000 To: kde-commits Subject: extragear/base/polkit-kde-1/kcmodules Message-Id: <20100723134446.9D76AAC7AB () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=127989268531013 SVN commit 1153546 by jmthomas: Various krazy2 fixes in the areas of proper iteration, includes, and newlines M +2 -2 helper/main.cpp M +8 -2 helper/policy-gen/kauth-policy-gen-polkit1.cpp M +5 -5 helper/policy-gen/policy-gen.h M +1 -1 polkitactions/PolkitActionsKCM.h --- trunk/extragear/base/polkit-kde-1/kcmodules/helper/main.cpp #1153545:1153546 @@ -8,7 +8,7 @@ version 2 of the License, or (at your option) any later version. */ #include "polkitkde1helper.h" -#include +#include int main(int argc, char *argv[]) { @@ -16,4 +16,4 @@ PolkitKde1Helper helper; return app.exec(); -} \ No newline at end of file +} --- trunk/extragear/base/polkit-kde-1/kcmodules/helper/policy-gen/kauth-policy-gen-polkit1.cpp #1153545:1153546 @@ -59,19 +59,25 @@ foreach (const Action &action, actions) { out << dent << "\n"; - foreach (const QString &lang, action.descriptions.keys()) { + QHash::const_iterator descriptionIter = action.descriptions.constBegin(); + while (descriptionIter != action.descriptions.constEnd()) { + QString lang = descriptionIter.key(); out << dent << dent << "' << action.messages.value(lang) << "\n"; + ++descriptionIter; } - foreach (const QString &lang, action.messages.keys()) { + QHash::const_iterator messageIter = action.messages.constBegin(); + while (messageIter != action.messages.constEnd()) { + QString lang = messageIter.key(); out << dent << dent << "' << action.descriptions.value(lang) << "\n"; + ++messageIter; } QString policy = action.policy; --- trunk/extragear/base/polkit-kde-1/kcmodules/helper/policy-gen/policy-gen.h #1153545:1153546 @@ -18,12 +18,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . */ -#ifndef _POLICY_GEN_H_ -#define _POLICY_GEN_H_ +#ifndef POLICY_GEN_H +#define POLICY_GEN_H -#include -#include -#include +#include +#include +#include struct Action { QString name; --- trunk/extragear/base/polkit-kde-1/kcmodules/polkitactions/PolkitActionsKCM.h #1153545:1153546 @@ -30,7 +30,7 @@ { Q_OBJECT public: - PolkitActionsKCM(QWidget* parent = 0, const QVariantList& args = QVariantList()); + explicit PolkitActionsKCM(QWidget* parent = 0, const QVariantList& args = QVariantList()); virtual ~PolkitActionsKCM(); virtual void load();