Code model: Update on changes from the versioning system.

Add changed signals to IVersionControl and
VCSManager and wire them to the update methods. Add a menu action for
manually updating. Improved version of reverted
7aa2411693.

Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Friedemann Kleint
2009-11-11 14:32:54 +01:00
parent 4d45ad0003
commit 8335a06ed4
27 changed files with 204 additions and 41 deletions

View File

@@ -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);
}
}