Version: be (using KDE KDE 3.1.94) Installed from: Compiled From Sources Compiler: gcc 3.3.1 KDE 3.2 beta 2 compiled using Konstruct OS: Linux quanta_be does not appear to handle xml tags properly when they are a "single" tag (sorry I don't know the correct technical terminology). For instance, the img tag. To reproduce: Open a file with XHTML DTD. Edit an existing image tag using the new GUI tool to edit attributes. Before edit, the tag would be like <img .... />. But after edit, a new tag attribute is simply placed at the end, after the necessary /. Quanta_be may crash at this point. It did not crash the first time I tried it, but it does subsequently. I'll file another bug report for that.
Apologies if I was not clear: I'm referring to the new editor which allows one to edit the CSS and other attributes in a tag. This bug exists with the latest version from CVS.
I'm seeing this too. It's rather naster. from: <img src="curvtest.png" xml:lang="en" /> to: <img src="curvtest.png" xml:lang="en" /alt="some">
Subject: quanta_be: quanta/quanta CVS commit by amantia: Fix editing of single XML tags in the new attribute editor as well as autoclosing of them. CCMAIL: 71104-done@bugs.kde.org M +17 -8 document.cpp 1.216.2.21 --- quanta/quanta/document.cpp #1.216.2.20:1.216.2.21 @@ -261,5 +261,13 @@ void Document::changeTagAttribute(Tag *t } else { + index = tag->attrCount() - 1; + if (tag->attribute(index) == "/") + { + tag->attributeNamePos(index, line, col); + col--; + } else + { tag->endPos(line, col); + } if (attrValue.isEmpty()) { @@ -767,6 +775,4 @@ bool Document::xmlAutoCompletion(int lin if (!tag) tag = userTagList.find(tagName.lower()); - if ( !tag || tagName.isEmpty() ) //we are outside of any tag - { QString s = editIf->textLine(line).left(column + 1); int i = column; @@ -775,4 +781,7 @@ bool Document::xmlAutoCompletion(int lin s = s.left(i + 1); + if ( !tag || tagName.isEmpty() ) //we are outside of any tag + { + if ( s.endsWith(completionDTD->tagAutoCompleteAfter) ) // a tag is started { @@ -814,5 +823,6 @@ bool Document::xmlAutoCompletion(int lin else // we are inside of a tag { - if ( string == ">" && tagName[0] != '/' && !tagName.endsWith("/") && tag) + if ( string == ">" && tagName[0] != '/' && !tagName.endsWith("/") && + !s.endsWith("/>") && tag) { if ( tag->parentDTD->singleTagStyle == "xml" && @@ -866,5 +876,4 @@ bool Document::xmlAutoCompletion(int lin int bl, bc; node->tag->beginPos(bl, bc); - QString s; if (node->tag->attrCount() > 0) {