| 95 | } |
| 96 | |
| 97 | void ThreadControlWidget::StartFunction(const QString& progress_text, |
| 98 | const std::function<void()>& func) { |
| 99 | class FunctionThread : public Thread { |
| 100 | public: |
| 101 | explicit FunctionThread(const std::function<void()>& f) : func_(f) {} |
| 102 | |
| 103 | private: |
| 104 | void Run() { func_(); } |
| 105 | const std::function<void()> func_; |
| 106 | }; |
| 107 | |
| 108 | StartThread(progress_text, false, std::make_unique<FunctionThread>(func)); |
| 109 | } |
| 110 | |
| 111 | } // namespace colmap |
no outgoing calls
no test coverage detected