MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / getScriptContent

Method getScriptContent

pluginbase/src/scopyjs.cpp:261–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261const QString ScopyJS::getScriptContent(QFile *file)
262{
263 QTextStream stream(file);
264 QString firstLine = stream.readLine();
265 if(!firstLine.startsWith("#!"))
266 stream.seek(0);
267
268 QString content = stream.readAll();
269 file->close();
270 return content;
271}
272
273#include "moc_scopyjs.cpp"

Callers

nothing calls this directly

Calls 3

readLineMethod · 0.80
readAllMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected