From 82cbd0519548c3f90eb7bb0924975d48d72d8f19 Mon Sep 17 00:00:00 2001 From: Lukas Holecek <hluk@email.cz> Date: Sun, 28 Mar 2021 16:20:28 +0200 Subject: [PATCH] Use QByteArrayLiteral --- src/scriptable/scriptableproxy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scriptable/scriptableproxy.cpp b/src/scriptable/scriptableproxy.cpp index c80632734..2f5ddaa18 100644 --- a/src/scriptable/scriptableproxy.cpp +++ b/src/scriptable/scriptableproxy.cpp @@ -123,7 +123,7 @@ void registerMetaTypes() { #define STR(str) str #define INVOKE_(function, arguments, functionCallId) do { \ - static const auto f = FunctionCallSerializer(STR(#function)).withSlotArguments arguments; \ + static const auto f = FunctionCallSerializer(QByteArrayLiteral(STR(#function))).withSlotArguments arguments; \ const auto args = f.argumentList arguments; \ emit sendMessage(f.serialize(functionCallId, args), CommandFunctionCall); \ } while(false) @@ -300,9 +300,9 @@ struct InputDialog { class FunctionCallSerializer final { public: - explicit FunctionCallSerializer(const char *functionName) + explicit FunctionCallSerializer(QByteArray functionName) + : m_slotName(std::move(functionName)) { - m_slotName = functionName; } template<typename ...Ts> -- GitLab