mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Use functor based QMetaObject::invokeMethod
This commit is contained in:
parent
183db3475a
commit
e31c1ca780
3 changed files with 35 additions and 0 deletions
|
@ -54,8 +54,13 @@ AsyncFileStorage::~AsyncFileStorage()
|
|||
|
||||
void AsyncFileStorage::store(const QString &fileName, const QByteArray &data)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
QMetaObject::invokeMethod(this, [this, data, fileName]() { store_impl(fileName, data); }
|
||||
, Qt::QueuedConnection);
|
||||
#else
|
||||
QMetaObject::invokeMethod(this, "store_impl", Qt::QueuedConnection
|
||||
, Q_ARG(QString, fileName), Q_ARG(QByteArray, data));
|
||||
#endif
|
||||
}
|
||||
|
||||
QDir AsyncFileStorage::storageDir() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue