Commit 22f03cbd authored by Friedemann Kleint's avatar Friedemann Kleint

ProjectExplor/Debugger: Header cleanup

parent 220a3d1a
......@@ -30,10 +30,13 @@
#ifndef CMAKEPROJECTMANAGER_H
#define CMAKEPROJECTMANAGER_H
#include <coreplugin/dialogs/ioptionspage.h>
#include <projectexplorer/iprojectmanager.h>
#include <coreplugin/dialogs/ioptionspage.h>
#include <coreplugin/icontext.h>
#include <utils/environment.h>
#include <utils/pathchooser.h>
#include <QtCore/QFuture>
#include <QtCore/QStringList>
#include <QtCore/QDir>
......
......@@ -35,17 +35,12 @@
#include "debuggerplugin.h"
#include "debuggerstringutils.h"
#include "threadshandler.h"
#include "stackhandler.h"
#include "stackframe.h"
#include <texteditor/basetextmark.h>
#include <utils/qtcassert.h>
#include <QtCore/QDir>
#include <QtCore/QByteArray>
#include <QtCore/QFileInfo>
namespace Debugger {
namespace Internal {
......
......@@ -30,13 +30,12 @@
#ifndef DEBUGGER_BREAKWINDOW_H
#define DEBUGGER_BREAKWINDOW_H
#include "breakpoint.h"
#include <QtGui/QTreeView>
namespace Debugger {
namespace Internal {
class BreakpointData;
class BreakWindow : public QTreeView
{
Q_OBJECT
......
......@@ -34,6 +34,7 @@
#include <QtCore/QFileInfo>
#include <QtCore/QRegExp>
#include <QtCore/QVector>
namespace Debugger {
namespace Internal {
......
......@@ -28,32 +28,22 @@
**************************************************************************/
#include "consolewindow.h"
#include "logwindow.h"
#include "debuggeractions.h"
#include "debuggerconstants.h"
#include <QtCore/QDebug>
#include <QtCore/QFile>
#include <QtCore/QTime>
#include <QtGui/QAction>
#include <QtGui/QHBoxLayout>
#include <QtGui/QVBoxLayout>
#include <QtGui/QKeyEvent>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QMenu>
#include <QtGui/QSpacerItem>
#include <QtGui/QSplitter>
#include <QtGui/QSyntaxHighlighter>
#include <QtGui/QTextBlock>
#include <QtGui/QPlainTextEdit>
#include <QtGui/QFileDialog>
#include <QtGui/QMessageBox>
#include <aggregation/aggregate.h>
#include <coreplugin/findplaceholder.h>
#include <coreplugin/minisplitter.h>
#include <find/basetextfind.h>
#include <utils/savedaction.h>
......@@ -268,25 +258,9 @@ private:
void Console::saveContents()
{
while (true) {
const QString fileName = QFileDialog::getSaveFileName(this, tr("Log File"));
if (fileName.isEmpty())
break;
QFile file(fileName);
if (file.open(QIODevice::WriteOnly|QIODevice::Text|QIODevice::Truncate)) {
file.write(toPlainText().toUtf8());
file.close();
break;
} else {
QMessageBox::warning(this, tr("Write Failure"),
tr("Unable to write log contents to '%1': %2").
arg(fileName, file.errorString()));
}
}
LogWindow::writeLogContents(this, this);
}
/////////////////////////////////////////////////////////////////////
//
// ConsoleWindow
......
......@@ -81,7 +81,7 @@ void DebuggerSettings::insertItem(int code, SavedAction *item)
m_items[code] = item;
}
void DebuggerSettings::readSettings(QSettings *settings)
void DebuggerSettings::readSettings(const QSettings *settings)
{
foreach (SavedAction *item, m_items)
item->readSettings(settings);
......
......@@ -68,7 +68,7 @@ public:
static DebuggerSettings *instance();
public slots:
void readSettings(QSettings *settings);
void readSettings(const QSettings *settings);
void writeSettings(QSettings *settings) const;
private:
......
......@@ -44,7 +44,6 @@
#include <texteditor/basetexteditor.h>
#include <texteditor/plaintexteditor.h>
#include <texteditor/basetextmark.h>
#include <texteditor/itexteditor.h>
#include <texteditor/texteditorconstants.h>
#include <texteditor/basetextdocument.h>
......
......@@ -49,11 +49,11 @@
#include "breakwindow.h"
#include <coreplugin/icore.h>
#include <coreplugin/ifile.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/progressmanager/futureprogress.h>
#include <projectexplorer/debugginghelper.h>
#include <projectexplorer/toolchaintype.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
......@@ -65,8 +65,6 @@
#include <utils/qtcassert.h>
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
#include <QtCore/QTimer>
#include <QtCore/QFutureInterface>
......@@ -79,7 +77,6 @@
#include <QtGui/QPushButton>
#include <QtGui/QTextBlock>
#include <QtGui/QTextCursor>
#include <QtGui/QTextDocument>
#include <QtGui/QTreeWidget>
#include <QtGui/QMainWindow>
......
......@@ -37,7 +37,6 @@
#include <coreplugin/ssh/sshconnection.h>
#include <QtCore/QObject>
#include <QtCore/QSharedPointer>
#include <QtCore/QStringList>
QT_BEGIN_NAMESPACE
......
......@@ -31,7 +31,6 @@
#define DEBUGGERMAINWINDOW_H
#include <utils/fancymainwindow.h>
#include "debuggerconstants.h"
QT_FORWARD_DECLARE_CLASS(QMenu);
......
......@@ -35,7 +35,6 @@
#include "debuggerdialogs.h"
#include "debuggerengine.h"
#include "debuggermainwindow.h"
#include "debuggerplugin.h"
#include "debuggerrunner.h"
#include "debuggerstringutils.h"
#include "debuggertooltip.h"
......@@ -52,16 +51,9 @@
#include "threadswindow.h"
#include "watchwindow.h"
#include "breakhandler.h"
#include "sessionengine.h"
#include "snapshothandler.h"
#include "threadshandler.h"
#include "watchutils.h"
#ifdef Q_OS_WIN
# include "shared/peutils.h"
#endif
#include "ui_commonoptionspage.h"
#include "ui_dumperoptionpage.h"
......@@ -79,15 +71,8 @@
#include <coreplugin/imode.h>
#include <coreplugin/icorelistener.h>
#include <coreplugin/manhattanstyle.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/minisplitter.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/navigationwidget.h>
#include <coreplugin/outputpane.h>
#include <coreplugin/rightpane.h>
#include <cplusplus/ExpressionUnderCursor.h>
#include <cplusplus/CppDocument.h>
#include <cppeditor/cppeditorconstants.h>
#include <cpptools/cppmodelmanagerinterface.h>
......@@ -104,52 +89,21 @@
#include <texteditor/basetexteditor.h>
#include <texteditor/basetextmark.h>
#include <texteditor/fontsettings.h>
#include <texteditor/itexteditor.h>
#include <texteditor/texteditorconstants.h>
#include <texteditor/texteditorsettings.h>
//#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <utils/qtcassert.h>
#include <utils/savedaction.h>
#include <utils/styledbar.h>
#include <qml/scriptconsole.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
#include <QtCore/QObject>
#include <QtCore/QPoint>
#include <QtCore/QSettings>
#include <QtCore/QTextStream>
#include <QtCore/QTime>
#include <QtCore/QTimer>
#include <QtCore/QVariant>
#include <QtCore/QtPlugin>
#include <QtCore/QScopedPointer>
#include <QtGui/QAbstractItemView>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QComboBox>
#include <QtGui/QDockWidget>
#include <QtGui/QErrorMessage>
#include <QtGui/QFileDialog>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QMenu>
#include <QtGui/QMessageBox>
#include <QtGui/QPlainTextEdit>
#include <QtGui/QPushButton>
#include <QtGui/QStatusBar>
#include <QtGui/QTextBlock>
#include <QtGui/QTextCursor>
#include <QtGui/QToolButton>
#include <QtGui/QToolTip>
#include <QtGui/QTreeWidget>
#include <climits>
......
......@@ -30,7 +30,6 @@
#include "debuggerrunner.h"
#include "debuggeractions.h"
#include "debuggerconstants.h"
#include "debuggerengine.h"
#include "debuggerplugin.h"
#include "debuggerstringutils.h"
......@@ -48,27 +47,17 @@
#include <projectexplorer/debugginghelper.h>
#include <projectexplorer/project.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/applicationrunconfiguration.h> // For LocalApplication*
#include <utils/environment.h>
#include <utils/synchronousprocess.h>
#include <utils/qtcassert.h>
#include <utils/fancymainwindow.h>
#include <coreplugin/icore.h>
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
#include <QtCore/QTimer>
#include <QtCore/QStringList>
#include <QtGui/QAbstractItemView>
#include <QtGui/QTextDocument>
#include <QtGui/QTreeWidget>
#include <QtGui/QMessageBox>
using namespace ProjectExplorer;
......
......@@ -53,8 +53,6 @@ class GdbEngine;
class AbstractGdbAdapter;
}
//DEBUGGER_EXPORT QDebug operator<<(QDebug str, const DebuggerStartParameters &);
class DEBUGGER_EXPORT DebuggerRunControlFactory
: public ProjectExplorer::IRunControlFactory
{
......
......@@ -29,20 +29,17 @@
#include "debuggertooltip.h"
#include <QtCore/QPointer>
#include <QtCore/QtDebug>
#include <QtCore/QPointer>
#include <QtGui/QApplication>
#include <QtGui/QDesktopWidget>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QKeyEvent>
#include <QtGui/QLabel>
#include <QtGui/QScrollBar>
#include <QtGui/QTreeView>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
namespace Debugger {
namespace Internal {
......
......@@ -29,13 +29,8 @@
#include "debuggeruiswitcher.h"
#include "debuggermainwindow.h"
#include "debuggeractions.h"
#include "debuggerconstants.h"
#include "debuggerrunner.h"
#include "debuggerplugin.h"
#include "savedaction.h"
#include <utils/savedaction.h>
#include <utils/styledbar.h>
#include <utils/qtcassert.h>
......@@ -48,7 +43,6 @@
#include <coreplugin/findplaceholder.h>
#include <coreplugin/icore.h>
#include <coreplugin/minisplitter.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/navigationwidget.h>
#include <coreplugin/outputpane.h>
#include <coreplugin/rightpane.h>
......@@ -60,7 +54,6 @@
#include <projectexplorer/target.h>
#include <projectexplorer/runconfiguration.h>
#include <QtGui/QActionGroup>
#include <QtGui/QStackedWidget>
#include <QtGui/QVBoxLayout>
#include <QtGui/QMenu>
......
......@@ -40,16 +40,14 @@ class QDockWidget;
QT_END_NAMESPACE
namespace Core {
class ActionContainer;
class Command;
class Context;
class BaseMode;
class IMode;
class BaseMode;
}
namespace Utils {
class FancyMainWindow;
class SavedAction;
}
namespace ProjectExplorer {
......
......@@ -28,7 +28,7 @@
**************************************************************************/
#include "abstractgdbadapter.h"
#include "gdbengine.h"
#include "abstractgdbprocess.h"
#include <utils/qtcassert.h>
......@@ -104,5 +104,25 @@ QString AbstractGdbAdapter::msgConnectRemoteServerFailed(const QString &why)
return tr("Connecting to remote server failed:\n%1").arg(why);
}
DebuggerState AbstractGdbAdapter::state() const
{
return m_engine->state();
}
const DebuggerStartParameters &AbstractGdbAdapter::startParameters() const
{
return m_engine->startParameters();
}
DebuggerStartParameters &AbstractGdbAdapter::startParameters()
{
return m_engine->startParameters();
}
void AbstractGdbAdapter::showMessage(const QString &msg, int channel, int timeout)
{
m_engine->showMessage(msg, channel, timeout);
}
} // namespace Internal
} // namespace Debugger
......@@ -30,14 +30,18 @@
#ifndef DEBUGGER_ABSTRACT_GDB_ADAPTER
#define DEBUGGER_ABSTRACT_GDB_ADAPTER
#include <QtCore/QObject>
#include "debuggerconstants.h"
#include "gdbengine.h"
#include <QtCore/QObject>
namespace Debugger {
class DebuggerStartParameters;
namespace Internal {
class AbstractGdbProcess;
class GdbEngine;
class GdbResponse;
// AbstractGdbAdapter is inherited by PlainGdbAdapter used for local
// debugging and TrkGdbAdapter used for on-device debugging.
......@@ -85,14 +89,10 @@ public:
virtual void trkReloadThreads() {}
protected:
DebuggerState state() const
{ return m_engine->state(); }
const DebuggerStartParameters &startParameters() const
{ return m_engine->startParameters(); }
DebuggerStartParameters &startParameters()
{ return m_engine->startParameters(); }
void showMessage(const QString &msg, int channel = LogDebug, int timeout = 1)
{ m_engine->showMessage(msg, channel, timeout); }
DebuggerState state() const;
const DebuggerStartParameters &startParameters() const;
DebuggerStartParameters &startParameters();
void showMessage(const QString &msg, int channel = LogDebug, int timeout = 1);
GdbEngine * const m_engine;
};
......
......@@ -28,7 +28,8 @@
**************************************************************************/
#include "abstractplaingdbadapter.h"
#include "gdbmi.h"
#include "gdbengine.h"
#include "debuggeractions.h"
#include "debuggerstringutils.h"
......
......@@ -28,6 +28,7 @@
**************************************************************************/
#include "attachgdbadapter.h"
#include "gdbmi.h"
#include "gdbengine.h"
#include "procinterrupt.h"
......
......@@ -31,8 +31,7 @@
#define DEBUGGER_ATTACHGDBADAPTER_H
#include "abstractgdbadapter.h"
#include "abstractgdbprocess.h"
#include "localgdbprocess.h"
namespace Debugger {
namespace Internal {
......
......@@ -28,6 +28,7 @@
**************************************************************************/
#include "gdbengine.h"
#include "gdbmi.h"
#include "abstractgdbadapter.h"
#include "debuggeractions.h"
......
......@@ -28,7 +28,7 @@
**************************************************************************/
#include "coregdbadapter.h"
#include "gdbmi.h"
#include "debuggeractions.h"
#include "gdbengine.h"
#include "debuggerstringutils.h"
......
......@@ -31,9 +31,7 @@
#define DEBUGGER_COREGDBADAPTER_H
#include "abstractgdbadapter.h"
#include "abstractgdbprocess.h"
#include "localgdbprocess.h"
namespace Debugger {
namespace Internal {
......
......@@ -32,12 +32,11 @@
#include "debuggerengine.h"
#include "gdbmi.h"
#include "localgdbprocess.h"
#include "stackframe.h"
#include "watchutils.h"
#include <QtCore/QByteArray>
#include <QtCore/QProcess>
#include <QtCore/QHash>
#include <QtCore/QMap>
#include <QtCore/QMultiMap>
......@@ -47,11 +46,9 @@
#include <QtCore/QTextCodec>
#include <QtCore/QTime>
#include <QtCore/QVariant>
#include <QtCore/QSharedPointer>
QT_BEGIN_NAMESPACE
class QMainWindow;
class QMessageBox;
class QTimer;
QT_END_NAMESPACE
......
......@@ -35,7 +35,6 @@
#include <coreplugin/dialogs/ioptionspage.h>
#include <utils/savedaction.h>
namespace Debugger {
namespace Internal {
......
......@@ -31,9 +31,7 @@
#define DEBUGGER_PLAINGDBADAPTER_H
#include "abstractplaingdbadapter.h"
#include "abstractgdbprocess.h"
#include "localgdbprocess.h"
#include <outputcollector.h>
namespace Debugger {
......
......@@ -28,7 +28,7 @@
**************************************************************************/
#include "gdbengine.h"
#include "gdbmi.h"
#include "abstractgdbadapter.h"
#include "debuggeractions.h"
#include "debuggerstringutils.h"
......
......@@ -28,7 +28,7 @@
**************************************************************************/
#include "remotegdbserveradapter.h"
#include "gdbmi.h"
#include "debuggerstringutils.h"
#include "gdbengine.h"
......
......@@ -31,8 +31,7 @@
#define DEBUGGER_REMOTEGDBADAPTER_H
#include "abstractgdbadapter.h"
#include "abstractgdbprocess.h"
#include "localgdbprocess.h"
namespace Debugger {
namespace Internal {
......
......@@ -28,12 +28,12 @@
**************************************************************************/
#include "remoteplaingdbadapter.h"
#include "gdbengine.h"
#include <debugger/debuggeractions.h>
#include <debugger/debuggerstringutils.h>
#include <utils/qtcassert.h>
namespace Debugger {
namespace Internal {
......