From b322254e436b4a1f1d625179e66426d972e8bb19 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Wed, 29 May 2024 17:13:59 +0200 Subject: [PATCH] Qml2Puppet: use better standalone fix without extra dependency Change-Id: I0bbc91c94feb84d0a0bbef8009b411ec20093079 Reviewed-by: Marco Bubke --- .../commands/view3dactioncommand.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/libs/qmlpuppetcommunication/commands/view3dactioncommand.cpp b/src/libs/qmlpuppetcommunication/commands/view3dactioncommand.cpp index 5ce61c7a9fc..72605d6711b 100644 --- a/src/libs/qmlpuppetcommunication/commands/view3dactioncommand.cpp +++ b/src/libs/qmlpuppetcommunication/commands/view3dactioncommand.cpp @@ -3,11 +3,17 @@ #include "view3dactioncommand.h" -#include "../../utils/utility.h" - #include #include +namespace { +template +[[nodiscard]] constexpr std::underlying_type_t to_underlying(Enumeration enumeration) noexcept +{ + return static_cast>(enumeration); +} +} + namespace QmlDesigner { View3DActionCommand::View3DActionCommand(View3DActionType type, const QVariant &value) @@ -68,7 +74,7 @@ QDebug operator<<(QDebug debug, const View3DActionCommand &command) QDebug operator<<(QDebug debug, View3DActionType type) { - return debug.nospace() << Utils::to_underlying(type); + return debug.nospace() << to_underlying(type); } } // namespace QmlDesigner