public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in kde-base/kdeplasma-addons/files: kdeplasma-addons-4.7.0-grid.patch
@ 2011-08-09 21:28 Andreas HAttel (dilfridge)
  0 siblings, 0 replies; only message in thread
From: Andreas HAttel (dilfridge) @ 2011-08-09 21:28 UTC (permalink / raw
  To: gentoo-commits

dilfridge    11/08/09 21:28:50

  Added:                kdeplasma-addons-4.7.0-grid.patch
  Log:
  Add upstream fix for plasma crash, bug 376791
  
  (Portage version: 2.1.10.10/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  kde-base/kdeplasma-addons/files/kdeplasma-addons-4.7.0-grid.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kdeplasma-addons/files/kdeplasma-addons-4.7.0-grid.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kdeplasma-addons/files/kdeplasma-addons-4.7.0-grid.patch?rev=1.1&content-type=text/plain

Index: kdeplasma-addons-4.7.0-grid.patch
===================================================================
commit 67b5c56e564f5052238bab38342a85e5f4af570b
Author: Christoph Feck <christoph@maxiom.de>
Date:   Sat Jul 30 19:15:28 2011 +0200

    Fix assignment operator and add copy constructor
    
    This fixes the crash in Grid Desktop and Grouping Desktop.
    Thanks to Aaron Seigo for investigation and patch review.
    
    BUG: 278222
    FIXED-IN: 4.7.1

diff --git a/containments/groupingdesktop/lib/groupinfo.cpp b/containments/groupingdesktop/lib/groupinfo.cpp
index 2106cca..c945551 100644
--- a/containments/groupingdesktop/lib/groupinfo.cpp
+++ b/containments/groupingdesktop/lib/groupinfo.cpp
@@ -43,6 +43,12 @@ GroupInfo::GroupInfo(const QString &name, const QString &prettyName)
     d->prettyName = prettyName;
 }
 
+GroupInfo::GroupInfo(const GroupInfo &other)
+          : d(new GroupInfoPrivate())
+{
+    *d = *other.d;
+}
+
 GroupInfo::~GroupInfo()
 {
     delete d;
@@ -78,13 +84,12 @@ QString GroupInfo::icon() const
     return d->icon;
 }
 
-GroupInfo GroupInfo::operator=(const GroupInfo &gi)
+GroupInfo &GroupInfo::operator=(const GroupInfo &gi)
 {
-    GroupInfo g(gi.name(), gi.prettyName());
-    g.setFormFactors(gi.formFactors());
-    g.setIcon(gi.icon());
-
-    return g;
+    if (this != &gi) {
+        *d = *gi.d;
+    }
+    return *this;
 }
 
 bool GroupInfo::operator==(const GroupInfo &gi) const
diff --git a/containments/groupingdesktop/lib/groupinfo.h b/containments/groupingdesktop/lib/groupinfo.h
index f8cc66f..320c800 100644
--- a/containments/groupingdesktop/lib/groupinfo.h
+++ b/containments/groupingdesktop/lib/groupinfo.h
@@ -31,6 +31,7 @@ class GroupInfo
 {
     public:
         explicit GroupInfo(const QString &name, const QString &prettyName = QString());
+        GroupInfo(const GroupInfo &other);
         ~GroupInfo();
         void setFormFactors(QSet<Plasma::FormFactor> formFactors);
         void setIcon(const QString &icon);
@@ -40,7 +41,7 @@ class GroupInfo
         QSet<Plasma::FormFactor> formFactors() const;
         QString icon() const;
 
-        GroupInfo operator=(const GroupInfo &gi);
+        GroupInfo &operator=(const GroupInfo &gi);
         bool operator==(const GroupInfo &gi) const;
         bool operator<(const GroupInfo &gi) const;
 






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-09 21:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-09 21:28 [gentoo-commits] gentoo-x86 commit in kde-base/kdeplasma-addons/files: kdeplasma-addons-4.7.0-grid.patch Andreas HAttel (dilfridge)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox