From 9b134d6354089920d22c8de783093120c44cfb36 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Sat, 9 Oct 2021 15:09:57 +0200 Subject: Enforce KAuthorized enums being not 0 This will output a warning if an invalid value is requested. The goal is to avoid implicit conversion which might result in a zero-int value. --- src/core/kauthorized.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/kauthorized.h') diff --git a/src/core/kauthorized.h b/src/core/kauthorized.h index b7fa4c97..071e0cb2 100644 --- a/src/core/kauthorized.h +++ b/src/core/kauthorized.h @@ -37,7 +37,7 @@ Q_NAMESPACE_EXPORT(KCONFIGCORE_EXPORT); * @since 5.88 */ enum GenericRestriction { - SHELL_ACCESS, // if the user is authorized to open a shell or execute shell commands + SHELL_ACCESS = 1, // if the user is authorized to open a shell or execute shell commands GHNS, /// if the collaborative data sharing framework KNewStuff is authorized // GUI behavior LINEEDIT_REVEAL_PASSWORD, /// if typed characters in password fields can be made visible @@ -52,7 +52,7 @@ Q_ENUM_NS(GenericRestriction) * @since 5.88 */ enum GenericAction { - OPEN_WITH, /// if the open-with menu should be shown for files etc. + OPEN_WITH = 1, /// if the open-with menu should be shown for files etc. EDITFILETYPE, /// if mime-type accociations are allowed to be configured OPTIONS_SHOW_TOOLBAR, /// if the toolbar should be displayed in apps -- cgit v1.2.1