mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07: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:
parent
206bb018dd
commit
8e65317d61
17 changed files with 54 additions and 47 deletions
|
@ -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('/')));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue