"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/plugins/cpptools/cppprojectupdater.cpp" between
qt-creator-opensource-src-4.15.0.tar.xz and qt-creator-opensource-src-4.15.1.tar.xz

About: Qt Creator is a cross-platform, complete IDE (integrated development environment) tailored to the needs of Qt developers.

cppprojectupdater.cpp  (qt-creator-opensource-src-4.15.0.tar.xz):cppprojectupdater.cpp  (qt-creator-opensource-src-4.15.1.tar.xz)
skipping to change at line 56 skipping to change at line 56
} }
CppProjectUpdater::~CppProjectUpdater() CppProjectUpdater::~CppProjectUpdater()
{ {
cancelAndWaitForFinished(); cancelAndWaitForFinished();
} }
void CppProjectUpdater::update(const ProjectExplorer::ProjectUpdateInfo &project UpdateInfo) void CppProjectUpdater::update(const ProjectExplorer::ProjectUpdateInfo &project UpdateInfo)
{ {
// Stop previous update. // Stop previous update.
cancelAndWaitForFinished(); cancel();
m_projectUpdateInfo = projectUpdateInfo; m_projectUpdateInfo = projectUpdateInfo;
// Ensure that we do not operate on a deleted toolchain. // Ensure that we do not operate on a deleted toolchain.
using namespace ProjectExplorer; using namespace ProjectExplorer;
connect(ToolChainManager::instance(), &ToolChainManager::toolChainRemoved, connect(ToolChainManager::instance(), &ToolChainManager::toolChainRemoved,
this, &CppProjectUpdater::onToolChainRemoved); this, &CppProjectUpdater::onToolChainRemoved);
// Run the project info generator in a worker thread and continue if that on e is finished. // Run the project info generator in a worker thread and continue if that on e is finished.
m_generateFuture = Utils::runAsync([=](QFutureInterface<ProjectInfo> &future Interface) { m_generateFuture = Utils::runAsync([=](QFutureInterface<ProjectInfo> &future Interface) {
skipping to change at line 96 skipping to change at line 96
if (m_generateFuture.isRunning()) if (m_generateFuture.isRunning())
m_generateFuture.waitForFinished(); m_generateFuture.waitForFinished();
if (m_updateFuture.isRunning()) if (m_updateFuture.isRunning())
m_updateFuture.waitForFinished(); m_updateFuture.waitForFinished();
} }
void CppProjectUpdater::onToolChainRemoved(ProjectExplorer::ToolChain *t) void CppProjectUpdater::onToolChainRemoved(ProjectExplorer::ToolChain *t)
{ {
QTC_ASSERT(t, return); QTC_ASSERT(t, return);
if (t == m_projectUpdateInfo.cToolChain || t == m_projectUpdateInfo.cxxToolC hain) if (t == m_projectUpdateInfo.cToolChain || t == m_projectUpdateInfo.cxxToolC hain)
cancelAndWaitForFinished(); cancel();
} }
void CppProjectUpdater::onProjectInfoGenerated() void CppProjectUpdater::onProjectInfoGenerated()
{ {
// From now on we do not access the toolchain anymore, so disconnect. // From now on we do not access the toolchain anymore, so disconnect.
using namespace ProjectExplorer; using namespace ProjectExplorer;
disconnect(ToolChainManager::instance(), &ToolChainManager::toolChainRemoved , disconnect(ToolChainManager::instance(), &ToolChainManager::toolChainRemoved ,
this, &CppProjectUpdater::onToolChainRemoved); this, &CppProjectUpdater::onToolChainRemoved);
if (m_generateFutureWatcher.isCanceled() || m_generateFutureWatcher.future() .resultCount() < 1) if (m_generateFutureWatcher.isCanceled() || m_generateFutureWatcher.future() .resultCount() < 1)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)