public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: kde-apps/akregator/, kde-apps/akregator/files/
@ 2017-09-13 18:07 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2017-09-13 18:07 UTC (permalink / raw
  To: gentoo-commits

commit:     306013b2e3da22f8e58270e0cff7eaa11fb32b1d
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 13 17:57:49 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Sep 13 18:06:50 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=306013b2

kde-apps/akregator: Fix file corruption, crashes

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 kde-apps/akregator/akregator-17.08.1-r1.ebuild     | 58 ++++++++++++++++++++++
 .../files/akregator-17.08.1-corruption.patch       | 44 ++++++++++++++++
 2 files changed, 102 insertions(+)

diff --git a/kde-apps/akregator/akregator-17.08.1-r1.ebuild b/kde-apps/akregator/akregator-17.08.1-r1.ebuild
new file mode 100644
index 00000000000..de2fc23e16c
--- /dev/null
+++ b/kde-apps/akregator/akregator-17.08.1-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="forceoptional"
+KDE_TEST="forceoptional"
+inherit kde5
+
+DESCRIPTION="News feed aggregator"
+HOMEPAGE="https://www.kde.org/applications/internet/akregator"
+LICENSE="GPL-2+ handbook? ( FDL-1.2+ )"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+# drop qtwebengine subslot operator when QT_MINIMAL >= 5.8.0
+COMMON_DEPEND="
+	$(add_frameworks_dep kcmutils)
+	$(add_frameworks_dep kcodecs)
+	$(add_frameworks_dep kcompletion)
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kconfigwidgets)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep kcrash)
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kio)
+	$(add_frameworks_dep kjobwidgets)
+	$(add_frameworks_dep knotifications)
+	$(add_frameworks_dep knotifyconfig)
+	$(add_frameworks_dep kparts)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep ktextwidgets)
+	$(add_frameworks_dep kwidgetsaddons)
+	$(add_frameworks_dep kxmlgui)
+	$(add_kdeapps_dep grantleetheme)
+	$(add_kdeapps_dep kontactinterface)
+	$(add_kdeapps_dep kpimtextedit)
+	$(add_kdeapps_dep libkdepim)
+	$(add_kdeapps_dep messagelib)
+	$(add_kdeapps_dep pimcommon)
+	$(add_kdeapps_dep syndication)
+	$(add_qt_dep qtdbus)
+	$(add_qt_dep qtgui)
+	$(add_qt_dep qtnetwork)
+	$(add_qt_dep qtwebengine '' '' '5=')
+	$(add_qt_dep qtwidgets)
+	$(add_qt_dep qtxml)
+"
+DEPEND="${COMMON_DEPEND}
+	dev-libs/grantlee:5
+"
+RDEPEND="${COMMON_DEPEND}
+	!kde-apps/kdepim-l10n
+"
+
+PATCHES=( "${FILESDIR}/${P}-corruption.patch" )

diff --git a/kde-apps/akregator/files/akregator-17.08.1-corruption.patch b/kde-apps/akregator/files/akregator-17.08.1-corruption.patch
new file mode 100644
index 00000000000..f2e9d75a3c3
--- /dev/null
+++ b/kde-apps/akregator/files/akregator-17.08.1-corruption.patch
@@ -0,0 +1,44 @@
+From d0a5f4159cddcca656ca8bbcbd6e551e3499c166 Mon Sep 17 00:00:00 2001
+From: Anthony Fieroni <bvbfan@abv.bg>
+Date: Sun, 10 Sep 2017 21:59:35 +0300
+Subject: [akregator] Make sure part is created before main windows is restored
+
+DIfferential Revision: https://phabricator.kde.org/D6739
+
+BUG: 381822
+BUG: 378513
+BUG: 381825
+BUG: 377129
+
+Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
+---
+ src/main.cpp | 13 +++++--------
+ 1 file changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index b80b198..aa1bb08 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -113,14 +113,11 @@ int main(int argc, char **argv)
+ 
+     // see if we are starting with session management
+     if (app.isSessionRestored()) {
+-#undef RESTORE
+-#define RESTORE(type) { int n = 1; \
+-                        while (KMainWindow::canBeRestored(n)) { \
+-                            (new type)->restore(n, false); \
+-                            n++;} \
+-}
+-
+-        RESTORE(Akregator::MainWindow);
++        auto mainWindow = new Akregator::MainWindow();
++        mainWindow->loadPart();
++        if (KMainWindow::canBeRestored(1)) {
++            mainWindow->restore(1, false);
++        }
+     }
+ 
+     return app.exec();
+-- 
+cgit v0.11.2
+


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/akregator/, kde-apps/akregator/files/
@ 2018-10-05 22:42 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2018-10-05 22:42 UTC (permalink / raw
  To: gentoo-commits

commit:     6d9d48a6e22660c15e07daf03c8319d2741f071a
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  5 22:40:56 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Oct  5 22:42:04 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d9d48a6

kde-apps/akregator: Fix build with kde-frameworks/syndication

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
Package-Manager: Portage-2.3.50, Repoman-2.3.11

 kde-apps/akregator/akregator-18.04.3-r1.ebuild     |  60 ++++++
 .../files/akregator-18.04.3-syndication.patch      | 222 +++++++++++++++++++++
 2 files changed, 282 insertions(+)

diff --git a/kde-apps/akregator/akregator-18.04.3-r1.ebuild b/kde-apps/akregator/akregator-18.04.3-r1.ebuild
new file mode 100644
index 00000000000..8f0cffe52ef
--- /dev/null
+++ b/kde-apps/akregator/akregator-18.04.3-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="forceoptional"
+KDE_TEST="forceoptional"
+inherit kde5
+
+DESCRIPTION="News feed aggregator"
+HOMEPAGE="https://www.kde.org/applications/internet/akregator"
+LICENSE="GPL-2+ handbook? ( FDL-1.2+ )"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+COMMON_DEPEND="
+	$(add_frameworks_dep kcmutils)
+	$(add_frameworks_dep kcodecs)
+	$(add_frameworks_dep kcompletion)
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kconfigwidgets)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep kcrash)
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kio)
+	$(add_frameworks_dep kjobwidgets)
+	$(add_frameworks_dep knotifications)
+	$(add_frameworks_dep knotifyconfig)
+	$(add_frameworks_dep kparts)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep ktextwidgets)
+	$(add_frameworks_dep kwidgetsaddons)
+	$(add_frameworks_dep kxmlgui)
+	$(add_frameworks_dep syndication)
+	$(add_kdeapps_dep grantleetheme)
+	$(add_kdeapps_dep kontactinterface)
+	$(add_kdeapps_dep kpimtextedit)
+	$(add_kdeapps_dep libkdepim)
+	$(add_kdeapps_dep messagelib)
+	$(add_kdeapps_dep pimcommon)
+	$(add_qt_dep qtdbus)
+	$(add_qt_dep qtgui)
+	$(add_qt_dep qtnetwork)
+	$(add_qt_dep qtwebengine)
+	$(add_qt_dep qtwidgets)
+	$(add_qt_dep qtxml)
+"
+DEPEND="${COMMON_DEPEND}
+	dev-libs/grantlee:5
+"
+RDEPEND="${COMMON_DEPEND}
+	!kde-apps/kdepim-l10n
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-17.12.2-crashfix.patch"
+	"${FILESDIR}/${P}-syndication.patch"
+)

diff --git a/kde-apps/akregator/files/akregator-18.04.3-syndication.patch b/kde-apps/akregator/files/akregator-18.04.3-syndication.patch
new file mode 100644
index 00000000000..f20f8fffa93
--- /dev/null
+++ b/kde-apps/akregator/files/akregator-18.04.3-syndication.patch
@@ -0,0 +1,222 @@
+From d2797fe48b6d4429cd30163fd75003118400511f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <dvratil@kde.org>
+Date: Sun, 22 Apr 2018 09:13:45 +0200
+Subject: Port away from remove Syndication API
+
+---
+ src/CMakeLists.txt         |  1 +
+ src/akregator_part.cpp     | 10 ------
+ src/feed/feed.cpp          |  3 +-
+ src/feed/feedretriever.cpp | 78 ++++++++++++++++++++++++++++++++++++++++++++++
+ src/feed/feedretriever.h   | 54 ++++++++++++++++++++++++++++++++
+ 5 files changed, 135 insertions(+), 11 deletions(-)
+ create mode 100644 src/feed/feedretriever.cpp
+ create mode 100644 src/feed/feedretriever.h
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 86af10e..312daee 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -86,6 +86,7 @@ set(akregatorprivate_LIB_SRCS
+     article.cpp
+     feed/feed.cpp
+     feed/feedlist.cpp
++    feed/feedretriever.cpp
+     treenode.cpp
+     treenodevisitor.cpp
+     utils.cpp
+diff --git a/src/akregator_part.cpp b/src/akregator_part.cpp
+index 74acfab..afde53f 100644
+--- a/src/akregator_part.cpp
++++ b/src/akregator_part.cpp
+@@ -259,14 +259,6 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &)
+     connect(m_autosaveTimer, &QTimer::timeout, this, &Part::slotSaveFeedList);
+     m_autosaveTimer->start(5 * 60 * 1000); // 5 minutes
+ 
+-    QString useragent = QStringLiteral("Akregator/%1; syndication").arg(QStringLiteral(AKREGATOR_VERSION));
+-
+-    if (!Settings::customUserAgent().isEmpty()) {
+-        useragent = Settings::customUserAgent();
+-    }
+-
+-    Syndication::FileRetriever::setUserAgent(useragent);
+-
+     loadPlugins(QStringLiteral("extension"));   // FIXME: also unload them!
+     if (mCentralWidget->previousSessionCrashed()) {
+         mCentralWidget->needToRestoreCrashedSession();
+@@ -361,8 +353,6 @@ void Part::slotSettingsChanged()
+         m_actionManager->setTrayIcon(nullptr);
+     }
+ 
+-    Syndication::FileRetriever::setUseCache(Settings::useHTMLCache());
+-
+     const QStringList fonts {
+         Settings::standardFont(),
+         Settings::fixedFont(),
+diff --git a/src/feed/feed.cpp b/src/feed/feed.cpp
+index 87ba473..774f506 100644
+--- a/src/feed/feed.cpp
++++ b/src/feed/feed.cpp
+@@ -36,6 +36,7 @@
+ #include "treenodevisitor.h"
+ #include "types.h"
+ #include "utils.h"
++#include "feedretriever.h"
+ 
+ #include <Syndication/Syndication>
+ 
+@@ -681,7 +682,7 @@ void Akregator::Feed::tryFetch()
+     d->loader = Syndication::Loader::create(this, SLOT(fetchCompleted(Syndication::Loader *,
+                                                                       Syndication::FeedPtr,
+                                                                       Syndication::ErrorCode)));
+-    d->loader->loadFrom(QUrl(d->xmlUrl));
++    d->loader->loadFrom(QUrl(d->xmlUrl), new FeedRetriever());
+ }
+ 
+ void Akregator::Feed::slotImageFetched(const QPixmap &image)
+diff --git a/src/feed/feedretriever.cpp b/src/feed/feedretriever.cpp
+new file mode 100644
+index 0000000..62526c4
+--- /dev/null
++++ b/src/feed/feedretriever.cpp
+@@ -0,0 +1,78 @@
++/*
++    This file is part of Akregator.
++
++    Copyright (C) 2018 Daniel Vrátil <dvratil@kde.org>
++
++    This program is free software; you can redistribute it and/or modify
++    it under the terms of the GNU General Public License as published by
++    the Free Software Foundation; either version 2 of the License, or
++    (at your option) any later version.
++
++    This program is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++    GNU General Public License for more details.
++
++    You should have received a copy of the GNU General Public License
++    along with this program; if not, write to the Free Software
++    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++
++    As a special exception, permission is given to link this program
++    with any edition of Qt, and distribute the resulting executable,
++    without including the source code for Qt in the source distribution.
++*/
++
++#include "feedretriever.h"
++#include "akregatorconfig.h"
++#include "akregator-version.h"
++
++#include <KIO/StoredTransferJob>
++
++#include <QUrl>
++
++using namespace Akregator;
++
++FeedRetriever::FeedRetriever()
++    : Syndication::DataRetriever()
++{
++}
++
++void FeedRetriever::retrieveData(const QUrl &url)
++{
++    QString userAgent = QStringLiteral("Akregator/%1; syndication").arg(QStringLiteral(AKREGATOR_VERSION));
++    if (!Settings::customUserAgent().isEmpty()) {
++        userAgent = Settings::customUserAgent();
++    }
++    bool useCache = Settings::useHTMLCache();
++
++    auto job = KIO::storedGet(url, KIO::NoReload, KIO::HideProgressInfo);
++    job->addMetaData(QStringLiteral("UserAgent"), userAgent);
++    job->addMetaData(QStringLiteral("cache"), useCache ? QStringLiteral("refresh") : QStringLiteral("reload"));
++    connect(job, &KJob::result, this, &FeedRetriever::getFinished);
++    mJob = job;
++    mJob->start();
++}
++
++int FeedRetriever::errorCode() const
++{
++    return mError;
++}
++
++void FeedRetriever::abort()
++{
++    if (mJob) {
++        mJob->kill();
++        mJob = nullptr;
++    }
++}
++
++void FeedRetriever::getFinished(KJob *job)
++{
++    if (job->error()) {
++        mError = job->error();
++        Q_EMIT dataRetrieved({}, false);
++        return;
++    }
++
++    Q_EMIT dataRetrieved(static_cast<KIO::StoredTransferJob*>(job)->data(), true);
++}
+diff --git a/src/feed/feedretriever.h b/src/feed/feedretriever.h
+new file mode 100644
+index 0000000..3a0ff3d
+--- /dev/null
++++ b/src/feed/feedretriever.h
+@@ -0,0 +1,54 @@
++/*
++    This file is part of Akregator.
++
++    Copyright (C) 2018 Daniel Vrátil <dvratil@kde.org>
++
++    This program is free software; you can redistribute it and/or modify
++    it under the terms of the GNU General Public License as published by
++    the Free Software Foundation; either version 2 of the License, or
++    (at your option) any later version.
++
++    This program is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++    GNU General Public License for more details.
++
++    You should have received a copy of the GNU General Public License
++    along with this program; if not, write to the Free Software
++    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++
++    As a special exception, permission is given to link this program
++    with any edition of Qt, and distribute the resulting executable,
++    without including the source code for Qt in the source distribution.
++*/
++
++#ifndef FEEDRETRIEVER_H_
++#define FEEDRETRIEVER_H_
++
++#include <syndication/dataretriever.h>
++
++class KJob;
++
++namespace Akregator {
++
++class FeedRetriever : public Syndication::DataRetriever
++{
++    Q_OBJECT
++public:
++    explicit FeedRetriever();
++
++    void retrieveData(const QUrl &url) override;
++    void abort() override;
++    int errorCode() const override;
++
++private Q_SLOTS:
++    void getFinished(KJob *job);
++
++private:
++    KJob *mJob = nullptr;
++    int mError = 0;
++};
++
++}
++
++#endif
+-- 
+cgit v0.11.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/akregator/, kde-apps/akregator/files/
@ 2018-12-16  9:47 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2018-12-16  9:47 UTC (permalink / raw
  To: gentoo-commits

commit:     b38e359348f8e7362532e19eb3e602348f9b5554
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 15 22:03:38 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Dec 16 09:46:59 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b38e3593

kde-apps/akregator: Fix crash with Qt-5.11+

KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=371511
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-apps/akregator/akregator-18.12.0-r1.ebuild     | 57 +++++++++++++++
 .../files/akregator-18.12.0-qt-5.11-crashfix.patch | 81 ++++++++++++++++++++++
 2 files changed, 138 insertions(+)

diff --git a/kde-apps/akregator/akregator-18.12.0-r1.ebuild b/kde-apps/akregator/akregator-18.12.0-r1.ebuild
new file mode 100644
index 00000000000..d1132436997
--- /dev/null
+++ b/kde-apps/akregator/akregator-18.12.0-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="forceoptional"
+KDE_TEST="forceoptional"
+inherit kde5
+
+DESCRIPTION="News feed aggregator"
+HOMEPAGE="https://www.kde.org/applications/internet/akregator"
+LICENSE="GPL-2+ handbook? ( FDL-1.2+ )"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+COMMON_DEPEND="
+	$(add_frameworks_dep kcmutils)
+	$(add_frameworks_dep kcodecs)
+	$(add_frameworks_dep kcompletion)
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kconfigwidgets)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep kcrash)
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kio)
+	$(add_frameworks_dep kjobwidgets)
+	$(add_frameworks_dep knotifications)
+	$(add_frameworks_dep knotifyconfig)
+	$(add_frameworks_dep kparts)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep ktextwidgets)
+	$(add_frameworks_dep kwidgetsaddons)
+	$(add_frameworks_dep kxmlgui)
+	$(add_frameworks_dep syndication)
+	$(add_kdeapps_dep grantleetheme)
+	$(add_kdeapps_dep kontactinterface)
+	$(add_kdeapps_dep kpimtextedit)
+	$(add_kdeapps_dep libkdepim)
+	$(add_kdeapps_dep messagelib)
+	$(add_kdeapps_dep pimcommon)
+	$(add_qt_dep qtdbus)
+	$(add_qt_dep qtgui)
+	$(add_qt_dep qtnetwork)
+	$(add_qt_dep qtwebengine)
+	$(add_qt_dep qtwidgets)
+	$(add_qt_dep qtxml)
+"
+DEPEND="${COMMON_DEPEND}
+	dev-libs/grantlee:5
+"
+RDEPEND="${COMMON_DEPEND}
+	!kde-apps/kdepim-l10n
+"
+
+PATCHES=( "${FILESDIR}/${P}-qt-5.11-crashfix.patch" )

diff --git a/kde-apps/akregator/files/akregator-18.12.0-qt-5.11-crashfix.patch b/kde-apps/akregator/files/akregator-18.12.0-qt-5.11-crashfix.patch
new file mode 100644
index 00000000000..f13512117a9
--- /dev/null
+++ b/kde-apps/akregator/files/akregator-18.12.0-qt-5.11-crashfix.patch
@@ -0,0 +1,81 @@
+From 91a4ab57a82970bd75eee4a7aee61a7e1c1321ef Mon Sep 17 00:00:00 2001
+From: Andras Mantia <andras@kdab.com>
+Date: Thu, 13 Dec 2018 17:32:52 +0200
+Subject: Don't crash with Qt 5.11+
+
+Summary:
+Based on the patch from https://bugs.kde.org/show_bug.cgi?id=371511
+See also https://bugreports.qt.io/browse/QTBUG-72260
+
+BUG: 371511
+
+Reviewers: PHID-PROJ-odxxyyfgujhgbu6ergrt, mlaurent
+
+Reviewed By: PHID-PROJ-odxxyyfgujhgbu6ergrt, mlaurent
+
+Subscribers: marten, asturmlechner, kfunk, kde-pim
+
+Tags: #kde_pim
+
+Differential Revision: https://phabricator.kde.org/D17563
+---
+ .../webengine/articleviewerwebengine.cpp           | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/src/articleviewer-ng/webengine/articleviewerwebengine.cpp b/src/articleviewer-ng/webengine/articleviewerwebengine.cpp
+index 2463fdf..174c09a 100644
+--- a/src/articleviewer-ng/webengine/articleviewerwebengine.cpp
++++ b/src/articleviewer-ng/webengine/articleviewerwebengine.cpp
+@@ -46,6 +46,7 @@
+ #include <QMenu>
+ #include <viewerplugintoolmanager.h>
+ #include <QWebEngineProfile>
++#include <QWebEngineUrlRequestInterceptor>
+ 
+ #include <WebEngineViewer/WebHitTestResult>
+ #include <WebEngineViewer/WebHitTest>
+@@ -57,6 +58,19 @@
+ 
+ using namespace Akregator;
+ 
++class AkregatorRequestInterceptor : public QWebEngineUrlRequestInterceptor
++{
++    Q_OBJECT
++
++public:
++    explicit AkregatorRequestInterceptor(QObject *parent = nullptr) : QWebEngineUrlRequestInterceptor(parent) {
++    }
++
++    void interceptRequest(QWebEngineUrlRequestInfo &info) override {
++        Q_UNUSED(info);
++    }
++};
++
+ ArticleViewerWebEngine::ArticleViewerWebEngine(KActionCollection *ac, QWidget *parent)
+     : WebEngineViewer::WebEngineView(parent)
+     , mActionCollection(ac)
+@@ -64,10 +78,16 @@ ArticleViewerWebEngine::ArticleViewerWebEngine(KActionCollection *ac, QWidget *p
+     , mViewerPluginToolManager(nullptr)
+ {
+     mNetworkAccessManager = new WebEngineViewer::InterceptorManager(this, ac, this);
++
+     QWebEngineProfile *profile = QWebEngineProfile::defaultProfile();
+     mPageEngine = new ArticleViewerWebEnginePage(profile, this);
+     profile->setPersistentCookiesPolicy(QWebEngineProfile::ForcePersistentCookies);
+ 
++    // Needed to workaround crash in webengine, see https://bugreports.qt.io/browse/QTBUG-72260
++    auto webEngineUrlInterceptor = new AkregatorRequestInterceptor();
++    profile->setRequestInterceptor(webEngineUrlInterceptor);
++    connect(profile, &QObject::destroyed, webEngineUrlInterceptor, &AkregatorRequestInterceptor::deleteLater);
++
+     setPage(mPageEngine);
+ 
+     connect(this, &ArticleViewerWebEngine::showContextMenu, this, &ArticleViewerWebEngine::slotShowContextMenu);
+@@ -494,3 +514,5 @@ void ArticleViewerWebEngine::slotActivatePlugin(MessageViewer::ViewerPluginInter
+     interface->setUrl(mCurrentUrl);
+     interface->execute();
+ }
++
++#include "articleviewerwebengine.moc"
+-- 
+cgit v1.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-16  9:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-16  9:47 [gentoo-commits] repo/gentoo:master commit in: kde-apps/akregator/, kde-apps/akregator/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2018-10-05 22:42 Andreas Sturmlechner
2017-09-13 18:07 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox