Commit e2e43c90 authored by Méven Car's avatar Méven Car
Browse files

Allow dolphin to format DateTime at later stage than KBalooRolesProvider

Summary:
KFileItemListWidgetInformant::roleText expected imageDateTime value to be a QDateTime but KBalooRolesProvider formatted it to QString previously, preventing KFileItemListWidgetInformant::roleText to format properly the imageDateTime

BUG: 411173

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25242
parent 89a7b316
......@@ -81,7 +81,12 @@ QHash<QByteArray, QVariant> KBalooRolesProvider::roleValues(const Baloo::File& f
std::for_each(rangeBegin, rangeEnd, [&list](const entry& s) { list.append(s.second); });
values.insert(role, propertyInfo.formatAsDisplayString(list));
} else {
values.insert(role, propertyInfo.formatAsDisplayString((*rangeBegin).second));
if (propertyInfo.valueType() == QVariant::DateTime) {
// Let dolphin format later Dates
values.insert(role, (*rangeBegin).second);
} else {
values.insert(role, propertyInfo.formatAsDisplayString((*rangeBegin).second));
}
}
rangeBegin = rangeEnd;
}
......
Markdown is supported
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