Previously it would warn about no "mainscript" having been provided but all paths are empty for an invalid package.
Print a more appropriate error message about the kpackage itself being invalid.
Details
- Reviewers
mart tcanabrava apol - Commits
- R296:19bf8ad69bde: Warn if KPackage is invalid
Tried a new KCM which had a folder missing, got a better error message now
Diff Detail
- Repository
- R296 KDeclarative
- Lint
Lint Skipped - Unit
Unit Tests Skipped
+1 in concept. Is there any more verbose information we can get though? Like specifically how the package is invalid?
src/quickaddons/configmodule.cpp | ||
---|---|---|
174 | maybe put it after checking the mainscript? the "no QML file provided" error is more accurate. We can keep ::isValid as a fallback. |
src/quickaddons/configmodule.cpp | ||
---|---|---|
174 | Is "mainscript" mandatory? In any case, if your package has the incorrect folder structure, it previously printed "no QML file provided" which is super misleading as it suggests the config entry is missing which it usually isn't. |
Let's consider it an iteration though.
src/quickaddons/configmodule.cpp | ||
---|---|---|
174 | ¯\_(ツ)_/¯ If that's the case... Maybe we could see to passing a string ref argument to isValid? Or adding a Package::errorString method (that will likely dupe all the logic). |