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

Function preventRecursion

plugins/git/gitplugin.cpp:103–119  ·  view source on GitHub ↗

* Whenever a directory is provided, change it for all the files in it but not inner directories, * that way we make sure we won't get into recursion, */

Source from the content-addressed store, hash-verified

101 * that way we make sure we won't get into recursion,
102 */
103static QList<QUrl> preventRecursion(const QList<QUrl>& urls)
104{
105 QList<QUrl> ret;
106 for (const QUrl& url : urls) {
107 QDir d(url.toLocalFile());
108 if(d.exists()) {
109 const QStringList entries = d.entryList(QDir::Files | QDir::NoDotAndDotDot);
110 ret.reserve(ret.size() + entries.size());
111 for (const QString& entry : entries) {
112 QUrl entryUrl = QUrl::fromLocalFile(d.absoluteFilePath(entry));
113 ret += entryUrl;
114 }
115 } else
116 ret += url;
117 }
118 return ret;
119}
120
121QString toRevisionName(const KDevelop::VcsRevision& rev, const QString& currentRevision=QString())
122{

Callers 7

addMethod · 0.85
statusMethod · 0.85
diffMethod · 0.85
resetMethod · 0.85
revertMethod · 0.85
commitMethod · 0.85
updateMethod · 0.85

Calls 4

toLocalFileMethod · 0.80
existsMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected