--- a/src/base/Pitch.h
+++ b/src/base/Pitch.h
@@ -24,6 +24,8 @@
 
 #include <string>
 
+#include <QObject>
+
 
 namespace Rosegarden
 {
--- a/src/gui/editors/matrix/MatrixTool.h
+++ b/src/gui/editors/matrix/MatrixTool.h
@@ -23,6 +23,8 @@
 #include "gui/general/ActionFileClient.h"
 #include "gui/general/AutoScroller.h"  // For FollowMode
 
+#include <QKeyEvent>
+
 class QAction;
 
 namespace Rosegarden
