commit polkit-qt-1 for openSUSE:11.4
Hello community, here is the log from the commit of package polkit-qt-1 for openSUSE:11.4 checked in at Wed Dec 21 18:29:53 CET 2011. -------- --- old-versions/11.4/all/polkit-qt-1/polkit-qt-1.changes 2010-12-18 23:30:14.000000000 +0100 +++ 11.4/polkit-qt-1/polkit-qt-1.changes 2011-12-21 14:12:04.000000000 +0100 @@ -1,0 +2,5 @@ +Wed Dec 21 13:10:31 UTC 2011 - idonmez@suse.com + +- Add git commit d3c337da to fix kde#258916, bnc#736158 + +------------------------------------------------------------------- Package does not exist at destination yet. Using Fallback old-versions/11.4/all/polkit-qt-1 Destination is old-versions/11.4/UPDATES/all/polkit-qt-1 calling whatdependson for 11.4-i586 New: ---- d3c337da.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ polkit-qt-1.spec ++++++ --- /var/tmp/diff_new_pack.r3arSJ/_old 2011-12-21 18:29:41.000000000 +0100 +++ /var/tmp/diff_new_pack.r3arSJ/_new 2011-12-21 18:29:41.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package polkit-qt-1 (Version 0.99.1) +# spec file for package polkit-qt-1 # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -30,12 +30,13 @@ Group: Development/Libraries/KDE Summary: PolicyKit Library Qt Bindings Version: 0.99.1 -Release: 2 +Release: 6.<RELEASE7> Url: http://api.kde.org/kdesupport-api/kdesupport-apidocs/polkit-qt/html/ BuildRoot: %{_tmppath}/%{name}-%{version}-build # ftp://ftp.kde.org/pub/kde/stable/apps/KDE4.x/admin/ Source0: %{name}-%{version}.tar.bz2 Source99: baselibs.conf +Patch1: d3c337da.patch %description Polkit-qt-1 aims to make it easy for Qt developers to take advantage of @@ -95,6 +96,7 @@ %prep %setup +%patch1 -p1 %build %cmake_kde4 -d build ++++++ d3c337da.patch ++++++ commit d3c337da01f3887da031fdb5c2ac784fb3e79210 Author: Nick Shaforostoff <shafff@ukr.net> Date: Mon Dec 12 01:03:35 2011 +0200 BUG: 258916 use stricter refing in all places of 'identity' keeping. it is interesting that it would be much harder to accidentaly make same mistake if G API was C++ style and not C. i also moved cleanup of successful sessions in time from system shutdown to session completion as polkit docs say it should be diff --git a/agent/polkitqt1-agent-session.cpp b/agent/polkitqt1-agent-session.cpp index 20cd403..52ddacf 100644 --- a/agent/polkitqt1-agent-session.cpp +++ b/agent/polkitqt1-agent-session.cpp @@ -46,7 +46,7 @@ public: Session::Private::~Private() { - g_object_unref(polkitAgentSession); + // polkitAgentSession is freed in Session d'tor } Session::Session(const PolkitQt1::Identity &identity, const QString &cookie, AsyncResult *result, QObject *parent) @@ -74,6 +74,9 @@ Session::Session(PolkitAgentSession *pkAgentSession, QObject *parent) Session::~Session() { + if (d->polkitAgentSession) + g_object_unref(d->polkitAgentSession); + delete d; } @@ -101,7 +104,11 @@ void Session::Private::completed(PolkitAgentSession *s, gboolean gained_authoriz { qDebug() << "COMPLETED"; Session *session = (Session *)user_data; - Q_EMIT((Session *)user_data)->completed(gained_authorization); + Q_EMIT(session)->completed(gained_authorization); + + //free session here as polkit documentation asks + g_object_unref(session->d->polkitAgentSession); + session->d->polkitAgentSession = 0; } void Session::Private::request(PolkitAgentSession *s, gchar *request, gboolean echo_on, gpointer user_data) @@ -139,7 +146,8 @@ AsyncResult::AsyncResult(GSimpleAsyncResult *result) AsyncResult::~AsyncResult() { - g_object_unref(d->result); + if (d->result) + g_object_unref(d->result); } void AsyncResult::setCompleted() diff --git a/core/polkitqt1-identity.cpp b/core/polkitqt1-identity.cpp index abf5abb..9cef558 100644 --- a/core/polkitqt1-identity.cpp +++ b/core/polkitqt1-identity.cpp @@ -35,11 +35,13 @@ public: : QSharedData(other) , identity(other.identity) { - g_object_ref(identity); + if (identity) + g_object_ref(identity); } ~Data() { - g_object_unref(identity); + if (identity) + g_object_unref(identity); } PolkitIdentity *identity; @@ -56,6 +58,8 @@ Identity::Identity(PolkitIdentity *polkitIdentity) { g_type_init(); d->identity = polkitIdentity; + if (d->identity) + g_object_ref(d->identity); } Identity::Identity(const PolkitQt1::Identity& other) @@ -86,7 +90,14 @@ PolkitIdentity *Identity::identity() const void Identity::setIdentity(PolkitIdentity *identity) { + if (d->identity == identity) + return; + + if (d->identity) + g_object_unref(d->identity); d->identity = identity; + if (d->identity) + g_object_ref(d->identity); } QString Identity::toString() const continue with "q"... Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de