summaryrefslogtreecommitdiffstats
path: root/extra/polkit-qt/fix-deprecated-warnings.patch
diff options
context:
space:
mode:
authorsibel <lesibel at free dot fr>2010-10-11 15:04:15 +0200
committersibel <lesibel at free dot fr>2010-10-11 15:04:15 +0200
commit0115dea8d30cc7521df2c6ba0c1eb58a6b462c5e (patch)
tree7e733574c62335c5ffca778bc9049bd1c36db607 /extra/polkit-qt/fix-deprecated-warnings.patch
parent83e7acc38d9771f9edfe89f5ec31674a012deea8 (diff)
downloadnutyx-pakxe-0115dea8d30cc7521df2c6ba0c1eb58a6b462c5e.tar.gz
nutyx-pakxe-0115dea8d30cc7521df2c6ba0c1eb58a6b462c5e.tar.bz2
nutyx-pakxe-0115dea8d30cc7521df2c6ba0c1eb58a6b462c5e.tar.xz
nutyx-pakxe-0115dea8d30cc7521df2c6ba0c1eb58a6b462c5e.zip
correction de polkit-qt#0.96.1-2
Diffstat (limited to 'extra/polkit-qt/fix-deprecated-warnings.patch')
-rw-r--r--extra/polkit-qt/fix-deprecated-warnings.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/extra/polkit-qt/fix-deprecated-warnings.patch b/extra/polkit-qt/fix-deprecated-warnings.patch
new file mode 100644
index 000000000..fa136b0ff
--- /dev/null
+++ b/extra/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_RUN_IN_THREAD,
+ subject->subject(),
+ objectPath.toAscii().data(),
++ NULL,
+ &error);
+ if (error != NULL) {
+ qWarning() << QString("Cannot register authentication agent: %1").arg(error->message);