forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user