mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 05:52:41 +00:00
fix: creating a copy of signalstring
This commit is contained in:
parent
0b41a9b86d
commit
7a286e548e
3
vendor/DOtherSide/lib/src/DOtherSide.cpp
vendored
3
vendor/DOtherSide/lib/src/DOtherSide.cpp
vendored
@ -766,7 +766,8 @@ bool dos_qurl_isValid(const ::DosQUrl *vptr)
|
||||
void dos_signal(::DosQObject *vptr, const char *signal, const char *slot) //
|
||||
{
|
||||
auto qobject = static_cast<QObject *>(vptr);
|
||||
QMetaObject::invokeMethod(qobject, slot, Qt::QueuedConnection, Q_ARG(QString, signal));
|
||||
std::string copy = signal; // signal comes from nim, and might be GC. Creating a copy (QT will handle the freeing)
|
||||
QMetaObject::invokeMethod(qobject, slot, Qt::QueuedConnection, Q_ARG(QString, copy.c_str()));
|
||||
}
|
||||
|
||||
void dos_qmetaobject_delete(::DosQMetaObject *vptr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user