Skip to content

overload with methods that don't use QString#64

Merged
iurimatias merged 1 commit into
masterfrom
add_qt_string_equivalents
May 21, 2026
Merged

overload with methods that don't use QString#64
iurimatias merged 1 commit into
masterfrom
add_qt_string_equivalents

Conversation

@iurimatias
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 21, 2026 17:29
@iurimatias iurimatias changed the title overload with method that don't use QString overload with methods that don't use QString May 21, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds std::string-based overloads to LogosAPIClient to make the client API easier to call from non-Qt code by converting std::string inputs to QString internally.

Changes:

  • Added invokeRemoteMethod(...) overloads that accept std::string for objectName/methodName and forward to existing QString overloads.
  • Added an onEvent(...) overload that accepts std::string for eventName and forwards to the existing QString overload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cpp/logos_api_client.h
Comment on lines +92 to +103
// std::string overloads — thin wrappers that convert internally
QVariant invokeRemoteMethod(const std::string& objectName, const std::string& methodName,
const QVariantList& args = QVariantList(), Timeout timeout = Timeout())
{ return invokeRemoteMethod(QString::fromStdString(objectName), QString::fromStdString(methodName), args, timeout); }

QVariant invokeRemoteMethod(const std::string& objectName, const std::string& methodName,
const QVariant& arg, Timeout timeout = Timeout())
{ return invokeRemoteMethod(QString::fromStdString(objectName), QString::fromStdString(methodName), arg, timeout); }

QVariant invokeRemoteMethod(const std::string& objectName, const std::string& methodName,
const QVariant& arg1, const QVariant& arg2, Timeout timeout = Timeout())
{ return invokeRemoteMethod(QString::fromStdString(objectName), QString::fromStdString(methodName), arg1, arg2, timeout); }
Comment thread cpp/logos_api_client.h
Comment on lines +105 to +107
void onEvent(LogosObject* originObject, const std::string& eventName,
std::function<void(const QString&, const QVariantList&)> callback)
{ onEvent(originObject, QString::fromStdString(eventName), callback); }
Comment thread cpp/logos_api_client.h
QVariant invokeRemoteMethod(const std::string& objectName, const std::string& methodName,
const QVariant& arg1, const QVariant& arg2, Timeout timeout = Timeout())
{ return invokeRemoteMethod(QString::fromStdString(objectName), QString::fromStdString(methodName), arg1, arg2, timeout); }

@iurimatias iurimatias force-pushed the add_qt_string_equivalents branch from e0e524d to 1c5559f Compare May 21, 2026 17:42
overload with method that don't use QString

overload with method that don't use QString

overload with method that don't use QString

overload with method that don't use QString
@iurimatias iurimatias force-pushed the add_qt_string_equivalents branch from 1c5559f to 45fae08 Compare May 21, 2026 17:50
@iurimatias iurimatias merged commit e29ba9b into master May 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants