- plasma crashe patch (kde#226823)

This commit is contained in:
Than Ngo 2010-02-16 11:28:51 +00:00
parent ba7e61b9cb
commit 9696368fdb
2 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,63 @@
Index: plasma/applet.cpp
===================================================================
--- plasma/applet.cpp (Revision 1090827)
+++ plasma/applet.cpp (Revision 1090828)
@@ -1712,6 +1712,7 @@
return;
}
+ d->publishUI.publishCheckbox = 0;
if (d->package && d->configLoader) {
KConfigDialog *dialog = 0;
@@ -1878,29 +1879,31 @@
}
#ifdef ENABLE_REMOTE_WIDGETS
- q->config().writeEntry("Share", publishUI.publishCheckbox->isChecked());
+ if (publishUI.publishCheckbox) {
+ q->config().writeEntry("Share", publishUI.publishCheckbox->isChecked());
- if (publishUI.publishCheckbox->isChecked()) {
- QString resourceName =
- i18nc("%1 is the name of a plasmoid, %2 the name of the machine that plasmoid is published on",
- "%1 on %2", q->name(), QHostInfo::localHostName());
- q->publish(Plasma::ZeroconfAnnouncement, resourceName);
- if (publishUI.allUsersCheckbox->isChecked()) {
- if (!AuthorizationManager::self()->d->matchingRule(resourceName, Credentials())) {
- AuthorizationRule *rule = new AuthorizationRule(resourceName, "");
- rule->setPolicy(AuthorizationRule::Allow);
- rule->setTargets(AuthorizationRule::AllUsers);
- AuthorizationManager::self()->d->rules.append(rule);
+ if (publishUI.publishCheckbox->isChecked()) {
+ QString resourceName =
+ i18nc("%1 is the name of a plasmoid, %2 the name of the machine that plasmoid is published on",
+ "%1 on %2", q->name(), QHostInfo::localHostName());
+ q->publish(Plasma::ZeroconfAnnouncement, resourceName);
+ if (publishUI.allUsersCheckbox->isChecked()) {
+ if (!AuthorizationManager::self()->d->matchingRule(resourceName, Credentials())) {
+ AuthorizationRule *rule = new AuthorizationRule(resourceName, "");
+ rule->setPolicy(AuthorizationRule::Allow);
+ rule->setTargets(AuthorizationRule::AllUsers);
+ AuthorizationManager::self()->d->rules.append(rule);
+ }
+ } else {
+ AuthorizationRule *matchingRule =
+ AuthorizationManager::self()->d->matchingRule(resourceName, Credentials());
+ if (matchingRule) {
+ AuthorizationManager::self()->d->rules.removeAll(matchingRule);
+ }
}
} else {
- AuthorizationRule *matchingRule =
- AuthorizationManager::self()->d->matchingRule(resourceName, Credentials());
- if (matchingRule) {
- AuthorizationManager::self()->d->rules.removeAll(matchingRule);
- }
+ q->unpublish();
}
- } else {
- q->unpublish();
}
#endif

View File

@ -93,6 +93,7 @@ Patch27: kdelibs-4.3.98-no_rpath.patch
Patch100: kdelibs-4.4.0-khtml_scrolling.patch
Patch101: kdelibs-4.4.0-nepomuk_memleak.patch
patch102: kdelibs-4.4.0-krunner-crash-kde#227118.patch
Patch103: kdelibs-4.4.0-plasma-crash-kde#226823.patch
# security fix
## Not Upstreamed? why not ? -- Rex
@ -246,6 +247,7 @@ format for easy browsing.
%patch100 -p4 -b .khtml_scrolling
%patch101 -p4 -b .nepomuk_memleak
%patch102 -p0 -b .krunner-crash-kde#227118
%patch103 -p0 -b .plasma-crash-kde#226823
# security fix
%patch200 -p1 -b .CVE-2009-2702
@ -439,6 +441,7 @@ rm -rf %{buildroot}
%changelog
* Tue Feb 16 2010 Than Ngo <than@redhat.com> - 6:4.4.0-8
- krunner crash patch (kde#227118)
- plasma crashe patch (kde#226823)
* Sat Feb 13 2010 Kevin Kofler <Kevin@tigcc.ticalc.org> - 6:4.4.0-7
- rebuild for new kde-filesystem in F13, fixes kde4-config --libsuffix (#564712)