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

List:       kde-commits
Subject:    extragear/base/konq-plugins/domtreeviewer
From:       Harri Porten <porten () kde ! org>
Date:       2008-11-17 23:45:57
Message-ID: 1226965557.652029.21890.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 885833 by porten:

Fixed display of text with newlines in it. QTextStream::readLine()
does strip trailing \n and \r\n but it can't if we surround the whole
text with quote characters.


 M  +2 -2      domtreeview.cpp  


--- trunk/extragear/base/konq-plugins/domtreeviewer/domtreeview.cpp #885832:885833
@@ -341,7 +341,7 @@
     }
     cur_item->setText(0, text);
   } else {
-    text = "`" + node.nodeValue().string() + '\'';
+    text = node.nodeValue().string();
 
     // Hacks to deal with PRE
     QTextStream ts( &text, QIODevice::ReadOnly );
@@ -349,7 +349,7 @@
       const QString txt(ts.readLine());
       const QFont font(KGlobalSettings::fixedFont());
       cur_item->setFont( font );
-      cur_item->setText(0, txt);
+      cur_item->setText(0, '`' + txt  + '\'');
 
       if(node.handle()) {
 	m_itemdict.insert(node.handle(), cur_item);
[prev in list] [next in list] [prev in thread] [next in thread] 

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