Commit 7aa24116 authored by Friedemann Kleint's avatar Friedemann Kleint

Code model: Update on changes from the versioning system.

Add state logic to CppCodeModelManagerInterface, making it aware whether
an indexer is running, protect the update methods from another
invocation while running. Add changed signals to IVersionControl and
VCSManager and wire them to the update methods. Add a menu action for
manually updating.
Reviewed-by: default avatarRoberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: default avatarcon <qtc-committer@nokia.com>
parent 19fb0311
......@@ -106,6 +106,10 @@ public:
*/
virtual bool vcsDelete(const QString &filename) = 0;
signals:
void repositoryChanged(const QString &repository);
void filesChanged(const QStringList &files);
// TODO: ADD A WAY TO DETECT WHETHER A FILE IS MANAGED, e.g
// virtual bool sccManaged(const QString &filename) = 0;
};
......
......@@ -126,7 +126,7 @@ MainWindow::MainWindow() :
m_progressManager(new ProgressManagerPrivate()),
m_scriptManager(new ScriptManagerPrivate(this)),
m_variableManager(new VariableManager(this)),
m_vcsManager(new VCSManager()),
m_vcsManager(new VCSManager),
m_viewManager(0),
m_modeManager(0),
m_mimeDatabase(new MimeDatabase),
......@@ -346,6 +346,7 @@ void MainWindow::extensionsInitialized()
OutputPaneManager::instance()->init();
m_actionManager->initialize();
m_vcsManager->extensionsInitialized();
readSettings();
updateContext();
......
......@@ -57,7 +57,8 @@ struct VCSManagerPrivate {
QMap<QString, IVersionControl *> m_cachedMatches;
};
VCSManager::VCSManager() :
VCSManager::VCSManager(QObject *parent) :
QObject(parent),
m_d(new VCSManagerPrivate)
{
}
......@@ -67,6 +68,17 @@ VCSManager::~VCSManager()
delete m_d;
}
void VCSManager::extensionsInitialized()
{
// Change signal connections
foreach (IVersionControl *versionControl, allVersionControls()) {
connect(versionControl, SIGNAL(filesChanged(QStringList)),
this, SIGNAL(filesChanged(QStringList)));
connect(versionControl, SIGNAL(repositoryChanged(QString)),
this, SIGNAL(repositoryChanged(QString)));
}
}
void VCSManager::setVCSEnabled(const QString &directory)
{
if (debug)
......
......@@ -33,6 +33,7 @@
#include "core_global.h"
#include <QtCore/QString>
#include <QtCore/QObject>
namespace Core {
......@@ -49,13 +50,16 @@ class IVersionControl;
// for the topmost directory it manages. This information is cached and
// VCSManager thus knows pretty fast which IVersionControl * is responsible.
class CORE_EXPORT VCSManager
class CORE_EXPORT VCSManager : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(VCSManager)
public:
VCSManager();
explicit VCSManager(QObject *parent = 0);
virtual ~VCSManager();
void extensionsInitialized();
IVersionControl *findVersionControlForDirectory(const QString &directory);
// Enable the VCS managing a certain directory only. This should
......@@ -69,6 +73,10 @@ public:
// if a failure occurs
bool showDeleteDialog(const QString &fileName);
signals:
void repositoryChanged(const QString &repository);
void filesChanged(const QStringList &files);
private:
VCSManagerPrivate *m_d;
};
......
......@@ -41,8 +41,10 @@ const char * const SWITCH_DECLARATION_DEFINITION = "CppEditor.SwitchDeclarationD
const char * const RENAME_SYMBOL_UNDER_CURSOR = "CppEditor.RenameSymbolUnderCursor";
const char * const FIND_USAGES = "CppEditor.FindUsages";
const char * const SEPARATOR = "CppEditor.Separator";
const char * const SEPARATOR2 = "CppEditor.Separator2";
const char * const FIND_REFERENCES = "CppEditor.FindReferences";
const char * const JUMP_TO_DEFINITION = "CppEditor.JumpToDefinition";
const char * const UPDATE_CODEMODEL = "CppEditor.UpdateCodeModel";
const char * const HEADER_FILE_TYPE = "CppHeaderFiles";
const char * const SOURCE_FILE_TYPE = "CppSourceFiles";
......
......@@ -43,7 +43,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <texteditor/completionsupport.h>
#include <texteditor/fontsettings.h>
#include <texteditor/storagesettings.h>
......@@ -112,7 +112,11 @@ CppPlugin *CppPlugin::m_instance = 0;
CppPlugin::CppPlugin() :
m_actionHandler(0),
m_sortedMethodOverview(false)
m_sortedMethodOverview(false),
m_renameSymbolUnderCursorAction(0),
m_findUsagesAction(0),
m_updateCodeModelAction(0)
{
m_instance = this;
}
......@@ -158,6 +162,17 @@ bool CppPlugin::sortedMethodOverview() const
return m_sortedMethodOverview;
}
static inline
Core::Command *createSeparator(Core::ActionManager *am,
QObject *parent,
const QList<int> &context,
const char *id)
{
QAction *separator = new QAction(parent);
separator->setSeparator(true);
return am->registerAction(separator, QLatin1String(id), context);
}
bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage)
{
Core::ICore *core = Core::ICore::instance();
......@@ -192,6 +207,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
Core::ActionContainer *contextMenu= am->createMenu(CppEditor::Constants::M_CONTEXT);
Core::Command *cmd;
Core::ActionContainer *cppToolsMenu = am->actionContainer(QLatin1String(CppTools::Constants::M_TOOLS_CPP));
QAction *jumpToDefinition = new QAction(tr("Follow Symbol under Cursor"), this);
cmd = am->registerAction(jumpToDefinition,
......@@ -200,7 +216,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
connect(jumpToDefinition, SIGNAL(triggered()),
this, SLOT(jumpToDefinition()));
contextMenu->addAction(cmd);
am->actionContainer(CppTools::Constants::M_TOOLS_CPP)->addAction(cmd);
cppToolsMenu->addAction(cmd);
QAction *switchDeclarationDefinition = new QAction(tr("Switch between Method Declaration/Definition"), this);
cmd = am->registerAction(switchDeclarationDefinition,
......@@ -209,14 +225,14 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
connect(switchDeclarationDefinition, SIGNAL(triggered()),
this, SLOT(switchDeclarationDefinition()));
contextMenu->addAction(cmd);
am->actionContainer(CppTools::Constants::M_TOOLS_CPP)->addAction(cmd);
cppToolsMenu->addAction(cmd);
m_findUsagesAction = new QAction(tr("Find Usages"), this);
cmd = am->registerAction(m_findUsagesAction, Constants::FIND_USAGES, context);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+U")));
connect(m_findUsagesAction, SIGNAL(triggered()), this, SLOT(findUsages()));
contextMenu->addAction(cmd);
am->actionContainer(CppTools::Constants::M_TOOLS_CPP)->addAction(cmd);
cppToolsMenu->addAction(cmd);
m_renameSymbolUnderCursorAction = new QAction(tr("Rename Symbol under Cursor"), this);
cmd = am->registerAction(m_renameSymbolUnderCursorAction,
......@@ -224,7 +240,17 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
cmd->setDefaultKeySequence(QKeySequence("CTRL+SHIFT+R"));
connect(m_renameSymbolUnderCursorAction, SIGNAL(triggered()), this, SLOT(renameSymbolUnderCursor()));
contextMenu->addAction(cmd);
am->actionContainer(CppTools::Constants::M_TOOLS_CPP)->addAction(cmd);
cppToolsMenu->addAction(cmd);
// Update context in global context
QList<int> globalContext;
globalContext.append(Core::Constants::C_GLOBAL_ID);
cppToolsMenu->addAction(createSeparator(am, this, globalContext, CppEditor::Constants::SEPARATOR2));
m_updateCodeModelAction = new QAction(tr("Update code model"), this);
cmd = am->registerAction(m_updateCodeModelAction, QLatin1String(Constants::UPDATE_CODEMODEL), globalContext);
CppTools::CppModelManagerInterface *cppModelManager = CppTools::CppModelManagerInterface::instance();
connect(m_updateCodeModelAction, SIGNAL(triggered()), cppModelManager, SLOT(updateModifiedSourceFiles()));
cppToolsMenu->addAction(cmd);
m_actionHandler = new TextEditor::TextEditorActionHandler(CppEditor::Constants::C_CPPEDITOR,
TextEditor::TextEditorActionHandler::Format
......@@ -233,10 +259,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
m_actionHandler->initializeActions();
QAction *separator = new QAction(this);
separator->setSeparator(true);
cmd = am->registerAction(separator, CppEditor::Constants::SEPARATOR, context);
contextMenu->addAction(cmd);
contextMenu->addAction(createSeparator(am, this, context, CppEditor::Constants::SEPARATOR));
cmd = am->command(TextEditor::Constants::AUTO_INDENT_SELECTION);
contextMenu->addAction(cmd);
......@@ -244,10 +267,8 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
cmd = am->command(TextEditor::Constants::UN_COMMENT_SELECTION);
contextMenu->addAction(cmd);
connect(core->progressManager(), SIGNAL(taskStarted(QString)),
this, SLOT(onTaskStarted(QString)));
connect(core->progressManager(), SIGNAL(allTasksFinished(QString)),
this, SLOT(onAllTasksFinished(QString)));
connect(cppModelManager, SIGNAL(indexingStarted()), this, SLOT(onCppModelIndexingStarted()));
connect(cppModelManager, SIGNAL(indexingFinished()), this, SLOT(onCppModelIndexingFinished()));
readSettings();
return true;
}
......@@ -303,20 +324,18 @@ void CppPlugin::findUsages()
editor->findUsages();
}
void CppPlugin::onTaskStarted(const QString &type)
void CppPlugin::onCppModelIndexingStarted()
{
if (type == CppTools::Constants::TASK_INDEX) {
m_renameSymbolUnderCursorAction->setEnabled(false);
m_findUsagesAction->setEnabled(false);
}
m_renameSymbolUnderCursorAction->setEnabled(false);
m_findUsagesAction->setEnabled(false);
m_updateCodeModelAction->setEnabled(false);
}
void CppPlugin::onAllTasksFinished(const QString &type)
void CppPlugin::onCppModelIndexingFinished()
{
if (type == CppTools::Constants::TASK_INDEX) {
m_renameSymbolUnderCursorAction->setEnabled(true);
m_findUsagesAction->setEnabled(true);
}
m_renameSymbolUnderCursorAction->setEnabled(true);
m_findUsagesAction->setEnabled(true);
m_updateCodeModelAction->setEnabled(true);
}
Q_EXPORT_PLUGIN(CppPlugin)
......@@ -75,8 +75,8 @@ private slots:
void switchDeclarationDefinition();
void jumpToDefinition();
void renameSymbolUnderCursor();
void onTaskStarted(const QString &type);
void onAllTasksFinished(const QString &type);
void onCppModelIndexingStarted();
void onCppModelIndexingFinished();
void findUsages();
private:
......@@ -90,6 +90,7 @@ private:
bool m_sortedMethodOverview;
QAction *m_renameSymbolUnderCursorAction;
QAction *m_findUsagesAction;
QAction *m_updateCodeModelAction;
};
class CppEditorFactory : public Core::IEditorFactory
......
......@@ -595,6 +595,8 @@ Document::Ptr CppPreprocessor::switchDocument(Document::Ptr doc)
void CppTools::CppModelManagerInterface::updateModifiedSourceFiles()
{
if (isIndexing())
return;
const Snapshot snapshot = this->snapshot();
QStringList sourceFiles;
......@@ -630,7 +632,8 @@ CppTools::CppModelManagerInterface *CppTools::CppModelManagerInterface::instance
*/
CppModelManager::CppModelManager(QObject *parent)
: CppModelManagerInterface(parent)
: CppModelManagerInterface(parent),
m_indexing(false)
{
m_findReferences = new CppFindReferences(this);
......@@ -675,6 +678,11 @@ CppModelManager::CppModelManager(QObject *parent)
connect(m_core->editorManager(), SIGNAL(editorAboutToClose(Core::IEditor *)),
this, SLOT(editorAboutToClose(Core::IEditor *)));
connect(m_core->progressManager(), SIGNAL(taskStarted(QString)),
this, SLOT(onTaskStarted(QString)));
connect(m_core->progressManager(), SIGNAL(allTasksFinished(QString)),
this, SLOT(onAllTasksFinished(QString)));
}
CppModelManager::~CppModelManager()
......@@ -871,7 +879,7 @@ QStringList CppModelManager::includesInPath(const QString &path) const
QFuture<void> CppModelManager::refreshSourceFiles(const QStringList &sourceFiles)
{
if (! sourceFiles.isEmpty() && qgetenv("QTCREATOR_NO_CODE_INDEXER").isNull()) {
if (!m_indexing && !sourceFiles.isEmpty() && qgetenv("QTCREATOR_NO_CODE_INDEXER").isNull()) {
const QMap<QString, QString> workingCopy = buildWorkingCopyList();
CppPreprocessor *preproc = new CppPreprocessor(this);
......@@ -897,7 +905,7 @@ QFuture<void> CppModelManager::refreshSourceFiles(const QStringList &sourceFiles
m_synchronizer.addFuture(result);
if (sourceFiles.count() > 1) {
if (sourceFiles.count() > 1) {
m_core->progressManager()->addTask(result, tr("Indexing"),
CppTools::Constants::TASK_INDEX,
Core::ProgressManager::CloseOnSuccess);
......@@ -1391,4 +1399,31 @@ void CppModelManager::GC()
protectSnapshot.unlock();
}
bool CppModelManager::isIndexing() const
{
return m_indexing;
}
void CppModelManager::setIndexing(bool v)
{
if (m_indexing == v)
return;
m_indexing = v;
if (v) {
emit indexingStarted();
} else {
emit indexingFinished();
}
}
void CppModelManager::onTaskStarted(const QString &type)
{
if (type == QLatin1String(CppTools::Constants::TASK_INDEX))
setIndexing(true);
}
void CppModelManager::onAllTasksFinished(const QString &type)
{
if (type == QLatin1String(CppTools::Constants::TASK_INDEX))
setIndexing(false);
}
......@@ -111,6 +111,8 @@ public:
void setHeaderSuffixes(const QStringList &suffixes)
{ m_headerSuffixes = suffixes; }
virtual bool isIndexing() const;
Q_SIGNALS:
void projectPathChanged(const QString &projectPath);
......@@ -129,6 +131,8 @@ private Q_SLOTS:
void onProjectAdded(ProjectExplorer::Project *project);
void postEditorUpdate();
void updateEditorSelections();
void onTaskStarted(const QString &type);
void onAllTasksFinished(const QString &type);
private:
QMap<QString, QString> buildWorkingCopyList();
......@@ -175,10 +179,13 @@ private:
CppPreprocessor *preproc,
QStringList files);
void setIndexing(bool);
private:
Core::ICore *m_core;
CPlusPlus::Snapshot m_snapshot;
bool m_indexing;
// cache
bool m_dirty;
QStringList m_projectFiles;
......
......@@ -102,6 +102,12 @@ public:
virtual void renameUsages(CPlusPlus::Symbol *symbol) = 0;
virtual void findUsages(CPlusPlus::Symbol *symbol) = 0;
virtual bool isIndexing() const = 0;
signals:
void indexingStarted();
void indexingFinished();
public Q_SLOTS:
void updateModifiedSourceFiles();
virtual void updateSourceFiles(const QStringList &sourceFiles) = 0;
......
......@@ -47,6 +47,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/vcsmanager.h>
#include <cppeditor/cppeditorconstants.h>
#include <QtCore/QtConcurrentRun>
......@@ -97,6 +98,11 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
// Objects
m_modelManager = new CppModelManager(this);
Core::VCSManager *vcsManager = core->vcsManager();
connect(vcsManager, SIGNAL(repositoryChanged(QString)),
m_modelManager, SLOT(updateModifiedSourceFiles()));
connect(vcsManager, SIGNAL(filesChanged(QStringList)),
m_modelManager, SLOT(updateModifiedSourceFiles()));
addAutoReleasedObject(m_modelManager);
m_completion = new CppCodeCompletion(m_modelManager);
......
......@@ -96,3 +96,14 @@ QString CVSControl::findTopLevelForDirectory(const QString &directory) const
{
return m_plugin->findTopLevelForDirectory(directory);
}
void CVSControl::emitRepositoryChanged(const QString &s)
{
emit repositoryChanged(s);
}
void CVSControl::emitFilesChanged(const QStringList &l)
{
emit filesChanged(l);
}
......@@ -56,6 +56,9 @@ public:
virtual bool vcsAdd(const QString &fileName);
virtual bool vcsDelete(const QString &filename);
void emitRepositoryChanged(const QString &s);
void emitFilesChanged(const QStringList &l);
signals:
void enabledChanged(bool);
......
......@@ -551,9 +551,11 @@ void CVSPlugin::revertCurrentFile()
QStringList args(QLatin1String("update"));
args.push_back(QLatin1String("-C"));
const CVSResponse revertResponse = runCVS(args, QStringList(file), cvsShortTimeOut, true);
const QStringList files = QStringList(file);
const CVSResponse revertResponse = runCVS(args, files, cvsShortTimeOut, true);
if (revertResponse.result == CVSResponse::Ok) {
fcb.setModifiedReload(true);
m_versionControl->emitFilesChanged(files);
}
}
......@@ -734,7 +736,10 @@ void CVSPlugin::updateProject()
if (!topLevels.empty()) {
QStringList args(QLatin1String("update"));
args.push_back(QLatin1String("-dR"));
runCVS(args, topLevels, cvsLongTimeOut, true);
const CVSResponse response = runCVS(args, topLevels, cvsLongTimeOut, true);
if (response.result == CVSResponse::Ok)
foreach(const QString &topLevel, topLevels)
m_versionControl->emitRepositoryChanged(topLevel);
}
}
......
......@@ -59,6 +59,7 @@ namespace CVS {
namespace Internal {
class CVSSubmitEditor;
class CVSControl;
struct CVSResponse
{
......@@ -153,7 +154,7 @@ private:
void cleanCommitMessageFile();
CVSSettings m_settings;
Core::IVersionControl *m_versionControl;
CVSControl *m_versionControl;
QString m_commitMessageFileName;
ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer;
......
......@@ -34,6 +34,7 @@
#include "gitconstants.h"
#include "gitplugin.h"
#include "gitsubmiteditor.h"
#include "gitversioncontrol.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/coreconstants.h>
......@@ -43,6 +44,9 @@
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/filemanager.h>
#include <coreplugin/filemanager.h>
#include <coreplugin/iversioncontrol.h>
#include <texteditor/itexteditor.h>
#include <utils/qtcassert.h>
#include <vcsbase/vcsbaseeditor.h>
......@@ -55,6 +59,7 @@
#include <QtCore/QTime>
#include <QtCore/QFileInfo>
#include <QtCore/QDir>
#include <QtCore/QSignalMapper>
#include <QtGui/QMainWindow> // for msg box parent
#include <QtGui/QMessageBox>
......@@ -102,7 +107,8 @@ static QString formatCommand(const QString &binary, const QStringList &args)
GitClient::GitClient(GitPlugin* plugin)
: m_msgWait(tr("Waiting for data...")),
m_plugin(plugin),
m_core(Core::ICore::instance())
m_core(Core::ICore::instance()),
m_repositoryChangedSignalMapper(0)
{
if (QSettings *s = m_core->settings()) {
m_settings.fromSettings(s);
......@@ -317,7 +323,8 @@ void GitClient::checkoutBranch(const QString &workingDirectory, const QString &b
{
QStringList arguments(QLatin1String("checkout"));
arguments << branch;
executeGit(workingDirectory, arguments, 0, true);
GitCommand *cmd = executeGit(workingDirectory, arguments, 0, true);
connectRepositoryChanged(workingDirectory, cmd);
}
void GitClient::checkout(const QString &workingDirectory, const QString &fileName)
......@@ -341,7 +348,8 @@ void GitClient::hardReset(const QString &workingDirectory, const QString &commit
if (!commit.isEmpty())
arguments << commit;
executeGit(workingDirectory, arguments, 0, true);
GitCommand *cmd = executeGit(workingDirectory, arguments, 0, true);
connectRepositoryChanged(workingDirectory, cmd);
}
void GitClient::addFile(const QString &workingDirectory, const QString &fileName)
......@@ -500,18 +508,19 @@ GitCommand *GitClient::createCommand(const QString &workingDirectory,
}
// Execute a single command
void GitClient::executeGit(const QString &workingDirectory,
const QStringList &arguments,
VCSBase::VCSBaseEditor* editor,
bool outputToWindow,
GitCommand::TerminationReportMode tm,
int editorLineNumber)
GitCommand *GitClient::executeGit(const QString &workingDirectory,
const QStringList &arguments,
VCSBase::VCSBaseEditor* editor,
bool outputToWindow,
GitCommand::TerminationReportMode tm,
int editorLineNumber)
{
VCSBase::VCSBaseOutputWindow::instance()->appendCommand(formatCommand(QLatin1String(Constants::GIT_BINARY), arguments));
GitCommand *command = createCommand(workingDirectory, editor, outputToWindow, editorLineNumber);
command->addJob(arguments, m_settings.timeout);
command->setTerminationReportMode(tm);
command->execute();
return command;
}
// Return fixed arguments required to run
......@@ -903,6 +912,8 @@ void GitClient::revert(const QStringList &files)
QString errorMessage;
switch (revertI(files, &isDirectory, &errorMessage)) {
case RevertOk:
m_plugin->versionControl()->emitFilesChanged(files);
break;
case RevertCanceled:
break;
case RevertUnchanged: {
......@@ -918,7 +929,8 @@ void GitClient::revert(const QStringList &files)
void GitClient::pull(const QString &workingDirectory)
{
executeGit(workingDirectory, QStringList(QLatin1String("pull")), 0, true, GitCommand::ReportStderr);
GitCommand *cmd = executeGit(workingDirectory, QStringList(QLatin1String("pull")), 0, true, GitCommand::ReportStderr);
connectRepositoryChanged(workingDirectory, cmd);
}
void GitClient::push(const QString &workingDirectory)
......@@ -952,7 +964,8 @@ void GitClient::stashPop(const QString &workingDirectory)
{
QStringList arguments(QLatin1String("stash"));
arguments << QLatin1String("pop");
executeGit(workingDirectory, arguments, 0, true);
GitCommand *cmd = executeGit(workingDirectory, arguments, 0, true);
connectRepositoryChanged(workingDirectory, cmd);
}
void GitClient::branchList(const QString &workingDirectory)
......@@ -1000,3 +1013,16 @@ void GitClient::setSettings(const GitSettings &s)
m_binaryPath = m_settings.gitBinaryPath();
}
}
void GitClient::connectRepositoryChanged(const QString & repository, GitCommand *cmd)
{
// Bind command success termination with repository to changed signal
if (!m_repositoryChangedSignalMapper) {
m_repositoryChangedSignalMapper = new QSignalMapper(this);
connect(m_repositoryChangedSignalMapper, SIGNAL(mapped(QString)),
m_plugin->versionControl(), SIGNAL(repositoryChanged(QString)));
}
m_repositoryChangedSignalMapper->setMapping(cmd, repository);
connect(cmd, SIGNAL(success()), m_repositoryChangedSignalMapper, SLOT(map()),
Qt::QueuedConnection);
}
......@@ -33,7 +33,6 @@
#include "gitsettings.h"
#include "gitcommand.h"
#include <coreplugin/iversioncontrol.h>
#include <coreplugin/editormanager/ieditor.h>
#include <QtCore/QString>
......@@ -41,6 +40,7 @@
QT_BEGIN_NAMESPACE
class QErrorMessage;
class QSignalMapper;
QT_END_NAMESPACE
namespace Core {
......@@ -158,12 +158,12 @@ private:
bool outputToWindow = false,
int editorLineNumber = -1);
void executeGit(const QString &workingDirectory,
const QStringList &arguments,
VCSBase::VCSBaseEditor* editor = 0,
bool outputToWindow = false,
GitCommand::TerminationReportMode tm = GitCommand::NoReport,
int editorLineNumber = -1);