forked from qt-creator/qt-creator
Rename IRunConfigurationRunner -> IRunControlFactory...
and ApplicationRunConfiguration to LocalApplicationRunConfiguration, preparing remote debugging. Change the interface canRun() to be const, run() to create() (since it does not run anything), use references to the QSharedPointer<Foo>. Introduce d-Pointer and remove unneeded headers from ProjectExplorerPlugin and add missing includes everywhere.
This commit is contained in:
@@ -48,9 +48,13 @@
|
||||
#include <vcsbase/vcsbaseeditor.h>
|
||||
#include <vcsbase/vcsbaseoutputwindow.h>
|
||||
|
||||
#include <projectexplorer/environment.h>
|
||||
|
||||
#include <QtCore/QRegExp>
|
||||
#include <QtCore/QTemporaryFile>
|
||||
#include <QtCore/QTime>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QDir>
|
||||
|
||||
#include <QtGui/QMainWindow> // for msg box parent
|
||||
#include <QtGui/QMessageBox>
|
||||
|
||||
@@ -56,6 +56,9 @@
|
||||
#include <vcsbase/basevcssubmiteditorfactory.h>
|
||||
#include <vcsbase/vcsbaseoutputwindow.h>
|
||||
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/project.h>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFileInfo>
|
||||
@@ -138,7 +141,6 @@ GitPlugin::GitPlugin() :
|
||||
m_stashPopAction(0),
|
||||
m_stashListAction(0),
|
||||
m_branchListAction(0),
|
||||
m_projectExplorer(0),
|
||||
m_gitClient(0),
|
||||
m_changeSelectionDialog(0),
|
||||
m_submitActionTriggered(false)
|
||||
@@ -418,7 +420,6 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
void GitPlugin::extensionsInitialized()
|
||||
{
|
||||
m_projectExplorer = ProjectExplorer::ProjectExplorerPlugin::instance();
|
||||
}
|
||||
|
||||
void GitPlugin::submitEditorDiff(const QStringList &unstaged, const QStringList &staged)
|
||||
@@ -452,9 +453,10 @@ QFileInfo GitPlugin::currentFile() const
|
||||
QString GitPlugin::getWorkingDirectory()
|
||||
{
|
||||
QString workingDirectory;
|
||||
if (m_projectExplorer && m_projectExplorer->currentNode()) {
|
||||
workingDirectory = QFileInfo(m_projectExplorer->currentNode()->path()).absolutePath();
|
||||
}
|
||||
if (const ProjectExplorer::ProjectExplorerPlugin *p = ProjectExplorer::ProjectExplorerPlugin::instance())
|
||||
if (p && p->currentNode())
|
||||
workingDirectory = QFileInfo(p->currentNode()->path()).absolutePath();
|
||||
|
||||
if (Git::Constants::debug > 1)
|
||||
qDebug() << Q_FUNC_INFO << "Project" << workingDirectory;
|
||||
|
||||
@@ -795,11 +797,10 @@ void GitPlugin::updateActions()
|
||||
|
||||
// We only know the file is in some repository, we do not know
|
||||
// anything about any project so far.
|
||||
using namespace ProjectExplorer;
|
||||
QString project;
|
||||
if (m_projectExplorer) {
|
||||
if (const Node *node = m_projectExplorer->currentNode())
|
||||
if (const Node *projectNode = node->projectNode())
|
||||
if (const ProjectExplorer::ProjectExplorerPlugin *p = ProjectExplorer::ProjectExplorerPlugin::instance()) {
|
||||
if (const ProjectExplorer::Node *node = p->currentNode())
|
||||
if (const ProjectExplorer::Node *projectNode = node->projectNode())
|
||||
project = QFileInfo(projectNode->path()).completeBaseName();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <coreplugin/editormanager/ieditorfactory.h>
|
||||
#include <coreplugin/icorelistener.h>
|
||||
#include <extensionsystem/iplugin.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QProcess>
|
||||
@@ -44,6 +43,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QFile;
|
||||
class QAction;
|
||||
class QFileInfo;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
@@ -87,8 +87,8 @@ public:
|
||||
|
||||
static GitPlugin *instance();
|
||||
|
||||
bool initialize(const QStringList &arguments, QString *error_message);
|
||||
void extensionsInitialized();
|
||||
virtual bool initialize(const QStringList &arguments, QString *error_message);
|
||||
virtual void extensionsInitialized();
|
||||
|
||||
QString getWorkingDirectory();
|
||||
|
||||
@@ -160,7 +160,6 @@ private:
|
||||
QAction *m_stashListAction;
|
||||
QAction *m_branchListAction;
|
||||
|
||||
ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer;
|
||||
GitClient *m_gitClient;
|
||||
ChangeSelectionDialog *m_changeSelectionDialog;
|
||||
QString m_submitRepository;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <vcsbase/vcsbaseconstants.h>
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtGui/QMessageBox>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user