diff --git a/src/libs/registry/docsetmetadata.cpp b/src/libs/registry/docsetmetadata.cpp index e1b2b68..2f9988e 100644 --- a/src/libs/registry/docsetmetadata.cpp +++ b/src/libs/registry/docsetmetadata.cpp @@ -27,6 +27,9 @@ #include #include #include +#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) +#include +#endif #include #include @@ -164,7 +167,11 @@ QUrl DocsetMetadata::feedUrl() const QUrl DocsetMetadata::url() const { +#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) + return m_urls.at(QRandomGenerator::global()->bounded(m_urls.size())); +#else return m_urls.at(qrand() % m_urls.size()); +#endif } QList DocsetMetadata::urls() const