Testing and debugging Dolphin/KIO plugin with Qt Creator¶
Build as usual, ensure
NO_FILE_ITEM_ACTION_PLUGINis turned off.For KF5, copy the
*.desktopfile from the build directory to~/.local/share/kservices5and enable it in Dolphin. You may skip this step if a packaged version with the same configuration name is already installed. As of KF6 this step is not required anymore.Add new config for run in Qt Creator and set
dolphinas executable.In the execution environment, set
QT_PLUGIN_PATHto the build directory of the plugin (for KF5 this directory contains theso-file directly, for KF6 it is in the sub directorykf6/kfileitemaction).QT_DEBUG_PLUGINSto 1 for verbose plugin detection.QT_XCB_NO_GRAB_SERVERto 1 to prevent grabbing so the debugger is usable (not required under Wayland).
Ignore the warning that the executable is no debug build. It is sufficient when the plugin is a debug build.
Testing against a development build of Dolphin¶
Build the whole dependency chain up to
dolphininstalling it under some custom prefix.Then follow the usual steps but make sure you build Syncthing Tray against the custom KDE builds. This is achieved the easiest by using the
debug-kde-customCMake preset. This preset uses the environment variableKDE_INSTALL_DIRwhich must point to the custom prefix used in step 1.Source the
prefix.shscript that should be present in the build directory of any KDE library you built in step 1, e.g.source kde/plasma-sdk/prefix.sh.When setting the environment one needs to be more careful to not override variables set in step 3. It is the easiest to just start
dolphinfrom the shell:QT_PLUGIN_PATH=$BUILD_DIR/syncthingtray/debug-kde-custom/syncthingtray/fileitemactionplugin:$QT_PLUGIN_PATH dolphin