summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2023-01-19 07:44:46 +0100
committerChristian Stenger <christian.stenger@qt.io>2023-01-19 07:19:08 +0000
commit435fe5e4db2a1fca710727e46f514eb50a5b483b (patch)
tree8e27ade922242bb110e16620637a9483029be95e
parent4e3eb5ab51336d4e7ddd777e5795e1ad3be81431 (diff)
Adapt to upstream change
Change-Id: I0f0de2823eb338cbd327846347f3b3c8e2b61c89 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
-rw-r--r--plugins/fossil/fossilclient.cpp14
-rw-r--r--plugins/fossil/fossilclient.h6
2 files changed, 12 insertions, 8 deletions
diff --git a/plugins/fossil/fossilclient.cpp b/plugins/fossil/fossilclient.cpp
index 04050d8..ce35438 100644
--- a/plugins/fossil/fossilclient.cpp
+++ b/plugins/fossil/fossilclient.cpp
@@ -917,7 +917,8 @@ void FossilLogHighlighter::highlightBlock(const QString &text)
void FossilClient::log(const FilePath &workingDir, const QStringList &files,
const QStringList &extraOptions,
- bool enableAnnotationContextMenu)
+ bool enableAnnotationContextMenu,
+ const std::function<void(Utils::CommandLine &)> &addAuthOptions)
{
// Show timeline for both repository and a file or path (--path <file-or-path>)
// When used for log repository, the files list is empty
@@ -926,7 +927,7 @@ void FossilClient::log(const FilePath &workingDir, const QStringList &files,
SupportedFeatures features = supportedFeatures();
if (!files.isEmpty()
&& !features.testFlag(TimelinePathFeature)) {
- logCurrentFile(workingDir, files, extraOptions, enableAnnotationContextMenu);
+ logCurrentFile(workingDir, files, extraOptions, enableAnnotationContextMenu, addAuthOptions);
return;
}
@@ -949,7 +950,7 @@ void FossilClient::log(const FilePath &workingDir, const QStringList &files,
editorConfig->setBaseArguments(extraOptions);
// editor has been just created, createVcsEditor() didn't set a configuration widget yet
connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested,
- [=]() { this->log(workingDir, files, editorConfig->arguments(), enableAnnotationContextMenu); } );
+ [=]() { this->log(workingDir, files, editorConfig->arguments(), enableAnnotationContextMenu, addAuthOptions); } );
fossilEditor->setEditorConfig(editorConfig);
}
}
@@ -970,7 +971,8 @@ void FossilClient::log(const FilePath &workingDir, const QStringList &files,
void FossilClient::logCurrentFile(const FilePath &workingDir, const QStringList &files,
const QStringList &extraOptions,
- bool enableAnnotationContextMenu)
+ bool enableAnnotationContextMenu,
+ const std::function<void(Utils::CommandLine &)> &addAuthOptions)
{
// Show commit history for the given file/file-revision
// NOTE: 'fossil finfo' shows full history from all branches.
@@ -978,7 +980,7 @@ void FossilClient::logCurrentFile(const FilePath &workingDir, const QStringList
// With newer clients, 'fossil timeline' can handle both repository and file
SupportedFeatures features = supportedFeatures();
if (features.testFlag(TimelinePathFeature)) {
- log(workingDir, files, extraOptions, enableAnnotationContextMenu);
+ log(workingDir, files, extraOptions, enableAnnotationContextMenu, addAuthOptions);
return;
}
@@ -1001,7 +1003,7 @@ void FossilClient::logCurrentFile(const FilePath &workingDir, const QStringList
editorConfig->setBaseArguments(extraOptions);
// editor has been just created, createVcsEditor() didn't set a configuration widget yet
connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested,
- [=]() { this->logCurrentFile(workingDir, files, editorConfig->arguments(), enableAnnotationContextMenu); } );
+ [=]() { this->logCurrentFile(workingDir, files, editorConfig->arguments(), enableAnnotationContextMenu, addAuthOptions); } );
fossilEditor->setEditorConfig(editorConfig);
}
}
diff --git a/plugins/fossil/fossilclient.h b/plugins/fossil/fossilclient.h
index 70aff0f..e2ed6a8 100644
--- a/plugins/fossil/fossilclient.h
+++ b/plugins/fossil/fossilclient.h
@@ -96,10 +96,12 @@ public:
int lineNumber = -1, const QString &revision = {},
const QStringList &extraOptions = {}, int firstLine = -1) final;
void log(const Utils::FilePath &workingDir, const QStringList &files = {},
- const QStringList &extraOptions = {}, bool enableAnnotationContextMenu = false) final;
+ const QStringList &extraOptions = {}, bool enableAnnotationContextMenu = false,
+ const std::function<void(Utils::CommandLine &)> &addAuthOptions = {}) final;
void logCurrentFile(const Utils::FilePath &workingDir, const QStringList &files = {},
const QStringList &extraOptions = {},
- bool enableAnnotationContextMenu = false);
+ bool enableAnnotationContextMenu = false,
+ const std::function<void(Utils::CommandLine &)> &addAuthOptions = {});
void revertFile(const Utils::FilePath &workingDir, const QString &file,
const QString &revision = {}, const QStringList &extraOptions = {}) final;
void revertAll(const Utils::FilePath &workingDir, const QString &revision = {},