[polkit-qt] - Fixed deprecation warning with polkit-0.98 - Fixed typo in url - Null checking patch (might be fix
Radek Novacek
rnovacek at fedoraproject.org
Thu Oct 7 16:11:37 UTC 2010
commit 0fb02ff316c2352742e80eaa9f731f67700ab726
Author: Radek Novacek <rnovacek at redhat.com>
Date: Thu Oct 7 15:04:16 2010 +0200
- Fixed deprecation warning with polkit-0.98
- Fixed typo in url
- Null checking patch (might be fix for #637064)
polkit-qt-0.96.1-fix-deprecated-warnings.patch | 41 ++++++++++++++++++++++++
polkit-qt-0.96.1-null-checking.patch | 14 ++++++++
polkit-qt.spec | 16 ++++++++-
sources | 2 +-
4 files changed, 70 insertions(+), 3 deletions(-)
---
diff --git a/polkit-qt-0.96.1-fix-deprecated-warnings.patch b/polkit-qt-0.96.1-fix-deprecated-warnings.patch
new file mode 100644
index 0000000..fa136b0
--- /dev/null
+++ b/polkit-qt-0.96.1-fix-deprecated-warnings.patch
@@ -0,0 +1,41 @@
+Index: core/polkitqt1-authority.cpp
+===================================================================
+--- core/polkitqt1-authority.cpp (revision 1183413)
++++ core/polkitqt1-authority.cpp (working copy)
+@@ -177,12 +177,17 @@
+ m_revokeTemporaryAuthorizationsCancellable = g_cancellable_new();
+ m_revokeTemporaryAuthorizationCancellable = g_cancellable_new();
+
++ GError *gerror = NULL;
+ if (pkAuthority == NULL) {
+- pkAuthority = polkit_authority_get();
++ pkAuthority = polkit_authority_get_sync(NULL, &gerror);
++ if (gerror != NULL) {
++ setError(E_GetAuthority, gerror->message);
++ g_error_free(gerror);
++ return;
++ }
+ }
+
+ if (pkAuthority == NULL) {
+- (E_GetAuthority);
+ return;
+ }
+
+Index: agent/polkitqt1-agent-listener.cpp
+===================================================================
+--- agent/polkitqt1-agent-listener.cpp (revision 1183413)
++++ agent/polkitqt1-agent-listener.cpp (working copy)
+@@ -73,9 +73,11 @@
+ {
+ GError *error = NULL;
+
+- bool r = polkit_agent_register_listener(d->listener,
++ bool r = polkit_agent_listener_register(d->listener,
++ POLKIT_AGENT_REGISTER_FLAGS_RUN_IN_THREAD,
+ subject->subject(),
+ objectPath.toAscii().data(),
++ NULL,
+ &error);
+ if (error != NULL) {
+ qWarning() << QString("Cannot register authentication agent: %1").arg(error->message);
diff --git a/polkit-qt-0.96.1-null-checking.patch b/polkit-qt-0.96.1-null-checking.patch
new file mode 100644
index 0000000..0ec2a8e
--- /dev/null
+++ b/polkit-qt-0.96.1-null-checking.patch
@@ -0,0 +1,14 @@
+Index: agent/polkitqt1-agent-listener.cpp
+===================================================================
+--- agent/polkitqt1-agent-listener.cpp (revision 1183495)
++++ agent/polkitqt1-agent-listener.cpp (working copy)
+@@ -66,7 +66,8 @@
+ qDebug("Destroying listener");
+
+ ListenerAdapter::instance()->removeListener(this);
+- g_object_unref(d->listener);
++ if (d->listener != NULL)
++ g_object_unref(d->listener);
+ }
+
+ bool Listener::registerListener(PolkitQt1::Subject *subject, const QString &objectPath)
diff --git a/polkit-qt.spec b/polkit-qt.spec
index 9f3848b..f1fa4f8 100644
--- a/polkit-qt.spec
+++ b/polkit-qt.spec
@@ -1,16 +1,18 @@
Name: polkit-qt
Version: 0.96.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Qt bindings for PolicyKit
Group: System Environment/Libraries
License: GPLv2+
URL: http://websvn.kde.org/trunk/kdesupport/polkit-qt-1/
-Source0: ftp://ftp.kde.org/pub/kde/stable/apps/KDE4.x/admim/polkit-qt-1-%{version}.tar.bz2
+Source0: ftp://ftp.kde.org/pub/kde/stable/apps/KDE4.x/admin/polkit-qt-1-%{version}.tar.bz2
Source1: Doxyfile
Patch0: polkit-qt-0.95.1-install-cmake-find.patch
+Patch1: polkit-qt-0.96.1-fix-deprecated-warnings.patch
+Patch2: polkit-qt-0.96.1-null-checking.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -55,6 +57,11 @@ BuildArch: noarch
# module installation
%patch0 -p1 -b .install-cmake-find
+# Fix deprecation warning with polkit-0.98
+%patch1 -p0
+# NULL checking
+%patch2 -p0
+
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
@@ -107,6 +114,11 @@ rm -rf %{buildroot}
%doc html/*
%changelog
+* Thu Oct 07 2010 Radek Novacek <rnovacek at redhat.com> 0.96.1-2
+- Fixed deprecation warning with polkit-0.98
+- Fixed typo in url
+- Null checking patch (might be fix for #637064)
+
* Tue Sep 07 2010 Rex Dieter <rdieter at fedoraproject.org> - 0.96.1-1
- polkit-qt-1-0.96.1
diff --git a/sources b/sources
index ec25f60..81e85a1 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-c961457165b36794674b97e9dced5fb8 Doxyfile
7d122aa67c6786ea7d0bb023701693a1 polkit-qt-1-0.96.1.tar.bz2
+c961457165b36794674b97e9dced5fb8 Doxyfile
More information about the scm-commits
mailing list