mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
Use KFileItem::text() instead of KFileItem::name().
This way Nepomuk search results get their proper user readable names. BUG: 287472 REVIEW: 103237
This commit is contained in:
parent
3950eccaf0
commit
93cc480803
|
@ -425,9 +425,9 @@ void DolphinViewContainer::showItemInfo(const KFileItem& item)
|
|||
} else {
|
||||
QString message;
|
||||
if (item.isDir()) {
|
||||
message = item.name();
|
||||
message = item.text();
|
||||
} else {
|
||||
message = i18nc("@info:status filename (type)", "%1 (%2)", item.name(), item.mimeComment());
|
||||
message = i18nc("@info:status filename (type)", "%1 (%2)", item.text(), item.mimeComment());
|
||||
}
|
||||
m_statusBar->setMessage(message, DolphinStatusBar::Default);
|
||||
}
|
||||
|
|
|
@ -953,7 +953,7 @@ QHash<QByteArray, QVariant> KFileItemModel::retrieveData(const KFileItem& item)
|
|||
}
|
||||
|
||||
if (m_requestRole[NameRole]) {
|
||||
data.insert("name", item.name());
|
||||
data.insert("name", item.text());
|
||||
}
|
||||
|
||||
if (m_requestRole[SizeRole]) {
|
||||
|
|
|
@ -339,7 +339,7 @@ void DolphinView::setItemSelectionEnabled(const QRegExp& pattern, bool enabled)
|
|||
|
||||
for (int index = 0; index < model->count(); index++) {
|
||||
const KFileItem item = model->fileItem(index);
|
||||
if (pattern.exactMatch(item.name())) {
|
||||
if (pattern.exactMatch(item.text())) {
|
||||
// An alternative approach would be to store the matching items in a QSet<int> and
|
||||
// select them in one go after the loop, but we'd need a new function
|
||||
// KItemListSelectionManager::setSelected(QSet<int>, SelectionMode mode)
|
||||
|
|
Loading…
Reference in a new issue