mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-19 20:28:52 +01:00
Fix formatting
This commit is contained in:
parent
f600274592
commit
2db77a248a
@ -171,26 +171,14 @@ class CallbackClosure : public ClosureBase {
|
|||||||
} // namespace _detail
|
} // namespace _detail
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
_detail::ClosureBase *NewClosure(
|
_detail::ClosureBase *NewClosure(QObject *sender, const char *signal, QObject *receiver, const char *slot, const Args&... args) {
|
||||||
QObject *sender,
|
return new _detail::Closure<Args...>(sender, signal, receiver, slot, args...);
|
||||||
const char *signal,
|
|
||||||
QObject *receiver,
|
|
||||||
const char *slot,
|
|
||||||
const Args&... args) {
|
|
||||||
return new _detail::Closure<Args...>(
|
|
||||||
sender, signal, receiver, slot, args...);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// QSharedPointer variant
|
// QSharedPointer variant
|
||||||
template <typename T, typename... Args>
|
template <typename T, typename... Args>
|
||||||
_detail::ClosureBase *NewClosure(
|
_detail::ClosureBase *NewClosure(QSharedPointer<T> sender, const char *signal, QObject *receiver, const char *slot, const Args&... args) {
|
||||||
QSharedPointer<T> sender,
|
return new _detail::SharedClosure<T, Args...>(sender, signal, receiver, slot, args...);
|
||||||
const char *signal,
|
|
||||||
QObject *receiver,
|
|
||||||
const char *slot,
|
|
||||||
const Args&... args) {
|
|
||||||
return new _detail::SharedClosure<T, Args...>(
|
|
||||||
sender, signal, receiver, slot, args...);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_detail::ClosureBase *NewClosure(QObject *sender, const char *signal, std::function<void()> callback);
|
_detail::ClosureBase *NewClosure(QObject *sender, const char *signal, std::function<void()> callback);
|
||||||
@ -201,20 +189,12 @@ _detail::ClosureBase *NewClosure(QObject *sender, const char *signal, std::funct
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
_detail::ClosureBase *NewClosure(
|
_detail::ClosureBase *NewClosure(QObject *sender, const char *signal, void (*callback)(Args...), const Args&... args) {
|
||||||
QObject *sender,
|
|
||||||
const char *signal,
|
|
||||||
void (*callback)(Args...),
|
|
||||||
const Args&... args) {
|
|
||||||
return NewClosure(sender, signal, std::bind(callback, args...));
|
return NewClosure(sender, signal, std::bind(callback, args...));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, typename Unused, typename... Args>
|
template <typename T, typename Unused, typename... Args>
|
||||||
_detail::ClosureBase *NewClosure(
|
_detail::ClosureBase *NewClosure(QObject *sender, const char *signal, T *receiver, Unused (T::*callback)(Args...), const Args&... args) {
|
||||||
QObject *sender,
|
|
||||||
const char *signal,
|
|
||||||
T *receiver, Unused (T::*callback)(Args...),
|
|
||||||
const Args&... args) {
|
|
||||||
return NewClosure(sender, signal, std::bind(callback, receiver, args...));
|
return NewClosure(sender, signal, std::bind(callback, receiver, args...));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,4 +229,3 @@ void DoAfter(std::function<void()> callback, std::chrono::duration<R, P> duratio
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // CLOSURE_H
|
#endif // CLOSURE_H
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user