MCPcopy Create free account
hub / github.com/bumptop/BumpTop / launch

Method launch

trunk/win/Source/BT_JavaScriptAPI.cpp:91–104  ·  view source on GitHub ↗

Launch a file. fullHandle is either a URL or a filename. If it is a URL, it will be downloaded to a temp dir first.

Source from the content-addressed store, hash-verified

89// Launch a file. fullHandle is either a URL or a filename. If it is a URL,
90// it will be downloaded to a temp dir first.
91bool JavaScriptAPI::launch(QString fullHandle, QString callbackName/*=QString::null*/, QString fileName/*=QString::null*/)
92{
93 bool result = false;
94
95 // First, see if it looks like a URL
96 QUrl url(fullHandle, QUrl::StrictMode);
97 if (url.scheme().startsWith("http"))
98 {
99 downloadFile(url, callbackName, fileName);
100 return true;
101 }
102 // Otherwise, assume it's a local file
103 return fsManager->launchFile(fullHandle);
104}
105
106// This slot is connected to a QNetworkReply, probably started by downloadFile()
107void JavaScriptAPI::downloadProgress( qint64 received, qint64 total )

Callers 2

createDropioApiFunction · 0.45
sharedFolder.jsFile · 0.45

Calls 2

launchFileMethod · 0.80
startsWithMethod · 0.45

Tested by

no test coverage detected