Rename "fromNativePath" to "toUniformPath"

Unlike "toNativePath" which name clearly reflects the function result
"fromNativePath" has no such clear meaning.
Since this function converts path into uniform format "toUniformPath"
is better name.
This commit is contained in:
Vladimir Golovnev (Glassez) 2019-06-16 20:14:15 +03:00
parent 206bb018dd
commit 8e65317d61
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
17 changed files with 54 additions and 47 deletions

View file

@ -303,12 +303,12 @@ void Preferences::setWinStartup(const bool b)
// Downloads
QString Preferences::lastLocationPath() const
{
return Utils::Fs::fromNativePath(value("Preferences/Downloads/LastLocationPath").toString());
return Utils::Fs::toUniformPath(value("Preferences/Downloads/LastLocationPath").toString());
}
void Preferences::setLastLocationPath(const QString &path)
{
setValue("Preferences/Downloads/LastLocationPath", Utils::Fs::fromNativePath(path));
setValue("Preferences/Downloads/LastLocationPath", Utils::Fs::toUniformPath(path));
}
QVariantHash Preferences::getScanDirs() const
@ -324,12 +324,12 @@ void Preferences::setScanDirs(const QVariantHash &dirs)
QString Preferences::getScanDirsLastPath() const
{
return Utils::Fs::fromNativePath(value("Preferences/Downloads/ScanDirsLastPath").toString());
return Utils::Fs::toUniformPath(value("Preferences/Downloads/ScanDirsLastPath").toString());
}
void Preferences::setScanDirsLastPath(const QString &path)
{
setValue("Preferences/Downloads/ScanDirsLastPath", Utils::Fs::fromNativePath(path));
setValue("Preferences/Downloads/ScanDirsLastPath", Utils::Fs::toUniformPath(path));
}
bool Preferences::isMailNotificationEnabled() const