Commit aebf19ea authored by Friedemann Kleint's avatar Friedemann Kleint

Clean headers in Utils.

Forward-declare QGraphicsOpacityEffect in DetailsButton,
QProcessEnvironment in Environment, QFileInfo in fileutils,
QUrl in IWelcomePage, FancyLineEdit in PathChooser and
remove unneeded headers.

Change-Id: I7d5f273530dd2059bbdaf0899f0a3bc7e49e8482
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 3824d901
......@@ -29,12 +29,7 @@
#include "annotateditemdelegate.h"
#include <QSize>
#include <QModelIndex>
#include <QStandardItemModel>
#include <QPainter>
#include <QStyle>
#include <QStyleOptionViewItemV4>
#include <QApplication>
using namespace Utils;
......
......@@ -32,7 +32,6 @@
#include "utils_global.h"
#include <QString>
#include <QStyledItemDelegate>
namespace Utils {
......
......@@ -30,8 +30,6 @@
#ifndef BASEVALIDATINGLINEEDIT_H
#define BASEVALIDATINGLINEEDIT_H
#include "utils_global.h"
#include "fancylineedit.h"
namespace Utils {
......
......@@ -28,20 +28,11 @@
****************************************************************************/
#include "buildablehelperlibrary.h"
#include "hostosinfo.h"
#include "synchronousprocess.h"
#include <QFileInfo>
#include <QCoreApplication>
#include <QHash>
#include <QProcess>
#include <QDir>
#include <QDateTime>
#include <utils/environment.h>
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
#include <utils/synchronousprocess.h>
#include <QDesktopServices>
#include <QDebug>
namespace Utils {
......
......@@ -30,18 +30,13 @@
#ifndef BUILDABLEHELPERLIBRARY_H
#define BUILDABLEHELPERLIBRARY_H
#include "utils_global.h"
#include <utils/environment.h>
#include <utils/fileutils.h>
#include <QString>
#include "environment.h"
#include "fileutils.h"
QT_FORWARD_DECLARE_CLASS(QFileInfo)
namespace Utils {
class Environment;
class QTCREATOR_UTILS_EXPORT BuildableHelperLibrary
{
public:
......
......@@ -29,22 +29,11 @@
#include "checkablemessagebox.h"
#include <QDebug>
#include <QVariant>
#include <QPushButton>
#include <QAction>
#include <QApplication>
#include <QButtonGroup>
#include <QCheckBox>
#include <QDialog>
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QHeaderView>
#include <QLabel>
#include <QSpacerItem>
#include <QVBoxLayout>
#include <QDebug>
/*!
\class Utils::CheckableMessageBox
......
......@@ -34,7 +34,6 @@
#include <QDialogButtonBox>
#include <QMessageBox>
#include <QDialog>
namespace Utils {
......
......@@ -30,7 +30,6 @@
#ifndef CLASSNAMEVALIDATINGLINEEDIT_H
#define CLASSNAMEVALIDATINGLINEEDIT_H
#include "utils_global.h"
#include "basevalidatinglineedit.h"
namespace Utils {
......
......@@ -31,7 +31,6 @@
#define CODEGENERATION_H
#include "utils_global.h"
#include <QString>
QT_BEGIN_NAMESPACE
class QTextStream;
......
......@@ -29,8 +29,6 @@
#include "consoleprocess_p.h"
#include <utils/hostosinfo.h>
#include <QSettings>
namespace Utils {
......
......@@ -32,11 +32,6 @@
#include "utils_global.h"
#include "environment.h"
#include <QObject>
#include <QString>
#include <QStringList>
#include <QProcess>
QT_BEGIN_NAMESPACE
......@@ -44,6 +39,7 @@ class QSettings;
QT_END_NAMESPACE
namespace Utils {
class Environment;
struct ConsoleProcessPrivate;
class QTCREATOR_UTILS_EXPORT ConsoleProcess : public QObject
......
......@@ -31,6 +31,7 @@
#define CONSOLEPROCESS_P_H
#include "consoleprocess.h"
#include "environment.h"
#include <QTemporaryFile>
......
......@@ -29,14 +29,11 @@
#include "consoleprocess_p.h"
#include "environment.h"
#include "qtcprocess.h"
#include <utils/hostosinfo.h>
#include <QCoreApplication>
#include <QDir>
#include <QSettings>
#include <QTimer>
#include <sys/stat.h>
......
......@@ -31,14 +31,10 @@
#include "qtcassert.h"
#include "stylehelper.h"
#include <QList>
#include <QHBoxLayout>
#include <QPushButton>
#include <QMenu>
#include <QStyle>
#include <QResizeEvent>
#include <QPainter>
#include <QImage>
namespace Utils {
......
......@@ -30,8 +30,8 @@
#include "detailsbutton.h"
#include <utils/hostosinfo.h>
#include <utils/stylehelper.h>
#include <QGraphicsOpacityEffect>
#include <QPropertyAnimation>
#include <QPaintEvent>
#include <QPainter>
......
......@@ -33,9 +33,6 @@
#include "utils_global.h"
#include <QAbstractButton>
#include <QPixmap>
#include <QGraphicsOpacityEffect>
QT_FORWARD_DECLARE_CLASS(QGraphicsOpacityEffect)
......
......@@ -31,9 +31,6 @@
#include "detailsbutton.h"
#include "hostosinfo.h"
#include <QStack>
#include <QPropertyAnimation>
#include <QGridLayout>
#include <QLabel>
#include <QCheckBox>
......
......@@ -30,9 +30,7 @@
#include "elfreader.h"
#include "qtcassert.h"
#include <QFile>
#include <QDir>
#include <QLibrary>
#include <QDebug>
namespace Utils {
......
......@@ -33,7 +33,6 @@
#include "utils_global.h"
#include <qendian.h>
#include <qstring.h>
#include <qvector.h>
#include <qcoreapplication.h>
......
......@@ -32,9 +32,7 @@
#include "hostosinfo.h"
#include <QDir>
#include <QProcess>
#include <QProcessEnvironment>
#include <QString>
#include <QCoreApplication>
class SystemEnvironment : public Utils::Environment
......
......@@ -32,12 +32,11 @@
#include "utils_global.h"
#include <QList>
#include <QMap>
#include <QProcessEnvironment>
#include <QString>
#include <QStringList>
QT_FORWARD_DECLARE_CLASS(QProcessEnvironment)
namespace Utils {
class QTCREATOR_UTILS_EXPORT EnvironmentItem
......
......@@ -32,8 +32,8 @@
#include <utils/environment.h>
#include <utils/hostosinfo.h>
#include <QTextDocument> // Qt::escape() in Qt 4
#include <QFont>
#include <QTextEdit>
namespace Utils {
namespace Internal {
......
......@@ -31,18 +31,12 @@
#include "historycompleter.h"
#include "qtcassert.h"
#include <QEvent>
#include <QDebug>
#include <QString>
#include <QPropertyAnimation>
#include <QApplication>
#include <QMenu>
#include <QMouseEvent>
#include <QLabel>
#include <QAbstractButton>
#include <QPainter>
#include <QStyle>
#include <QPaintEvent>
#include <QDesktopWidget>
/*! Opens a menu at the specified widget position.
......
......@@ -31,10 +31,6 @@
#include "qtcassert.h"
#include <QList>
#include <QHash>
#include <QAction>
#include <QContextMenuEvent>
#include <QMenu>
#include <QDockWidget>
......
......@@ -30,9 +30,6 @@
#include "filesearch.h"
#include <cctype>
#include <QBuffer>
#include <QFile>
#include <QtConcurrentRun>
#include <QRegExp>
#include <QCoreApplication>
#include <QTextCodec>
......
......@@ -32,7 +32,6 @@
#include "utils_global.h"
#include <QStringList>
#include <QFuture>
#include <QMap>
#include <QStack>
......
......@@ -31,7 +31,6 @@
#include <QDebug>
#include <QDir>
#include <QFileInfo>
#include <QFileSystemWatcher>
#include <QDateTime>
......
......@@ -33,7 +33,6 @@
#include "utils_global.h"
#include <QObject>
#include <QStringList>
namespace Utils {
class FileSystemWatcherPrivate;
......
......@@ -35,11 +35,7 @@
#include <QDir>
#include <QDebug>
#include <QFileInfo>
#include <QTemporaryFile>
#include <QDateTime>
#include <QDataStream>
#include <QTextStream>
#include <QMessageBox>
namespace Utils {
......
......@@ -33,9 +33,7 @@
#include "utils_global.h"
#include <QCoreApplication>
#include <QIODevice>
#include <QXmlStreamWriter> // Mac.
#include <QFileInfo>
#include <QMetaType>
QT_BEGIN_NAMESPACE
......@@ -45,6 +43,8 @@ class QWidget;
class QTextStream;
class QDataStream;
class QDateTime;
class QFileInfo;
class QDir;
QT_END_NAMESPACE
namespace Utils {
......
......@@ -30,7 +30,6 @@
#ifndef FILEWIZARDDIALOG_H
#define FILEWIZARDDIALOG_H
#include "utils_global.h"
#include "wizard.h"
namespace Utils {
......
......@@ -29,8 +29,6 @@
#include "flowlayout.h"
#include <QRect>
#include <QWidgetItem>
#include <QWidget>
using namespace Utils;
......
......@@ -31,7 +31,6 @@
#include "qtcassert.h"
#include <QAbstractListModel>
#include <QSettings>
#include <QItemDelegate>
......@@ -39,7 +38,6 @@
#include <QLineEdit>
#include <QListView>
#include <QPainter>
#include <QStyle>
namespace Utils {
namespace Internal {
......
......@@ -29,8 +29,6 @@
#include "htmldocextractor.h"
#include <QLatin1String>
#include <QLatin1Char>
#include <QStringList>
#include <QRegExp>
......
......@@ -32,8 +32,6 @@
#include "utils_global.h"
#include <QString>
namespace Utils {
class QTCREATOR_UTILS_EXPORT HtmlDocExtractor
......
......@@ -30,7 +30,6 @@
#ifndef IPADDRESSLINEEDIT_H
#define IPADDRESSLINEEDIT_H
#include "utils_global.h"
#include "basevalidatinglineedit.h"
namespace Utils {
......
......@@ -29,6 +29,8 @@
#include "iwelcomepage.h"
#include <QUrl>
namespace Utils {
IWelcomePage::IWelcomePage()
......@@ -40,3 +42,5 @@ IWelcomePage::~IWelcomePage()
}
} // namespace Utils
#include "moc_iwelcomepage.cpp"
......@@ -33,8 +33,8 @@
#include "utils_global.h"
#include <QObject>
#include <QUrl>
QT_FORWARD_DECLARE_CLASS(QUrl)
QT_FORWARD_DECLARE_CLASS(QDeclarativeEngine)
namespace Utils {
......
......@@ -33,11 +33,8 @@
#include <utils/fileutils.h>
#include <QDir>
#include <QFileInfo>
#include <QFile>
#include <QStringBuilder>
#include <QDebug>
#include <QVariant>
#include <QScriptEngine>
using namespace Utils;
......
......@@ -31,7 +31,6 @@
#include <QCoreApplication>
#include <QLocale>
#include <QUrl>
#include <QNetworkReply>
#ifdef Q_OS_UNIX
......
......@@ -30,12 +30,8 @@
#include "newclasswidget.h"
#include "ui_newclasswidget.h"
#include <utils/filewizardpage.h>
#include <QFileDialog>
#include <QFileInfo>
#include <QStringList>
#include <QDir>
#include <QDebug>
#include <QRegExp>
......
......@@ -30,9 +30,6 @@
#include "outputformatter.h"
#include <QPlainTextEdit>
#include <QColor>
#include <QString>
using namespace Utils;
......
......@@ -29,6 +29,7 @@
#include "pathchooser.h"
#include "fancylineedit.h"
#include "basevalidatinglineedit.h"
#include "environment.h"
#include "qtcassert.h"
......@@ -38,15 +39,9 @@
#include <QDebug>
#include <QDesktopServices>
#include <QDir>
#include <QEvent>
#include <QFileDialog>
#include <QFileInfo>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QProcess>
#include <QPushButton>
#include <QSettings>
/*!
\class Utils::PathChooser
......
......@@ -30,10 +30,7 @@
#ifndef PATHCHOOSER_H
#define PATHCHOOSER_H
#include "utils_global.h"
#include "fileutils.h"
#include "fancylineedit.h"
#include <QWidget>
......@@ -45,6 +42,7 @@ QT_END_NAMESPACE
namespace Utils {
class FancyLineEdit;
class Environment;
class PathChooserPrivate;
......
......@@ -32,20 +32,15 @@
#include "hostosinfo.h"
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QPlainTextEdit>
#include <QToolButton>
#include <QSpacerItem>
#include <QFileDialog>
#include <QTextCursor>
#include <QTextBlock>
#include <QMenu>
#include <QAction>
#include <QSignalMapper>
#include <QMimeData>
#include <QSharedPointer>
#include <QDir>
#include <QDebug>
/*!
......
......@@ -33,7 +33,6 @@
#include "utils_global.h"
#include <QWidget>
#include <QStringList>
namespace Utils {
......
......@@ -29,12 +29,8 @@
#include "persistentsettings.h"
#include <utils/fileutils.h>
#include <QDebug>
#include <QFile>
#include <QDir>
#include <QVariant>
#include <QStack>
#include <QXmlStreamAttributes>
#include <QXmlStreamReader>
......
......@@ -30,11 +30,8 @@
#ifndef PERSISTENTSETTINGS_H
#define PERSISTENTSETTINGS_H
#include "utils_global.h"
#include "fileutils.h"
#include <QMap>
#include <QVariant>
QT_BEGIN_NAMESPACE
......
......@@ -29,9 +29,9 @@
#include "portlist.h"
#include <QList>
#include <QPair>
#include <QString>
#include <QStringList>
#include <cctype>
......
......@@ -28,13 +28,9 @@
****************************************************************************/
#include "projectintropage.h"
#include "filewizardpage.h"
#include "ui_projectintropage.h"
#include <QMessageBox>
#include <QDir>
#include <QFileInfo>
/*!