4850c08998b33b37af99c3312d193b063b3e8174.diff 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. diff --git a/src/zanshin/kontact/kontact_plugin.cpp b/src/zanshin/kontact/kontact_plugin.cpp
  2. index b03d967457d6f7a7cc60fd72cb990e8e64f352f0..4b0d2f925a300545ea3f222864b264f12ac38593 100644
  3. --- a/src/zanshin/kontact/kontact_plugin.cpp
  4. +++ b/src/zanshin/kontact/kontact_plugin.cpp
  5. @@ -33,9 +33,16 @@ Plugin::Plugin(KontactInterface::Core *core, const QVariantList&)
  6. setComponentName(QStringLiteral("zanshin"), QStringLiteral("zanshin"));
  7. }
  8. +#if KONTACTINTERFACE_VERSION >= QT_VERSION_CHECK(5, 14, 42)
  9. +KParts::Part *Plugin::createPart()
  10. +{
  11. + return loadPart();
  12. +}
  13. +#else
  14. KParts::ReadOnlyPart *Plugin::createPart()
  15. {
  16. return loadPart();
  17. }
  18. +#endif
  19. #include "kontact_plugin.moc"
  20. diff --git a/src/zanshin/kontact/kontact_plugin.h b/src/zanshin/kontact/kontact_plugin.h
  21. index 0d45564e861f21fc26b4e2b3a21668bd9c757002..a270ba1643bf11bd38f9f08a4096588082f962b2 100644
  22. --- a/src/zanshin/kontact/kontact_plugin.h
  23. +++ b/src/zanshin/kontact/kontact_plugin.h
  24. @@ -25,6 +25,7 @@
  25. #define ZANSHIN_KONTACT_PLUGIN_H
  26. #include <KontactInterface/Plugin>
  27. +#include <kontactinterface_version.h>
  28. class Plugin : public KontactInterface::Plugin
  29. {
  30. @@ -36,7 +37,11 @@ public:
  31. int weight() const override { return 449; }
  32. protected:
  33. +#if KONTACTINTERFACE_VERSION >= QT_VERSION_CHECK(5, 14, 42)
  34. + KParts::Part *createPart() override;
  35. +#else
  36. KParts::ReadOnlyPart *createPart() override;
  37. +#endif
  38. };
  39. #endif