forked from qt-creator/qt-creator
Git: Fix log for repo/project
Broke by ad6968f45f
.
Change-Id: I06ff8384a088f6d9137b9711f855efa8d6bf4a74
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
76c0149ceb
commit
4ae6c2a89b
@@ -612,7 +612,7 @@ class GitLogArgumentsWidget : public BaseGitDiffArgumentsWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GitLogArgumentsWidget(VcsBaseClientSettings &settings, QToolBar *toolBar = nullptr) :
|
GitLogArgumentsWidget(VcsBaseClientSettings &settings, bool fileRelated, QToolBar *toolBar) :
|
||||||
BaseGitDiffArgumentsWidget(settings, toolBar)
|
BaseGitDiffArgumentsWidget(settings, toolBar)
|
||||||
{
|
{
|
||||||
QAction *diffButton = addToggleButton("--patch", tr("Show Diff"),
|
QAction *diffButton = addToggleButton("--patch", tr("Show Diff"),
|
||||||
@@ -635,9 +635,12 @@ public:
|
|||||||
tr("Show textual graph log."));
|
tr("Show textual graph log."));
|
||||||
mapSetting(graphButton, settings.boolPointer(GitSettings::graphLogKey));
|
mapSetting(graphButton, settings.boolPointer(GitSettings::graphLogKey));
|
||||||
|
|
||||||
QAction *followButton = addToggleButton("--follow", tr("Follow"),
|
if (fileRelated) {
|
||||||
tr("Show log also for previous names of the file."));
|
QAction *followButton = addToggleButton(
|
||||||
mapSetting(followButton, settings.boolPointer(GitSettings::followRenamesKey));
|
"--follow", tr("Follow"),
|
||||||
|
tr("Show log also for previous names of the file."));
|
||||||
|
mapSetting(followButton, settings.boolPointer(GitSettings::followRenamesKey));
|
||||||
|
}
|
||||||
|
|
||||||
addButton(tr("Reload"), Utils::Icons::RELOAD.icon());
|
addButton(tr("Reload"), Utils::Icons::RELOAD.icon());
|
||||||
}
|
}
|
||||||
@@ -1019,7 +1022,7 @@ void GitClient::log(const QString &workingDirectory, const QString &fileName,
|
|||||||
codecFor(CodecLogOutput), "logTitle", msgArg);
|
codecFor(CodecLogOutput), "logTitle", msgArg);
|
||||||
VcsBaseEditorConfig *argWidget = editor->editorConfig();
|
VcsBaseEditorConfig *argWidget = editor->editorConfig();
|
||||||
if (!argWidget) {
|
if (!argWidget) {
|
||||||
argWidget = new GitLogArgumentsWidget(settings(), editor->toolBar());
|
argWidget = new GitLogArgumentsWidget(settings(), !fileName.isEmpty(), editor->toolBar());
|
||||||
argWidget->setBaseArguments(args);
|
argWidget->setBaseArguments(args);
|
||||||
connect(argWidget, &VcsBaseEditorConfig::commandExecutionRequested, this,
|
connect(argWidget, &VcsBaseEditorConfig::commandExecutionRequested, this,
|
||||||
[=]() { this->log(workingDir, fileName, enableAnnotationContextMenu, args); });
|
[=]() { this->log(workingDir, fileName, enableAnnotationContextMenu, args); });
|
||||||
|
Reference in New Issue
Block a user