mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +00:00
Avoid back and forth string conversions
This commit is contained in:
parent
6cc7c700b8
commit
a3ca277eaf
@ -45,8 +45,8 @@ QVariant APIController::run(const QString &action, const StringMap ¶ms, cons
|
|||||||
m_params = params;
|
m_params = params;
|
||||||
m_data = data;
|
m_data = data;
|
||||||
|
|
||||||
const QString methodName {action + QLatin1String("Action")};
|
const QByteArray methodName = action.toLatin1() + "Action";
|
||||||
if (!QMetaObject::invokeMethod(this, methodName.toLatin1().constData()))
|
if (!QMetaObject::invokeMethod(this, methodName.constData()))
|
||||||
throw APIError(APIErrorType::NotFound);
|
throw APIError(APIErrorType::NotFound);
|
||||||
|
|
||||||
return m_result;
|
return m_result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user