forked from qt-creator/qt-creator
Utils/Coreplugin: Clean headers.
Change-Id: I1e0d432127651622d40ff990e1866eac9fac46a0 Reviewed-on: http://codereview.qt.nokia.com/3091 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
@@ -37,7 +37,8 @@
|
||||
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QUrl>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QUrl)
|
||||
|
||||
namespace Utils {
|
||||
|
||||
|
@@ -33,13 +33,12 @@
|
||||
#include "filesearch.h"
|
||||
#include <cctype>
|
||||
|
||||
#include <QtCore/QIODevice>
|
||||
#include <QtCore/QBuffer>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QFutureInterface>
|
||||
#include <QtCore/QtConcurrentRun>
|
||||
#include <QtCore/QRegExp>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QTextCodec>
|
||||
|
||||
#include <qtconcurrent/runextensions.h>
|
||||
|
||||
|
@@ -40,9 +40,10 @@
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QStack>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QTextCodec>
|
||||
#include <QtGui/QTextDocument>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QTextCodec)
|
||||
|
||||
namespace Utils {
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT FileIterator
|
||||
|
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <QtCore/QRect>
|
||||
#include <QtGui/QWidgetItem>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
|
@@ -36,7 +36,6 @@
|
||||
#include "utils_global.h"
|
||||
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QStyle>
|
||||
|
||||
namespace Utils {
|
||||
|
@@ -32,14 +32,14 @@
|
||||
|
||||
#include "iwelcomepage.h"
|
||||
|
||||
using namespace Utils;
|
||||
namespace Utils {
|
||||
|
||||
IWelcomePage::IWelcomePage()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
IWelcomePage::~IWelcomePage()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
} // namespace Utils
|
||||
|
@@ -33,16 +33,12 @@
|
||||
#ifndef IWELCOMEPAGE_H
|
||||
#define IWELCOMEPAGE_H
|
||||
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QMetaType>
|
||||
#include <QtCore/QUrl>
|
||||
|
||||
#include "utils_global.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QDeclarativeEngine;
|
||||
QT_END_NAMESPACE
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QUrl>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QDeclarativeEngine)
|
||||
|
||||
namespace Utils {
|
||||
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include "networkaccessmanager.h"
|
||||
|
||||
#include <QtCore/QLocale>
|
||||
#include <QtCore/QUrl>
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
|
@@ -32,9 +32,10 @@
|
||||
|
||||
#include "utils_global.h"
|
||||
|
||||
#include <QtCore/QUrl>
|
||||
#include <QtNetwork/QNetworkAccessManager>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QUrl)
|
||||
|
||||
namespace Utils {
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT NetworkAccessManager : public QNetworkAccessManager
|
||||
|
@@ -31,19 +31,13 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "savefile.h"
|
||||
|
||||
#include "qtcassert.h"
|
||||
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QTemporaryFile>
|
||||
|
||||
namespace Utils {
|
||||
|
||||
SaveFile::SaveFile(const QString &filename)
|
||||
SaveFile::SaveFile(const QString &filename) :
|
||||
m_finalFileName(filename), m_finalized(false), m_backup(false)
|
||||
{
|
||||
m_finalFileName = filename;
|
||||
m_finalized = false;
|
||||
m_backup = false;
|
||||
}
|
||||
|
||||
SaveFile::~SaveFile()
|
||||
|
@@ -53,7 +53,7 @@ public:
|
||||
void setBackup(bool backup) { m_backup = backup; }
|
||||
|
||||
private:
|
||||
QString m_finalFileName;
|
||||
const QString m_finalFileName;
|
||||
bool m_finalized;
|
||||
bool m_backup;
|
||||
};
|
||||
|
@@ -184,7 +184,8 @@ HEADERS += mainwindow.h \
|
||||
mimetypemagicdialog.h \
|
||||
mimetypesettings.h \
|
||||
dialogs/promptoverwritedialog.h \
|
||||
fileutils.h
|
||||
fileutils.h \
|
||||
externaltoolmanager.h
|
||||
|
||||
FORMS += dialogs/newdialog.ui \
|
||||
actionmanager/commandmappings.ui \
|
||||
|
@@ -31,7 +31,9 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "externaltool.h"
|
||||
#include "externaltoolmanager.h"
|
||||
#include "actionmanager/actionmanager.h"
|
||||
#include "actionmanager/actioncontainer.h"
|
||||
#include "coreconstants.h"
|
||||
#include "variablemanager.h"
|
||||
|
||||
@@ -44,6 +46,7 @@
|
||||
#include <utils/stringutils.h>
|
||||
#include <utils/environment.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QXmlStreamReader>
|
||||
|
@@ -33,22 +33,18 @@
|
||||
#ifndef EXTERNALTOOL_H
|
||||
#define EXTERNALTOOL_H
|
||||
|
||||
#include "icore.h"
|
||||
#include "core_global.h"
|
||||
#include "actionmanager/command.h"
|
||||
#include "actionmanager/actioncontainer.h"
|
||||
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QProcess>
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QTextCodec>
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtCore/QMetaType>
|
||||
|
||||
namespace Utils {
|
||||
class QtcProcess;
|
||||
}
|
||||
namespace Core {
|
||||
class ActionContainer;
|
||||
namespace Internal {
|
||||
|
||||
class ExternalTool : public QObject
|
||||
@@ -164,52 +160,6 @@ private:
|
||||
};
|
||||
|
||||
} // Internal
|
||||
|
||||
class CORE_EXPORT ExternalToolManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static ExternalToolManager *instance() { return m_instance; }
|
||||
|
||||
ExternalToolManager(Core::ICore *core);
|
||||
~ExternalToolManager();
|
||||
|
||||
QMap<QString, QList<Internal::ExternalTool *> > toolsByCategory() const;
|
||||
QMap<QString, Internal::ExternalTool *> toolsById() const;
|
||||
|
||||
void setToolsByCategory(const QMap<QString, QList<Internal::ExternalTool *> > &tools);
|
||||
|
||||
signals:
|
||||
void replaceSelectionRequested(const QString &text);
|
||||
|
||||
private slots:
|
||||
void menuActivated();
|
||||
void openPreferences();
|
||||
|
||||
private:
|
||||
void initialize();
|
||||
void parseDirectory(const QString &directory,
|
||||
QMap<QString, QMultiMap<int, Internal::ExternalTool*> > *categoryMenus,
|
||||
QMap<QString, Internal::ExternalTool *> *tools,
|
||||
bool isPreset = false);
|
||||
void readSettings(const QMap<QString, Internal::ExternalTool *> &tools,
|
||||
QMap<QString, QList<Internal::ExternalTool*> > *categoryPriorityMap);
|
||||
void writeSettings();
|
||||
|
||||
static ExternalToolManager *m_instance;
|
||||
Core::ICore *m_core;
|
||||
QMap<QString, Internal::ExternalTool *> m_tools;
|
||||
QMap<QString, QList<Internal::ExternalTool *> > m_categoryMap;
|
||||
QMap<QString, QAction *> m_actions;
|
||||
QMap<QString, ActionContainer *> m_containers;
|
||||
QAction *m_configureSeparator;
|
||||
QAction *m_configureAction;
|
||||
|
||||
// for sending the replaceSelectionRequested signal
|
||||
friend class Core::Internal::ExternalToolRunner;
|
||||
};
|
||||
|
||||
} // Core
|
||||
|
||||
Q_DECLARE_METATYPE(Core::Internal::ExternalTool *)
|
||||
|
102
src/plugins/coreplugin/externaltoolmanager.h
Normal file
102
src/plugins/coreplugin/externaltoolmanager.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (info@qt.nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at info@qt.nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef EXTERNALTOOLMANAGER_H
|
||||
#define EXTERNALTOOLMANAGER_H
|
||||
|
||||
#include "core_global.h"
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QString>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QAction)
|
||||
|
||||
namespace Core {
|
||||
class ICore;
|
||||
class ActionContainer;
|
||||
|
||||
namespace Internal {
|
||||
class ExternalToolRunner;
|
||||
class ExternalTool;
|
||||
}
|
||||
|
||||
class CORE_EXPORT ExternalToolManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static ExternalToolManager *instance() { return m_instance; }
|
||||
|
||||
ExternalToolManager(Core::ICore *core);
|
||||
~ExternalToolManager();
|
||||
|
||||
QMap<QString, QList<Internal::ExternalTool *> > toolsByCategory() const;
|
||||
QMap<QString, Internal::ExternalTool *> toolsById() const;
|
||||
|
||||
void setToolsByCategory(const QMap<QString, QList<Internal::ExternalTool *> > &tools);
|
||||
|
||||
signals:
|
||||
void replaceSelectionRequested(const QString &text);
|
||||
|
||||
private slots:
|
||||
void menuActivated();
|
||||
void openPreferences();
|
||||
|
||||
private:
|
||||
void initialize();
|
||||
void parseDirectory(const QString &directory,
|
||||
QMap<QString, QMultiMap<int, Internal::ExternalTool*> > *categoryMenus,
|
||||
QMap<QString, Internal::ExternalTool *> *tools,
|
||||
bool isPreset = false);
|
||||
void readSettings(const QMap<QString, Internal::ExternalTool *> &tools,
|
||||
QMap<QString, QList<Internal::ExternalTool*> > *categoryPriorityMap);
|
||||
void writeSettings();
|
||||
|
||||
static ExternalToolManager *m_instance;
|
||||
Core::ICore *m_core;
|
||||
QMap<QString, Internal::ExternalTool *> m_tools;
|
||||
QMap<QString, QList<Internal::ExternalTool *> > m_categoryMap;
|
||||
QMap<QString, QAction *> m_actions;
|
||||
QMap<QString, ActionContainer *> m_containers;
|
||||
QAction *m_configureSeparator;
|
||||
QAction *m_configureAction;
|
||||
|
||||
// for sending the replaceSelectionRequested signal
|
||||
friend class Core::Internal::ExternalToolRunner;
|
||||
};
|
||||
|
||||
} // Core
|
||||
|
||||
|
||||
#endif // EXTERNALTOOLMANAGER_H
|
@@ -72,6 +72,7 @@
|
||||
#include "statusbarwidget.h"
|
||||
#include "basefilewizard.h"
|
||||
#include "ioutputpane.h"
|
||||
#include "externaltoolmanager.h"
|
||||
#include "editormanager/systemeditor.h"
|
||||
|
||||
#include <coreplugin/findplaceholder.h>
|
||||
|
@@ -31,6 +31,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "messageoutputwindow.h"
|
||||
#include "outputwindow.h"
|
||||
#include "icontext.h"
|
||||
#include "coreconstants.h"
|
||||
|
||||
|
@@ -34,13 +34,10 @@
|
||||
#define MESSAGEOUTPUTWINDOW_H
|
||||
|
||||
#include "ioutputpane.h"
|
||||
#include "outputwindow.h"
|
||||
|
||||
#include <QtGui/QShowEvent>
|
||||
#include <QtGui/QResizeEvent>
|
||||
#include <QtGui/QTextEdit>
|
||||
|
||||
namespace Core {
|
||||
class OutputWindow;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class MessageOutputWindow : public Core::IOutputPane
|
||||
|
@@ -33,7 +33,6 @@
|
||||
#ifndef SIDEBARWIDGET_H
|
||||
#define SIDEBARWIDGET_H
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@@ -33,7 +33,10 @@
|
||||
#ifndef STATUSBARMANAGER_H
|
||||
#define STATUSBARMANAGER_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QList>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QWidget)
|
||||
|
||||
namespace Core {
|
||||
namespace Internal {
|
||||
|
@@ -31,9 +31,11 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "toolsettings.h"
|
||||
|
||||
#include "dialogs/externaltoolconfig.h"
|
||||
#include "externaltool.h"
|
||||
#include "externaltoolmanager.h"
|
||||
#include "coreconstants.h"
|
||||
#include "icore.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -41,6 +43,7 @@
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QTime>
|
||||
#include <QtGui/QIcon>
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
@@ -52,6 +55,10 @@ ToolSettings::ToolSettings(QObject *parent) :
|
||||
{
|
||||
}
|
||||
|
||||
ToolSettings::~ToolSettings()
|
||||
{
|
||||
}
|
||||
|
||||
QString ToolSettings::id() const
|
||||
{
|
||||
return QLatin1String(Core::Constants::SETTINGS_ID_TOOLS);
|
||||
|
@@ -33,8 +33,6 @@
|
||||
#ifndef TOOLSETTINGS_H
|
||||
#define TOOLSETTINGS_H
|
||||
|
||||
#include "dialogs/externaltoolconfig.h"
|
||||
|
||||
#include "ioptionspage.h"
|
||||
|
||||
#include <QtCore/QPointer>
|
||||
@@ -42,12 +40,14 @@
|
||||
namespace Core {
|
||||
namespace Internal {
|
||||
|
||||
class ExternalToolConfig;
|
||||
|
||||
class ToolSettings : public IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ToolSettings(QObject *parent = 0);
|
||||
~ToolSettings() {}
|
||||
~ToolSettings();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
|
@@ -35,7 +35,13 @@
|
||||
#include "variablemanager.h"
|
||||
#include "coreconstants.h"
|
||||
|
||||
#include <utils/fancylineedit.h> // IconButton
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtGui/QLineEdit>
|
||||
#include <QtGui/QTextEdit>
|
||||
#include <QtGui/QPlainTextEdit>
|
||||
#include <QtGui/QListWidgetItem>
|
||||
|
||||
using namespace Core;
|
||||
|
||||
|
@@ -35,14 +35,19 @@
|
||||
|
||||
#include "core_global.h"
|
||||
|
||||
#include <utils/fancylineedit.h>
|
||||
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QLineEdit>
|
||||
#include <QtGui/QTextEdit>
|
||||
#include <QtGui/QPlainTextEdit>
|
||||
#include <QtGui/QListWidgetItem>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QLineEdit;
|
||||
class QTextEdit;
|
||||
class QPlainTextEdit;
|
||||
class QListWidgetItem;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Utils {
|
||||
class IconButton;
|
||||
} // namespace Utils
|
||||
|
||||
namespace Core {
|
||||
|
||||
@@ -79,6 +84,5 @@ private:
|
||||
QPointer<Utils::IconButton> m_iconButton;
|
||||
};
|
||||
|
||||
|
||||
} // namespace Core
|
||||
#endif // VARIABLECHOOSER_H
|
||||
|
@@ -83,6 +83,7 @@
|
||||
#include <QtCore/QSignalMapper>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <QtCore/QTextCodec>
|
||||
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtGui/QComboBox>
|
||||
|
@@ -55,7 +55,7 @@
|
||||
#include <coreplugin/actionmanager/command.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/uniqueidmanager.h>
|
||||
#include <coreplugin/externaltool.h>
|
||||
#include <coreplugin/externaltoolmanager.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <texteditor/texteditoractionhandler.h>
|
||||
#include <find/searchresultwindow.h>
|
||||
|
Reference in New Issue
Block a user