KPluginMetaData: convert empty string to empty stringlist.
ClosedPublic

Authored by dfaure on Aug 10 2018, 9:55 AM.

Details

Summary

As a fallback when the property type is unknown, we use string.
When reading a stringlist, if the key is absent or empty, this method
was returning QStringList(""), which was rather unexpected.

Test Plan

XDG_DATA_DIRS='foo' ../bin/kplugininfotest in kservice:
Got dependencies ("")
FAIL! : KPluginInfoTest::testLoadDesktop(from KService::Ptr) Compared lists have different sizes.

Actual   (info.dependencies()) size: 1
Expected (QStringList()) size: 0

Diff Detail

Repository
R244 KCoreAddons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dfaure created this revision.Aug 10 2018, 9:55 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 10 2018, 9:55 AM
Restricted Application edited subscribers, added: kde-frameworks-devel; removed: Frameworks. · View Herald Transcript
dfaure requested review of this revision.Aug 10 2018, 9:55 AM
This revision is now accepted and ready to land.Aug 10 2018, 10:01 AM
This revision was automatically updated to reflect the committed changes.