summaryrefslogtreecommitdiff
path: root/noncore/apps/tableviewer/ui/tvbrowseview.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/tableviewer/ui/tvbrowseview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tableviewer/ui/tvbrowseview.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/apps/tableviewer/ui/tvbrowseview.cpp b/noncore/apps/tableviewer/ui/tvbrowseview.cpp
index f5f2555..22bac55 100644
--- a/noncore/apps/tableviewer/ui/tvbrowseview.cpp
+++ b/noncore/apps/tableviewer/ui/tvbrowseview.cpp
@@ -14,24 +14,25 @@
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "tvbrowseview.h"
#include "browsekeyentry.h"
#include <qtoolbutton.h>
#include <qtextview.h>
#include <qtextbrowser.h>
#include <qlayout.h>
+#include "../xmlencodeattr.h"
/*!
\class TVBrowseView
\brief The widget describing how to draw the browse view user interface
This widget allows for the user to browse through the table, one element
at a time, or search on a single key. Its main goal is to show a
single element in a readable format and make it easy for the user to
rapidly find specific elements in the table.
*/
/*!
@@ -93,30 +94,30 @@ void TVBrowseView::reset()
sets the data element to be displayed to element
*/
void TVBrowseView::setDisplayText(const DataElem *element)
{
QString rep = "";
KeyListIterator it(*ts->kRep);
while (it.current()) {
if (element->hasValidValue(it.currentKey())) {
if(it.currentKey() == ts->current_column) {
rep += "<A name=\"ckey\"></A><B><FONT COLOR=#FF0000>"
- + it.current()->name()
+ + encodeAttr(it.current()->name())
+ ":</FONT></B> ";
} else {
- rep += "<B>" + it.current()->name() + ":</B> ";
+ rep += "<B>" + encodeAttr(it.current()->name()) + ":</B> ";
}
- rep += element->toQString(it.currentKey()) + "<BR>";
+ rep += encodeAttr(element->toQString(it.currentKey())) + "<BR>";
}
++it;
}
textViewDisplay->setText(rep);
textViewDisplay->scrollToAnchor("ckey");
}
void TVBrowseView::rebuildKeys()
{
keyEntry->rebuildKeys();
}