diff --git a/src/location/maps/qgeoprojection.cpp b/src/location/maps/qgeoprojection.cpp
index 4e5f1979bfdb1ee5f0da7cf1dd201a43932ce501..5aaf584b54a881e9add62dcdb9956d2aacf49d51 100644
--- a/src/location/maps/qgeoprojection.cpp
+++ b/src/location/maps/qgeoprojection.cpp
@@ -39,6 +39,7 @@
 #include <QtPositioning/private/qlocationutils_p.h>
 #include <QtPositioning/private/qclipperutils_p.h>
 #include <QSize>
+#include <QtGui/QMatrix4x4>
 #include <cmath>
 
 namespace {
diff --git a/src/positioning/qdoublematrix4x4.cpp b/src/positioning/qdoublematrix4x4.cpp
index 76e1252b6eb1ac059661651d30493d37017744e4..32cc7f1f956bdce1f2a40f922a5bdff48b005622 100644
--- a/src/positioning/qdoublematrix4x4.cpp
+++ b/src/positioning/qdoublematrix4x4.cpp
@@ -40,6 +40,7 @@
 #include "qdoublematrix4x4_p.h"
 #include <QtCore/qmath.h>
 //#include <QtCore/qvariant.h>
+#include <QtCore/qdatastream.h>
 #include <cmath>
 
 QT_BEGIN_NAMESPACE
diff --git a/src/positioning/qdoublematrix4x4_p.h b/src/positioning/qdoublematrix4x4_p.h
index d8f6b1f61c3c30026802e7d915dfdd2c3e490032..77b3e5b92df426c8a169f021965249d39ce84967 100644
--- a/src/positioning/qdoublematrix4x4_p.h
+++ b/src/positioning/qdoublematrix4x4_p.h
@@ -53,9 +53,9 @@
 
 #include <QtPositioning/private/qpositioningglobal_p.h>
 #include <QtPositioning/private/qdoublevector3d_p.h>
+#include <QtCore/QDebug>
 #include <QtCore/qmetatype.h>
 #include <QtCore/QRectF>
-#include <QtGui/qmatrix4x4.h>
 
 QT_BEGIN_NAMESPACE