mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
fix: open paths directly
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@ -290,12 +290,12 @@ void ExternalResourcesPage::disableItem()
|
||||
|
||||
void ExternalResourcesPage::viewConfigs()
|
||||
{
|
||||
DesktopServices::openDirectory(m_instance->instanceConfigFolder(), true);
|
||||
DesktopServices::openPath(m_instance->instanceConfigFolder(), true);
|
||||
}
|
||||
|
||||
void ExternalResourcesPage::viewFolder()
|
||||
{
|
||||
DesktopServices::openDirectory(m_model->dir().absolutePath(), true);
|
||||
DesktopServices::openPath(m_model->dir().absolutePath(), true);
|
||||
}
|
||||
|
||||
bool ExternalResourcesPage::current(const QModelIndex& current, const QModelIndex& previous)
|
||||
|
@ -325,7 +325,7 @@ void ScreenshotsPage::onItemActivated(QModelIndex index)
|
||||
return;
|
||||
auto info = m_model->fileInfo(index);
|
||||
QString fileName = info.absoluteFilePath();
|
||||
DesktopServices::openFile(info.absoluteFilePath());
|
||||
DesktopServices::openPath(info.absoluteFilePath());
|
||||
}
|
||||
|
||||
void ScreenshotsPage::onCurrentSelectionChanged(const QItemSelection& selected)
|
||||
@ -352,7 +352,7 @@ void ScreenshotsPage::onCurrentSelectionChanged(const QItemSelection& selected)
|
||||
|
||||
void ScreenshotsPage::on_actionView_Folder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(m_folder, true);
|
||||
DesktopServices::openPath(m_folder, true);
|
||||
}
|
||||
|
||||
void ScreenshotsPage::on_actionUpload_triggered()
|
||||
|
@ -447,12 +447,12 @@ void VersionPage::on_actionAdd_Empty_triggered()
|
||||
|
||||
void VersionPage::on_actionLibrariesFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(m_inst->getLocalLibraryPath(), true);
|
||||
DesktopServices::openPath(m_inst->getLocalLibraryPath(), true);
|
||||
}
|
||||
|
||||
void VersionPage::on_actionMinecraftFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(m_inst->gameRoot(), true);
|
||||
DesktopServices::openPath(m_inst->gameRoot(), true);
|
||||
}
|
||||
|
||||
void VersionPage::versionCurrent(const QModelIndex& current, [[maybe_unused]] const QModelIndex& previous)
|
||||
|
@ -207,7 +207,7 @@ void WorldListPage::on_actionRemove_triggered()
|
||||
|
||||
void WorldListPage::on_actionView_Folder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(m_worlds->dir().absolutePath(), true);
|
||||
DesktopServices::openPath(m_worlds->dir().absolutePath(), true);
|
||||
}
|
||||
|
||||
void WorldListPage::on_actionDatapacks_triggered()
|
||||
@ -223,7 +223,7 @@ void WorldListPage::on_actionDatapacks_triggered()
|
||||
|
||||
auto fullPath = m_worlds->data(index, WorldList::FolderRole).toString();
|
||||
|
||||
DesktopServices::openDirectory(FS::PathCombine(fullPath, "datapacks"), true);
|
||||
DesktopServices::openPath(FS::PathCombine(fullPath, "datapacks"), true);
|
||||
}
|
||||
|
||||
void WorldListPage::on_actionReset_Icon_triggered()
|
||||
|
Reference in New Issue
Block a user