diff --git a/src/plugins/projectexplorer/compileoutputwindow.cpp b/src/plugins/projectexplorer/compileoutputwindow.cpp
index de13b9ff3f351d6557bb44459ce806400e5f0837..58e3556cf1ef283e9f3e2ad408f0697f45488211 100644
--- a/src/plugins/projectexplorer/compileoutputwindow.cpp
+++ b/src/plugins/projectexplorer/compileoutputwindow.cpp
@@ -37,6 +37,7 @@
 #include <QtGui/QIcon>
 #include <QtGui/QTextEdit>
 #include <QtGui/QScrollBar>
+#include <QtGui/QPlainTextEdit>
 
 using namespace ProjectExplorer;
 using namespace ProjectExplorer::Internal;
diff --git a/src/plugins/projectexplorer/compileoutputwindow.h b/src/plugins/projectexplorer/compileoutputwindow.h
index c919448ec235f384c0d4d3db7464bef8a94303f7..502018f53c7aa7ef9a86dec618198defc23e8226 100644
--- a/src/plugins/projectexplorer/compileoutputwindow.h
+++ b/src/plugins/projectexplorer/compileoutputwindow.h
@@ -32,7 +32,9 @@
 
 #include <coreplugin/ioutputpane.h>
 
-#include <QtGui/QPlainTextEdit>
+QT_BEGIN_NAMESPACE
+class QPlainTextEdit;
+QT_END_NAMESPACE
 
 namespace ProjectExplorer {
 
diff --git a/src/plugins/projectexplorer/currentprojectfilter.h b/src/plugins/projectexplorer/currentprojectfilter.h
index e4b336fee51e1d35fe652d511598b4a96d0b37d1..e8204a68878cc9fa63b7428ac02e44a012dd4024 100644
--- a/src/plugins/projectexplorer/currentprojectfilter.h
+++ b/src/plugins/projectexplorer/currentprojectfilter.h
@@ -35,8 +35,6 @@
 #include <QtCore/QString>
 #include <QtCore/QByteArray>
 #include <QtCore/QFutureInterface>
-#include <QtCore/QTimer>
-#include <QtGui/QWidget>
 
 namespace ProjectExplorer {
 
diff --git a/src/plugins/projectexplorer/currentprojectfind.h b/src/plugins/projectexplorer/currentprojectfind.h
index 2e8fdb219c2686304961a3eaa8a5c5c221e74a9e..b57e29a5c437c42df2b59067f5fea8b87bc73285 100644
--- a/src/plugins/projectexplorer/currentprojectfind.h
+++ b/src/plugins/projectexplorer/currentprojectfind.h
@@ -35,7 +35,10 @@
 #include <texteditor/basefilefind.h>
 
 #include <QtCore/QPointer>
-#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+class QWidget;
+QT_END_NAMESPACE
 
 namespace ProjectExplorer {
 
diff --git a/src/plugins/projectexplorer/dependenciespanel.cpp b/src/plugins/projectexplorer/dependenciespanel.cpp
index ef9f4ce7ad680ddc1e2e6bbd3e0266214cbdbc95..f714619b7ca9a33153d8c28d8018d6afdc41be39 100644
--- a/src/plugins/projectexplorer/dependenciespanel.cpp
+++ b/src/plugins/projectexplorer/dependenciespanel.cpp
@@ -33,10 +33,13 @@
 
 #include <coreplugin/fileiconprovider.h>
 #include <coreplugin/ifile.h>
+#include <utils/detailswidget.h>
 
 #include <QtCore/QVector>
 #include <QtCore/QDebug>
-#include <QtCore/QAbstractListModel>
+#include <QtCore/QSize>
+#include <QtCore/QCoreApplication>
+
 #include <QtGui/QLabel>
 #include <QtGui/QApplication>
 #include <QtGui/QHBoxLayout>
@@ -46,7 +49,8 @@
 #include <QtGui/QMessageBox>
 #include <QtGui/QPushButton>
 #include <QtGui/QToolButton>
-#include <QtCore/QCoreApplication>
+#include <QtGui/QWidget>
+#include <QtGui/QLabel>
 
 namespace ProjectExplorer {
 namespace Internal {
diff --git a/src/plugins/projectexplorer/dependenciespanel.h b/src/plugins/projectexplorer/dependenciespanel.h
index 2b452e4ae34963c8f5a61eec00a7ae125c044c6d..835abf7799ca5a598888d17262d4666ccea7c7e4 100644
--- a/src/plugins/projectexplorer/dependenciespanel.h
+++ b/src/plugins/projectexplorer/dependenciespanel.h
@@ -31,13 +31,15 @@
 #define DEPENDENCIESDIALOG_H
 
 #include "iprojectproperties.h"
-#include <utils/detailswidget.h>
 
-#include <QtCore/QSize>
-#include <QtGui/QWidget>
-#include <QtGui/QLabel>
+#include <QtCore/QAbstractListModel>
+
 #include <QtGui/QTreeView>
 
+namespace Utils {
+    class DetailsWidget;
+}
+
 namespace ProjectExplorer {
 
 class Project;
diff --git a/src/plugins/projectexplorer/foldernavigationwidget.cpp b/src/plugins/projectexplorer/foldernavigationwidget.cpp
index 799b27add44455f97a68dc56a1f6f8fda6f2d1d7..77f55f1f17f3cbba35b09ca9e9151c0935f32dcc 100644
--- a/src/plugins/projectexplorer/foldernavigationwidget.cpp
+++ b/src/plugins/projectexplorer/foldernavigationwidget.cpp
@@ -38,15 +38,14 @@
 #include <utils/pathchooser.h>
 
 #include <QtCore/QDebug>
+#include <QtGui/QDirModel>
 #include <QtGui/QVBoxLayout>
 #include <QtGui/QToolButton>
+#include <QtGui/QLabel>
+#include <QtGui/QListView>
+#include <QtGui/QSortFilterProxyModel>
 
-using namespace ProjectExplorer;
-using namespace ProjectExplorer::Internal;
-
-namespace {
-bool debug = false;
-}
+enum { debug = 0 };
 
 namespace ProjectExplorer {
 namespace Internal {
@@ -62,9 +61,6 @@ protected:
     }
 };
 
-} // namespace Internal
-} // namespace ProjectExplorer
-
 /*!
   /class FolderNavigationWidget
 
@@ -205,7 +201,7 @@ Core::NavigationView FolderNavigationWidgetFactory::createWidget()
     FolderNavigationWidget *ptw = new FolderNavigationWidget;
     n.widget = ptw;
     QToolButton *toggleSync = new QToolButton;
-    toggleSync->setIcon(QIcon(":/core/images/linkicon.png"));
+    toggleSync->setIcon(QIcon(QLatin1String(":/core/images/linkicon.png")));
     toggleSync->setCheckable(true);
     toggleSync->setChecked(ptw->autoSynchronization());
     toggleSync->setToolTip(tr("Synchronize with Editor"));
@@ -214,4 +210,7 @@ Core::NavigationView FolderNavigationWidgetFactory::createWidget()
     return n;
 }
 
+} // namespace Internal
+} // namespace ProjectExplorer
+
 #include "foldernavigationwidget.moc"
diff --git a/src/plugins/projectexplorer/foldernavigationwidget.h b/src/plugins/projectexplorer/foldernavigationwidget.h
index 97082d6ec04b8945262f2b7fa2e0d2305d4e2640..cc405cac494ba74f26dd918be1767b91bca655ba 100644
--- a/src/plugins/projectexplorer/foldernavigationwidget.h
+++ b/src/plugins/projectexplorer/foldernavigationwidget.h
@@ -32,12 +32,17 @@
 
 #include <coreplugin/inavigationwidgetfactory.h>
 
-#include <QtGui/QDirModel>
-#include <QtGui/QLabel>
-#include <QtGui/QListView>
-#include <QtGui/QSortFilterProxyModel>
 #include <QtGui/QWidget>
 
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QListView;
+class QSortFilterProxyModel;
+class QModelIndex;
+class QDirModel;
+class QDir;
+QT_END_NAMESPACE
+
 namespace ProjectExplorer {
 
 class ProjectExplorerPlugin;
diff --git a/src/plugins/projectexplorer/outputwindow.cpp b/src/plugins/projectexplorer/outputwindow.cpp
index 8f9ba4607f04c95c0c19e1a31841cf4cd7b7b45b..1b962ba637965b287ae1d2d770fa0bb3f3fbc946 100644
--- a/src/plugins/projectexplorer/outputwindow.cpp
+++ b/src/plugins/projectexplorer/outputwindow.cpp
@@ -35,12 +35,14 @@
 #include <coreplugin/coreconstants.h>
 #include <coreplugin/icore.h>
 #include <coreplugin/uniqueidmanager.h>
+#include <coreplugin/icontext.h>
 #include <find/basetextfind.h>
 #include <aggregation/aggregate.h>
 
 #include <QtGui/QIcon>
 #include <QtGui/QScrollBar>
 #include <QtGui/QTextLayout>
+#include <QtGui/QTextBlock>
 #include <QtGui/QPainter>
 #include <QtGui/QApplication>
 #include <QtGui/QClipboard>
@@ -48,6 +50,7 @@
 #include <QtGui/QMessageBox>
 #include <QtGui/QVBoxLayout>
 #include <QtGui/QTabWidget>
+#include <QtGui/QToolButton>
 
 using namespace ProjectExplorer::Internal;
 using namespace ProjectExplorer;
diff --git a/src/plugins/projectexplorer/outputwindow.h b/src/plugins/projectexplorer/outputwindow.h
index e2175deaa5fc9b2c1ef21420881ecaf076e5a8f6..b5463f883d78862e6a233c77216e2cd88094da81 100644
--- a/src/plugins/projectexplorer/outputwindow.h
+++ b/src/plugins/projectexplorer/outputwindow.h
@@ -31,19 +31,22 @@
 #define OUTPUTWINDOW_H
 
 #include <coreplugin/ioutputpane.h>
-#include <texteditor/plaintexteditor.h>
 
 #include <QtCore/QObject>
 #include <QtCore/QHash>
-#include <QtCore/QBasicTimer>
-#include <QtGui/QAbstractScrollArea>
-#include <QtGui/QToolButton>
+#include <QtGui/QShowEvent>
 #include <QtGui/QPlainTextEdit>
 
 QT_BEGIN_NAMESPACE
 class QTabWidget;
+class QToolButton;
+class QAction;
 QT_END_NAMESPACE
 
+namespace Core {
+    class BaseContext;
+}
+
 namespace ProjectExplorer {
 
 class RunControl;
@@ -108,7 +111,6 @@ private:
     QTabWidget *m_tabWidget;
     QHash<RunControl *, OutputWindow *> m_outputWindows;
     QAction *m_stopAction;
-//    QToolButton *m_insertLineButton;
     QToolButton *m_reRunButton;
     QToolButton *m_stopButton;
 };