MCPcopy Create free account
hub / github.com/KDE/kdiff3 / addPath

Method addPath

src/fileaccess.cpp:376–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374}
375
376void FileAccess::addPath(const QString& txt, bool reinit)
377{
378 if(!isLocal())
379 {
380 QUrl url = m_url.adjusted(QUrl::StripTrailingSlash);
381 url.setPath(url.path() + '/' + txt);
382 m_url = url;
383
384 if(reinit)
385 setFile(url); // reinitialize
386 }
387 else
388 {
389 QString slash = (txt.isEmpty() || txt[0] == '/') ? QString() : u8"/";
390 setFile(absoluteFilePath() + slash + txt);
391 }
392}
393
394#if HAS_KFKIO && !defined AUTOTEST
395/* Filetype:

Callers 2

enterDirMethod · 0.45
improveFilenamesMethod · 0.45

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected