Skip to content
Snippets Groups Projects
Commit 82cbd051 authored by hluk's avatar hluk
Browse files

Use QByteArrayLiteral

parent 901db828
No related branches found
No related tags found
No related merge requests found
...@@ -123,7 +123,7 @@ void registerMetaTypes() { ...@@ -123,7 +123,7 @@ void registerMetaTypes() {
#define STR(str) str #define STR(str) str
#define INVOKE_(function, arguments, functionCallId) do { \ #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; \ const auto args = f.argumentList arguments; \
emit sendMessage(f.serialize(functionCallId, args), CommandFunctionCall); \ emit sendMessage(f.serialize(functionCallId, args), CommandFunctionCall); \
} while(false) } while(false)
...@@ -300,9 +300,9 @@ struct InputDialog { ...@@ -300,9 +300,9 @@ struct InputDialog {
class FunctionCallSerializer final { class FunctionCallSerializer final {
public: public:
explicit FunctionCallSerializer(const char *functionName) explicit FunctionCallSerializer(QByteArray functionName)
: m_slotName(std::move(functionName))
{ {
m_slotName = functionName;
} }
template<typename ...Ts> template<typename ...Ts>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment