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

Method getRepositoryName

plugins/perforce/perforceplugin.cpp:178–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178QString PerforcePlugin::getRepositoryName(const QFileInfo& curFile)
179{
180 const QString DEPOT_FILE_STR(QStringLiteral("... depotFile "));
181 QString ret;
182 QScopedPointer<DVcsJob> job(p4fstatJob(curFile, KDevelop::OutputJob::Silent));
183 if (job->exec() && job->status() == KDevelop::VcsJob::JobSucceeded) {
184 if (!job->output().isEmpty()) {
185 const QStringList outputLines = job->output().split(QLatin1Char('\n'), Qt::SkipEmptyParts);
186 for (const QString& line : outputLines) {
187 int idx(line.indexOf(DEPOT_FILE_STR));
188 if (idx != -1) {
189 ret = line.mid(DEPOT_FILE_STR.size());
190 return ret;
191 }
192 }
193 }
194 }
195
196 return ret;
197}
198
199KDevelop::VcsJob* PerforcePlugin::repositoryLocation(const QUrl& /*localLocation*/)
200{

Callers

nothing calls this directly

Calls 8

execMethod · 0.80
outputMethod · 0.80
midMethod · 0.80
statusMethod · 0.45
isEmptyMethod · 0.45
splitMethod · 0.45
indexOfMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected