diff --git a/doc/example/textfinder/main.cpp b/doc/example/textfinder/main.cpp
index 7f8c63d951b56d0ea8976cfcfe3fb1aad4bd381a..e790b6e989f2d88c3b0f53f767072cb80e3fcb33 100644
--- a/doc/example/textfinder/main.cpp
+++ b/doc/example/textfinder/main.cpp
@@ -30,9 +30,11 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
-#include <QtGui/QApplication>
+
 #include "textfinder.h"
 
+#include <QtGui/QApplication>
+
 int main(int argc, char *argv[])
 {
     Q_INIT_RESOURCE(textfinder);
diff --git a/doc/example/textfinder/textfinder.cpp b/doc/example/textfinder/textfinder.cpp
index a524f1c869af2f1bd730633347e0273a600372a3..c2a9f50f869b00cf9b9024680d5abfc6177b9d9d 100644
--- a/doc/example/textfinder/textfinder.cpp
+++ b/doc/example/textfinder/textfinder.cpp
@@ -30,10 +30,12 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
-#include <QtGui/QMessageBox>
+
+#include "textfinder.h"
+
 #include <QtCore/QFile>
 #include <QtCore/QTextStream>
-#include "textfinder.h"
+#include <QtGui/QMessageBox>
 
 TextFinder::TextFinder(QWidget *parent, Qt::WFlags flags)
     : QWidget(parent, flags)
diff --git a/doc/example/textfinder/textfinder.h b/doc/example/textfinder/textfinder.h
index 2563a2016acd9524eac006550ed0f8982fca1d57..d5d10c6b525722667dfbbd71301fef41065adc53 100644
--- a/doc/example/textfinder/textfinder.h
+++ b/doc/example/textfinder/textfinder.h
@@ -30,12 +30,14 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef TEXTFINDER_H
 #define TEXTFINDER_H
 
-#include <QtGui/QWidget>
 #include "ui_textfinder.h"
 
+#include <QtGui/QWidget>
+
 class QPushButton;
 class QTextEdit;
 class QLineEdit;
diff --git a/shared/cpaster/cgi.cpp b/shared/cpaster/cgi.cpp
index 222d0c9d088c4b4b708912b68caebb3159a50eef..3670005134095dfba56e9bb9b60932755a208ade 100644
--- a/shared/cpaster/cgi.cpp
+++ b/shared/cpaster/cgi.cpp
@@ -30,13 +30,14 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "cgi.h"
 
 #include <QByteArray>
 
-// -------------------------------------------------------------------------------------------------
 
 const char *cgi_chars = "0123456789abcdef"; // RFC 1738 suggests lower-case to be optimal
+
 QString CGI::encodeURL(const QString &rawText)
 {
     QByteArray utf = rawText.toUtf8();
@@ -424,5 +425,3 @@ QString CGI::encodeHTML(const QString &rawText, int conversionFlags)
     return enc;
 }
 
-// -------------------------------------------------------------------------------------------------
-
diff --git a/shared/cpaster/cgi.h b/shared/cpaster/cgi.h
index 37b3eb09986fde2fef8bae1d312de45929546ee4..7d554783d850c47c10dd66ac240b88fdaf2b1712 100644
--- a/shared/cpaster/cgi.h
+++ b/shared/cpaster/cgi.h
@@ -30,8 +30,10 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
-#ifndef _CGI_H_
-#define _CGI_H_
+
+#ifndef CGI_H
+#define CGI_H
+
 #include <QString>
 
 class CGI
@@ -54,5 +56,4 @@ private:
     inline QChar hexToChar(const QString &hx);
 };
 
-#endif // _CGI_H_
-
+#endif // CGI_H
diff --git a/shared/cpaster/fetcher.cpp b/shared/cpaster/fetcher.cpp
index 19e9690b8bc5a43d3140af4fcfcfc84cc1e9b4cf..556b9288d9453046d5fb7cd507775e3d31458475 100644
--- a/shared/cpaster/fetcher.cpp
+++ b/shared/cpaster/fetcher.cpp
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "fetcher.h"
 #include "cgi.h"
 
@@ -44,7 +45,7 @@ Fetcher::Fetcher(const QString &host)
     m_status = 0;
     m_hadError = false;
     connect(this, SIGNAL(requestFinished(int,bool)), SLOT(gotRequestFinished(int,bool)));
-    connect(this, SIGNAL(readyRead(const QHttpResponseHeader &)), SLOT(gotReadyRead(const QHttpResponseHeader &)));
+    connect(this, SIGNAL(readyRead(QHttpResponseHeader)), SLOT(gotReadyRead(QHttpResponseHeader)));
 }
 
 int Fetcher::fetch(const QString &url)
diff --git a/shared/cpaster/fetcher.h b/shared/cpaster/fetcher.h
index 989965c2714dfedb940d1d262a021b44c3f2dddc..feb523571731394ad1ed917eb8126c6d0c79c833 100644
--- a/shared/cpaster/fetcher.h
+++ b/shared/cpaster/fetcher.h
@@ -30,12 +30,12 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef FETCHER_H
 #define FETCHER_H
 
 #include <QHttp>
 #include <QHttpResponseHeader>
-
 #include <QString>
 
 class Fetcher : public QHttp
diff --git a/shared/cpaster/poster.cpp b/shared/cpaster/poster.cpp
index 1b7f152ad2138fb617405aabb4f3a3870c04b1d2..c8baae34f4a9ad982fd5def993de3d666fc2b8a4 100644
--- a/shared/cpaster/poster.cpp
+++ b/shared/cpaster/poster.cpp
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "poster.h"
 #include "cgi.h"
 
@@ -43,7 +44,7 @@ Poster::Poster(const QString &host)
     m_status = 0;
     m_hadError = false;
     connect(this, SIGNAL(requestFinished(int,bool)), SLOT(gotRequestFinished(int,bool)));
-    connect(this, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), SLOT(gotResponseHeaderReceived(const QHttpResponseHeader &)));
+    connect(this, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), SLOT(gotResponseHeaderReceived(QHttpResponseHeader)));
 }
 
 void Poster::post(const QString &description, const QString &comment,
diff --git a/shared/cpaster/poster.h b/shared/cpaster/poster.h
index 2f405d4207a9f8b5c0f272bbbc36d20098a64717..b95a56a3958be17e02f4b59c57bc820be614b58a 100644
--- a/shared/cpaster/poster.h
+++ b/shared/cpaster/poster.h
@@ -30,12 +30,12 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef POSTER_H
 #define POSTER_H
 
 #include <QHttp>
 #include <QHttpResponseHeader>
-
 #include <QString>
 
 class Poster : public QHttp
diff --git a/shared/cpaster/splitter.cpp b/shared/cpaster/splitter.cpp
index 15a74b02f1e36a10e869e8b0c4ea8895ca216d3a..142cd190f519b536d4c10b60ebfd9e44164b48eb 100644
--- a/shared/cpaster/splitter.cpp
+++ b/shared/cpaster/splitter.cpp
@@ -30,7 +30,9 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "splitter.h"
+
 #include <QRegExp>
 
 FileDataList splitDiffToFiles(const QByteArray &data)
diff --git a/shared/cpaster/splitter.h b/shared/cpaster/splitter.h
index 0daaf378bf28636de5aee68105a6d88c0d4ea785..2735930943a496bf8504518a9893fec27d5ea0fd 100644
--- a/shared/cpaster/splitter.h
+++ b/shared/cpaster/splitter.h
@@ -30,12 +30,13 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef SPLITTER_H
 #define SPLITTER_H
 
-#include <QString>
 #include <QByteArray>
 #include <QList>
+#include <QString>
 
 struct FileData
 {
diff --git a/shared/cpaster/view.cpp b/shared/cpaster/view.cpp
index 1db8039ab5fd735cd936ff4a00153458a3b9ef7b..984d7d425aec3d2c54b0cc421bb0a5aed5617995 100644
--- a/shared/cpaster/view.cpp
+++ b/shared/cpaster/view.cpp
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "view.h"
 
 #include <QFontMetrics>
@@ -38,7 +39,6 @@
 #include <QPushButton>
 #include <QSettings>
 
-// -------------------------------------------------------------------------------------------------
 class ColumnIndicatorTextEdit : public QTextEdit
 {
 public:
diff --git a/shared/cpaster/view.h b/shared/cpaster/view.h
index 5ba72fd93842978ba42263ad9c14c7632ae3e0be..83d7809150b705b04b8f873ee6e8ac7ea141a064 100644
--- a/shared/cpaster/view.h
+++ b/shared/cpaster/view.h
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef VIEW_H
 #define VIEW_H
 
@@ -63,4 +64,3 @@ private:
 };
 
 #endif // VIEW_H
-
diff --git a/shared/cplusplus/Array.cpp b/shared/cplusplus/Array.cpp
index e62ed1ee12a9d5b7e801c4b49aac100d1a0174ba..0fc99aa1369b215e35fa4fd4ea7d16bb346d3161 100644
--- a/shared/cplusplus/Array.cpp
+++ b/shared/cplusplus/Array.cpp
@@ -30,24 +30,5 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
-// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
 
 #include "Array.h"
diff --git a/shared/cplusplus/LiteralTable.cpp b/shared/cplusplus/LiteralTable.cpp
index 8254c2868b9911d24bc3973f23ec4bb8a1ffcf89..38356725c9effe898887c2e354c60706a73b0f5a 100644
--- a/shared/cplusplus/LiteralTable.cpp
+++ b/shared/cplusplus/LiteralTable.cpp
@@ -30,24 +30,5 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
-// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
 
 #include "LiteralTable.h"
diff --git a/shared/designerintegrationv2/widgethost.cpp b/shared/designerintegrationv2/widgethost.cpp
index d7e09b4d544450ebcadd490e02dabd1a4a943933..efa8341c5ade423f6daa5e5ca3d804bf81c05267 100644
--- a/shared/designerintegrationv2/widgethost.cpp
+++ b/shared/designerintegrationv2/widgethost.cpp
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "widgethost.h"
 #include "formresizer.h"
 #include "widgethostconstants.h"
diff --git a/shared/designerintegrationv2/widgethost.h b/shared/designerintegrationv2/widgethost.h
index 392b1c26db618f79d4efcf932360bd2eb826ac98..698312162d6c927c4a9d5b3580d7ad4c0c4cce0a 100644
--- a/shared/designerintegrationv2/widgethost.h
+++ b/shared/designerintegrationv2/widgethost.h
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef WIDGETHOST_H
 #define WIDGETHOST_H
 
@@ -80,4 +81,3 @@ private:
 } // namespace SharedTools
 
 #endif // WIDGETHOST_H
-
diff --git a/shared/designerintegrationv2/widgethostconstants.h b/shared/designerintegrationv2/widgethostconstants.h
index 6555c7f494bb03a57cd0a567436975cf9b10fc4e..5500a5c3fac4a92c25b322bae32ccc0b38d5855e 100644
--- a/shared/designerintegrationv2/widgethostconstants.h
+++ b/shared/designerintegrationv2/widgethostconstants.h
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef WIDGETHOST_CONSTANTS_H
 #define WIDGETHOST_CONSTANTS_H
 
@@ -40,5 +41,5 @@ namespace SharedTools {
    }
 }
 
-#endif //WIDGETHOST_CONSTANTS_H
+#endif // WIDGETHOST_CONSTANTS_H
 
diff --git a/shared/help/contentwindow.cpp b/shared/help/contentwindow.cpp
index d67ac7c803db1620cbee2e4a6d1382c503cb540f..b4b46c24d2ae75baa688c05fe2d0f53a8b9315d1 100644
--- a/shared/help/contentwindow.cpp
+++ b/shared/help/contentwindow.cpp
@@ -108,7 +108,7 @@ void ContentWindow::keyPressEvent(QKeyEvent *e)
         emit escapePressed();
 }
 
-bool ContentWindow::eventFilter(QObject* o, QEvent *e)
+bool ContentWindow::eventFilter(QObject *o, QEvent *e)
 {
     if (m_contentWidget && o == m_contentWidget->viewport() && e->type()
         == QEvent::MouseButtonRelease) {
diff --git a/shared/help/contentwindow.h b/shared/help/contentwindow.h
index c3abb8084b32797ededef3eadbfab9955d7aaf94..3832f5ea7ec86a2b336818b5fcb459ca035ea595 100644
--- a/shared/help/contentwindow.h
+++ b/shared/help/contentwindow.h
@@ -66,7 +66,7 @@ private slots:
 private:
     void focusInEvent(QFocusEvent *e);
     void keyPressEvent(QKeyEvent *e);
-    bool eventFilter(QObject* o, QEvent *e);
+    bool eventFilter(QObject *o, QEvent *e);
 
     QHelpEngine *m_helpEngine;
     QHelpContentWidget *m_contentWidget;
@@ -75,4 +75,4 @@ private:
 
 QT_END_NAMESPACE
 
-#endif
+#endif // CONTENTWINDOW_H
diff --git a/shared/help/filternamedialog.cpp b/shared/help/filternamedialog.cpp
index c6d9f3e78d3533c233ebbd2ab0120329394335ef..8ea8314a2b294a8840e86888792cb207a1d1261b 100644
--- a/shared/help/filternamedialog.cpp
+++ b/shared/help/filternamedialog.cpp
@@ -45,7 +45,7 @@ FilterNameDialog::FilterNameDialog(QWidget *parent)
         SIGNAL(clicked()), this, SLOT(accept()));
     connect(m_ui.buttonBox->button(QDialogButtonBox::Cancel),
         SIGNAL(clicked()), this, SLOT(reject()));
-    connect(m_ui.lineEdit, SIGNAL(textChanged(const QString&)),
+    connect(m_ui.lineEdit, SIGNAL(textChanged(QString)),
         this, SLOT(updateOkButton()));
     m_ui.buttonBox->button(QDialogButtonBox::Ok)->setDisabled(true);
 
diff --git a/shared/help/helpviewer.cpp b/shared/help/helpviewer.cpp
index 660d35b411b4a3f2ebcc0773ff85e91251336742..0434fee4ca95ba79afc6d6ed6a5c2a81b98e10f9 100644
--- a/shared/help/helpviewer.cpp
+++ b/shared/help/helpviewer.cpp
@@ -214,8 +214,8 @@ HelpViewer::HelpViewer(QHelpEngine *engine, CentralWidget *parent)
     connect(pageAction(QWebPage::Copy), SIGNAL(changed()), this, SLOT(actionChanged()));
     connect(pageAction(QWebPage::Back), SIGNAL(changed()), this, SLOT(actionChanged()));
     connect(pageAction(QWebPage::Forward), SIGNAL(changed()), this, SLOT(actionChanged()));
-    connect(page(), SIGNAL(linkHovered(const QString &, const QString &, const QString &)), this, SIGNAL(highlighted(const QString &)));
-    connect(this, SIGNAL(urlChanged(const QUrl &)), this, SIGNAL(sourceChanged(const QUrl &)));
+    connect(page(), SIGNAL(linkHovered(QString, QString, QString)), this, SIGNAL(highlighted(QString)));
+    connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl)));
 }
 
 void HelpViewer::setSource(const QUrl &url)
diff --git a/shared/help/indexwindow.cpp b/shared/help/indexwindow.cpp
index fdc919c5be3e3e2e8e056a57715e80e3f7fca267..094df2774178d68b2d802ef450855682eadb65e6 100644
--- a/shared/help/indexwindow.cpp
+++ b/shared/help/indexwindow.cpp
@@ -60,8 +60,8 @@ IndexWindow::IndexWindow(QHelpEngine *helpEngine, QWidget *parent)
 
     m_searchLineEdit = new QLineEdit();
     l->setBuddy(m_searchLineEdit);
-    connect(m_searchLineEdit, SIGNAL(textChanged(const QString&)),
-        this, SLOT(filterIndices(const QString&)));
+    connect(m_searchLineEdit, SIGNAL(textChanged(QString)),
+        this, SLOT(filterIndices(QString)));
     m_searchLineEdit->installEventFilter(this);
     layout->setMargin(4);
     layout->addWidget(m_searchLineEdit);
@@ -72,11 +72,10 @@ IndexWindow::IndexWindow(QHelpEngine *helpEngine, QWidget *parent)
         this, SLOT(disableSearchLineEdit()));
     connect(m_helpEngine->indexModel(), SIGNAL(indexCreated()),
         this, SLOT(enableSearchLineEdit()));
-    connect(m_indexWidget, SIGNAL(linkActivated(const QUrl&, const QString&)),
-        this, SIGNAL(linkActivated(const QUrl&)));
-    connect(m_indexWidget, SIGNAL(linksActivated(const QMap<QString, QUrl>&,
-        const QString&)), this, SIGNAL(linksActivated(const QMap<QString, QUrl>&,
-        const QString&)));
+    connect(m_indexWidget, SIGNAL(linkActivated(QUrl, QString)),
+        this, SIGNAL(linkActivated(QUrl)));
+    connect(m_indexWidget, SIGNAL(linksActivated(QMap<QString, QUrl>, QString)),
+        this, SIGNAL(linksActivated(QMap<QString, QUrl>, QString)));
     connect(m_searchLineEdit, SIGNAL(returnPressed()),
         m_indexWidget, SLOT(activateCurrentItem()));
     layout->addWidget(m_indexWidget);
diff --git a/shared/help/indexwindow.h b/shared/help/indexwindow.h
index 9554979e7792f77b8cd034ef6372623a63153899..f410e7ba2e627daf21643a8a3a6bee26d8f3f709 100644
--- a/shared/help/indexwindow.h
+++ b/shared/help/indexwindow.h
@@ -31,8 +31,8 @@
 ** 
 ***************************************************************************/
 
-#ifndef INDEXWINDOW
-#define INDEXWINDOW
+#ifndef INDEXWINDOW_H
+#define INDEXWINDOW_H
 
 #include <QtCore/QUrl>
 #include <QtGui/QWidget>
@@ -75,4 +75,4 @@ private:
 
 QT_END_NAMESPACE
 
-#endif
+#endif // INDEXWINDOW_H
diff --git a/shared/help/topicchooser.h b/shared/help/topicchooser.h
index 45b65d2399783c3368563b3d46c6ed0ebccbb960..9bfad0becd4c943ab46899b41928fdde07593f23 100644
--- a/shared/help/topicchooser.h
+++ b/shared/help/topicchooser.h
@@ -34,12 +34,13 @@
 #ifndef TOPICCHOOSER_H
 #define TOPICCHOOSER_H
 
+#include "ui_topicchooser.h"
+
 #include <QUrl>
 #include <QMap>
 #include <QString>
 
 #include <QtGui/QDialog>
-#include "ui_topicchooser.h"
 
 QT_BEGIN_NAMESPACE
 
@@ -60,4 +61,4 @@ private:
 
 QT_END_NAMESPACE
 
-#endif
+#endif // TOPICCHOOSER_H
diff --git a/shared/indenter/constants.cpp b/shared/indenter/constants.cpp
index 8ff9612ca37a31135d1bfaee5f9702d93f0cb3ad..d1e9584fda6b8a7d7be8bccd46db9dae8a38738a 100644
--- a/shared/indenter/constants.cpp
+++ b/shared/indenter/constants.cpp
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "indenter.h"
 
 using namespace SharedTools::IndenterInternal;
diff --git a/shared/indenter/indenter.h b/shared/indenter/indenter.h
index 4e2226245c7e2e28eed6c1d9aa1532bc32e885e6..d5aa9c20e27698dc1b64dfd1eba5c9c7aa081721 100644
--- a/shared/indenter/indenter.h
+++ b/shared/indenter/indenter.h
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef INDENTER_H
 #define INDENTER_H
 
@@ -141,4 +142,4 @@ private:
 
 #include "indenter_impl.h"
 
-#endif
+#endif // INDENTER_H
diff --git a/shared/indenter/indenter_impl.h b/shared/indenter/indenter_impl.h
index c60c380a55536e092b88a8dc95b0818eb85632d1..7e58d814a2d13ac0a21ff5e9eececc1652469c97 100644
--- a/shared/indenter/indenter_impl.h
+++ b/shared/indenter/indenter_impl.h
@@ -30,22 +30,10 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef INDENTER_C
 #define INDENTER_C
 
-/****************************************************************************
-**
-** Copyright (C) 1992-$THISYEAR$ Trolltech AS. All rights reserved.
-**
-** This file is part of the $MODULE$ of the Qt Toolkit.
-**
-** $LICENSE$
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-****************************************************************************/
-
 /*
   This file is a self-contained interactive indenter for C++ and Qt
   Script.
@@ -1120,4 +1108,5 @@ int Indenter<Iterator>::indentForBottomLine(const Iterator &current,
 
 #undef YY_SAVE
 #undef YY_RESTORE
-#endif
+
+#endif // INDENTER_C
diff --git a/shared/indenter/test/main.cpp b/shared/indenter/test/main.cpp
index 3e7f114741f4eae2152a2e43df1e5c6011123bbb..0d5654d04ce339fe48b4b76097f481d97eeb817a 100644
--- a/shared/indenter/test/main.cpp
+++ b/shared/indenter/test/main.cpp
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "indenter.h"
 
 #include <QtCore/QFile>
@@ -40,12 +41,12 @@
 
 #include <stdio.h>
 
-typedef SharedTools::Indenter<QStringList::const_iterator> Indenter ;
+typedef SharedTools::Indenter<QStringList::const_iterator> Indenter;
 
-static QString fileContents( const QString& fileName )
+static QString fileContents(const QString &fileName)
 {
-    QFile f( fileName );
-    if ( !f.open(QIODevice::ReadOnly) ) {
+    QFile f(fileName);
+    if (!f.open(QIODevice::ReadOnly)) {
         const QString msg = QString(QLatin1String("error: Cannot open file '%1' for reading: %2")).
                             arg(fileName).arg(f.errorString());
         qWarning(msg.toLatin1().constData());
@@ -119,11 +120,11 @@ static QStringList parseCommandLine(char **begin, char **end)
 
 int format(const QString &fileName)
 {
-    const QString code = fileContents(fileName );
-    if ( code == QString::null)
+    const QString code = fileContents(fileName);
+    if (code == QString::null)
         return 1;
 
-    QStringList program = code.split( QLatin1Char('\n'), QString::KeepEmptyParts);
+    QStringList program = code.split(QLatin1Char('\n'), QString::KeepEmptyParts);
     while (!program.isEmpty()) {
         if (!program.back().trimmed().isEmpty())
             break;
@@ -138,19 +139,19 @@ int format(const QString &fileName)
     const QChar newLine = QLatin1Char('\n');
 
     QStringList::const_iterator cend = program.constEnd();
-    for  (QStringList::const_iterator it = program.constBegin(); it != cend; ++it) {
+    for (QStringList::const_iterator it = program.constBegin(); it != cend; ++it) {
         p.push_back(*it);
         QString &line = p.back();
 
         QChar typedIn = Indenter::instance().firstNonWhiteSpace(line);
-        if ( p.last().endsWith( colon ) )
+        if (p.last().endsWith(colon))
             typedIn = colon;
 
-        const int indent = Indenter::instance().indentForBottomLine( p.constBegin(), p.constEnd(), typedIn );
+        const int indent = Indenter::instance().indentForBottomLine(p.constBegin(), p.constEnd(), typedIn);
 
         const QString trimmed = line.trimmed();
         // Indent the line in the list so that the formatter code sees the indented line.
-        if ( !trimmed.isEmpty() ) {
+        if (!trimmed.isEmpty()) {
             line = QString(indent, blank);
             line += trimmed;
         }
@@ -158,14 +159,14 @@ int format(const QString &fileName)
         out += newLine ;
     }
 
-    while ( out.endsWith(newLine) )
-        out.truncate( out.length() - 1 );
+    while (out.endsWith(newLine))
+        out.truncate(out.length() - 1 );
 
     fputs(out.toUtf8().constData(), stdout);
     return 0;
 }
 
-int main( int argc, char **argv )
+int main(int argc, char **argv)
 {
     const QStringList fileNames = parseCommandLine(argv, argv + argc);
     if (fileNames.empty()) {
@@ -174,7 +175,7 @@ int main( int argc, char **argv )
     }
 
     foreach(QString fileName, fileNames)
-        if (const int rc  = format(fileName))
+        if (const int rc = format(fileName))
             return rc;
 
     return 0;
diff --git a/shared/namespace_global.h b/shared/namespace_global.h
index ff097a91035ff266c06eb7bfcdfed63a9e910cd3..24875bed055e7c4e77cb9289ce749276d0eae40c 100644
--- a/shared/namespace_global.h
+++ b/shared/namespace_global.h
@@ -49,4 +49,4 @@
 #  define QT_MANGLE_NAMESPACE(name) name
 #endif
 
-#endif
+#endif // NAMESPACE_GLOBAL_H
diff --git a/shared/proparser/abstractproitemvisitor.h b/shared/proparser/abstractproitemvisitor.h
index adc9a2fdfc4faa03f874308030ba61d9ba52166c..f4c8be3f87dee8bfb6c62c431baba54cf15426bf 100644
--- a/shared/proparser/abstractproitemvisitor.h
+++ b/shared/proparser/abstractproitemvisitor.h
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef ABSTRACTPROITEMVISITOR
 #define ABSTRACTPROITEMVISITOR
 
@@ -37,7 +38,8 @@
 
 QT_BEGIN_NAMESPACE
 
-struct AbstractProItemVisitor {
+struct AbstractProItemVisitor
+{
     virtual ~AbstractProItemVisitor() {}
     virtual bool visitBeginProBlock(ProBlock *block) = 0;
     virtual bool visitEndProBlock(ProBlock *block) = 0;
@@ -52,7 +54,6 @@ struct AbstractProItemVisitor {
     virtual bool visitProFunction(ProFunction *function) = 0;
     virtual bool visitProOperator(ProOperator *function) = 0;
     virtual bool visitProCondition(ProCondition *function) = 0;
-
 };
 
 QT_END_NAMESPACE
diff --git a/shared/proparser/procommandmanager.cpp b/shared/proparser/procommandmanager.cpp
index f5f40f7f5f3ff61835271690a2c9632ce4a97de8..e61d20458b07bdbd53a41458b14b29751f71e6c8 100644
--- a/shared/proparser/procommandmanager.cpp
+++ b/shared/proparser/procommandmanager.cpp
@@ -30,12 +30,14 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "procommandmanager.h"
 
 using namespace Qt4ProjectManager::Internal;
 
 ProCommandGroup::ProCommandGroup(const QString &name)
-    : m_name(name) { }
+    : m_name(name)
+{ }
 
 ProCommandGroup::~ProCommandGroup()
 {
@@ -49,16 +51,14 @@ void ProCommandGroup::appendCommand(ProCommand *cmd)
 
 void ProCommandGroup::undo()
 {
-    for(int i=m_commands.count(); i>0; --i) {
+    for (int i = m_commands.count(); i > 0; --i)
         m_commands[i-1]->undo();
-    }
 }
 
 void ProCommandGroup::redo()
 {
-    for(int i=0; i<m_commands.count(); ++i) {
+    for (int i = 0; i < m_commands.count(); ++i)
         m_commands[i]->redo();
-    }
 }
 
 ProCommandManager::ProCommandManager(QObject *parent)
@@ -80,9 +80,8 @@ void ProCommandManager::beginGroup(const QString &name)
 
     if (m_pos != m_groups.count()) {
         int removecount = m_groups.count() - m_pos;
-        for(int i=0; i<removecount; ++i) {
+        for (int i = 0; i < removecount; ++i)
             delete m_groups.takeLast();
-        }
         m_pos = m_groups.count();
     }
     
@@ -91,7 +90,7 @@ void ProCommandManager::beginGroup(const QString &name)
 
 bool ProCommandManager::hasGroup() const
 {
-    return (m_group != 0);
+    return m_group != 0;
 }
 
 void ProCommandManager::endGroup()
@@ -154,13 +153,12 @@ void ProCommandManager::notifySave()
         m_savepoint = m_groups.at(m_pos - 1);
 }
 
-
 bool ProCommandManager::canUndo() const
 {
-    return (!m_groups.isEmpty() && m_pos > 0);
+    return !m_groups.isEmpty() && m_pos > 0;
 }
 
 bool ProCommandManager::canRedo() const
 {
-    return (m_groups.count() > m_pos);
+    return m_groups.count() > m_pos;
 }
diff --git a/shared/proparser/procommandmanager.h b/shared/proparser/procommandmanager.h
index 717bf1fcef6e3a21fbdf4d65f422a0f704e8509d..990327dcfa50d35ee8e4c74bbe8a1c3c73fbbdb4 100644
--- a/shared/proparser/procommandmanager.h
+++ b/shared/proparser/procommandmanager.h
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef PROCOMMANDMANAGER_H
 #define PROCOMMANDMANAGER_H
 
@@ -37,19 +38,23 @@
 
 #include <QtCore/QModelIndex>
 
-QT_FORWARD_DECLARE_CLASS(ProItem)
+QT_BEGIN_NAMESPACE
+class ProItem;
+QT_END_NAMESPACE
 
 namespace Qt4ProjectManager {
 namespace Internal {
     
-class ProCommand {
+class ProCommand
+{
 public:
     virtual ~ProCommand() {}
     virtual bool redo() = 0;
     virtual void undo() = 0;
 };
 
-class ProCommandGroup {
+class ProCommandGroup
+{
 public:
     ProCommandGroup(const QString &name);
     ~ProCommandGroup();
@@ -104,4 +109,4 @@ private:
 } //namespace Internal
 } //namespace Qt4ProjectManager
 
-#endif //PROCOMMANDMANAGER_H
+#endif // PROCOMMANDMANAGER_H
diff --git a/shared/proparser/proeditor.cpp b/shared/proparser/proeditor.cpp
index e22ba28e3f2064ad7bbecfd10d0932748aafc010..b6c7500036f1637c5d241fb98e129a8b5cb73cd9 100644
--- a/shared/proparser/proeditor.cpp
+++ b/shared/proparser/proeditor.cpp
@@ -30,9 +30,6 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
-#include <QtGui/QMenu>
-#include <QtGui/QKeyEvent>
-#include <QtGui/QClipboard>
 
 #include "proeditor.h"
 #include "proitems.h"
@@ -40,6 +37,10 @@
 #include "procommandmanager.h"
 #include "proxml.h"
 
+#include <QtGui/QMenu>
+#include <QtGui/QKeyEvent>
+#include <QtGui/QClipboard>
+
 using namespace Qt4ProjectManager::Internal;
 
 ProEditor::ProEditor(QWidget *parent, bool shortcuts)
@@ -58,7 +59,6 @@ ProEditor::ProEditor(QWidget *parent, bool shortcuts)
 
 ProEditor::~ProEditor()
 {
-
 }
 
 void ProEditor::initialize(ProEditorModel *model, ProItemInfoManager *infomanager)
@@ -384,4 +384,3 @@ void ProEditor::addBlock()
         m_editListView->setCurrentIndex(m_model->index(row,0,parent));
     }
 }
-
diff --git a/shared/proparser/proeditor.h b/shared/proparser/proeditor.h
index 450fe542bfe922b14cd723bb8a08a7da08504032..44468a1c7723a3aa0cbe1f7c894c62cd53a4b918 100644
--- a/shared/proparser/proeditor.h
+++ b/shared/proparser/proeditor.h
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef PROEDITOR_H
 #define PROEDITOR_H
 
@@ -56,8 +57,7 @@ namespace Internal {
 class ProEditorModel;
 class ProScopeFilter;
 
-class ProEditor : public QWidget,
-    protected Ui::ProEditor
+class ProEditor : public QWidget, protected Ui::ProEditor
 {
     Q_OBJECT
 
@@ -125,4 +125,4 @@ private:
 } //namespace Internal
 } //namespace Qt4ProjectManager
 
-#endif //PROEDITOR_H
+#endif // PROEDITOR_H
diff --git a/shared/proparser/proeditormodel.cpp b/shared/proparser/proeditormodel.cpp
index 1e2097739e918aac9136a765322ca3ec425ce5d8..a2d846d5380c96c728a1e064c630f4ee722b4e21 100644
--- a/shared/proparser/proeditormodel.cpp
+++ b/shared/proparser/proeditormodel.cpp
@@ -30,10 +30,6 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
-#include <QtCore/QStringList>
-#include <QtCore/QMimeData>
-#include <QtCore/QDebug>
-#include <QtGui/QIcon>
 
 #include "proxml.h"
 #include "proitems.h"
@@ -41,12 +37,18 @@
 #include "procommandmanager.h"
 #include "proiteminfo.h"
 
+#include <QtCore/QDebug>
+#include <QtCore/QMimeData>
+#include <QtCore/QStringList>
+#include <QtGui/QIcon>
+
 using namespace Qt4ProjectManager::Internal;
 
 namespace Qt4ProjectManager {
 namespace Internal {
     
-class ProAddCommand : public ProCommand {
+class ProAddCommand : public ProCommand
+{
 public:
     ProAddCommand(ProEditorModel *model, ProItem *item, int row, const QModelIndex &parent, bool dodelete = true)
         : m_model(model), m_item(item), m_row(row), m_parent(parent), m_dodelete(dodelete), m_delete(false) { }
@@ -75,7 +77,8 @@ private:
     bool m_delete;
 };
 
-class ProRemoveCommand : public ProCommand {
+class ProRemoveCommand : public ProCommand
+{
 public:
     ProRemoveCommand(ProEditorModel *model, const QModelIndex &index, bool dodelete = true)
         : m_model(model), m_index(index), m_dodelete(dodelete), m_delete(dodelete) { }
@@ -103,7 +106,8 @@ private:
     bool m_delete;
 };
 
-class ChangeProVariableIdCommand : public ProCommand {
+class ChangeProVariableIdCommand : public ProCommand
+{
 public:
     ChangeProVariableIdCommand(ProEditorModel *model, ProVariable *variable, const QString &newId)
         : m_newId(newId), m_model(model), m_variable(variable)
@@ -130,7 +134,8 @@ private:
     ProVariable *m_variable;
 };
 
-class ChangeProVariableOpCommand : public ProCommand {
+class ChangeProVariableOpCommand : public ProCommand
+{
 public:
     ChangeProVariableOpCommand(ProEditorModel *model, ProVariable *variable, ProVariable::VariableOperator newOp)
         :  m_newOp(newOp), m_model(model), m_variable(variable)
@@ -157,7 +162,8 @@ private:
     ProVariable *m_variable;
 };
 
-class ChangeProScopeCommand : public ProCommand {
+class ChangeProScopeCommand : public ProCommand
+{
 public:
     ChangeProScopeCommand(ProEditorModel *model, ProBlock *scope, const QString &newExp)
         : m_newExp(newExp), m_model(model), m_scope(scope) {
@@ -196,7 +202,8 @@ private:
     ProBlock *m_scope;
 };
 
-class ChangeProAdvancedCommand : public ProCommand {
+class ChangeProAdvancedCommand : public ProCommand
+{
 public:
     ChangeProAdvancedCommand(ProEditorModel *model, ProBlock *block, const QString &newExp)
         : m_newExp(newExp), m_model(model), m_block(block) {
@@ -239,7 +246,6 @@ ProEditorModel::ProEditorModel(QObject *parent)
 
 ProEditorModel::~ProEditorModel()
 {
-
 }
 
 void ProEditorModel::setInfoManager(ProItemInfoManager *infomanager)
@@ -299,9 +305,8 @@ QList<QModelIndex> ProEditorModel::findBlocks(const QModelIndex &parent) const
         return result;
     }
 
-    for (int i=0; i<rowCount(parent); ++i) {
+    for (int i = 0; i < rowCount(parent); ++i)
         result += findBlocks(index(i, 0, parent));
-    }
 
     return result;
 }
@@ -936,7 +941,8 @@ bool ProScopeFilter::setData(const QModelIndex &index, const QVariant &value, in
 {
     // map to source
     if (m_checkable != ProScopeFilter::None && role == Qt::CheckStateRole) {
-        if ( m_checkable == ProScopeFilter::Blocks  || ( m_checkable == ProScopeFilter::Variable && sourceVariable(index))) {
+        if (m_checkable == ProScopeFilter::Blocks
+             || (m_checkable == ProScopeFilter::Variable && sourceVariable(index))) {
             QModelIndex srcindex = mapToSource(index);
             if (value.toInt() == Qt::Checked && !m_checkStates.value(srcindex, false)) {
                 m_checkStates.insert(srcindex, true);
diff --git a/shared/proparser/proeditormodel.h b/shared/proparser/proeditormodel.h
index 7e5088bba8a75e914f664e83dc224442a4ec9f2e..89142a079ccab1d8063b5e77fcb0bdc45a4342af 100644
--- a/shared/proparser/proeditormodel.h
+++ b/shared/proparser/proeditormodel.h
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef PROEDITORMODEL_H
 #define PROEDITORMODEL_H
 
@@ -41,10 +42,12 @@
 #include <QtCore/QStringList>
 #include <QtGui/QSortFilterProxyModel>
 
-QT_FORWARD_DECLARE_CLASS(ProBlock)
-QT_FORWARD_DECLARE_CLASS(ProFile)
-QT_FORWARD_DECLARE_CLASS(ProItem)
-QT_FORWARD_DECLARE_CLASS(ProVariable)
+QT_BEGIN_NAMESPACE
+class ProBlock;
+class ProFile;
+class ProItem;
+class ProVariable;
+QT_END_NAMESPACE
 
 namespace Qt4ProjectManager {
 namespace Internal {
@@ -146,8 +149,8 @@ private:
     QMap<QModelIndex, bool> m_checkStates;
 };
 
-} //namespace Internal
-} //namespace Qt4ProjectManager
+} // namespace Internal
+} // namespace Qt4ProjectManager
 
-#endif //PROEDITORMODEL_H
+#endif // PROEDITORMODEL_H
 
diff --git a/shared/proparser/profileevaluator.cpp b/shared/proparser/profileevaluator.cpp
index 1ed55398a59236e6d666f209b193eb0ad5ebe476..db274e0c9ddb2f4c558974150acda9babfff47ef 100644
--- a/shared/proparser/profileevaluator.cpp
+++ b/shared/proparser/profileevaluator.cpp
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "profileevaluator.h"
 #include "proparserutils.h"
 #include "proitems.h"
diff --git a/shared/proparser/profileevaluator.h b/shared/proparser/profileevaluator.h
index 741f3db1781d5045d0c53fd7e4f5dda83aa7fa3b..8a4be21ae85abc80d17af37fcfe6687b391fa26b 100644
--- a/shared/proparser/profileevaluator.h
+++ b/shared/proparser/profileevaluator.h
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef PROFILEEVALUATOR_H
 #define PROFILEEVALUATOR_H
 
@@ -91,4 +92,3 @@ private:
 QT_END_NAMESPACE
 
 #endif // PROFILEEVALUATOR_H
-
diff --git a/shared/proparser/proiteminfo.cpp b/shared/proparser/proiteminfo.cpp
index 40411c193b8f41b58a2e7d47a86b53da1b5a50ef..456e8bee873172efd9355b6adaf074f65168f883 100644
--- a/shared/proparser/proiteminfo.cpp
+++ b/shared/proparser/proiteminfo.cpp
@@ -30,15 +30,16 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "proiteminfo.h"
 
 #include <QtCore/QFile>
 
-
 using namespace Qt4ProjectManager::Internal;
 
 ProItemInfo::ProItemInfo(ProItemInfoKind kind)
-    : m_kind(kind) { }
+    : m_kind(kind)
+{ }
 
 ProItemInfo::ProItemInfoKind ProItemInfo::kind() const
 {
@@ -76,10 +77,12 @@ QString ProItemInfo::description() const
 }
 
 ProScopeInfo::ProScopeInfo()
-    : ProItemInfo(ProItemInfo::Scope) { }
+    : ProItemInfo(ProItemInfo::Scope)
+{ }
 
 ProValueInfo::ProValueInfo()
-    : ProItemInfo(ProItemInfo::Value) { }
+    : ProItemInfo(ProItemInfo::Value)
+{ }
 
 ProVariableInfo::ProVariableInfo()
     : ProItemInfo(ProItemInfo::Variable)
@@ -107,7 +110,6 @@ void ProVariableInfo::setDefaultOperator(ProVariable::VariableOperator op)
     m_operator = op;
 }
 
-
 ProValueInfo *ProVariableInfo::value(const QString &id) const
 {
     return m_values.value(id, 0);
diff --git a/shared/proparser/proiteminfo.h b/shared/proparser/proiteminfo.h
index 18045dd388386352553fce2613f72cfaaaf7625b..abc8efb0641edf42866c17193f499c338dc01ab2 100644
--- a/shared/proparser/proiteminfo.h
+++ b/shared/proparser/proiteminfo.h
@@ -28,8 +28,9 @@
 ** In addition, as a special exception, Nokia gives you certain additional
 ** rights. These rights are described in the Nokia Qt GPL Exception version
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
-** 
+**
 ***************************************************************************/
+
 #ifndef PROITEMINFO_H
 #define PROITEMINFO_H
 
@@ -44,7 +45,8 @@
 namespace Qt4ProjectManager {
 namespace Internal {
 
-class ProItemInfo {
+class ProItemInfo
+{
 public:
     enum ProItemInfoKind {
         Scope,
@@ -70,17 +72,20 @@ private:
     ProItemInfoKind m_kind;
 };
 
-class ProScopeInfo : public ProItemInfo {
+class ProScopeInfo : public ProItemInfo
+{
 public:
     ProScopeInfo();
 };
 
-class ProValueInfo : public ProItemInfo {
+class ProValueInfo : public ProItemInfo
+{
 public:
     ProValueInfo();
 };
 
-class ProVariableInfo : public ProItemInfo {
+class ProVariableInfo : public ProItemInfo
+{
 public:
     ProVariableInfo();
     ~ProVariableInfo();
@@ -126,7 +131,7 @@ private:
     QMap<QString, ProVariableInfo *> m_variables;
 };
 
-} //namespace Internal
-} //namespace Qt4ProjectManager
+} // namespace Internal
+} // namespace Qt4ProjectManager
 
-#endif //PROITEMINFO_H
+#endif // PROITEMINFO_H
diff --git a/shared/proparser/proitems.cpp b/shared/proparser/proitems.cpp
index 22aabba8f6ab50a7c981ecee58215842bc75c0a1..330e7aba81db0a6b3bc2c8dde97480fb75e4786c 100644
--- a/shared/proparser/proitems.cpp
+++ b/shared/proparser/proitems.cpp
@@ -30,13 +30,15 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
-#include <QtCore/QFileInfo>
-#include <QtCore/QDebug>
 
 #include "proitems.h"
 #include "abstractproitemvisitor.h"
 
+#include <QtCore/QFileInfo>
+#include <QtCore/QDebug>
+
 QT_BEGIN_NAMESPACE
+
 // --------------- ProItem ------------
 void ProItem::setComment(const QString &comment)
 {
@@ -278,7 +280,6 @@ ProFile::ProFile(const QString &fileName)
 
 ProFile::~ProFile()
 {
-
 }
 
 QString ProFile::displayFileName() const
diff --git a/shared/proparser/proitems.h b/shared/proparser/proitems.h
index 776a8335348a391e98bc74eadc5e3178beffdb16..7d658f435f4be294db8482d7b8ce4bbd4b0a97e6 100644
--- a/shared/proparser/proitems.h
+++ b/shared/proparser/proitems.h
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef PROITEMS_H
 #define PROITEMS_H
 
diff --git a/shared/proparser/proparserutils.h b/shared/proparser/proparserutils.h
index 03a767cac1949756e658894de7e6e00d24b96785..9aca5a33534e81f442caa1d0f330f4ef324d03e0 100644
--- a/shared/proparser/proparserutils.h
+++ b/shared/proparser/proparserutils.h
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef PROPARSERUTILS_H
 #define PROPARSERUTILS_H
 
@@ -272,4 +273,3 @@ static QStringList qmake_mkspec_paths()
 QT_END_NAMESPACE
 
 #endif // PROPARSERUTILS_H
-
diff --git a/shared/proparser/prowriter.cpp b/shared/proparser/prowriter.cpp
index aa00600e1ebbcaa83cf9672e8fc0b3615df75d41..b3d9266755076e44169a02cbcf4a8ac0e439739a 100644
--- a/shared/proparser/prowriter.cpp
+++ b/shared/proparser/prowriter.cpp
@@ -30,11 +30,12 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
-#include <QtCore/QFile>
 
 #include "proitems.h"
 #include "prowriter.h"
 
+#include <QtCore/QFile>
+
 using namespace Qt4ProjectManager::Internal;
 
 bool ProWriter::write(ProFile *profile, const QString &fileName)
diff --git a/shared/proparser/prowriter.h b/shared/proparser/prowriter.h
index f6f7d05ebc236ba2ce5e313c8b25d5cded12f33a..63f48e1d17e09c545df6d0ebfbd4e58d7f2fe6e3 100644
--- a/shared/proparser/prowriter.h
+++ b/shared/proparser/prowriter.h
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef PROWRITER_H
 #define PROWRITER_H
 
@@ -37,15 +38,18 @@
 
 #include <QtCore/QTextStream>
 
-QT_FORWARD_DECLARE_CLASS(ProFile)
-QT_FORWARD_DECLARE_CLASS(ProValue)
-QT_FORWARD_DECLARE_CLASS(ProItem)
-QT_FORWARD_DECLARE_CLASS(ProBlock)
+QT_BEGIN_NAMESPACE
+class ProFile;
+class ProValue;
+class ProItem;
+class ProBlock;
+QT_END_NAMESPACE
 
 namespace Qt4ProjectManager {
 namespace Internal {
 
-class ProWriter {
+class ProWriter
+{
 public:
     bool write(ProFile *profile, const QString &fileName);
     QString contents(ProFile *profile);
@@ -69,7 +73,7 @@ private:
     QString m_comment;
 };
 
-} //namespace Internal
-} //namespace Qt4ProjectManager
+} // namespace Internal
+} // namespace Qt4ProjectManager
 
-#endif //PROWRITER_H
+#endif // PROWRITER_H
diff --git a/shared/proparser/proxml.cpp b/shared/proparser/proxml.cpp
index 57764241c3a286c126ae3e072510f1b709df75de..2449bd5f420edad53ea838ad05b15c714308ef1e 100644
--- a/shared/proparser/proxml.cpp
+++ b/shared/proparser/proxml.cpp
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "proxml.h"
 #include "proitems.h"
 
diff --git a/shared/proparser/proxml.h b/shared/proparser/proxml.h
index a6e2b3ca5052dcba76bef8d7a24928966a9ac643..79575a25a3ea084bd20d9ef9b540e8a44b2a9aea 100644
--- a/shared/proparser/proxml.h
+++ b/shared/proparser/proxml.h
@@ -30,13 +30,17 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef PROXML_H
 #define PROXML_H
 
 #include "namespace_global.h"
 
 #include <QtXml>
-QT_FORWARD_DECLARE_CLASS(ProItem)
+
+QT_BEGIN_NAMESPACE
+class ProItem;
+QT_END_NAMESPACE
 
 namespace Qt4ProjectManager {
 namespace Internal {
@@ -50,7 +54,7 @@ private:
     ProItem *parseItemNode(QDomDocument doc, QDomNode node) const;
 };
 
-} //namespace Internal
-} //namespace Qt4ProjectManager
+} // namespace Internal
+} // namespace Qt4ProjectManager
 
-#endif //PROXML_H
+#endif // PROXML_H
diff --git a/shared/proparser/valueeditor.cpp b/shared/proparser/valueeditor.cpp
index 9d367dad1ea6be8b737195471c8fff69c4ba8e3b..76862382c87af4b31bab04467128a7582f108d8f 100644
--- a/shared/proparser/valueeditor.cpp
+++ b/shared/proparser/valueeditor.cpp
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "valueeditor.h"
 #include "proitems.h"
 #include "proeditormodel.h"
@@ -40,8 +41,8 @@
 
 using namespace Qt4ProjectManager::Internal;
 
-ValueEditor::ValueEditor(QWidget *parent) :
-    QWidget(parent),
+ValueEditor::ValueEditor(QWidget *parent)
+  : QWidget(parent),
     m_model(0),
     m_handleModelChanges(true),
     m_infomanager(0)
@@ -434,7 +435,8 @@ void ValueEditor::updateItemChanges(QListWidgetItem *item)
     m_handleModelChanges = true;
 }
 
-void ValueEditor::updateVariableId() {
+void ValueEditor::updateVariableId()
+{
     if (!m_model)
         return;
     m_handleModelChanges = false;
@@ -442,7 +444,8 @@ void ValueEditor::updateVariableId() {
     m_handleModelChanges = true;
 }
 
-void ValueEditor::updateVariableId(int index) {
+void ValueEditor::updateVariableId(int index)
+{
     if (!m_model)
         return;
     ProVariableInfo *info = m_infomanager->variable(m_varComboBox->itemData(index).toString());
@@ -451,7 +454,8 @@ void ValueEditor::updateVariableId(int index) {
     m_model->setData(m_currentIndex, info->defaultOperator());
 }
 
-void ValueEditor::updateVariableOp(int index) {
+void ValueEditor::updateVariableOp(int index)
+{
     if (!m_model)
         return;
     m_handleModelChanges = false;
@@ -459,7 +463,8 @@ void ValueEditor::updateVariableOp(int index) {
     m_handleModelChanges = true;
 }
 
-void ValueEditor::updateItemId() {
+void ValueEditor::updateItemId()
+{
     if (!m_model)
         return;
     QModelIndex index = m_currentIndex;
@@ -476,7 +481,8 @@ void ValueEditor::updateItemId() {
     m_handleModelChanges = true;
 }
 
-void ValueEditor::updateItemId(int index) {
+void ValueEditor::updateItemId(int index)
+{
     if (!m_model)
         return;
     QModelIndex idx = m_currentIndex;
diff --git a/shared/proparser/valueeditor.h b/shared/proparser/valueeditor.h
index 50ba2f8a925f9ca3b630dc34be817b6b5c81c6e9..df0ba93be5ba562ef8452be36fa1e6c618cb7068 100644
--- a/shared/proparser/valueeditor.h
+++ b/shared/proparser/valueeditor.h
@@ -30,15 +30,16 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #ifndef VALUEEDITOR_H
 #define VALUEEDITOR_H
 
 #include "namespace_global.h"
+#include "ui_valueeditor.h"
 
 #include <QtCore/QList>
 #include <QtGui/QWidget>
 #include <QtCore/QPointer>
-#include "ui_valueeditor.h"
 
 QT_BEGIN_NAMESPACE
 class ProBlock;
@@ -51,8 +52,7 @@ namespace Internal {
 class ProEditorModel;
 class ProItemInfoManager;
 
-class ValueEditor : public QWidget,
-    protected Ui::ValueEditor
+class ValueEditor : public QWidget, protected Ui::ValueEditor
 {
     Q_OBJECT
 
@@ -113,7 +113,7 @@ private:
     ProItemInfoManager *m_infomanager;
 };
 
-} //namespace Internal
-} //namespace Qt4ProjectManager
+} // namespace Internal
+} // namespace Qt4ProjectManager
 
-#endif //VALUEEDITOR_H
+#endif // VALUEEDITOR_H
diff --git a/shared/qrceditor/qrceditor.cpp b/shared/qrceditor/qrceditor.cpp
index ac7305c4d83e7f49e4c2c2eef4c3728491a8188f..6a18bf12cbfc7a5b14d3727528545ba6a34d634c 100644
--- a/shared/qrceditor/qrceditor.cpp
+++ b/shared/qrceditor/qrceditor.cpp
@@ -30,6 +30,7 @@
 ** 1.2, included in the file GPL_EXCEPTION.txt in this package.  
 ** 
 ***************************************************************************/
+
 #include "qrceditor.h"
 #include "undocommands_p.h"
 
@@ -40,8 +41,8 @@
 
 namespace SharedTools {
 
-QrcEditor::QrcEditor(QWidget *parent) :
-    QWidget(parent),
+QrcEditor::QrcEditor(QWidget *parent)
+  : QWidget(parent),
     m_treeview(new ResourceView(&m_history)),
     m_addFileAction(0)
 {
@@ -62,18 +63,18 @@ QrcEditor::QrcEditor(QWidget *parent) :
     m_ui.addButton->setMenu(addMenu);
 
     connect(m_treeview, SIGNAL(addPrefixTriggered()), this, SLOT(onAddPrefix()));
-    connect(m_treeview, SIGNAL(addFilesTriggered(const QString &)), this, SLOT(onAddFiles()));
+    connect(m_treeview, SIGNAL(addFilesTriggered(QString)), this, SLOT(onAddFiles()));
     connect(m_treeview, SIGNAL(removeItem()), this, SLOT(onRemove()));
     connect(m_treeview, SIGNAL(currentIndexChanged()), this, SLOT(updateCurrent()));
     connect(m_treeview, SIGNAL(dirtyChanged(bool)), this, SIGNAL(dirtyChanged(bool)));
     m_treeview->setFocus();
 
-    connect(m_ui.aliasText, SIGNAL(textEdited(const QString &)),
-            this, SLOT(onAliasChanged(const QString &)));
-    connect(m_ui.prefixText, SIGNAL(textEdited(const QString &)),
-            this, SLOT(onPrefixChanged(const QString &)));
-    connect(m_ui.languageText, SIGNAL(textEdited(const QString &)),
-            this, SLOT(onLanguageChanged(const QString &)));
+    connect(m_ui.aliasText, SIGNAL(textEdited(QString)),
+            this, SLOT(onAliasChanged(QString)));
+    connect(m_ui.prefixText, SIGNAL(textEdited(QString)),
+            this, SLOT(onPrefixChanged(QString)));
+    connect(m_ui.languageText, SIGNAL(textEdited(QString)),
+            this, SLOT(onLanguageChanged(QString)));
 
     // Prevent undo command merging after a switch of focus:
     // (0) The initial text is "Green".
diff --git a/src/plugins/cpptools/rpp/pp-engine.cpp b/src/plugins/cpptools/rpp/pp-engine.cpp
index 97e168f0c24910f69fa079d88345737f0c6e6f36..6fea939ae57d0b1251aa5d2122951933dbd10078 100644
--- a/src/plugins/cpptools/rpp/pp-engine.cpp
+++ b/src/plugins/cpptools/rpp/pp-engine.cpp
@@ -54,6 +54,7 @@
 #include <Lexer.h>
 #include <Token.h>
 #include <QtDebug>
+#include <algorithm>
 
 using namespace rpp;
 using namespace CPlusPlus;