| 203 | } |
| 204 | |
| 205 | void MessageComponent::initConnect() |
| 206 | { |
| 207 | if (!editButton) |
| 208 | return; |
| 209 | connect(editButton, &QPushButton::clicked, this, [=]() { |
| 210 | ChatManager::instance()->setMessage(messageData.messageData()); |
| 211 | }); |
| 212 | connect(ChatManager::instance(), &ChatManager::crawledWebsite, this, |
| 213 | [=](const QString &msgID, const QList<websiteReference> &websites) { |
| 214 | Q_UNUSED(msgID); |
| 215 | if (!finished) |
| 216 | this->websites = websites; |
| 217 | }); |
| 218 | connect(ChatManager::instance(), &ChatManager::chatFinished, this, |
| 219 | [=]() { |
| 220 | if (isConnecting && !websites.isEmpty()) |
| 221 | showWebsitesReferences(); |
| 222 | if (ChatManager::instance()->isReferenceCodebase()) |
| 223 | showChunksReferences(); |
| 224 | finished = true; |
| 225 | }); |
| 226 | connect(ChatManager::instance(), &ChatManager::requestStop, this, |
| 227 | [=]() { |
| 228 | finished = true; |
| 229 | }); |
| 230 | } |
| 231 | |
| 232 | void MessageComponent::waitForAnswer() |
| 233 | { |
nothing calls this directly
no test coverage detected