* @brief 从HTML文件的路径获取想要的资源文件夹路径 * @param strHtmlFileName * @return */
| 62 | * @return |
| 63 | */ |
| 64 | QString GetResoucePathFromFile(const QString& strHtmlFileName) |
| 65 | { |
| 66 | if (strHtmlFileName.isEmpty() || !QFile::exists(strHtmlFileName)) |
| 67 | return QString(); |
| 68 | |
| 69 | QString strTitle = Utils::WizMisc::extractFileTitle(strHtmlFileName); |
| 70 | QString strPath = Utils::WizMisc::extractFilePath(strHtmlFileName); |
| 71 | QString strPath1 = strPath + strTitle + "_files/"; |
| 72 | QString strPath2 = strPath + strTitle + ".files/"; |
| 73 | if (QFile::exists(strPath1)) |
| 74 | return strPath1; |
| 75 | if (QFile::exists(strPath2)) |
| 76 | return strPath2; |
| 77 | |
| 78 | return QString(); |
| 79 | } |
| 80 | |
| 81 | |
| 82 | class WizUserCertPassword |
no test coverage detected