diff --git a/src/plugins/vcsbase/vcsprojectcache.cpp b/src/plugins/vcsbase/vcsprojectcache.cpp index 5fd620b6f6e..fe1942a62cd 100644 --- a/src/plugins/vcsbase/vcsprojectcache.cpp +++ b/src/plugins/vcsbase/vcsprojectcache.cpp @@ -79,9 +79,9 @@ VcsProjectCache::VcsProjectCache() m_instance = this; connect(ProjectExplorer::SessionManager::instance(), &ProjectExplorer::SessionManager::projectAdded, - this, []() { VcsProjectCache::invalidate(); }); + this, [&]() { VcsProjectCache::invalidate(); }); connect(ProjectExplorer::SessionManager::instance(), &ProjectExplorer::SessionManager::projectRemoved, - this, []() { VcsProjectCache::invalidate(); }); + this, [&]() { VcsProjectCache::invalidate(); }); } VcsProjectCache::~VcsProjectCache()