MCPcopy Create free account
hub / github.com/MultiMC/Launcher / openDirectory

Function openDirectory

launcher/DesktopServices.cpp:73–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71
72namespace DesktopServices {
73bool openDirectory(const QString &path, bool ensureExists)
74{
75 qDebug() << "Opening directory" << path;
76 QDir parentPath;
77 QDir dir(path);
78 if (!dir.exists())
79 {
80 parentPath.mkpath(dir.absolutePath());
81 }
82 auto f = [&]()
83 {
84 return QDesktopServices::openUrl(QUrl::fromLocalFile(dir.absolutePath()));
85 };
86#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
87 return IndirectOpen(f);
88#else
89 return f();
90#endif
91}
92
93bool openFile(const QString &path)
94{

Calls 3

openUrlFunction · 0.85
IndirectOpenFunction · 0.85
existsMethod · 0.80

Tested by

no test coverage detected