https://bugs.kde.org/show_bug.cgi?id=442783
Bug ID: 442783 Summary: Doesn't add a new resource type to the database if the database was created without it (seexpr) Product: krita Version: git master (please specify the git hash!) Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: Resource Management Assignee: krita-bugs-n...@kde.org Reporter: tamtamy.tym...@gmail.com Target Milestone: --- Created attachment 141774 --> https://bugs.kde.org/attachment.cgi?id=141774&action=edit Screenshot of the database without the seexpr resource type entry SUMMARY I compiled kseexpr and installed it into Krita, and Krita's seexpr works, but the resources don't show up. Text in the console: "Adding to database failed, resource id after adding is -1 ! (Probable reason: the resource has the same filename, storage, resource type as an existing resource). Resource is: "Wolthera's_fractional_Brownian_Motion" "Wolthera's_fractional_Brownian_Motion.kse" "seexpr_scripts" "Krita_Artists_SeExpr_examples.bundle"" I believe the reason it cannot be added is because it cannot find an appropriate id for the seexpr resource type, and that's because the seexpr resource type is not available in the database at all. STEPS TO REPRODUCE 1. Remove your resource folder. 2. Use Krita that doesn't have seexpr (which is an optional dependency). See that there is no text on the console (because it considers the seexpr resources just broken). 3. Use Krita with seexpr. OBSERVED RESULT No seexpr scripts in the seexpr dialog. Warnings on the console about not being able to add seexpr scripts entries to the database. Seexpr script written by the user works (and actually, it even by default uses the last script the user wrote or used, I think?). EXPECTED RESULT Seexpr scripts resources are available in the seexpr dialog. NOTE If we figure out how to handle it nicely, it should help us add further resource types in the future. All of the new resource types will be in the same situation, after all (already existing database without that type in the resource_types table). The easy solution for this particular bug would be to just always add the seexpr entry even if Krita has no access to seexpr scripts, but maybe it could be handled better and handle an existing database without that entry already (and just add it). SOFTWARE/OS VERSIONS Krita Version: 5.1.0-prealpha (git 09aee17) Languages: en_US, en, en_US, en, en_US, en, pl_PL, pl, pl_PL, pl Hidpi: true Qt Version (compiled): 5.11.1 Version (loaded): 5.11.1 -- You are receiving this mail because: You are watching all bug changes.