mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
refs #887, copy nested directories in wizard
* added utility function * removed preselectMissingOrOutdated, flag for initCurrentDirectories * support for copying nested directories
This commit is contained in:
committed by
Mathew Sutcliffe
parent
96a2b757e7
commit
80b127bce8
@@ -101,6 +101,13 @@ namespace BlackMisc
|
||||
return QDir::cleanPath(path1 + QChar('/') + path2);
|
||||
}
|
||||
|
||||
QString CFileUtils::stripFileFromPath(const QString &path)
|
||||
{
|
||||
if (path.endsWith('/')) { return path; }
|
||||
if (!path.contains('/')) { return path; }
|
||||
return path.left(path.lastIndexOf('/'));
|
||||
}
|
||||
|
||||
QString CFileUtils::appendFilePaths(const QString &path1, const QString &path2, const QString &path3)
|
||||
{
|
||||
return CFileUtils::appendFilePaths(CFileUtils::appendFilePaths(path1, path2), path3);
|
||||
|
||||
@@ -63,6 +63,9 @@ namespace BlackMisc
|
||||
//! \sa CNetworkUtils::buildUrl for URLs
|
||||
static QString appendFilePaths(const QString &path1, const QString &path2);
|
||||
|
||||
//! Strip file from path a/b/c.json a/b
|
||||
static QString stripFileFromPath(const QString &path);
|
||||
|
||||
//! Append file paths
|
||||
//! \sa CNetworkUtils::buildUrl for URLs
|
||||
static QString appendFilePaths(const QString &path1, const QString &path2, const QString &path3);
|
||||
|
||||
Reference in New Issue
Block a user