summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2017-03-28 16:14:32 (GMT)
committerKai Uwe Broulik <kde@privat.broulik.de>2017-03-28 16:14:32 (GMT)
commitb9eedbe78c7967b321a4104c93162c89dbbbd647 (patch)
treef8e2865a76924f4a1e28bf4d957dc0c7bff9fde9
parent02137a269d7746c47abf4f53c904d7bced6ad017 (diff)
[Folder View] Use toDisplayString which strips passwords
Otherwise we might be leaking sensitive information. Differential Revision: https://phabricator.kde.org/D5226
-rw-r--r--containments/desktop/plugins/folder/labelgenerator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/containments/desktop/plugins/folder/labelgenerator.cpp b/containments/desktop/plugins/folder/labelgenerator.cpp
index 3022f8a..441880c 100644
--- a/containments/desktop/plugins/folder/labelgenerator.cpp
+++ b/containments/desktop/plugins/folder/labelgenerator.cpp
@@ -102,12 +102,12 @@ QString LabelGenerator::displayLabel()
url = QUrl::fromLocalFile(KShell::tildeExpand(m_url));
}
- QString label(url.toString(QUrl::PreferLocalFile | QUrl::StripTrailingSlash));
+ QString label(url.toDisplayString(QUrl::PreferLocalFile | QUrl::StripTrailingSlash));
const QModelIndex index = m_placesModel->closestItem(url);
if (index.isValid()) {
- QString root = m_placesModel->url(index).toString(QUrl::PreferLocalFile | QUrl::StripTrailingSlash);
+ QString root = m_placesModel->url(index).toDisplayString(QUrl::PreferLocalFile | QUrl::StripTrailingSlash);
label = label.right(label.length() - root.length());
@@ -129,7 +129,7 @@ QString LabelGenerator::displayLabel()
return label;
}
} else if (m_labelMode == 2 /* Full path */) {
- return QUrl(m_url).toString(QUrl::PreferLocalFile | QUrl::StripTrailingSlash);
+ return QUrl(m_url).toDisplayString(QUrl::PreferLocalFile | QUrl::StripTrailingSlash);
} else if (m_labelMode == 3 /* Custom title */) {
return m_labelText;
}