The commit bfa4274f58fcf5c873f20210ce6a88277671ccee breaks building dolphin-plugins. The forward declarations of KFileItemList and KFileItem classes makes them incomplete. Removing the forward declarations on top and readding the #include <KFileItem>; fixes the compilation. So reverting following change fixes the build for me: --- a/src/views/versioncontrol/kversioncontrolplugin.h +++ b/src/views/versioncontrol/kversioncontrolplugin.h @@ -23,9 +23,9 @@ #include <dolphin_export.h> #include <QObject> -#include <KFileItem> #include <QAction> - +class KFileItemList; +class KFileItem; /** * @brief Base class for version control plugins. * Reproducible: Always
Thanks for the bug report! On the one hand, one could argue that this should better be fixed in dolphin-plugins, because using forward declarations to reduce dependencies is a good practice. On the other hand, the header with the KFileItem include has already been released in a stable version, and forcing users of this header to adjust their code now is not very nice.
I completely agree with you.
Relying on indirect inclusion is a bug. Keeping it for convenience is nice, but our goal should be clean headers.
A fix for dolphin-plugins, which seems to be the best long-term solution, is at https://git.reviewboard.kde.org/r/125247/. If I missed anything, please let me know! (If it is considered necessary to revert the change in kversioncontrolplugin.h in order to not break backwards compatibility, this can still be done.)
This has been fixed in dolphin-plugins in the mean time: https://quickgit.kde.org/?p=dolphin-plugins.git&a=commit&h=9ceea02f9d1903e260a1d45d1ca0330d6c2d47fe