[PackageLoader] Don't access invalid KPluginMetadata
ClosedPublic

Authored by broulik on Jan 4 2017, 2:58 PM.

Details

Summary

BUG: 374541

Test Plan

Compiles

Hmm, according to docs of KPluginMetadata pluginId()

@return the internal name of the plugin (for KParts Plugins this is
the same name as set in the .rc file). If the plugin name property is not set in
the metadata this will return the plugin file name without the file extension."

and for isValid()

If this is @c true pluginId() will return a non-empty string.

So accessing pluginId() should always be safe?

Also, docs for KPluginLoader::findPlugins say

Only plugins which have JSON metadata will be considered.

So I would assume it should never return invalid KPluginMetadata? Dunno...

Diff Detail

Repository
R290 KPackage
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 9708.Jan 4 2017, 2:58 PM
broulik retitled this revision from to [PackageLoader] Don't access invalid KPluginMetadata.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added reviewers: Plasma, apol.
broulik set the repository for this revision to R290 KPackage.
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptJan 4 2017, 2:58 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
broulik edited the test plan for this revision. (Show Details)Jan 4 2017, 3:01 PM
broulik edited the test plan for this revision. (Show Details)Jan 4 2017, 3:03 PM
mart accepted this revision.Jan 4 2017, 3:42 PM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Jan 4 2017, 3:42 PM
This revision was automatically updated to reflect the committed changes.