Bug 443903

Summary: "QML module not found" in IDE
Product: [Frameworks and Libraries] libplasma Reporter: Kristen McWilliam <kristen>
Component: componentsAssignee: Marco Martin <notmart>
Status: REPORTED ---    
Severity: normal CC: nate, p.r.worrall, plasma-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: qtcreator error
kdevelop error

Description Kristen McWilliam 2021-10-17 19:20:41 UTC
IDE is apparently unable to import plasmoid:

`import org.kde.plasma.plasmoid 2.0`

> QML module not found (org.kde.plasma.plasmoid).

Same experience in QtCreator & KDevelop. This doesn't affect the build, only working on the source code.


This makes development more difficult, and in particular poses a barrier to potential new contributors since things like IntelliSense, Go To Definition, quick docs, etc will not work.

So far the only insight to the issue has been:

> "That module is only present if you're running in a Plasmashell context"

Is there any way to resolve this?
Comment 1 Nate Graham 2021-10-17 22:48:13 UTC
Where do you see this error exactly?
Comment 2 Kristen McWilliam 2021-10-18 00:28:30 UTC
A few examples:


plasma-desktop:
containments/desktop/package/contents/ui/main.qml
applets/keyboardlayout/contents/ui/main.qml


plasma-workspace:
components/containmentlayoutmanager/qml/BasicAppletContainer.qml


kweather:
plasmoid/package/contents/ui/main.qml


So far every instance I have checked has the same issue.
Comment 3 Kristen McWilliam 2021-10-18 00:29:50 UTC
Created attachment 142556 [details]
qtcreator error
Comment 4 Kristen McWilliam 2021-10-18 00:30:19 UTC
Created attachment 142557 [details]
kdevelop error
Comment 5 Nate Graham 2021-10-18 15:33:01 UTC
That's funny, I don't see those messages in Kate.
Comment 6 Kristen McWilliam 2021-10-18 16:09:26 UTC
Same, and I don't see them in VSCode either.

Despite the missing error, do you get any sort of intelligent parsing of doc comments, autocomplete suggestions, go to definition for the things plasmoid imports?
Comment 7 Nate Graham 2021-10-19 13:26:27 UTC
I do not