[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bcalligra/text-layoutrestructure-boemann=5D_libs/tex?=
From:       Sebastian Sauer <sebastian.sauer () kdab ! com>
Date:       2011-04-27 14:44:57
Message-ID: 20110427144457.45543A60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 04811ff34ea26412c5df8ed609ae42cb17daa284 by Sebastian Sauer.
Committed on 27/04/2011 at 16:42.
Pushed by sebsauer into branch 'text-layoutrestructure-boemann'.

Don't delete the old KoTextPage.
The code was wrong anyways cause the dtor wasn't deleteting the KoTextPage either \
else I would have note the problem way earlier.

M  +0    -1    libs/textlayout/KoTextLayoutRootArea.cpp     
M  +6    -1    libs/textlayout/KoTextLayoutRootArea.h     

http://commits.kde.org/calligra/04811ff34ea26412c5df8ed609ae42cb17daa284

diff --git a/libs/textlayout/KoTextLayoutRootArea.cpp \
b/libs/textlayout/KoTextLayoutRootArea.cpp index fc4af35..3370a34 100644
--- a/libs/textlayout/KoTextLayoutRootArea.cpp
+++ b/libs/textlayout/KoTextLayoutRootArea.cpp
@@ -65,7 +65,6 @@ KoShape *KoTextLayoutRootArea::associatedShape()
 
 void KoTextLayoutRootArea::setPage(KoTextPage *textpage)
 {
-    delete d->textpage;
     d->textpage = textpage;
 }
 
diff --git a/libs/textlayout/KoTextLayoutRootArea.h \
b/libs/textlayout/KoTextLayoutRootArea.h index ef156e6..f884ac6 100644
--- a/libs/textlayout/KoTextLayoutRootArea.h
+++ b/libs/textlayout/KoTextLayoutRootArea.h
@@ -50,7 +50,12 @@ public:
     /// Retruns the shape set with setAssociatedShape()
     KoShape *associatedShape();
 
-    /// Set the \p page this root area is on.
+    /**
+     * Set the \p page this root area is on.
+     *
+     * The root-area does NOT take over ownership of the KoTextPage and the user
+     * of the root-area is responsible to delete it if not needed any longer.
+     */
     void setPage(KoTextPage *textpage);
 
     /// Returns the page this root area is on.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic