* @brief Handles the examples.json manifest fetch response. */
| 233 | * @brief Handles the examples.json manifest fetch response. |
| 234 | */ |
| 235 | void Misc::Examples::onManifestReply() |
| 236 | { |
| 237 | auto* reply = qobject_cast<QNetworkReply*>(sender()); |
| 238 | if (!reply) |
| 239 | return; |
| 240 | |
| 241 | reply->deleteLater(); |
| 242 | |
| 243 | if (reply->error() == QNetworkReply::NoError) { |
| 244 | const auto doc = QJsonDocument::fromJson(reply->readAll()); |
| 245 | m_allExamples = doc.array(); |
| 246 | applyFilter(); |
| 247 | } |
| 248 | |
| 249 | m_loading = false; |
| 250 | Q_EMIT loadingChanged(); |
| 251 | } |
| 252 | |
| 253 | /** |
| 254 | * @brief Handles the README.md fetch response and caches it. |