Add a clang-format off marker

Otherwise clang-format unoptimizes the code
This commit is contained in:
Albert Astals Cid 2020-09-06 20:47:17 +02:00
parent f88abb0697
commit db8ff052a9

View File

@ -175,9 +175,12 @@ QVariant SyncThread::call(QObject *obj, const QByteArray &method, const QVariant
QMutexLocker locker(&d->m);
bool ret;
Q_UNUSED(ret); // In really ret is used. I use this hack to suppress a compiler warning
// clang-format off
// Otherwise the QObject* gets turned into Object * that is not normalized and is slightly slower
ret = QMetaObject::invokeMethod(d->agent, "call_do",
Qt::QueuedConnection, Q_ARG(QObject*, obj),
Q_ARG(QByteArray, method), Q_ARG(QVariantList, args));
// clang-format on
Q_ASSERT(ret);
d->w.wait(&d->m);
if(ok)