MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / openJsonEditor

Method openJsonEditor

launcher/Application.cpp:1199–1211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1197}
1198
1199bool Application::openJsonEditor(const QString &filename)
1200{
1201 const QString file = QDir::current().absoluteFilePath(filename);
1202 if (m_settings->get("JsonEditor").toString().isEmpty())
1203 {
1204 return DesktopServices::openUrl(QUrl::fromLocalFile(file));
1205 }
1206 else
1207 {
1208 //return DesktopServices::openFile(m_settings->get("JsonEditor").toString(), file);
1209 return DesktopServices::run(m_settings->get("JsonEditor").toString(), {file});
1210 }
1211}
1212
1213bool Application::launch(
1214 InstancePtr instance,

Callers 1

Calls 5

openUrlFunction · 0.85
runFunction · 0.85
isEmptyMethod · 0.80
toStringMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected