| 236 | } |
| 237 | |
| 238 | QString GetObsCurrentModuleSHA256() |
| 239 | { |
| 240 | // NOTE: `obs_module_file(nullptr)` returns the plugin's "Resources" path and will not work. |
| 241 | auto module = obs_current_module(); |
| 242 | auto module_binary_path = obs_get_module_binary_path(module); |
| 243 | #if 0 |
| 244 | obs_log(LOG_DEBUG, |
| 245 | "GetObsCurrentModuleSHA256: module_binary_path='%s'", |
| 246 | module_binary_path); |
| 247 | #endif |
| 248 | QString module_hash_sha256; |
| 249 | auto success = CalculateFileHash(module_binary_path, module_hash_sha256); |
| 250 | #if 0 |
| 251 | obs_log(LOG_DEBUG, |
| 252 | "GetObsCurrentModuleSHA256: module_hash_sha256='%s'", |
| 253 | QT_TO_UTF8(module_hash_sha256)); |
| 254 | #endif |
| 255 | return success ? module_hash_sha256 : ""; |
| 256 | } |
| 257 | |
| 258 | //#define UPDATE_REQUEST_QT |
| 259 | #ifdef UPDATE_REQUEST_QT |
no test coverage detected