MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / update_file_list_async

Method update_file_list_async

src/ui/DownloadDictionariesDialog.cpp:935–945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

933}
934
935void DownloadDictionariesDialog::update_file_list_async(const std::wstring &full_path) {
936 // temporary workaround for xsmf_control.h bug
937 static_assert(std::is_copy_constructible_v<std::variant<FtpOperationErrorType, std::vector<std::wstring>>>);
938 m_ftp_operation_task->do_deferred([params = spawn_ftp_operation_params(full_path)](auto) { return do_download_file_list_ftp(params); },
939 [this](std::variant<FtpOperationErrorType, std::vector<std::wstring>> res) {
940 if (auto error = std::get_if<FtpOperationErrorType>(&res)) {
941 return this->process_file_list_error(*error);
942 }
943 on_new_file_list(transform_zip_list(std::get<std::vector<std::wstring>>(res)));
944 });
945}
946
947void DownloadDictionariesDialog::download_file_async(const std::wstring &full_path, const std::wstring &target_location) {
948 m_ftp_operation_task->do_deferred([params = spawn_ftp_operation_params(full_path), target_location, progressData = get_progress_dlg()->get_progress_data()](

Callers

nothing calls this directly

Calls 4

transform_zip_listFunction · 0.85
do_deferredMethod · 0.80

Tested by

no test coverage detected