https://bugs.kde.org/show_bug.cgi?id=349458
well... just thought I tried it since it's been hanging for awhile. It's more of a hack, so some revisions will be required. Currently missing deleting workspaces (to be explained). I tried to follow how it is done in photoshop.
The workspaces submenu shows up and updating accordingly when modified by KisWorkspaceChooser; that's the easy part.
For importing and creating workspaces, this patch just simply copy paste from where it was originally from; there's 2 copies of the same thing.
For deleting workspaces, I had not implemented it as I have my doubts on whether it would work. I initially have in mind a simple QInputDialog::getItem modal dialog, but there's a slight complication: there can exists multiple workspaces with the same name (for example if I save "bruce" as a workspace twice there are 2 workspaces named "bruce"). This is not allowed in photoshop; I'm not sure what use case would exist that a user wants 2 of more workspaces with the same name.
To workaround this is to create a custom QDialog that would have a QCombobox take a KoResourceModel as a model. Another Alternative is to copy paste code from KoResourceItemChooser. Either way there's going to be duplicate code.
Some refactoring in various parts of Krita will be needed to have import, create and delete workspace functionality properly shared.
Thoughts on this? Feel free to also comment on best practices and stuff; I'm fairly new to the project.