Commit bbcacaf5 authored by Friedemann Kleint's avatar Friedemann Kleint

Header cleaning spree in Core/Debugger and Symbian/Maemo-code of Qt4.

parent 718dd06e
......@@ -37,6 +37,8 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
#include <extensionsystem/pluginmanager.h>
#include <texteditor/itexteditor.h>
#include <texteditor/texteditorconstants.h>
......
......@@ -31,9 +31,12 @@
#define ACTIONCONTAINER_H
#include <QtCore/QObject>
#include <QtGui/QMenu>
#include <QtGui/QMenuBar>
#include <QtGui/QAction>
QT_BEGIN_NAMESPACE
class QMenu;
class QMenuBar;
class QAction;
QT_END_NAMESPACE
namespace Core {
......
......@@ -32,9 +32,6 @@
#include "coreplugin/core_global.h"
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
#include <QtCore/QObject>
#include <QtCore/QList>
......@@ -46,6 +43,9 @@ QT_END_NAMESPACE
namespace Core {
class ActionContainer;
class Command;
class CORE_EXPORT ActionManager : public QObject
{
Q_OBJECT
......
......@@ -37,12 +37,13 @@
#include "filemanager.h"
#include "icore.h"
#include "uniqueidmanager.h"
#include <utils/treewidgetcolumnstretcher.h>
#include <utils/treewidgetcolumnstretcher.h>
#include <QtGui/QKeyEvent>
#include <QtGui/QShortcut>
#include <QtGui/QHeaderView>
#include <QtGui/QTreeWidgetItem>
#include <QtGui/QFileDialog>
#include <QtCore/QCoreApplication>
#include <QtDebug>
......
......@@ -33,11 +33,11 @@
#include <coreplugin/dialogs/ioptionspage.h>
#include <QtCore/QObject>
#include <QtGui/QTreeWidgetItem>
QT_BEGIN_NAMESPACE
class QLineEdit;
class QTreeWidget;
class QTreeWidgetItem;
class Ui_CommandMappings;
QT_END_NAMESPACE
......
......@@ -33,7 +33,6 @@
#include <QtCore/QObject>
#include <QtCore/QString>
#include <QtCore/QMap>
#include <QtCore/QList>
#include <QtGui/QKeySequence>
namespace Core {
......
......@@ -51,6 +51,7 @@
#include <QtGui/QMessageBox>
#include <QtGui/QWizard>
#include <QtGui/QMainWindow>
#include <QtGui/QIcon>
enum { debugWizard = 0 };
......
......@@ -34,12 +34,11 @@
#include <coreplugin/dialogs/iwizard.h>
#include <QtGui/QIcon>
#include <QtCore/QSharedDataPointer>
#include <QtCore/QMap>
#include <QtCore/QList>
QT_BEGIN_NAMESPACE
class QIcon;
class QWizard;
class QWizardPage;
class QDebug;
......
......@@ -32,6 +32,7 @@
#include <extensionsystem/pluginmanager.h>
#include <QtGui/QWidget>
#include <QtGui/QIcon>
using namespace Core;
......
......@@ -34,9 +34,13 @@
#include "imode.h"
#include <QtCore/QObject>
#include <QtGui/QWidget>
#include <QtGui/QIcon>
QT_BEGIN_NAMESPACE
class QWidget;
QT_END_NAMESPACE
namespace Core {
class CORE_EXPORT BaseMode
......
......@@ -28,6 +28,7 @@
**************************************************************************/
#include "coreimpl.h"
#include "mainwindow.h"
#include <QtCore/QDir>
#include <QtCore/QCoreApplication>
......
......@@ -31,10 +31,10 @@
#define COREIMPL_H
#include "icore.h"
#include "mainwindow.h"
namespace Core {
namespace Internal {
class MainWindow;
class CoreImpl : public ICore
{
......
......@@ -30,7 +30,7 @@
#ifndef SAVEITEMSDIALOG_H
#define SAVEITEMSDIALOG_H
#include <QtCore/QMap>
#include <QtCore/QList>
#include <QtGui/QDialog>
#include "ui_saveitemsdialog.h"
......
......@@ -30,12 +30,12 @@
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include "coreplugin/dialogs/ioptionspage.h"
#include <QtCore/QList>
#include <QtCore/QSet>
#include <QtGui/QDialog>
#include "coreplugin/dialogs/ioptionspage.h"
QT_BEGIN_NAMESPACE
class QModelIndex;
class QStandardItemModel;
......
......@@ -44,6 +44,9 @@
#include <QtGui/QHeaderView>
#include <QtGui/QFileDialog>
#include <QtGui/QLineEdit>
#include <QtGui/QAction>
#include <QtGui/QKeyEvent>
#include <QtGui/QTreeWidgetItem>
#include <QtCore/QCoreApplication>
#include <QtDebug>
......
......@@ -32,10 +32,11 @@
#include <coreplugin/actionmanager/commandmappings.h>
#include <QtCore/QObject>
#include <QtGui/QKeySequence>
#include <QtGui/QTreeWidgetItem>
#include <QtGui/QKeyEvent>
QT_BEGIN_NAMESPACE
class QKeyEvent;
QT_END_NAMESPACE
namespace Core {
......
......@@ -32,8 +32,6 @@
#include <coreplugin/imode.h>
#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
class QSplitter;
class QWidget;
......
......@@ -45,8 +45,11 @@
#include <coreplugin/modemanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/editormanager/iexternaleditor.h>
#include <coreplugin/icorelistener.h>
#include <coreplugin/imode.h>
#include <coreplugin/settingsdatabase.h>
#include <coreplugin/variablemanager.h>
......@@ -76,10 +79,6 @@
Q_DECLARE_METATYPE(Core::IEditor*)
using namespace Core;
using namespace Core::Internal;
using namespace Utils;
enum { debugEditorManager=0 };
static inline ExtensionSystem::PluginManager *pluginManager()
......@@ -87,6 +86,46 @@ static inline ExtensionSystem::PluginManager *pluginManager()
return ExtensionSystem::PluginManager::instance();
}
//===================EditorClosingCoreListener======================
namespace Core {
namespace Internal {
class EditorClosingCoreListener : public ICoreListener
{
public:
EditorClosingCoreListener(EditorManager *em);
bool editorAboutToClose(IEditor *editor);
bool coreAboutToClose();
private:
EditorManager *m_em;
};
EditorClosingCoreListener::EditorClosingCoreListener(EditorManager *em)
: m_em(em)
{
}
bool EditorClosingCoreListener::editorAboutToClose(IEditor *)
{
return true;
}
bool EditorClosingCoreListener::coreAboutToClose()
{
// Do not ask for files to save.
// MainWindow::closeEvent has already done that.
return m_em->closeAllEditors(false);
}
} // namespace Internal
} // namespace Core
using namespace Core;
using namespace Core::Internal;
using namespace Utils;
//===================EditorManager=====================
EditorManagerPlaceHolder *EditorManagerPlaceHolder::m_current = 0;
......@@ -1953,19 +1992,3 @@ void EditorManager::gotoOtherSplit()
}
//===================EditorClosingCoreListener======================
EditorClosingCoreListener::EditorClosingCoreListener(EditorManager *em)
: m_em(em)
{
}
bool EditorClosingCoreListener::editorAboutToClose(IEditor *)
{
return true;
}
bool EditorClosingCoreListener::coreAboutToClose()
{
// Do not ask for files to save.
// MainWindow::closeEvent has already done that.
return m_em->closeAllEditors(false);
}
......@@ -32,15 +32,12 @@
#include "../core_global.h"
#include <coreplugin/icorelistener.h>
#include <coreplugin/ifile.h>
#include <coreplugin/ifile.h> // enumerations
#include <QtGui/QWidget>
#include <QtCore/QList>
#include <QtCore/QPointer>
QT_BEGIN_NAMESPACE
class QSettings;
class QModelIndex;
QT_END_NAMESPACE
......@@ -273,27 +270,4 @@ private:
} // namespace Core
Q_DECLARE_OPERATORS_FOR_FLAGS(Core::EditorManager::OpenEditorFlags);
//===================EditorClosingCoreListener======================
namespace Core {
namespace Internal {
class EditorClosingCoreListener : public ICoreListener
{
Q_OBJECT
public:
EditorClosingCoreListener(EditorManager *em);
bool editorAboutToClose(IEditor *editor);
bool coreAboutToClose();
private:
EditorManager *m_em;
};
} // namespace Internal
} // namespace Core
#endif // EDITORMANAGER_H
......@@ -58,6 +58,9 @@
#include <QtGui/QToolButton>
#include <QtGui/QMenu>
#include <QtGui/QClipboard>
#include <QtGui/QAction>
#include <QtGui/QSplitter>
#include <QtGui/QStackedLayout>
#ifdef Q_WS_MAC
#include <qmacstyle_mac.h>
......
......@@ -33,27 +33,24 @@
#include <QtCore/QMap>
#include <QtCore/QList>
#include <QtCore/QString>
#include <QtCore/QSettings>
#include <QtGui/QWidget>
#include <QtGui/QAction>
#include <QtGui/QSplitter>
#include <QtGui/QStackedLayout>
#include <QtCore/QPointer>
#include <coreplugin/icontext.h>
#include <coreplugin/ifile.h>
#include <QtGui/QSortFilterProxyModel>
#include <QtCore/QVariant>
QT_BEGIN_NAMESPACE
class QComboBox;
class QToolButton;
class QLabel;
class QStackedWidget;
class QSplitter;
class QStackedLayout;
class QAction;
class QFrame;
QT_END_NAMESPACE
namespace Core {
class IContext;
class IFile;
class IEditor;
class OpenEditorsModel;
class EditorToolBar;
......@@ -72,7 +69,7 @@ class EditorView : public QWidget
Q_OBJECT
public:
EditorView(QWidget *parent = 0);
explicit EditorView(QWidget *parent = 0);
virtual ~EditorView();
int editorCount() const;
......@@ -146,8 +143,8 @@ class SplitterOrView : public QWidget
{
Q_OBJECT
public:
SplitterOrView(OpenEditorsModel *model); // creates a root splitter
SplitterOrView(Core::IEditor *editor = 0);
explicit SplitterOrView(OpenEditorsModel *model); // creates a root splitter
explicit SplitterOrView(Core::IEditor *editor = 0);
~SplitterOrView();
void split(Qt::Orientation orientation);
......@@ -187,7 +184,6 @@ protected:
void paintEvent(QPaintEvent *);
void mousePressEvent(QMouseEvent *e);
private:
void unsplitAll_helper();
SplitterOrView *findNextView_helper(SplitterOrView *view, bool *found);
......
......@@ -32,17 +32,13 @@
#include "ui_openeditorsview.h"
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/inavigationwidgetfactory.h>
#include <QtCore/QList>
#include <QtGui/QWidget>
#include <QtGui/QKeySequence>
#include <QtGui/QAbstractButton>
#include <QtGui/QTreeWidgetItem>
#include <QtGui/QStyledItemDelegate>
namespace Core {
class IEditor;
namespace Internal {
class OpenEditorsDelegate : public QStyledItemDelegate
......@@ -50,7 +46,7 @@ class OpenEditorsDelegate : public QStyledItemDelegate
Q_OBJECT
public:
OpenEditorsDelegate(QObject *parent = 0);
explicit OpenEditorsDelegate(QObject *parent = 0);
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const;
......@@ -58,7 +54,6 @@ public:
mutable QModelIndex pressedIndex;
};
class OpenEditorsWidget : public QWidget
{
Q_OBJECT
......
......@@ -31,6 +31,7 @@
#include "openeditorsmodel.h"
#include "editormanager.h"
#include "editorview.h"
#include "ifile.h"
#include <utils/qtcassert.h>
......
......@@ -30,7 +30,6 @@
#ifndef FANCYACTIONBAR_H
#define FANCYACTIONBAR_H
#include <QtCore/QMap>
#include <QtGui/QToolButton>
QT_BEGIN_NAMESPACE
......
......@@ -30,12 +30,12 @@
#ifndef FANCYTABWIDGET_H
#define FANCYTABWIDGET_H
#include <QtGui/QPushButton>
#include <QtGui/QTabBar>
#include <QtGui/QStyleOptionTabV2>
#include <QtCore/QTimeLine>
#include <QtGui/QIcon>
#include <QtGui/QWidget>
#include <QtCore/QTimer>
#include <QtCore/QPropertyAnimation>
QT_BEGIN_NAMESPACE
class QPainter;
class QStackedLayout;
......
......@@ -29,6 +29,9 @@
#include "flowlayout.h"
#include <QRect>
#include <QWidgetItem>
using namespace Core::Internal;
FlowLayout::FlowLayout(QWidget *parent, int margin, int spacing)
......
......@@ -30,9 +30,7 @@
#ifndef FLOWLAYOUT_H
#define FLOWLAYOUT_H
#include <QLayout>
#include <QRect>
#include <QWidgetItem>
#include <QtGui/QLayout>
namespace Core {
namespace Internal {
......
......@@ -38,6 +38,7 @@
#include <coreplugin/icore.h>
#include <QtGui/QMainWindow>
#include <QtGui/QMessageBox>
#include <QtCore/QCoreApplication>
#include <QtCore/QTextStream>
......
......@@ -32,7 +32,10 @@
#include <coreplugin/dialogs/ioptionspage.h>
#include <QtCore/QPointer>
#include <QtGui/QMessageBox>
QT_BEGIN_NAMESPACE
class QMessageBox;
QT_END_NAMESPACE
namespace Core {
namespace Internal {
......
......@@ -29,6 +29,7 @@
#include "mainwindow.h"
#include "actioncontainer.h"
#include "command.h"
#include "actionmanager_p.h"
#include "coreimpl.h"
#include "coreconstants.h"
......@@ -64,6 +65,7 @@
#include "editormanager/systemeditor.h"
#include <coreplugin/findplaceholder.h>
#include <coreplugin/icorelistener.h>
#include <coreplugin/settingsdatabase.h>
#include <utils/pathchooser.h>
#include <utils/stylehelper.h>
......@@ -86,6 +88,7 @@
#include <QtGui/QWizard>
#include <QtGui/QToolButton>
#include <QtGui/QMessageBox>
#include <QtGui/QMenuBar>
/*
#ifdef Q_OS_UNIX
......
This diff is collapsed.
......@@ -31,39 +31,33 @@
#define MODEMANAGER_H
#include <QtCore/QObject>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QVector>
#include <coreplugin/core_global.h>
QT_BEGIN_NAMESPACE
class QAction;
class QSignalMapper;
class QMenu;
QT_END_NAMESPACE
namespace Core {
class Command;
class IMode;
namespace Internal {
class FancyTabWidget;
class FancyActionBar;
class FancyConfigButton;
class MainWindow;
} // namespace Internal
class MainWindow;
class FancyTabWidget;
}
struct ModeManagerPrivate;
class CORE_EXPORT ModeManager : public QObject
{
Q_OBJECT
public:
ModeManager(Internal::MainWindow *mainWindow, Internal::FancyTabWidget *modeStack);
explicit ModeManager(Internal::MainWindow *mainWindow, Internal::FancyTabWidget *modeStack);
virtual ~ModeManager();
void init();