diff --git a/src/plugins/projectexplorer/project.h b/src/plugins/projectexplorer/project.h index 0e9fa056a58..73be1c2f359 100644 --- a/src/plugins/projectexplorer/project.h +++ b/src/plugins/projectexplorer/project.h @@ -184,9 +184,9 @@ public: template void subscribeSignal(void (S::*sig)(Args1...), R*recv, T sl) { - new Internal::ProjectSubscription([sig, recv, sl](ProjectConfiguration *pc) { + new Internal::ProjectSubscription([sig, recv, sl, this](ProjectConfiguration *pc) { if (S* sender = qobject_cast(pc)) - return QObject::connect(sender, sig, recv, sl); + return connect(sender, sig, recv, sl); return QMetaObject::Connection(); }, recv, this); }