| 1874 | } |
| 1875 | |
| 1876 | void GitPlugin::WatchedFile::scheduleDelayedBranchChanged(const GitPlugin* plugin) |
| 1877 | { |
| 1878 | Q_ASSERT(plugin); |
| 1879 | |
| 1880 | if (!m_timer) { |
| 1881 | m_timer.reset(new QTimer); |
| 1882 | m_timer->setSingleShot(true); |
| 1883 | m_timer->setInterval(1000); |
| 1884 | m_timer->callOnTimeout(plugin, &GitPlugin::delayedBranchChanged); |
| 1885 | } |
| 1886 | // During a git rebase, multiple changes to the HEAD file can occur within the timer interval. |
| 1887 | // Restart the timer and emit the signal once in the end to avoid freezing the KDevelop UI. |
| 1888 | m_timer->start(); |
| 1889 | } |
| 1890 | |
| 1891 | auto GitPlugin::findWatchedFile(const QString& filePath) -> std::vector<WatchedFileAndListeners>::iterator |
| 1892 | { |
no test coverage detected