#3512 System : Remove unused functions

This commit is contained in:
Magne Sjaastad
2018-10-18 16:32:02 +02:00
parent 726658d642
commit 16265273b9
4 changed files with 0 additions and 55 deletions

View File

@@ -96,39 +96,6 @@ QString RiaFilePathTools::canonicalPath(const QString& path)
return QDir(path).absolutePath();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaFilePathTools::commonRootPath(const QStringList& paths)
{
if (paths.size() < 2) return "";
int i = 0;
int iDir = 0;
for(i = 0; ; i++)
{
bool isCommon = true;
QChar ch = i < paths.front().size() ? paths.front()[i] : 0;
// Remember last directory separator
if (i > 0 && (ch == '/' || ch == '\\')) iDir = i;
// Compare characters at position i
for (const QString& path : paths)
{
if (ch == 0 || path[i] != ch)
{
isCommon = false;
break;
}
}
if (!isCommon) break;
}
return paths.front().left(iDir + 1);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------