Helper function for transfers started with sendHttpPostFileUpload()
| 212 | |
| 213 | // Helper function for transfers started with sendHttpPostFileUpload() |
| 214 | void JavaScriptAPI::transferFinished(const FileTransfer& transfer, bool success) |
| 215 | { |
| 216 | QString *callbackName = (QString *)transfer.getUserData(); |
| 217 | assert(_stringData.isNull()); |
| 218 | _stringData = transfer.getTemporaryString(); |
| 219 | _page->evaluateJavaScript(QString("%1(BumpTopNative.internal_getStringData(), %2);") |
| 220 | .arg(*callbackName).arg(success ? "true" : "false")); |
| 221 | delete callbackName; |
| 222 | } |
| 223 | |
| 224 | // Callback for transfers that were enqueued with the FileTransferManager |
| 225 | void JavaScriptAPI::onTransferComplete( const FileTransfer& transfer ) |
nothing calls this directly
no test coverage detected