| 801 | } |
| 802 | |
| 803 | void ProtocolClient::enqeueCallbackTask(openmittsu::tasks::CallbackTask* callbackTask) { |
| 804 | if (callbackTask == nullptr) { |
| 805 | LOGGER()->warn("Ignoring nullptr callback task."); |
| 806 | return; |
| 807 | } |
| 808 | |
| 809 | OPENMITTSU_CONNECT_QUEUED(callbackTask, finished(openmittsu::tasks::CallbackTask*), this, callbackTaskFinished(openmittsu::tasks::CallbackTask*)); |
| 810 | |
| 811 | if (!QMetaObject::invokeMethod(callbackTask, "start", Qt::QueuedConnection)) { |
| 812 | throw openmittsu::exceptions::InternalErrorException() << "Could not invoke method start in " << __FILE__ << " at line " << __LINE__ << "."; |
| 813 | } |
| 814 | } |
| 815 | |
| 816 | void ProtocolClient::callbackTaskFinished(openmittsu::tasks::CallbackTask* callbackTask) { |
| 817 | if (dynamic_cast<openmittsu::tasks::IdentityReceiverCallbackTask*>(callbackTask) != nullptr) { |
nothing calls this directly
no outgoing calls
no test coverage detected