[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#865861: python-kde4: Qtwebkit not available breaks importing plasma module



Hi,

I created the attached patch and put it in the debian/patches directory and 
recompiled the package provided in stretch. 
This one allows importing of plasma from PyKDE4 now. 
The build-depends: libqtwebkit-dev is also not necessary anymore. 


Greetings
Leszek



Am Montag, 26. Juni 2017, 11:38:09 schrieben Sie:
> On Monday, June 26, 2017 05:21:00 PM you wrote:
> > Am 25.06.2017 um 21:41 schrieb Scott Kitterman:
> > > On June 25, 2017 7:24:58 AM EDT, ZevenOS <leszek@zevenos.com> wrote:
> > >> Package: python-kde4
> > >> Version: 4:4.14.3-2
> > >> Severity: grave
> > >> Justification: renders package unusable
> > >> 
> > >> Dear Maintainer,
> > >> 
> > >>   * What led up to the situation?
> > >> 
> > >> Importing Plasma in python scripts throws an error
> > >> 
> > >>   * What exactly did you do (or not do) that was effective (or
> > >>   
> > >>     ineffective)?
> > > >
> > > >from PyKDE4.plasma import *
> > > >
> > >> fails
> > > 
> > > I think the error here is not removing PyKDE4.plasma from the package
> > > entirely.  Since Stretch ships Qt5 based Plasma, the Qt4 based PyKDE4
> > > will never work with it.
> > > 
> > > The WebKit removal was intentional due to lack of upstream support and
> > > known security vulnerabilities.
> > > 
> > > Scott K
> > 
> > It would be better to dissect the PyKDE4.plasma package and remove only
> > the component (it should be the plasma webview) which needs qtwebkit.
> > 
> > PyKDE4 and its plasma module works just fine in parallel to plasma 5 for
> > some older applications that still use the old pykde4.plasma components.
> > (except the webview part)
> 
> OK.  PyKDE4 will almost certainly be removed entirely in Buster and is dead
> upstream, so this is a Stretch only issue.  If you can produce a patch, I'll
> take care of getting the fix into Stretch.  I'm unlikely to have the time
> to develop a patch on my own.
> 
> Scott K

-- 
ZevenOS / Neptune Team
http://www.zevenos.com / http://www.neptuneos.com
Leszek Lesner <leszek@zevenos.com>
--- pykde4-4.14.3.orig/CMakeLists.txt
+++ pykde4-4.14.3/CMakeLists.txt
@@ -91,7 +91,6 @@ include_directories(
     ${QT_QTSQL_INCLUDE_DIR}
     ${QT_QTXML_INCLUDE_DIR}
     ${QT_QTSVG_INCLUDE_DIR}
-    ${QT_QTWEBKIT_INCLUDE_DIR}
     ${KDE4_INCLUDE_DIR}
     ${KDE4_INCLUDE_DIR}/solid
     ${KDE4_INCLUDE_DIR}/kio
--- pykde4-4.14.3.orig/sip/plasma/abstractrunner.sip
+++ pykde4-4.14.3/sip/plasma/abstractrunner.sip
@@ -94,7 +94,6 @@
 #include <plasma/view.h>
 #include <plasma/wallpaper.h>
 #include <plasma/scripting/wallpaperscript.h>
-#include <plasma/widgets/webview.h>
 %End
 
 namespace Plasma
@@ -288,8 +287,6 @@ protected:
         sipType = sipType_Plasma_SvgWidget;
     else if (dynamic_cast<Plasma::TabBar*>(sipCpp))
         sipType = sipType_Plasma_TabBar;
-    else if (dynamic_cast<Plasma::WebView*>(sipCpp))
-        sipType = sipType_Plasma_WebView;
     else if (dynamic_cast<Plasma::CheckBox*>(sipCpp))
         sipType = sipType_Plasma_CheckBox;
     else if (dynamic_cast<Plasma::ComboBox*>(sipCpp))
--- pykde4-4.14.3.orig/sip/plasma/animation.sip
+++ pykde4-4.14.3/sip/plasma/animation.sip
@@ -163,8 +163,6 @@ protected:
         sipType = sipType_Plasma_SvgWidget;
     else if (dynamic_cast<Plasma::TabBar*>(sipCpp))
         sipType = sipType_Plasma_TabBar;
-    else if (dynamic_cast<Plasma::WebView*>(sipCpp))
-        sipType = sipType_Plasma_WebView;
     else if (dynamic_cast<Plasma::CheckBox*>(sipCpp))
         sipType = sipType_Plasma_CheckBox;
     else if (dynamic_cast<Plasma::ComboBox*>(sipCpp))
@@ -292,5 +290,4 @@ public:
 #include <plasma/view.h>
 #include <plasma/wallpaper.h>
 #include <plasma/scripting/wallpaperscript.h>
-#include <plasma/widgets/webview.h>
 %End
--- pykde4-4.14.3.orig/sip/plasma/plasmamod.sip
+++ pykde4-4.14.3/sip/plasma/plasmamod.sip
@@ -27,7 +27,6 @@
 %Import QtGui/QtGuimod.sip
 %Import QtNetwork/QtNetworkmod.sip
 %Import QtSvg/QtSvgmod.sip
-%Import QtWebKit/QtWebKitmod.sip
 %Import QtXml/QtXmlmod.sip
 %Import QtDeclarative/QtDeclarativemod.sip
 %Import QtScript/QtScriptmod.sip
@@ -116,5 +115,4 @@
 %Include toolbutton.sip
 %Include treeview.sip
 %Include videowidget.sip
-%Include webview.sip
 %Include windoweffects.sip
--- pykde4-4.14.3.orig/sip/plasma/webview.sip
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2008 Simon Edwards <simon@simonzone.com>
-
-//                 Generated by twine
-
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU Library General Public License as
-// published by the Free Software Foundation; either version 2, 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 Library 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.
-
-
-namespace Plasma
-{
-
-class WebView : QGraphicsWidget
-{
-%TypeHeaderCode
-#include <plasma/widgets/webview.h>
-%End
-
-
-public:
-    explicit                WebView (QGraphicsItem* parent = 0);
-    void                    setUrl (const KUrl& url);
-    KUrl                    url () const;
-//ig    void                    setHtml (const QByteArray& html, const KUrl& baseUrl = KUrl());
-    QString                 html () const;
-    void                    setHtml (const QString& html, const KUrl& baseUrl = KUrl());
-    QRectF                  geometry () const;
-    void                    setPage (QWebPage* page);
-    QWebPage*               page () const;
-    QWebFrame*              mainFrame () const;
-    void                    setDragToScroll (bool drag);
-    bool                    dragToScroll ();
-    void                    setGeometry (const QRectF& geometry);
-
-signals:
-    void                    loadProgress (int percent);
-    void                    loadFinished (bool success);
-
-protected:
-    void                    paint (QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
-    void                    mouseMoveEvent (QGraphicsSceneMouseEvent* event);
-    void                    hoverMoveEvent (QGraphicsSceneHoverEvent* event);
-    void                    mousePressEvent (QGraphicsSceneMouseEvent* event);
-    void                    mouseDoubleClickEvent (QGraphicsSceneMouseEvent* event);
-    void                    mouseReleaseEvent (QGraphicsSceneMouseEvent* event);
-    void                    contextMenuEvent (QGraphicsSceneContextMenuEvent* event);
-    void                    wheelEvent (QGraphicsSceneWheelEvent* event);
-    void                    keyPressEvent (QKeyEvent* event);
-    void                    keyReleaseEvent (QKeyEvent* event);
-    void                    focusInEvent (QFocusEvent* event);
-    void                    focusOutEvent (QFocusEvent* event);
-    void                    dragEnterEvent (QGraphicsSceneDragDropEvent* event);
-    void                    dragLeaveEvent (QGraphicsSceneDragDropEvent* event);
-    void                    dragMoveEvent (QGraphicsSceneDragDropEvent* event);
-    void                    dropEvent (QGraphicsSceneDragDropEvent* event);
-public:
-    ~WebView ();
-    QSizeF                  contentsSize () const;
-    void                    setScrollPosition (const QPointF& position);
-    QPointF                 scrollPosition () const;
-    QRectF                  viewportGeometry () const;
-protected:
-    QSizeF                  sizeHint (Qt::SizeHint which, const QSizeF& constraint) const;
-public:
-    qreal                   zoomFactor () const;
-    void                    setZoomFactor (const qreal zoom);
-protected:
-    QVariant                itemChange (QGraphicsItem::GraphicsItemChange change, const QVariant& value);
-public:
-    void                    back ();
-    void                    forward ();
-    void                    reload ();
-    void                    stop ();
-signals:
-    void                    urlChanged (const QUrl& url);
-};
-// WebView
-
-};
-// Plasma
-
-

Reply to: