MCPcopy Create free account
hub / github.com/KDE/kdevelop / unregisterRepositoryForCurrentBranchChanges

Method unregisterRepositoryForCurrentBranchChanges

plugins/git/gitplugin.cpp:1803–1824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1801}
1802
1803void GitPlugin::unregisterRepositoryForCurrentBranchChanges(const QUrl& repository, const QObject* listener)
1804{
1805 Q_ASSERT(listener); // precondition
1806 const auto headFile = gitHeadFile(repository);
1807 qCDebug(PLUGIN_GIT) << "unregistering repository" << repository.toString(QUrl::PreferLocalFile) << "and listener"
1808 << listener << "with the HEAD file" << headFile;
1809
1810 const auto it = findWatchedFile(headFile);
1811 if (it == m_watchedFiles.end()) {
1812 qCDebug(PLUGIN_GIT) << "the HEAD file" << headFile << "is not watched => nothing to do";
1813 return;
1814 }
1815
1816 // unregister listener from one of possibly multiple same-URL repositories
1817 it->listeners.removeOne(listener);
1818 // clean up
1819 if (it->listeners.empty()) {
1820 m_watchedFiles.erase(it);
1821 m_watcher->removeFile(headFile);
1822 qCDebug(PLUGIN_GIT) << "stopped watching the HEAD file" << headFile;
1823 }
1824}
1825
1826void GitPlugin::fileChanged(const QString& file)
1827{

Callers 4

removeProjectMethod · 0.80
removeProjectMethod · 0.80
removeProjectMethod · 0.80

Calls 6

gitHeadFileFunction · 0.85
removeOneMethod · 0.80
emptyMethod · 0.80
removeFileMethod · 0.80
toStringMethod · 0.45
endMethod · 0.45