diff --git a/src/webui/api/apicontroller.cpp b/src/webui/api/apicontroller.cpp index c306a351b..40de8dcdf 100644 --- a/src/webui/api/apicontroller.cpp +++ b/src/webui/api/apicontroller.cpp @@ -45,8 +45,8 @@ QVariant APIController::run(const QString &action, const StringMap ¶ms, cons m_params = params; m_data = data; - const QString methodName {action + QLatin1String("Action")}; - if (!QMetaObject::invokeMethod(this, methodName.toLatin1().constData())) + const QByteArray methodName = action.toLatin1() + "Action"; + if (!QMetaObject::invokeMethod(this, methodName.constData())) throw APIError(APIErrorType::NotFound); return m_result;