Commit c8178a5f authored by cerf's avatar cerf Committed by Tobias Hunger
Browse files

vcsbase: allow custom init of client log editors



VCSBaseClient provides similar initialization of log editors
as for diff editors

Change-Id: Ic4cae50de70ebf7235e216a6f86b9bbc507483b8
Merge-request: 351
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/2331

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
parent c9fda128
......@@ -310,8 +310,6 @@ void VCSBaseClient::log(const QString &workingDir, const QStringList &files,
bool enableAnnotationContextMenu)
{
const QString vcsCmdString = vcsCommandString(LogCommand);
QStringList args;
args << vcsCmdString << logArguments(files, extraOptions);
const QString kind = vcsEditorKind(LogCommand);
const QString id = VCSBase::VCSBaseEditorWidget::getTitleId(workingDir, files);
const QString title = vcsEditorTitle(vcsCmdString, id);
......@@ -321,6 +319,13 @@ void VCSBaseClient::log(const QString &workingDir, const QStringList &files,
vcsCmdString.toLatin1().constData(), id);
editor->setFileLogAnnotateEnabled(enableAnnotationContextMenu);
VCSBaseEditorParameterWidget *paramWidget = createLogEditor(workingDir, files, extraOptions);
if (paramWidget != 0)
editor->setConfigurationWidget(paramWidget);
QStringList args;
const QStringList paramArgs = paramWidget != 0 ? paramWidget->arguments() : QStringList();
args << vcsCmdString << logArguments(files, extraOptions + paramArgs);
QSharedPointer<VCSJob> job(new VCSJob(workingDir, args, editor));
enqueueJob(job);
}
......@@ -481,6 +486,15 @@ VCSBaseEditorParameterWidget *VCSBaseClient::createDiffEditor(const QString &wor
return 0;
}
VCSBaseEditorParameterWidget *VCSBaseClient::createLogEditor(const QString &workingDir,
const QStringList &files,
const QStringList &extraOptions)
{
Q_UNUSED(workingDir);
Q_UNUSED(files);
Q_UNUSED(extraOptions);
return 0;
}
QString VCSBaseClient::vcsEditorTitle(const QString &vcsCmd, const QString &sourceId) const
{
......
......@@ -160,6 +160,9 @@ protected:
const QStringList &extraOptions);
virtual QStringList logArguments(const QStringList &files,
const QStringList &extraOptions) const = 0;
virtual VCSBaseEditorParameterWidget *createLogEditor(const QString &workingDir,
const QStringList &files,
const QStringList &extraOptions);
virtual QStringList statusArguments(const QString &file) const = 0;
virtual QStringList viewArguments(const QString &revision) const = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment