src: implemented move constructor/assignment for filepath
* improves indexing performance by roughly 5% * switched to use uniqu_ptr for boost path to get rid of including boost in header * added different methods to change the current FilePath or to make a copy and change that one * used these methods appropriately throughout the code base * removed exists() method from FileSystem because it is already contained in FilePath * added const in some places
This commit is contained in:
@@ -102,7 +102,7 @@ void QtLocationPicker::handleButtonPress()
|
||||
FilePath path(m_data->text().toStdString());
|
||||
if (!path.empty() && !path.isAbsolute() && !m_relativeRootDirectory.empty())
|
||||
{
|
||||
path = m_relativeRootDirectory.concat(path);
|
||||
path = m_relativeRootDirectory.getConcatenated(path);
|
||||
}
|
||||
|
||||
QString fileName;
|
||||
@@ -119,8 +119,8 @@ void QtLocationPicker::handleButtonPress()
|
||||
{
|
||||
if (!m_relativeRootDirectory.empty())
|
||||
{
|
||||
FilePath path(fileName.toStdString());
|
||||
FilePath relPath(path.relativeTo(m_relativeRootDirectory));
|
||||
const FilePath path(fileName.toStdString());
|
||||
const FilePath relPath = path.getRelativeTo(m_relativeRootDirectory);
|
||||
if (relPath.str().size() < path.str().size())
|
||||
{
|
||||
fileName = QString::fromStdString(relPath.str());
|
||||
|
||||
Reference in New Issue
Block a user