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: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: con <qtc-committer@nokia.com>
This commit is contained in:
Friedemann Kleint
2009-11-09 15:57:56 +01:00
parent 19fb0311ba
commit 7aa2411693
30 changed files with 265 additions and 61 deletions

View File

@@ -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);
GitCommand *executeGit(const QString &workingDirectory,
const QStringList &arguments,
VCSBase::VCSBaseEditor* editor = 0,
bool outputToWindow = false,
GitCommand::TerminationReportMode tm = GitCommand::NoReport,
int editorLineNumber = -1);
bool synchronousGit(const QString &workingDirectory,
const QStringList &arguments,
@@ -173,12 +173,14 @@ private:
enum RevertResult { RevertOk, RevertUnchanged, RevertCanceled, RevertFailed };
RevertResult revertI(QStringList files, bool *isDirectory, QString *errorMessage);
void connectRepositoryChanged(const QString & repository, GitCommand *cmd);
const QString m_msgWait;
GitPlugin *m_plugin;
Core::ICore *m_core;
GitSettings m_settings;
QString m_binaryPath;
QSignalMapper *m_repositoryChangedSignalMapper;
};