forked from qt-creator/qt-creator
Git: Indicate affected commits for range operations
* Reset: Strikethrough discarded commits * Interactive Rebase: Mark included commits * Push to Gerrit: Mark pushed commits Change-Id: I5599a72055fd94b88c55b74b3a1116c07e35c113 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
4e32babc44
commit
9ef8d71e2c
@@ -33,12 +33,31 @@
|
||||
#include "../gitplugin.h"
|
||||
#include "../gitclient.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
|
||||
namespace Gerrit {
|
||||
namespace Internal {
|
||||
|
||||
class PushItemDelegate : public Git::Internal::IconItemDelegate
|
||||
{
|
||||
public:
|
||||
PushItemDelegate(Git::Internal::LogChangeWidget *widget)
|
||||
: IconItemDelegate(widget, QLatin1String(Core::Constants::ICON_PLUS))
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
bool hasIcon(int row) const
|
||||
{
|
||||
return row >= currentRow();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
GerritPushDialog::GerritPushDialog(const QString &workingDir, const QString &reviewerList, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
m_workingDir(workingDir),
|
||||
@@ -54,6 +73,8 @@ GerritPushDialog::GerritPushDialog(const QString &workingDir, const QString &rev
|
||||
if (!m_ui->commitView->init(workingDir, QString(), false))
|
||||
return;
|
||||
|
||||
PushItemDelegate *delegate = new PushItemDelegate(m_ui->commitView);
|
||||
delegate->setParent(this);
|
||||
QString earliestCommit = m_ui->commitView->earliestCommit();
|
||||
if (earliestCommit.isEmpty())
|
||||
return;
|
||||
|
Reference in New Issue
Block a user