This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Necessary conditions for semantic analysis to function?

Tags: None
(comma "," separated)
User avatar
hugh_k
Registered Member
Posts
1
Karma
0
OS
I am trying to learn enough to contribute to KDE Plasma, especially the desktop environment. My first step is to work out what happens where in the code. I would like to use KDevelop but I cannot get the semantic analysis to function, which severely inhibits navigation and hence exploration.
My set-up is:
    - a dedicated user for coding in a discrete environment in which I have built KF5-Workspace, KF5-Frameworks and KDevelop (5.5.40) using kdesrc-build in a tty log-in; I use Arch Linux, kernel 5.7.7-arch1-1.
    - a separate directory for kdesrc-build: ~/kde/src, ~/kde/build and ~/kde/usr.
    - I have not built a separate Qt but rely on my full installation in /usr/lib.
The problem is:
    - if I use KDevelop to open any of the .qml files in the KF5 sources in ~/kde/src the Qt imports operate as expected but all the org.kde imports are marked as 'module not found' with the exception or org.kde.kirigami.
    - if I use QT Creator the org.kde imports do work correctly where the directories contain plugins.qmltypes files; if I use qmlplugindump to create a (non-relocatable) plugins.qmltypes the import is read.
    - the environment variables QML2_IMPORT_PATH and QT_PLUGIN_PATH seeme to be correctly set (as evidenced by QT Creator working).
    - in Configure KDegvelop the QML Support plug-in is present and enabled, and Background Parser is enabled.
    - I have tried various combinations of directories in the Project-Open Configuration-Language Support-Includes/Imports tab but none have any effect on the problem.
    - running KDevelop from a terminal yields no obviously useful messages.
I feel I have missed something obvious (not least because my knowledge of Cmake is very limited) but I have scoured the configuration options without success.
Can anyone point me in the right direction?
Thanks, Hugh Kernohan
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
FIrst of all, the QML plugin is not the most-used feature of KDevelop, it is possible that something is simply wrong.

That said, did you try configuring a custom include path for the module directories in the project settings?

You could also try to run strace -f kdevelop 2>&1| grep 'some module' to see where KDevelop looks for it, that might tell you why it doesn't find anything.


I'm working on the KDevelop IDE.
bam80
Registered Member
Posts
3
Karma
0
Any success? Have the same problem but my QT Creator has import errors even for dirs with plugins.qmltypes files.
However, if I hover on error message it lists qml directory with needed components there.

UPDATE:
OK, solved it - the import paths must not contain links - so make sure readlink -f <path> returns <path> indeed.
Thanks @scummos for the tip! :)

Looks like QT Creator bug, isn't it?


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]