Skip to content

Commit 6958a26

Browse files
committed
Revert "qt: Add ObjectInvoke template function"
This reverts commit 5659e73.
1 parent 249984f commit 6958a26

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/qt/guiutil.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -361,18 +361,6 @@ namespace GUIUtil
361361
#endif
362362
}
363363

364-
/**
365-
* Queue a function to run in an object's event loop. This can be
366-
* replaced by a call to the QMetaObject::invokeMethod functor overload after Qt 5.10, but
367-
* for now use a QObject::connect for compatibility with older Qt versions, based on
368-
* https://stackoverflow.com/questions/21646467/how-to-execute-a-functor-or-a-lambda-in-a-given-thread-in-qt-gcd-style
369-
*/
370-
template <typename Fn>
371-
void ObjectInvoke(QObject* object, Fn&& function, Qt::ConnectionType connection = Qt::QueuedConnection)
372-
{
373-
QObject source;
374-
QObject::connect(&source, &QObject::destroyed, object, std::forward<Fn>(function), connection);
375-
}
376364

377365
/**
378366
* Replaces a plain text link with an HTML tagged one.

0 commit comments

Comments
 (0)