MCPcopy Create free account
hub / github.com/Tencent/libpag / GetJavaScriptFromQRC

Function GetJavaScriptFromQRC

exporter/src/utils/StringHelper.cpp:312–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312std::string GetJavaScriptFromQRC(const QString& jsPath) {
313 QFile jsFile(jsPath);
314 if (!jsFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
315 return "";
316 }
317
318 QTextStream in(&jsFile);
319 in.setEncoding(QStringConverter::Encoding::Utf8);
320 QString jsContent = in.readAll();
321 jsFile.close();
322 return jsContent.toStdString();
323}
324
325bool IsEndWidthSuffix(const std::string& str, const std::string& suffix) {
326 if (str.length() < suffix.length()) {

Callers 1

Calls 2

openMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected