It prevents compile-time checking, use QTimer::singleShot(0, ...)
instead.
Details
Diff Detail
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 3798 Build 3816: arc lint + arc unit
Yes, but gwenview requires at least 5.9.
And code is longer with QMetaObject::invokeMethod, compare:
QTimer::singleShot(0, this, &FileOpsContextManagerItem::updateActions);
and
QMetaObject::invokeMethod(this, &FileOpsContextManagerItem::updateActions, Qt::QueuedConnection);
Honestly i'd prefer if we wait for 5.10 and then use QMetaObject::invokeMethod instead of QTimer::singleShot.
AFAIR they're not exactly the same, even if they are 99% similar, so in trying to make we don't break stuff just to have nicer code i'd delay this until we decide to depend on 5.10 for gwenview.
Which IMHO we could right now, but OTOH Ubuntu LTS (that is used by quite some people) has Qt 5.9 so maybe it's not the best of the ideas to break "buildability" in a "popular" distro just for "nicer code"