#3091 Completion export. Add WELSPECS/WELSPECL to exported file

This commit is contained in:
Bjørn Erik Jensen
2018-08-29 13:36:33 +02:00
parent c4577084dc
commit 6b2359cb39
8 changed files with 444 additions and 57 deletions

View File

@@ -128,3 +128,20 @@ QString RiaFilePathTools::commonRootPath(const QStringList& paths)
return paths.front().left(iDir + 1);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::pair<QString, QString> RiaFilePathTools::toFolderAndFileName(const QString& absFileName)
{
auto absFN = toInternalSeparator(absFileName);
int lastSep = absFN.lastIndexOf(SEPARATOR);
if (lastSep > 0)
{
return std::make_pair(absFN.left(lastSep), absFN.mid(lastSep+1));
}
else
{
return std::make_pair("", absFN);
}
}

View File

@@ -40,4 +40,5 @@ public:
static bool equalPaths(const QString& path1, const QString& path2);
static QString canonicalPath(const QString& path);
static QString commonRootPath(const QStringList& paths);
static std::pair<QString, QString> toFolderAndFileName(const QString& absFileName);
};