forked from qt-creator/qt-creator
Gerrit: Added pushToGerrit dialog
Change-Id: Ic16eae2def11343ef7be5ce8378d24b5fd11a386 Reviewed-by: Petar Perisin <petar.perisin@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -33,9 +33,19 @@
|
||||
#include <QObject>
|
||||
#include <QPointer>
|
||||
#include <QSharedPointer>
|
||||
#include <QPair>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QAction;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
class ActionContainer;
|
||||
class Command;
|
||||
}
|
||||
|
||||
namespace Locator {
|
||||
class CommandLocator;
|
||||
}
|
||||
|
||||
namespace Gerrit {
|
||||
@@ -45,6 +55,8 @@ class GerritChange;
|
||||
class GerritParameters;
|
||||
class GerritDialog;
|
||||
|
||||
typedef QPair<QAction *, Core::Command* > ActionCommandPair;
|
||||
|
||||
class GerritPlugin : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -56,11 +68,13 @@ public:
|
||||
|
||||
static QString gitBinary();
|
||||
static QString branch(const QString &repository);
|
||||
void addToLocator(Locator::CommandLocator *locator);
|
||||
|
||||
public slots:
|
||||
void fetchDisplay(const QSharedPointer<Gerrit::Internal::GerritChange> &change);
|
||||
void fetchApply(const QSharedPointer<Gerrit::Internal::GerritChange> &change);
|
||||
void fetchCheckout(const QSharedPointer<Gerrit::Internal::GerritChange> &change);
|
||||
void updateActions(bool hasTopLevel);
|
||||
|
||||
signals:
|
||||
void fetchStarted(const QSharedPointer<Gerrit::Internal::GerritChange> &change);
|
||||
@@ -68,6 +82,7 @@ signals:
|
||||
|
||||
private slots:
|
||||
void openView();
|
||||
void push();
|
||||
|
||||
private:
|
||||
QString findLocalRepository(QString project, const QString &branch) const;
|
||||
@@ -75,6 +90,7 @@ private:
|
||||
|
||||
QSharedPointer<GerritParameters> m_parameters;
|
||||
QPointer<GerritDialog> m_dialog;
|
||||
ActionCommandPair m_pushToGerritPair;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user