mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
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:
@@ -154,7 +154,7 @@ QPoint Utils::Gui::screenCenter(const QWidget *w)
|
||||
// Open the given path with an appropriate application
|
||||
void Utils::Gui::openPath(const QString &absolutePath)
|
||||
{
|
||||
const QString path = Utils::Fs::fromNativePath(absolutePath);
|
||||
const QString path = Utils::Fs::toUniformPath(absolutePath);
|
||||
// Hack to access samba shares with QDesktopServices::openUrl
|
||||
if (path.startsWith("//"))
|
||||
QDesktopServices::openUrl(Utils::Fs::toNativePath("file:" + path));
|
||||
@@ -166,7 +166,7 @@ void Utils::Gui::openPath(const QString &absolutePath)
|
||||
// (if possible) the item at the given path
|
||||
void Utils::Gui::openFolderSelect(const QString &absolutePath)
|
||||
{
|
||||
const QString path = Utils::Fs::fromNativePath(absolutePath);
|
||||
const QString path = Utils::Fs::toUniformPath(absolutePath);
|
||||
// If the item to select doesn't exist, try to open its parent
|
||||
if (!QFileInfo::exists(path)) {
|
||||
openPath(path.left(path.lastIndexOf('/')));
|
||||
|
||||
Reference in New Issue
Block a user