mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-03 16:25:54 +08:00
fixed new compiler error due to MSVC incorrect handling of
capturing the this pointer in a lambda inside another lambda
This commit is contained in:
@@ -87,12 +87,13 @@ public:
|
|||||||
template <class F1, class F2> ExpectUnit& expect(F1 signal, F2 slot)
|
template <class F1, class F2> ExpectUnit& expect(F1 signal, F2 slot)
|
||||||
{
|
{
|
||||||
auto subj = subject<F1>();
|
auto subj = subject<F1>();
|
||||||
|
auto next = [=]{ this->next(); };
|
||||||
m_expects.push_back([=]{
|
m_expects.push_back([=]{
|
||||||
m_waitingFor = subj->metaObject()->className();
|
m_waitingFor = subj->metaObject()->className();
|
||||||
m_waitingFor += "::";
|
m_waitingFor += "::";
|
||||||
m_waitingFor += QMetaMethod::fromSignal(signal).name();
|
m_waitingFor += QMetaMethod::fromSignal(signal).name();
|
||||||
m_guard += QObject::connect(subj, signal, slot);
|
m_guard += QObject::connect(subj, signal, slot);
|
||||||
m_guard += QObject::connect(subj, signal, [=]{ next(); });
|
m_guard += QObject::connect(subj, signal, next);
|
||||||
});
|
});
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user