So that filenames that look like HTML don't get fancy-formatted when
we show info about them (i.e. on hover)
This patch fixes the same issue in two places:
- dolphin, by setting Qt::PlainText on the status bar's label
- konqueror, by escaping setStatusBarText strings emitted by
DolphinPart
BUG: 321778
FIXED-IN: 4.11.0
REVIEW: 111746
#include <QApplication>
#include <QClipboard>
#include <QDir>
#include <QApplication>
#include <QClipboard>
#include <QDir>
+#include <QTextDocument>
K_PLUGIN_FACTORY(DolphinPartFactory, registerPlugin<DolphinPart>();)
K_EXPORT_PLUGIN(DolphinPartFactory("dolphinpart", "dolphin"))
K_PLUGIN_FACTORY(DolphinPartFactory, registerPlugin<DolphinPart>();)
K_EXPORT_PLUGIN(DolphinPartFactory("dolphinpart", "dolphin"))
if (item.isNull()) {
updateStatusBar();
} else {
if (item.isNull()) {
updateStatusBar();
} else {
- ReadOnlyPart::setStatusBarText(item.getStatusBarInfo());
+ const QString escapedText = Qt::escape(item.getStatusBarInfo());
+ ReadOnlyPart::setStatusBarText(QString("<qt>%1</qt>").arg(escapedText));
// Initialize text label
m_label = new QLabel(this);
m_label->setWordWrap(true);
// Initialize text label
m_label = new QLabel(this);
m_label->setWordWrap(true);
+ m_label->setTextFormat(Qt::PlainText);
m_label->installEventFilter(this);
// Initialize zoom widget
m_label->installEventFilter(this);
// Initialize zoom widget