[calligra/f17] followup upstream kcolorset commit

Rex Dieter rdieter at fedoraproject.org
Mon May 7 16:34:25 UTC 2012


commit db3c2052b0145bdd593c774103b05a1f155f4780
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Mon May 7 11:36:35 2012 -0500

    followup upstream kcolorset commit

 calligra-2.4.1-kocolorset-2.patch |   65 +++++++++++++++++++++++++++++++++++++
 calligra.spec                     |    3 ++
 2 files changed, 68 insertions(+), 0 deletions(-)
---
diff --git a/calligra-2.4.1-kocolorset-2.patch b/calligra-2.4.1-kocolorset-2.patch
new file mode 100644
index 0000000..6d9cb14
--- /dev/null
+++ b/calligra-2.4.1-kocolorset-2.patch
@@ -0,0 +1,65 @@
+From: Boudewijn Rempt <boud at valdyas.org>
+Date: Thu, 19 Apr 2012 13:02:20 +0000
+Subject: Make KoColorSet a QObject so QPointer can manage it
+X-Git-Url: http://quickgit.kde.org/?p=calligra.git&amp;a=commitdiff&amp;h=512c6fa18825798e01ead1f0f009608b5281e5e0
+---
+Make KoColorSet a QObject so QPointer can manage it
+---
+
+
+--- a/libs/pigment/resources/KoColorSet.cpp
++++ b/libs/pigment/resources/KoColorSet.cpp
+@@ -29,30 +29,6 @@
+ 
+ #include "KoColorSpaceRegistry.h"
+ 
+-/*
+-KoColorSet::KoColorSet(const KisGradient * gradient, qint32 nColors, const QString & name)
+-    : KoResource(QString("")),
+-      m_name(name)
+-{
+-    Q_ASSERT(nColors > 0);
+-    Q_ASSERT(gradient != 0);
+-
+-    qreal dx, cur_x;
+-    qint32 i;
+-    dx = 1.0 / (nColors - 1);
+-
+-    KoColorSetEntry e;
+-    KoColor c;
+-    for (i = 0, cur_x = 0; i < nColors; i++, cur_x += dx) {
+-        gradient->colorAt(c,cur_x);
+-        e.color = c;
+-        e.name = "Untitled";
+-        add(e);
+-    }
+-
+-    m_columns = 0; // Set the default value that the GIMP uses...
+-}
+-*/
+ KoColorSet::KoColorSet(const QString& filename)
+         : KoResource(filename)
+ {
+
+--- a/libs/pigment/resources/KoColorSet.h
++++ b/libs/pigment/resources/KoColorSet.h
+@@ -19,6 +19,7 @@
+ #ifndef KOCOLORSET
+ #define KOCOLORSET
+ 
++#include <QObject>
+ #include <QImage>
+ #include <QColor>
+ #include <QVector>
+@@ -42,8 +43,9 @@ struct KoColorSetEntry {
+  * Open Gimp, Photoshop or RIFF palette files. This is a straight port
+  * from the Gimp.
+  */
+-class PIGMENTCMS_EXPORT KoColorSet : public KoResource
++class PIGMENTCMS_EXPORT KoColorSet : public QObject, public KoResource
+ {
++    Q_OBJECT
+ public:
+     /**
+      * Load a color set from a file. This can be a Gimp
+
diff --git a/calligra.spec b/calligra.spec
index 7fb6922..2d4bf15 100644
--- a/calligra.spec
+++ b/calligra.spec
@@ -24,6 +24,8 @@ Patch101: calligra-2.3.92-tables_to_sheets.patch
 # Calligra Products segfault when opening a new doc / new from template, http://bugzilla.redhat.com/819371
 # Crash when opening a new document with custom settings, http://bugs.kde.org/298412
 Patch102: calligra-2.4.1-kocolorset.patch
+# followup http://quickgit.kde.org/index.php?p=calligra.git&a=commit&h=512c6fa18825798e01ead1f0f009608b5281e5e0
+Patch103: calligra-2.4.1-kocolorset-2.patch
 
 BuildRequires: boost-devel
 BuildRequires: bzip2-devel bzip2
@@ -423,6 +425,7 @@ Requires: okular%{?_kde4_version: >= %{_kde4_version}}
 
 %patch101 -p1 -b .tables_to_sheets
 %patch102 -p1 -b .kocolorset
+%patch103 -p1 -b .kocolorset-2
 
 ## kdchart munging begin
 pushd plugins/chartshape/kdchart


More information about the scm-commits mailing list