mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 17:11:23 +00:00
Fix Windows UNC Path Handling
In Windows, when using Open Install Folder etc with UNC paths, nothing would happen. This replaces the "file://"+path usage with QUrl::fromLocalFile(path) which appears to handle this better. Needs testing under non-Windows.
This commit is contained in:
parent
5669c7497d
commit
c39ad1ee12
@ -300,13 +300,13 @@ namespace gui
|
||||
QProcess::execute("/usr/bin/osascript", { "-e", "tell application \"Finder\" to reveal POSIX file \"" + path + "\"" });
|
||||
QProcess::execute("/usr/bin/osascript", { "-e", "tell application \"Finder\" to activate" });
|
||||
#else
|
||||
// open parent directory
|
||||
QDesktopServices::openUrl(QUrl("file:///" + qstr(fs::get_parent_dir(spath))));
|
||||
// open parent directory
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(qstr(fs::get_parent_dir(spath))));
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
QDesktopServices::openUrl(QUrl("file:///" + path));
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
|
||||
}
|
||||
|
||||
void open_dir(const QString& path)
|
||||
|
@ -203,7 +203,7 @@ void save_manager_dialog::Init(std::string dir)
|
||||
}
|
||||
const int idx_real = item->data(Qt::UserRole).toInt();
|
||||
const QString path = qstr(m_dir + m_save_entries[idx_real].dirName + "/");
|
||||
QDesktopServices::openUrl(QUrl("file:///" + path));
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
|
||||
});
|
||||
connect(slider_icon_size, &QAbstractSlider::valueChanged, this, &save_manager_dialog::SetIconSize);
|
||||
connect(m_list->horizontalHeader(), &QHeaderView::sectionClicked, this, &save_manager_dialog::OnSort);
|
||||
@ -480,7 +480,7 @@ void save_manager_dialog::ShowContextMenu(const QPoint &pos)
|
||||
}
|
||||
const int idx_real = item->data(Qt::UserRole).toInt();
|
||||
const QString path = qstr(m_dir + m_save_entries[idx_real].dirName + "/");
|
||||
QDesktopServices::openUrl(QUrl("file:///" + path));
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
|
||||
});
|
||||
|
||||
menu->exec(m_list->viewport()->mapToGlobal(pos));
|
||||
|
@ -668,7 +668,7 @@ void trophy_manager_dialog::ShowContextMenu(const QPoint& pos)
|
||||
connect(show_trophy_dir, &QAction::triggered, [=, this]()
|
||||
{
|
||||
QString path = qstr(m_trophies_db[db_ind]->path);
|
||||
QDesktopServices::openUrl(QUrl("file:///" + path));
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
|
||||
});
|
||||
|
||||
menu->addAction(show_trophy_dir);
|
||||
|
@ -460,7 +460,7 @@ void user_manager_dialog::ShowContextMenu(const QPoint &pos)
|
||||
connect(show_dir_act, &QAction::triggered, [=, this]()
|
||||
{
|
||||
QString path = qstr(m_user_list[key].GetUserDir());
|
||||
QDesktopServices::openUrl(QUrl("file:///" + path));
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
|
||||
});
|
||||
|
||||
connect(user_id_act, &QAction::triggered, this, [=, this] {OnSort(0); });
|
||||
|
Loading…
Reference in New Issue
Block a user