Commit ba56ec86 authored by Fabio D'Urso's avatar Fabio D'Urso
Browse files

dolphin: Show full file info in statusbar when only one file is selected

The purpose of this change is to give the user a chance to see hover
file information if it doesn't fit in the status bar, by allowing to
click on the file and hover on the status bar.

As it's now possible to have status bar texts starting with "<qt>",
DolphinPart::updateStatusBar() must escape strings. Otherwise,
filenames such as "<qt>Tes<font color=red>t" would be rendered as HTML
data in konqueror's status bar when selected.

BUG: 260717
FIXED-IN: 4.12.0
REVIEW: 111934
parent d0a9410e
......@@ -572,7 +572,8 @@ void DolphinPart::updateNewMenu()
void DolphinPart::updateStatusBar()
emit ReadOnlyPart::setStatusBarText(m_view->statusBarText());
const QString escapedText = Qt::convertFromPlainText(m_view->statusBarText());
emit ReadOnlyPart::setStatusBarText(QString("<qt>%1</qt>").arg(escapedText));
void DolphinPart::updateProgress(int percent)
......@@ -556,8 +556,8 @@ QString DolphinView::statusBarText() const
if (folderCount + fileCount == 1) {
// If only one item is selected, show the filename
filesText = i18nc("@info:status", "<filename>%1</filename> selected", list.first().text());
// If only one item is selected, show info about it
return list.first().getStatusBarInfo();
} else {
// At least 2 items are selected
foldersText = i18ncp("@info:status", "1 Folder selected", "%1 Folders selected", folderCount);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment