mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 05:31:25 -07:00
Simplify implementation
This also enable each platform to provide its own optimal implementation of it.
This commit is contained in:
parent
5b269a782a
commit
727d20cc92
3 changed files with 16 additions and 12 deletions
|
@ -218,6 +218,15 @@ QString Path::toString() const
|
|||
return QDir::toNativeSeparators(m_pathStr);
|
||||
}
|
||||
|
||||
std::filesystem::path Path::toStdFsPath() const
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
return {data().toStdWString(), std::filesystem::path::format::generic_format};
|
||||
#else
|
||||
return {data().toStdString(), std::filesystem::path::format::generic_format};
|
||||
#endif
|
||||
}
|
||||
|
||||
Path &Path::operator/=(const Path &other)
|
||||
{
|
||||
*this = *this / other;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue