mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
[KBalooRolesProvider] Support properties of type QStringList
QVariant::toString() unwraps a QStringList with a single string to a QString, however a list with multiple entries returns a null string. Explicitly check for KFileMetaData property type and convert accordingly. BUG: 395033 FIXED-IN: 18.04.3 Differential Revision: https://phabricator.kde.org/D13349
This commit is contained in:
parent
588abbf1b6
commit
2f6635f4e8
|
@ -97,6 +97,8 @@ QHash<QByteArray, QVariant> KBalooRolesProvider::roleValues(const Baloo::File& f
|
|||
} else if (role == "bitrate") {
|
||||
const QString bitrate = bitrateFromValue(value.toInt());
|
||||
values.insert(role, bitrate);
|
||||
} else if (pi.valueType() == QVariant::StringList) {
|
||||
values.insert(role, value.toStringList().join(QStringLiteral(", ")));
|
||||
} else {
|
||||
values.insert(role, value.toString());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue