Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56fd9c057d | ||
|
|
053c2d0057 |
2 changed files with 39 additions and 5 deletions
25
akonadi-google-auth_token.patch
Normal file
25
akonadi-google-auth_token.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
diff -up akonadi-google/libkgoogle/authdialog.cpp.auth_token akonadi-google/libkgoogle/authdialog.cpp
|
||||
--- akonadi-google/libkgoogle/authdialog.cpp.auth_token 2012-04-27 08:19:17.000000000 -0500
|
||||
+++ akonadi-google/libkgoogle/authdialog.cpp 2012-06-20 11:44:03.179406253 -0500
|
||||
@@ -102,13 +102,18 @@ void AuthDialog::webviewFinished()
|
||||
}
|
||||
|
||||
if (url.host() == "accounts.google.com" && url.path() == "/o/oauth2/approval") {
|
||||
- QWebElement el = m_webiew->page()->mainFrame()->findFirstElement("textarea");
|
||||
- if (el.isNull()) {
|
||||
+ QString title = m_webiew->title();
|
||||
+ QString token;
|
||||
+
|
||||
+ if (title.startsWith(QLatin1String("success"), Qt::CaseInsensitive)) {
|
||||
+ int pos = title.indexOf(QLatin1String("code="));
|
||||
+ /* Skip the 'code=' string as well */
|
||||
+ token = title.mid (pos + 5);
|
||||
+ } else {
|
||||
emitError(KGoogle::AuthError, i18n("Parsing token page failed."));
|
||||
return;
|
||||
}
|
||||
|
||||
- QString token = el.toInnerXml();
|
||||
if (token.isEmpty()) {
|
||||
emitError(KGoogle::AuthError, i18n("Failed to obtain token."));
|
||||
return;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
Name: akonadi-google
|
||||
Version: 0.3.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Akonadi Resources for accessing Google services
|
||||
|
||||
License: GPLv3
|
||||
|
|
@ -16,6 +16,10 @@ URL: http://projects.kde.org/akonadi-google
|
|||
# master
|
||||
Source0: akonadi-google-0.3.1.tar.gz
|
||||
|
||||
## backported upstream patches
|
||||
# https://projects.kde.org/projects/kdereview/libkgoogle/repository/revisions/5c92e2fb5ced528a20fd1d8723fd7a8d7ba686a3
|
||||
Patch100: akonadi-google-auth_token.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: qt-devel
|
||||
BuildRequires: kdepimlibs-devel
|
||||
|
|
@ -24,7 +28,7 @@ BuildRequires: akonadi-devel
|
|||
BuildRequires: qjson-devel
|
||||
BuildRequires: libxslt-devel
|
||||
|
||||
Requires: libkgoogle = %{version}-%{release}
|
||||
Requires: libkgoogle%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-calendar = %{version}-%{release}
|
||||
Requires: %{name}-contacts = %{version}-%{release}
|
||||
|
||||
|
|
@ -44,13 +48,13 @@ Group: System Environment/Libraries
|
|||
%package -n libkgoogle-devel
|
||||
Summary: Development files for %{name}
|
||||
Group: Development/Libraries
|
||||
Requires: libkgoogle = %{version}-%{release}
|
||||
Requires: libkgoogle%{?_isa} = %{version}-%{release}
|
||||
%description -n libkgoogle-devel
|
||||
Libraries and header files for developing applications that use %{name}.
|
||||
|
||||
%package calendar
|
||||
Summary: Akonadi resource for Google Calendar and Tasks
|
||||
Requires: libkgoogle = %{version}-%{release}
|
||||
Requires: libkgoogle%{?_isa} = %{version}-%{release}
|
||||
Obsoletes: akonadi-google-tasks < 0.3
|
||||
Provides: akonadi-google-tasks = %{version}-%{release}
|
||||
%description calendar
|
||||
|
|
@ -58,13 +62,15 @@ Provides: akonadi-google-tasks = %{version}-%{release}
|
|||
|
||||
%package contacts
|
||||
Summary: Akonadi resource for Google Contacts
|
||||
Requires: libkgoogle = %{version}-%{release}
|
||||
Requires: libkgoogle%{?_isa} = %{version}-%{release}
|
||||
%description contacts
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}
|
||||
|
||||
%patch100 -p1 -b .auth_token
|
||||
|
||||
%build
|
||||
mkdir -p %{_target_platform}
|
||||
pushd %{_target_platform}
|
||||
|
|
@ -104,6 +110,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
|
|||
%{_datadir}/akonadi/agents/googlecontactsresource.desktop
|
||||
|
||||
%changelog
|
||||
* Wed Jun 20 2012 Rex Dieter <rdieter@fedoraproject.org> 0.3.1-2
|
||||
- Parsing token page failed (kde#301240)
|
||||
|
||||
* Mon Apr 30 2012 Mario Santagiuliana <fedora@marionline.it> 0.3.1-1
|
||||
- New version 0.3.1
|
||||
|
||||
|
|
|
|||
Reference in a new issue