mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-23 23:27:12 -08:00
kde-frameworks/attica: drop 5.86.0*
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
@@ -1,3 +1,2 @@
|
||||
DIST attica-5.85.0.tar.xz 66672 BLAKE2B 61e3ca48058f615af27fd7ad226c2a3ad6a05ae6edb1e1e59ed4dded937ec24a5115780fe128011bb983d83d3d7e3603a1780a5b15dadbceb95165f05e2fd1e6 SHA512 a6f64c51bd0b6a8eb739db198b6db7f5c91f3276912a0bba8b20bbca526738b6e8baea24e6f4502cd0f96b1fc704f4a61445dde0acd645776052527d376215bc
|
||||
DIST attica-5.86.0.tar.xz 66608 BLAKE2B 631c6c779a931ad8bd12cc48db707463ffba69b1f7f003c85dd0e619362dcc53e2ee7a31467f60b87380ef8ae5441138b16a88df630789925f3859a2e4881219 SHA512 aff74d1bbde5ad10f007f3f51f7bf0346746fd6fd5ca37745001257a72b04bb02a08bd61f03891edc13fbb11975833d1fa1ced6dcc116f9435a544dc9e6d5d47
|
||||
DIST attica-5.87.0.tar.xz 67080 BLAKE2B 90b1e2e7113867cee5e302f1bc82becbb406c848129c69986914e9cff68485ff0e111536057bb33be363802b1d5f5ba34181940452eadeb4934175c4b3ff2740 SHA512 211ee8256bd5da4a21cf4afe513557e4be878b2f84c5b9848e929df62d18573bfcbab5128b998d9eb00c8f5e54c65da768a5e017b4e2e27105ad3efaeca7a172
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
QTMIN=5.15.2
|
||||
inherit ecm kde.org
|
||||
|
||||
DESCRIPTION="Framework providing access to Open Collaboration Services"
|
||||
LICENSE="LGPL-2.1+"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
>=dev-qt/qtnetwork-${QTMIN}:5
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${P}-fetch-categories.xml-only-once.patch" )
|
||||
|
||||
src_test() {
|
||||
# requires network access, bug #661230
|
||||
local myctestargs=(
|
||||
-E "(providertest)"
|
||||
)
|
||||
|
||||
ecm_src_test
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
commit 7c38c8cf28a4d0d667e23ddfaaf38a955d65bf3e
|
||||
Author: Aleix Pol <aleixpol@kde.org>
|
||||
Date: Wed Sep 22 16:19:39 2021 +0200
|
||||
|
||||
Ensure categories.xml is only fetched once in parallel
|
||||
|
||||
Otherwise we overload the server that is returning them fairly slowly
|
||||
anyway (2 to 3 seconds?). It seems like it serves these sequentially as
|
||||
well, which makes Discover startup stuttery.
|
||||
|
||||
diff --git a/src/atticabasejob.cpp b/src/atticabasejob.cpp
|
||||
index 99acf4f..e65d556 100644
|
||||
--- a/src/atticabasejob.cpp
|
||||
+++ b/src/atticabasejob.cpp
|
||||
@@ -26,6 +26,7 @@ public:
|
||||
PlatformDependent *m_internals;
|
||||
QNetworkReply *m_reply;
|
||||
bool aborted{false};
|
||||
+ bool started = false;
|
||||
|
||||
Private(PlatformDependent *internals)
|
||||
: m_internals(internals)
|
||||
@@ -120,7 +121,10 @@ void BaseJob::dataFinished()
|
||||
|
||||
void BaseJob::start()
|
||||
{
|
||||
- QTimer::singleShot(0, this, &BaseJob::doWork);
|
||||
+ if (!d->started) {
|
||||
+ d->started = true;
|
||||
+ QTimer::singleShot(0, this, &BaseJob::doWork);
|
||||
+ }
|
||||
}
|
||||
|
||||
void BaseJob::doWork()
|
||||
diff --git a/src/provider.cpp b/src/provider.cpp
|
||||
index 9e4da64..b994ce9 100644
|
||||
--- a/src/provider.cpp
|
||||
+++ b/src/provider.cpp
|
||||
@@ -64,6 +64,7 @@
|
||||
#include <QFile>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
+#include <QThreadStorage>
|
||||
#include <QUrlQuery>
|
||||
|
||||
using namespace Attica;
|
||||
@@ -1134,8 +1135,18 @@ ListJob<Category> *Provider::requestCategories()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
- QUrl url = createUrl(QLatin1String("content/categories"));
|
||||
- ListJob<Category> *job = new ListJob<Category>(d->m_internals, createRequest(url));
|
||||
+ const QUrl url = createUrl(QLatin1String("content/categories"));
|
||||
+
|
||||
+ // Thread-local cache of categories requests. They are fairly slow and block startup
|
||||
+ static QThreadStorage<QHash<QUrl, ListJob<Category> *>> reqs;
|
||||
+ ListJob<Category> *job = reqs.localData().value(url);
|
||||
+ if (!job) {
|
||||
+ job = new ListJob<Category>(d->m_internals, createRequest(url));
|
||||
+ QObject::connect(job, &BaseJob::finished, [url] {
|
||||
+ reqs.localData().remove(url);
|
||||
+ });
|
||||
+ reqs.localData().insert(url, job);
|
||||
+ }
|
||||
return job;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user