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>
(cherry picked from commit 0ccdcd23e3
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
7d9b95b4ce
commit
6f5d074b4b
@ -3,31 +3,30 @@
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
class QFileInfo;
|
||||
|
||||
/**
|
||||
* This wraps around QDesktopServices and adds workarounds where needed
|
||||
* Use this instead of QDesktopServices!
|
||||
*/
|
||||
namespace DesktopServices {
|
||||
/**
|
||||
* Open a file in whatever application is applicable
|
||||
* Open a path in whatever application is applicable.
|
||||
* @param ensurePathExists Make sure the path exists
|
||||
*/
|
||||
bool openFile(const QString& path);
|
||||
bool openPath(const QFileInfo& path, bool ensurePathExists = false);
|
||||
|
||||
/**
|
||||
* Open a file in the specified application
|
||||
* Open a path in whatever application is applicable.
|
||||
* @param ensurePathExists Make sure the path exists
|
||||
*/
|
||||
bool openFile(const QString& application, const QString& path, const QString& workingDirectory = QString(), qint64* pid = 0);
|
||||
bool openPath(const QString& path, bool ensurePathExists = false);
|
||||
|
||||
/**
|
||||
* Run an application
|
||||
*/
|
||||
bool run(const QString& application, const QStringList& args, const QString& workingDirectory = QString(), qint64* pid = 0);
|
||||
|
||||
/**
|
||||
* Open a directory
|
||||
*/
|
||||
bool openDirectory(const QString& path, bool ensureExists = false);
|
||||
|
||||
/**
|
||||
* Open the URL, most likely in a browser. Maybe.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user