diff --git a/src/call.cpp b/src/call.cpp
index 6ab460dcfa66ee7093839f4257d6058bea5bdb3c..b763b8198344b3181266684fcb83c97a35e6ac3d 100644
--- a/src/call.cpp
+++ b/src/call.cpp
@@ -1637,7 +1637,7 @@ QVariant Call::roleData(int role) const
          return peerContactMethod()->uri();
          break;
       case Call::Role::Direction2:
-         return static_cast<int>(d_ptr->m_Direction); //TODO Qt5, use the Q_ENUM
+         return QVariant::fromValue(d_ptr->m_Direction);
          break;
       case Call::Role::Date:
          return (int)startTimeStamp();
@@ -1652,7 +1652,7 @@ QVariant Call::roleData(int role) const
          return hasRecording();
          break;
       case Call::Role::Historystate:
-         return static_cast<int>(historyState());
+         return QVariant::fromValue(historyState());
          break;
       case Call::Role::Filter: {
          QString normStripppedC;
@@ -1665,7 +1665,7 @@ QVariant Call::roleData(int role) const
          }
          break;
       case Call::Role::FuzzyDate:
-         return (int)d_ptr->m_HistoryConst; //TODO Qt5, use the Q_ENUM
+         return QVariant::fromValue(d_ptr->m_HistoryConst);
          break;
       case Call::Role::IsBookmark:
          return false;
@@ -1692,7 +1692,7 @@ QVariant Call::roleData(int role) const
          return ct?ct->photo():QVariant();
          break;
       case Call::Role::CallState:
-         return static_cast<int>(state()); //TODO Qt5, use the Q_ENUM
+         return QVariant::fromValue(state());
          break;
       case Call::Role::Id:
          return id();
diff --git a/src/call.h b/src/call.h
index 4f54122c225d8e53e95d4259e4a1b51cb61794be..1584ba3651206eb15fe75b653ac72bc33e3a2a5f 100644
--- a/src/call.h
+++ b/src/call.h
@@ -148,6 +148,7 @@ public:
       MISSED  , /*!< The call has been missed */
       NONE      /*!< The legacy state is not set */
    };
+   Q_ENUMS(LegacyHistoryState)
 
    ///@enum Direction If the user have been called or have called
    enum class Direction : int {
@@ -349,6 +350,9 @@ Q_SIGNALS:
 };
 
 Q_DECLARE_METATYPE(Call*)
+Q_DECLARE_METATYPE(Call::State)
+Q_DECLARE_METATYPE(Call::Direction)
+Q_DECLARE_METATYPE(Call::LegacyHistoryState)
 
 QDebug LIB_EXPORT operator<<(QDebug dbg, const Call::State& c       );
 QDebug LIB_EXPORT operator<<(QDebug dbg, const Call::DaemonState& c );
diff --git a/src/delegates/pixmapmanipulationdelegate.h b/src/delegates/pixmapmanipulationdelegate.h
index af14e8f4b07d49b6b2df4d7229dcafe27161d116..cc2b353ce3881ec7737689fbeab4ca5fae8cd579 100644
--- a/src/delegates/pixmapmanipulationdelegate.h
+++ b/src/delegates/pixmapmanipulationdelegate.h
@@ -17,7 +17,7 @@
  ***************************************************************************/
 #ifndef PIXMAPMANIPULATIONVISITOR_H
 #define PIXMAPMANIPULATIONVISITOR_H
-#include "../typedefs.h"
+#include <typedefs.h>
 
 //Qt
 #include <QtCore/QVariant>
diff --git a/src/historytimecategorymodel.h b/src/historytimecategorymodel.h
index 22d0ee9b60a1cc712c9c7d736bd6c37493868fc8..8ab20526e0582d0631c9160d7e207e1ab49aca48 100644
--- a/src/historytimecategorymodel.h
+++ b/src/historytimecategorymodel.h
@@ -84,5 +84,7 @@ private:
    HistoryTimeCategoryModelPrivate* d_ptr;
    Q_DECLARE_PRIVATE(HistoryTimeCategoryModel)
 };
+Q_DECLARE_METATYPE(HistoryTimeCategoryModel::HistoryConst)
+Q_DECLARE_METATYPE(HistoryTimeCategoryModel*)
 
 #endif