Hello community,

here is the log from the commit of package amarok for openSUSE:Factory checked 
in at 2015-07-19 11:44:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/amarok (Old)
 and      /work/SRC/openSUSE:Factory/.amarok.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "amarok"

Changes:
--------
--- /work/SRC/openSUSE:Factory/amarok/amarok.changes    2015-02-06 
22:36:31.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.amarok.new/amarok.changes       2015-07-19 
11:44:15.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Jul  9 09:50:57 UTC 2015 - [email protected]
+
+- Add Enable_Wikipedia_over_SSL.patch to make the Wikipedia applet
+  work again (boo#934730, kde#349313)
+  
+-------------------------------------------------------------------

New:
----
  Enable_Wikipedia_over_SSL.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ amarok.spec ++++++
--- /var/tmp/diff_new_pack.WC1V6a/_old  2015-07-19 11:44:17.000000000 +0200
+++ /var/tmp/diff_new_pack.WC1V6a/_new  2015-07-19 11:44:17.000000000 +0200
@@ -53,6 +53,8 @@
 Patch107:       0008-Clean-up-the-leftover-of-strigi-removal.patch
 # PATCH-FIX-OPENSUSE 0009-Fix-Ampache-plugin-connections.patch - Unbreak 
Ampache plugin login (under review upstream)
 Patch108:       0009-Fix-Ampache-plugin-connections.patch
+# PATCH-FIX-UPSTREAM Enable_Wikipedia_over_SSL.patch boo#934730, kde#349313 - 
Unbreak Wikipedia applet by enabling SSL
+Patch109:       Enable_Wikipedia_over_SSL.patch
 # Required for the fdupes macro
 BuildRequires:  fdupes
 BuildRequires:  gdk-pixbuf-devel
@@ -121,6 +123,7 @@
 %patch106 -p1
 %patch107 -p1
 %patch108 -p1
+%patch109 -p1
 
 # Remove build time references so build-compare can do its work
 FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{S:99} '+%%b %%e %%Y')

++++++ Enable_Wikipedia_over_SSL.patch ++++++
From: Frank Meerkötter <[email protected]>
Date: Thu, 12 Sep 2013 19:44:03 +0000
Subject: Enable Wikipedia over SSL.
X-Git-Tag: v2.8.90
X-Git-Url: 
http://quickgit.kde.org/?p=amarok.git&a=commitdiff&h=284342b48dc32341c3553fd2b0ee5069d75b58f9
---
Enable Wikipedia over SSL.

This patch makes SSL the default. It also adds a checkbox to disable
it so if there would be a problem a fallback to HTTP is possible.

BUG: 322249
REVIEW: 112706
FIXED-IN: 2.9
---


--- a/src/context/applets/wikipedia/WikipediaApplet.cpp
+++ b/src/context/applets/wikipedia/WikipediaApplet.cpp
@@ -250,11 +250,14 @@
     }
     langList = list;
     useMobileWikipedia = (generalSettingsUi.mobileCheckBox->checkState() == 
Qt::Checked);
+    useSSL = (generalSettingsUi.sslCheckBox->checkState() == Qt::Checked);
     Amarok::config("Wikipedia Applet").writeEntry( "PreferredLang", list );
     Amarok::config("Wikipedia Applet").writeEntry( "UseMobile", 
useMobileWikipedia );
+    Amarok::config( "Wikipedia Applet" ).writeEntry( "UseSSL", useSSL );
     _paletteChanged( App::instance()->palette() );
     dataContainer->setData( "lang", langList );
     dataContainer->setData( "mobile", useMobileWikipedia );
+    dataContainer->setData( "ssl", useSSL );
     scheduleEngineUpdate();
 }
 
@@ -656,9 +659,11 @@
     // Read config and inform the engine.
     d->langList = Amarok::config("Wikipedia Applet").readEntry( 
"PreferredLang", QStringList() << "en" );
     d->useMobileWikipedia = Amarok::config("Wikipedia Applet").readEntry( 
"UseMobile", false );
+    d->useSSL = Amarok::config( "Wikipedia Applet" ).readEntry( "UseSSL", true 
);
     d->_paletteChanged( App::instance()->palette() );
     d->dataContainer->setData( "lang", d->langList );
     d->dataContainer->setData( "mobile", d->useMobileWikipedia );
+    d->dataContainer->setData( "ssl", d->useSSL );
     d->scheduleEngineUpdate();
 
     updateConstraints();
@@ -787,6 +792,7 @@
     QWidget *genSettings = new QWidget;
     d->generalSettingsUi.setupUi( genSettings );
     d->generalSettingsUi.mobileCheckBox->setCheckState( d->useMobileWikipedia 
? Qt::Checked : Qt::Unchecked );
+    d->generalSettingsUi.sslCheckBox->setCheckState( d->useSSL ? Qt::Checked : 
Qt::Unchecked );
 
     connect( d->languageSettingsUi.downloadButton, SIGNAL(clicked()), this, 
SLOT(_getLangMap()) );
     connect( parent, SIGNAL(okClicked()), this, SLOT(_loadSettings()) );

--- a/src/context/applets/wikipedia/WikipediaApplet_p.h
+++ b/src/context/applets/wikipedia/WikipediaApplet_p.h
@@ -143,6 +143,7 @@
     bool isForwardHistory;
     bool isBackwardHistory;
     bool useMobileWikipedia;
+    bool useSSL;
 };
 
 class WikipediaSearchLineEdit : public Plasma::LineEdit

--- a/src/context/applets/wikipedia/wikipediaGeneralSettings.ui
+++ b/src/context/applets/wikipedia/wikipediaGeneralSettings.ui
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>244</width>
-    <height>23</height>
+    <width>253</width>
+    <height>62</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -32,6 +32,13 @@
        </property>
       </widget>
      </item>
+     <item row="1" column="1">
+      <widget class="QCheckBox" name="sslCheckBox">
+       <property name="text">
+        <string>Use &amp;SSL</string>
+       </property>
+      </widget>
+     </item>
     </layout>
    </item>
   </layout>

--- a/src/context/engines/wikipedia/WikipediaEngine.cpp
+++ b/src/context/engines/wikipedia/WikipediaEngine.cpp
@@ -45,6 +45,7 @@
         : q_ptr( parent )
         , currentSelection( Artist )
         , useMobileVersion( false )
+        , useSSL( true )
         , dataContainer( 0 )
     {}
     ~WikipediaEnginePrivate() {}
@@ -88,6 +89,7 @@
         }
     } m_previousTrackMetadata;
     bool useMobileVersion;
+    bool useSSL;
 
     Plasma::DataContainer *dataContainer;
 
@@ -165,6 +167,16 @@
         {
             debug() << (mobile ? "switching to mobile wikipedia" : "switching 
to normal wikipedia");
             useMobileVersion = mobile;
+            updateEngine();
+        }
+    }
+
+    if( data.contains( QLatin1String("ssl") ) )
+    {
+        const bool ssl = data.value( QLatin1String("ssl") ).toBool();
+        if( ssl != useSSL )
+        {
+            useSSL = ssl;
             updateEngine();
         }
     }
@@ -532,7 +544,7 @@
     Q_Q( WikipediaEngine );
     KUrl pageUrl;
     QString host( ".wikipedia.org" );
-    pageUrl.setScheme( QLatin1String("http") );
+    pageUrl.setScheme( useSSL ? QLatin1String( "https" ) : QLatin1String( 
"http" ) );
 
     if( useMobileVersion )
     {
@@ -570,7 +582,7 @@
 {
     Q_Q( WikipediaEngine );
     KUrl url;
-    url.setScheme( QLatin1String("http") );
+    url.setScheme( useSSL ? QLatin1String( "https" ) : QLatin1String( "http" ) 
);
     url.setHost( hostLang + QLatin1String(".wikipedia.org") );
     url.setPath( QLatin1String("/w/api.php") );
     url.addQueryItem( QLatin1String("action"), QLatin1String("query") );
@@ -592,7 +604,7 @@
 {
     Q_Q( WikipediaEngine );
     KUrl url;
-    url.setScheme( QLatin1String("http") );
+    url.setScheme( useSSL ? QLatin1String( "https" ) : QLatin1String( "http" ) 
);
     url.setHost( hostLang + QLatin1String(".wikipedia.org") );
     url.setPath( QLatin1String("/w/api.php") );
     url.addQueryItem( QLatin1String("action"), QLatin1String("query") );


Reply via email to