[choqok: 1/2] apply upstream patch for rhbz #691237
Sven Lankes
slankes at fedoraproject.org
Sun Mar 27 21:06:00 UTC 2011
commit 495d87120910331adf9b316198a435e2ff16c5c5
Author: Sven Lankes <sven at lank.es>
Date: Sun Mar 27 23:00:11 2011 +0200
apply upstream patch for rhbz #691237
choqok-1.0-videopreviewsync.patch | 59 +++++++++++++++++++++++++++++++++++++
choqok.spec | 7 ++++-
2 files changed, 65 insertions(+), 1 deletions(-)
---
diff --git a/choqok-1.0-videopreviewsync.patch b/choqok-1.0-videopreviewsync.patch
new file mode 100644
index 0000000..5e9c6e6
--- /dev/null
+++ b/choqok-1.0-videopreviewsync.patch
@@ -0,0 +1,59 @@
+commit 65800218baa391973cc50b08af544829ed10829d
+Author: Mehrdad Momeny <mehrdad.momeny at gmail.com>
+Date: Sat Jan 8 12:25:44 2011 +0330
+
+ BUG: 243368 Video preview made synchronous as before, due some crashes :/
+
+diff --git a/plugins/videopreview/videopreview.cpp b/plugins/videopreview/videopreview.cpp
+index 8ead263..1486ab3 100644
+--- a/plugins/videopreview/videopreview.cpp
++++ b/plugins/videopreview/videopreview.cpp
+@@ -165,17 +165,18 @@ QString VideoPreview::parseYoutube(QString videoid, QPointer< Choqok::UI::PostWi
+ QString youtubeUrl = QString( "http://gdata.youtube.com/feeds/api/videos/%1" ).arg(videoid);
+ // kDebug() << youtubeUrl;
+ KUrl th_url(youtubeUrl);
+- KIO::StoredTransferJob *job = KIO::storedGet( th_url, KIO::Reload, KIO::HideProgressInfo );
++ KIO::TransferJob *job = KIO::get( th_url, KIO::NoReload, KIO::HideProgressInfo );
+ QString title, description, thumb_url;
+- QEventLoop loop;
+- connect(job, SIGNAL(result(KJob*)), &loop, SLOT(quit()));
+- job->start();
+- loop.exec();
++// QEventLoop loop;
++// connect(job, SIGNAL(result(KJob*)), &loop, SLOT(quit()));
++// job->start();
++// loop.exec();
++ QByteArray data;
+
+- if ( job->error() == KJob::NoError ) {
++ if ( KIO::NetAccess::synchronousRun(job, Choqok::UI::Global::mainWindow(), &data) ) {
+ QDomDocument document;
+ // kDebug()<<job->data();
+- document.setContent ( job->data() );
++ document.setContent ( data );
+ QDomElement root = document.documentElement();
+ if ( !root.isNull() ) {
+ QDomElement node;
+@@ -216,15 +217,16 @@ QString VideoPreview::parseVimeo(QString videoid, QPointer< Choqok::UI::PostWidg
+ // kDebug() << vimeoUrl;
+ KUrl th_url(vimeoUrl);
+ QEventLoop loop;
+- KIO::StoredTransferJob *job = KIO::storedGet( th_url, KIO::Reload, KIO::HideProgressInfo );
++ KIO::TransferJob *job = KIO::get( th_url, KIO::NoReload, KIO::HideProgressInfo );
+ QString title, description, thumb_url;
+- connect(job, SIGNAL(result(KJob*)), &loop, SLOT(quit()));
+- job->start();
+- loop.exec();
++// connect(job, SIGNAL(result(KJob*)), &loop, SLOT(quit()));
++// job->start();
++// loop.exec();
++ QByteArray data;
+
+- if ( job->error() == KJob::NoError ) {
++ if ( KIO::NetAccess::synchronousRun(job, Choqok::UI::Global::mainWindow(), &data) ) {
+ QDomDocument document;
+- document.setContent ( job->data() );
++ document.setContent ( data );
+ QDomElement root = document.documentElement();
+ if ( !root.isNull() ) {
+ QDomElement videotag;
diff --git a/choqok.spec b/choqok.spec
index a6d9d60..d990672 100644
--- a/choqok.spec
+++ b/choqok.spec
@@ -1,11 +1,12 @@
Summary: KDE Micro-Blogging Client
Name: choqok
Version: 1.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv3
Group: Applications/Internet
URL: http://choqok.gnufolks.org/
Source: http://d10xg45o6p6dbl.cloudfront.net/projects/c/%{name}/%{name}-%{version}.tar.bz2
+Patch0: choqok-1.0-videopreviewsync.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -44,6 +45,7 @@ Requires: kdelibs4-devel
%prep
%setup -q
+%patch0 -p1
%build
mkdir -p %{_target_platform}
@@ -113,6 +115,9 @@ gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
%{_kde4_sharedir}/kde4/apps/cmake/modules/*.cmake
%changelog
+* Sun Mar 26 2011 Sven Lankes <sven at lank.es> - 1.0-2
+- apply upstream patch for rhbz #691237
+
* Sun Jan 30 2011 Sven Lankes <sven at lank.es> - 1.0-1
- new upstream release
More information about the scm-commits
mailing list