MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / checkDuplicate

Function checkDuplicate

src/common/util/fileoperation.cpp:40–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40QString checkDuplicate(const QString & parentPath, const QString &newFileName)
41{
42 QString newFilePath = parentPath + QDir::separator() + newFileName;
43 if (QFile::exists(newFilePath)) {
44 QString newName = newFileName + QString("(1)");
45 newFilePath = checkDuplicate(parentPath, newName);
46 }
47
48 return newFilePath;
49};
50
51bool FileOperation::doNewDocument(const QString &parentPath, const QString &docName)
52{

Callers 1

doNewDocumentMethod · 0.85

Calls 1

QStringClass · 0.70

Tested by

no test coverage detected