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
Branch
convert_empty_string_to_stringlist
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1665
Build 1683: arc lint + arc unit
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.