| 1039 | |
| 1040 | |
| 1041 | bool GUI::queue_save() |
| 1042 | { |
| 1043 | static std::mutex mtx; |
| 1044 | std::lock_guard<std::mutex> lock {mtx}; |
| 1045 | if(fn_write_conf && lbq.item_count()) |
| 1046 | { |
| 1047 | conf.unfinished_queue_items.clear(); |
| 1048 | for(size_t cat {0}; cat < lbq.size_categ(); cat++) |
| 1049 | { |
| 1050 | auto icat {lbq.at(cat)}; |
| 1051 | if(icat.size()) |
| 1052 | { |
| 1053 | auto &qitems {conf.unfinished_queue_items.emplace_back(icat.text(), std::vector<std::string>{}).second}; |
| 1054 | for(auto item : icat) |
| 1055 | { |
| 1056 | auto text {item.text(3)}; |
| 1057 | if(text != "done" && (text != "error" || text == "error" && conf.cb_save_errors)) |
| 1058 | qitems.push_back(nana::to_utf8(item.value<lbqval_t>().url)); |
| 1059 | } |
| 1060 | } |
| 1061 | } |
| 1062 | return fn_write_conf(); |
| 1063 | } |
| 1064 | return true; |
| 1065 | } |
| 1066 | |
| 1067 | |
| 1068 | void GUI::queue_save_data(size_t max_qitems_to_process) |
nothing calls this directly
no test coverage detected