kFatal() is long gone and was not ported to qFatal().
If there are multiple plugin choices without a keyword,
the function returns a random object among the candidates.
Details
Details
- Reviewers
dfaure apol - Commits
- R244:03e96bcfc1f2: KPluginFactory: fix create() apidox
Diff Detail
Diff Detail
- Repository
- R244 KCoreAddons
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 4798 Build 4816: arc lint + arc unit
Comment Actions
Note: I'm not 100% sure the code actually returns nullptr, so someone please double check.
src/lib/plugin/kpluginfactory.h | ||
---|---|---|
347 ↗ | (On Diff #45222) | I don't see that the code returns nullptr in this case, no. Seems to me that it gets into kpluginfactory.cpp:143 which issues a qWarning [git log says I ported from kFatal to qWarning, not sure why, I guess I was doing like in Qt, bad API usage = warning, use QT_FATAL_WARNINGS if you want to abort on warnings]. The code then returns the last one of the candidates, but order is undefined, so the docu should say that it's not defined which object is returned. |