forked from qt-creator/qt-creator
VCS: Pass workingDirectory for annotate
Required for supporting renames on annotate. The renamed file (and possibly its parent directory) doesn't exist anymore, so it shouldn't be passed as a working directory. Change-Id: I809e8df17c1dc5199e533b525244a668eccbcd5f Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
0bb9ab131e
commit
7b08d993bf
@@ -692,10 +692,10 @@ void PerforcePlugin::annotate()
|
||||
}
|
||||
}
|
||||
|
||||
void PerforcePlugin::vcsAnnotate(const QString &file, const QString &revision, int lineNumber)
|
||||
void PerforcePlugin::vcsAnnotate(const QString &workingDirectory, const QString &file,
|
||||
const QString &revision, int lineNumber)
|
||||
{
|
||||
const QFileInfo fi(file);
|
||||
annotate(fi.absolutePath(), fi.fileName(), revision, lineNumber);
|
||||
annotate(workingDirectory, file, revision, lineNumber);
|
||||
}
|
||||
|
||||
void PerforcePlugin::annotate(const QString &workingDir,
|
||||
@@ -1166,8 +1166,8 @@ Core::IEditor *PerforcePlugin::showOutputInEditor(const QString &title, const QS
|
||||
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
||||
QString s = title;
|
||||
Core::IEditor *editor = Core::EditorManager::openEditorWithContents(id, &s, output.toUtf8());
|
||||
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,int)),
|
||||
this, SLOT(vcsAnnotate(QString,QString,int)));
|
||||
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
|
||||
this, SLOT(vcsAnnotate(QString,QString,QString,int)));
|
||||
PerforceEditor *e = qobject_cast<PerforceEditor*>(editor->widget());
|
||||
if (!e)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user