| 310 | } |
| 311 | |
| 312 | std::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 | |
| 325 | bool IsEndWidthSuffix(const std::string& str, const std::string& suffix) { |
| 326 | if (str.length() < suffix.length()) { |
no test coverage detected