From 6cf387f41c3f1a9747d5b18004efa111f534fe45 Mon Sep 17 00:00:00 2001 From: philm Date: Tue, 18 Jan 2011 21:29:10 +0100 Subject: [PATCH] add forgotten patches --- .../fix-deprecated-warnings.patch | 41 +++++++++++++++++++ support-pkg-polkit-qt/null-checking.patch | 14 +++++++ 2 files changed, 55 insertions(+) create mode 100644 support-pkg-polkit-qt/fix-deprecated-warnings.patch create mode 100644 support-pkg-polkit-qt/null-checking.patch diff --git a/support-pkg-polkit-qt/fix-deprecated-warnings.patch b/support-pkg-polkit-qt/fix-deprecated-warnings.patch new file mode 100644 index 000000000..7d1d25c88 --- /dev/null +++ b/support-pkg-polkit-qt/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_NONE, + subject->subject(), + objectPath.toAscii().data(), ++ NULL, + &error); + if (error != NULL) { + qWarning() << QString("Cannot register authentication agent: %1").arg(error->message); diff --git a/support-pkg-polkit-qt/null-checking.patch b/support-pkg-polkit-qt/null-checking.patch new file mode 100644 index 000000000..0ec2a8e38 --- /dev/null +++ b/support-pkg-polkit-qt/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)