mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3091 Completion export. Add WELSPECS/WELSPECL to exported file
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user