| 238 | } |
| 239 | |
| 240 | QString RemoteChecker::getRemoteFile(const QUrl &url) |
| 241 | { |
| 242 | QString ret; |
| 243 | while (ret.isEmpty()) { |
| 244 | QProcess curlProc; |
| 245 | curlProc.setProgram("curl"); |
| 246 | curlProc.setArguments({url.toEncoded()}); |
| 247 | curlProc.start(); |
| 248 | lspServOut << curlProc.program().toStdString(); |
| 249 | for (auto args : curlProc.arguments()) { |
| 250 | lspServOut << "," << args.toStdString(); |
| 251 | } |
| 252 | curlProc.waitForFinished(1500); |
| 253 | |
| 254 | if (curlProc.exitCode() == 0) |
| 255 | ret = curlProc.readAll(); |
| 256 | } |
| 257 | |
| 258 | if (ret.endsWith("\n")) |
| 259 | ret.remove(ret.size() - 1, 1); |
| 260 | return ret; |
| 261 | } |
| 262 | |
| 263 | bool RemoteChecker::saveRemoteFile(const QUrl &url, const QString &saveFilePath) |
| 264 | { |
nothing calls this directly
no test coverage detected