diff options
author | Carsten Lohrke <carlo@gentoo.org> | 2005-05-02 22:53:46 +0000 |
---|---|---|
committer | Carsten Lohrke <carlo@gentoo.org> | 2005-05-02 22:53:46 +0000 |
commit | 30d51ddc8d7a49146805a6a2491f085ea8986c91 (patch) | |
tree | edd68b31296b6788e75fa29d7c3bfb8fb6cd865b /kde-base/quanta | |
parent | new patch, fixing a bug in the previous one (diff) | |
download | gentoo-2-30d51ddc8d7a49146805a6a2491f085ea8986c91.tar.gz gentoo-2-30d51ddc8d7a49146805a6a2491f085ea8986c91.tar.bz2 gentoo-2-30d51ddc8d7a49146805a6a2491f085ea8986c91.zip |
fix for vpl editor crash
(Portage version: 2.0.51.19)
Diffstat (limited to 'kde-base/quanta')
-rw-r--r-- | kde-base/quanta/ChangeLog | 8 | ||||
-rw-r--r-- | kde-base/quanta/Manifest | 7 | ||||
-rw-r--r-- | kde-base/quanta/files/digest-quanta-3.4.0-r1 | 1 | ||||
-rw-r--r-- | kde-base/quanta/files/quanta-3.4.0-vpl.patch | 214 | ||||
-rw-r--r-- | kde-base/quanta/quanta-3.4.0-r1.ebuild | 36 |
5 files changed, 263 insertions, 3 deletions
diff --git a/kde-base/quanta/ChangeLog b/kde-base/quanta/ChangeLog index 94d582745249..6a16a0fc774c 100644 --- a/kde-base/quanta/ChangeLog +++ b/kde-base/quanta/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for kde-base/quanta # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/quanta/ChangeLog,v 1.6 2005/03/18 17:46:34 morfic Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/quanta/ChangeLog,v 1.7 2005/05/02 22:53:46 carlo Exp $ + +*quanta-3.4.0-r1 (02 May 2005) + + 02 May 2005; Carsten Lohrke <carlo@gentoo.org> + +files/quanta-3.4.0-vpl.patch, +quanta-3.4.0-r1.ebuild: + fix for vpl editor crash 18 Mar 2005; Daniel Goller <morfic@gentoo.org> quanta-3.4.0.ebuild: Added to ~ppc diff --git a/kde-base/quanta/Manifest b/kde-base/quanta/Manifest index a26854204e45..2b2aba310606 100644 --- a/kde-base/quanta/Manifest +++ b/kde-base/quanta/Manifest @@ -1,4 +1,7 @@ -MD5 acc03a4b12bb0433a57e95bd253b9501 metadata.xml 156 -MD5 fc5e61ff456aa977588dfa0cb3b74871 ChangeLog 1213 MD5 921209e68e670ad74e966a80080421e6 quanta-3.4.0.ebuild 1030 +MD5 1d86bc930bf64d91c1e9d92e7cb8b6b0 ChangeLog 1380 +MD5 7c461cd6fc02536dd347903a9de41f54 quanta-3.4.0-r1.ebuild 1015 +MD5 acc03a4b12bb0433a57e95bd253b9501 metadata.xml 156 +MD5 a6863fd743a5d77407c2de68efec9b90 files/digest-quanta-3.4.0-r1 69 MD5 a6863fd743a5d77407c2de68efec9b90 files/digest-quanta-3.4.0 69 +MD5 d0fe799b425a893d05d633cd6afb32a8 files/quanta-3.4.0-vpl.patch 8115 diff --git a/kde-base/quanta/files/digest-quanta-3.4.0-r1 b/kde-base/quanta/files/digest-quanta-3.4.0-r1 new file mode 100644 index 000000000000..0af1ae241535 --- /dev/null +++ b/kde-base/quanta/files/digest-quanta-3.4.0-r1 @@ -0,0 +1 @@ +MD5 a131b9a14c5da402417b43ed8bc61df1 kdewebdev-3.4.0.tar.bz2 6243584 diff --git a/kde-base/quanta/files/quanta-3.4.0-vpl.patch b/kde-base/quanta/files/quanta-3.4.0-vpl.patch new file mode 100644 index 000000000000..4188ab7072bc --- /dev/null +++ b/kde-base/quanta/files/quanta-3.4.0-vpl.patch @@ -0,0 +1,214 @@ +=================================================================== +RCS file: /home/kde/kdewebdev/quanta/parsers/qtag.cpp,v +retrieving revision 1.22 +retrieving revision 1.23 +diff -u -r1.22 -r1.23 +--- quanta/parsers/qtag.cpp 2005/01/29 13:31:13 1.22 ++++ quanta/parsers/qtag.cpp 2005/03/29 22:18:35 1.23 +@@ -210,7 +210,7 @@ + return (!childTags.isEmpty() && childTags.contains(tagName)); + } + +-bool QTag::isChild(Node *node, bool trueIfNoChildsDefined) ++bool QTag::isChild(Node *node, bool trueIfNoChildsDefined, bool treatEmptyNodesAsText) + { + QString nodeName; + +@@ -223,8 +223,15 @@ + else + return(!childTags.isEmpty() && (childTags.contains("#text") || childTags.contains("#TEXT"))); + } +- else if(node->tag->type == Tag::Empty) +- return true; ++ else if(node->tag->type == Tag::Empty && !treatEmptyNodesAsText) ++ return true; ++ else if(node->tag->type == Tag::Empty && treatEmptyNodesAsText) ++ { ++ if(trueIfNoChildsDefined) ++ return(childTags.isEmpty() || childTags.contains("#text") || childTags.contains("#TEXT")); ++ else ++ return(!childTags.isEmpty() && (childTags.contains("#text") || childTags.contains("#TEXT"))); ++ } + else if(node->tag->type == Tag::XmlTagEnd) + { + nodeName = node->tag->name; +=================================================================== +RCS file: /home/kde/kdewebdev/quanta/parsers/qtag.h,v +retrieving revision 1.65 +retrieving revision 1.66 +diff -u -r1.65 -r1.66 +--- quanta/parsers/qtag.h 2005/02/28 18:18:28 1.65 ++++ quanta/parsers/qtag.h 2005/03/29 22:18:35 1.66 +@@ -235,7 +235,7 @@ + there are no children defined and if trueIfNoChildsDefined is set to true. */ + bool isChild(const QString& tag, bool trueIfNoChildsDefined = true); + //prefer using this variant, it handle Text, Empty, XmlTagEnd nodes! +- bool isChild(Node *node, bool trueIfNoChildsDefined = true); ++ bool isChild(Node *node, bool trueIfNoChildsDefined = true, bool treatEmptyNodesAsText = false); + /*** Returns the list of parent of this tag. */ + QPtrList<QTag> parents(); + +=================================================================== +RCS file: /home/kde/kdewebdev/quanta/parts/kafka/htmlenhancer.cpp,v +retrieving revision 1.22 +retrieving revision 1.22.2.1 +diff -u -r1.22 -r1.22.2.1 +--- quanta/parts/kafka/htmlenhancer.cpp 2005/02/09 11:41:58 1.22 ++++ quanta/parts/kafka/htmlenhancer.cpp 2005/04/28 00:08:23 1.22.2.1 +@@ -125,9 +125,12 @@ + m_wkafkapart->connectDomNodeToQuantaNode(domNode2, node); + } + } ++ ++ QTag* qTag = QuantaCommon::tagFromDTD(m_wkafkapart->getCurrentDoc()->defaultDTD(), ++ parentDNode.nodeName().string()); + + //THEN replace, if asked, scripts by a little icon. +- if(node->tag->type == Tag::ScriptTag && m_showIconForScripts) ++ if(node->tag->type == Tag::ScriptTag && m_showIconForScripts && qTag->isChild("IMG", false)) + { + script = node->tag->name.left(node->tag->name.find("block", 0, false) - 1).lower(); + #ifdef LIGHT_DEBUG +@@ -164,7 +167,7 @@ + } + + //THEN if it is a comment, add a little icon ;o) +- if(node->tag->type == Tag::Comment && m_showIconForScripts) ++ if(node->tag->type == Tag::Comment && m_showIconForScripts && qTag->isChild("IMG", false)) + { + #ifdef LIGHT_DEBUG + kdDebug(25001)<< "HTMLTranslator::translateNode() - Comment" << endl; +=================================================================== +RCS file: /home/kde/kdewebdev/quanta/parts/kafka/kafkacommon.cpp,v +retrieving revision 1.74 +retrieving revision 1.74.2.1 +diff -u -r1.74 -r1.74.2.1 +--- quanta/parts/kafka/kafkacommon.cpp 2005/01/05 05:02:36 1.74 ++++ quanta/parts/kafka/kafkacommon.cpp 2005/04/28 00:08:23 1.74.2.1 +@@ -3328,19 +3328,10 @@ + try + { + parent.insertBefore(node, nextSibling); +-#ifdef HEAVY_DEBUG +- + } +- catch(DOM::DOMException e) ++ catch(DOM::DOMException const& e) + { + kdDebug(25001)<< "kafkaCommon::insertDomNode() - ERROR code :" << e.code << endl; +-#else +- +- } +- catch(DOM::DOMException) +- { +-#endif +- return false; + } + return true; + } +=================================================================== +RCS file: /home/kde/kdewebdev/quanta/parts/kafka/wkafkapart.cpp,v +retrieving revision 1.95 +retrieving revision 1.95.2.1 +diff -u -r1.95 -r1.95.2.1 +--- quanta/parts/kafka/wkafkapart.cpp 2005/02/22 12:46:18 1.95 ++++ quanta/parts/kafka/wkafkapart.cpp 2005/04/28 00:08:23 1.95.2.1 +@@ -709,29 +709,35 @@ + node->setLeafNode(ptDomNode); + mainEnhancer->enhanceNode(node, parentNode, nextNode); + +- if(nextNode.isNull()) +- { +- if(!kafkaCommon::insertDomNode(newNode, parentNode)) +- { +- disconnectDomNodeFromQuantaNode(newNode); +- if(node->rootNode()) +- delete node->rootNode(); +- node->setRootNode(0L); +- return false; +- } +- } +- else +- { +- if(!kafkaCommon::insertDomNode(newNode, parentNode, nextNode)) +- { +- disconnectDomNodeFromQuantaNode(newNode); +- if(node->rootNode()) +- delete node->rootNode(); +- node->setRootNode(0L); +- return false; +- } +- } +- } ++ QTag* qTag = QuantaCommon::tagFromDTD(getCurrentDoc()->defaultDTD(), ++ parentNode.nodeName().string()); ++ ++ if(qTag->isChild(node, false)) ++ { ++ if(nextNode.isNull()) ++ { ++ if(!kafkaCommon::insertDomNode(newNode, parentNode)) ++ { ++ disconnectDomNodeFromQuantaNode(newNode); ++ if(node->rootNode()) ++ delete node->rootNode(); ++ node->setRootNode(0L); ++ return false; ++ } ++ } ++ else ++ { ++ if(!kafkaCommon::insertDomNode(newNode, parentNode, nextNode)) ++ { ++ disconnectDomNodeFromQuantaNode(newNode); ++ if(node->rootNode()) ++ delete node->rootNode(); ++ node->setRootNode(0L); ++ return false; ++ } ++ } ++ } ++ } + else + { + ptDomNode = new DOM::Node(newNode); +Index: quanta/parts/kafka/wkafkapart.cpp +=================================================================== +RCS file: /home/kde/kdewebdev/quanta/parts/kafka/wkafkapart.cpp,v +retrieving revision 1.95.2.1 +diff -U3 -r1.95.2.1 wkafkapart.cpp +--- quanta/parts/kafka/wkafkapart.cpp 28 Apr 2005 00:08:23 -0000 1.95.2.1 ++++ quanta/parts/kafka/wkafkapart.cpp 2 May 2005 17:47:52 -0000 +@@ -499,16 +499,24 @@ + Node *n, *parent; + int i; + +-// This is a hack to not created DOM::Nodes from quanta empty nodes if outside body, because KHTML +-// moves a node in that condition into the body and then the trees become desynchronized. +- bool isInsideBody = false; +- if(!m_currentDoc->defaultDTD()->name.contains("HTML", false)) +- isInsideBody = true; +- else +- isInsideBody = kafkaCommon::hasParent(node, "body"); ++// Don't create DOM::Nodes from Quanta empty nodes outside the body or inside other not allowed element, or KHTML ++// will give us problems. ++ bool canInsertEmptyNode = false; ++ if(node->tag->type == Tag::Empty) ++ { ++ if(!m_currentDoc->defaultDTD()->name.contains("HTML", false)) ++ canInsertEmptyNode = true; ++ else ++ canInsertEmptyNode = kafkaCommon::hasParent(node, "body"); ++ ++ Node* parent_node = node->parent; ++ QTag* parent_node_description_tag = QuantaCommon::tagFromDTD(parent_node); ++ if(parent_node_description_tag && !parent_node_description_tag->isChild(node, false, true)) ++ canInsertEmptyNode = false; ++ } + + if(node->tag->type == Tag::XmlTag || +- ((node->tag->type == Tag::Text || (node->tag->type == Tag::Empty && isInsideBody)) && !node->insideSpecial)) ++ ((node->tag->type == Tag::Text || (node->tag->type == Tag::Empty && canInsertEmptyNode)) && !node->insideSpecial)) + { + str = node->tag->name.lower(); + diff --git a/kde-base/quanta/quanta-3.4.0-r1.ebuild b/kde-base/quanta/quanta-3.4.0-r1.ebuild new file mode 100644 index 000000000000..e0e7e6fcf012 --- /dev/null +++ b/kde-base/quanta/quanta-3.4.0-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/quanta/quanta-3.4.0-r1.ebuild,v 1.1 2005/05/02 22:53:46 carlo Exp $ +KMNAME=kdewebdev +MAXKDEVER=$PV +KM_DEPRANGE="$PV $MAXKDEVER" +inherit kde-meta eutils + +DESCRIPTION="KDE: Quanta Plus Web Development Environment" +KEYWORDS="~x86 ~amd64 ~ppc" +IUSE="doc tidy" +DEPEND="doc? ( app-doc/quanta-docs ) + dev-libs/libxml2" +RDEPEND="$DEPEND +$(deprange $PV $MAXKDEVER kde-base/kfilereplace) +$(deprange $PV $MAXKDEVER kde-base/kimagemapeditor) +$(deprange $PV $MAXKDEVER kde-base/klinkstatus) +$(deprange $PV $MAXKDEVER kde-base/kommander) +$(deprange $PV $MAXKDEVER kde-base/kxsldbg) +tidy? ( app-text/htmltidy )" + +KMCOMPILEONLY=lib + +src_unpack () { + kde-meta_src_unpack + epatch ${FILESDIR}/${P}-vpl.patch +} + +# TODO: check why this wasn't needed back in the monolithic ebuild +src_compile () { + myconf="--with-extra-includes=$(xml2-config --cflags | sed -e 's:^-I::')" + + export LIBXML_LIBS="`xml2-config --libs`" + export LIBXSLT_LIBS="`xslt-config --libs`" + kde-meta_src_compile +} |