* 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, */
| 101 | * that way we make sure we won't get into recursion, |
| 102 | */ |
| 103 | static 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 | |
| 121 | QString toRevisionName(const KDevelop::VcsRevision& rev, const QString& currentRevision=QString()) |
| 122 | { |