mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 13:53:37 -07:00
Avoid back and forth string conversions
This commit is contained in:
parent
6cc7c700b8
commit
a3ca277eaf
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue