mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
Revert "qt: Add ObjectInvoke template function"
This reverts commit 5659e73493
.
This commit is contained in:
parent
249984f4f9
commit
6958a26aa1
1 changed files with 0 additions and 12 deletions
|
@ -361,18 +361,6 @@ namespace GUIUtil
|
|||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Queue a function to run in an object's event loop. This can be
|
||||
* replaced by a call to the QMetaObject::invokeMethod functor overload after Qt 5.10, but
|
||||
* for now use a QObject::connect for compatibility with older Qt versions, based on
|
||||
* https://stackoverflow.com/questions/21646467/how-to-execute-a-functor-or-a-lambda-in-a-given-thread-in-qt-gcd-style
|
||||
*/
|
||||
template <typename Fn>
|
||||
void ObjectInvoke(QObject* object, Fn&& function, Qt::ConnectionType connection = Qt::QueuedConnection)
|
||||
{
|
||||
QObject source;
|
||||
QObject::connect(&source, &QObject::destroyed, object, std::forward<Fn>(function), connection);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces a plain text link with an HTML tagged one.
|
||||
|
|
Loading…
Add table
Reference in a new issue