Commit 4eb2224f authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Add override



Change-Id: Iae0779c1efa8b3b46cf504f7bda00d614a4a157e
Reviewed-by: default avatarAndré Hartmann <aha_1980@gmx.de>
parent aedfbd57
......@@ -45,7 +45,7 @@ public:
QTextDocument *document = 0);
private:
QString changeNumber(const QString &block) const;
QString changeNumber(const QString &block) const override;
const QChar m_blank;
};
......
......@@ -71,7 +71,7 @@ public:
~BranchNameValidator() {}
State validate(QString &input, int &pos) const
State validate(QString &input, int &pos) const override
{
Q_UNUSED(pos)
......
......@@ -53,13 +53,13 @@ public:
~BranchModel();
// QAbstractItemModel
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &index) const;
int rowCount(const QModelIndex &parentIdx = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
Qt::ItemFlags flags(const QModelIndex &index) const;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &index) const override;
int rowCount(const QModelIndex &parentIdx = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
void clear();
bool refresh(const QString &workingDirectory, QString *errorMessage);
......
......@@ -45,7 +45,7 @@ public:
CloneWizard(const Utils::FileName &path, QWidget *parent = 0);
protected:
VcsBase::VcsCommand *createCommand(Utils::FileName *checkoutDir);
VcsBase::VcsCommand *createCommand(Utils::FileName *checkoutDir) override;
};
} // namespace Internal
......
......@@ -51,8 +51,8 @@ public:
VcsBase::VcsCommand *createCheckoutJob(Utils::FileName *checkoutPath) const;
protected:
QString directoryFromRepository(const QString &r) const;
QStringList branches(const QString &repository, int *current);
QString directoryFromRepository(const QString &r) const override;
QStringList branches(const QString &repository, int *current) override;
#ifdef WITH_TESTS
public:
......
......@@ -118,7 +118,7 @@ public:
GerritModel(const QSharedPointer<GerritParameters> &, QObject *parent = 0);
~GerritModel();
QVariant data(const QModelIndex &index, int role) const;
QVariant data(const QModelIndex &index, int role) const override;
GerritChangePtr change(const QModelIndex &index) const;
QString toHtml(const QModelIndex &index) const;
......
......@@ -75,9 +75,9 @@ public:
QObject *parent = 0);
~GerritOptionsPage();
QWidget *widget();
void apply();
void finish();
QWidget *widget() override;
void apply() override;
void finish() override;
private:
const QSharedPointer<GerritParameters> &m_parameters;
......
......@@ -54,7 +54,7 @@ public:
}
protected:
bool hasIcon(int row) const
bool hasIcon(int row) const override
{
return row >= currentRow();
}
......
......@@ -219,7 +219,7 @@ public:
BaseController(document, dir)
{ }
void reload();
void reload() override;
};
void RepositoryDiffController::reload()
......@@ -239,7 +239,7 @@ public:
m_fileName(fileName)
{ }
void reload();
void reload() override;
private:
const QString m_fileName;
......@@ -265,7 +265,7 @@ public:
m_unstagedFiles(unstagedFiles)
{ }
void reload();
void reload() override;
private:
const QStringList m_stagedFiles;
......@@ -303,7 +303,7 @@ public:
m_projectPaths(projectPaths)
{ }
void reload();
void reload() override;
private:
const QStringList m_projectPaths;
......@@ -327,7 +327,7 @@ public:
m_branch(branch)
{ }
void reload();
void reload() override;
private:
const QString m_branch;
......@@ -350,8 +350,8 @@ public:
m_state(Idle)
{ }
void reload();
void processOutput(const QString &output);
void reload() override;
void processOutput(const QString &output) override;
private:
const QString m_id;
......@@ -522,7 +522,7 @@ public:
}
protected:
void parseProgress(const QString &text)
void parseProgress(const QString &text) override
{
if (m_progressExp.lastIndexIn(text) != -1)
setProgressAndMaximum(m_progressExp.cap(1).toInt(), m_progressExp.cap(2).toInt());
......
......@@ -140,7 +140,7 @@ public:
explicit GitClient();
Utils::FileName vcsBinary() const;
Utils::FileName vcsBinary() const override;
unsigned gitVersion(QString *errorMessage = 0) const;
QString findRepositoryForDirectory(const QString &dir) const;
......@@ -330,7 +330,7 @@ public:
QStringList synchronousRepositoryBranches(const QString &repositoryURL,
const QString &workingDirectory = QString()) const;
QProcessEnvironment processEnvironment() const;
QProcessEnvironment processEnvironment() const override;
bool beginStashScope(const QString &workingDirectory, const QString &command,
StashFlag flag = Default, PushAction pushAction = NoPush);
......
......@@ -60,20 +60,20 @@ private slots:
void applyDiffChunk(const VcsBase::DiffChunk& chunk, bool revert);
private:
void init();
void init() override;
void resetChange(const QByteArray &resetType);
void addDiffActions(QMenu *menu, const VcsBase::DiffChunk &chunk);
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
QSet<QString> annotationChanges() const;
QString changeUnderCursor(const QTextCursor &) const;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
QString decorateVersion(const QString &revision) const;
QStringList annotationPreviousVersions(const QString &revision) const;
bool isValidRevision(const QString &revision) const;
void addChangeActions(QMenu *menu, const QString &change);
QString revisionSubject(const QTextBlock &inBlock) const;
bool supportChangeLinks() const;
QString fileNameForLine(int line) const;
void addDiffActions(QMenu *menu, const VcsBase::DiffChunk &chunk) override;
bool open(QString *errorString, const QString &fileName, const QString &realFileName) override;
QSet<QString> annotationChanges() const override;
QString changeUnderCursor(const QTextCursor &) const override;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const override;
QString decorateVersion(const QString &revision) const override;
QStringList annotationPreviousVersions(const QString &revision) const override;
bool isValidRevision(const QString &revision) const override;
void addChangeActions(QMenu *menu, const QString &change) override;
QString revisionSubject(const QTextBlock &inBlock) const override;
bool supportChangeLinks() const override;
QString fileNameForLine(int line) const override;
QString sourceWorkingDirectory() const;
mutable QRegExp m_changeNumberPattern;
......
......@@ -55,7 +55,7 @@ class GitSubmitHighlighter : public TextEditor::SyntaxHighlighter
{
public:
explicit GitSubmitHighlighter(QTextEdit *parent = 0);
void highlightBlock(const QString &text);
void highlightBlock(const QString &text) override;
private:
enum State { None = -1, Header, Other };
......@@ -69,7 +69,7 @@ class GitRebaseHighlighter : public TextEditor::SyntaxHighlighter
{
public:
explicit GitRebaseHighlighter(QTextDocument *parent = 0);
void highlightBlock(const QString &text);
void highlightBlock(const QString &text) override;
private:
class RebaseAction
......
......@@ -760,7 +760,7 @@ class ResetItemDelegate : public LogItemDelegate
{
public:
ResetItemDelegate(LogChangeWidget *widget) : LogItemDelegate(widget) {}
void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const
void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const override
{
if (index.row() < currentRow())
option->font.setStrikeOut(true);
......@@ -777,7 +777,7 @@ public:
}
protected:
bool hasIcon(int row) const
bool hasIcon(int row) const override
{
return row <= currentRow();
}
......
......@@ -81,7 +81,7 @@ public:
static GitPlugin *instance();
bool initialize(const QStringList &arguments, QString *errorMessage);
bool initialize(const QStringList &arguments, QString *errorMessage) override;
GitVersionControl *gitVersionControl() const;
......@@ -147,8 +147,8 @@ private slots:
void testCloneWizard_directoryFromRepository_data();
#endif
protected:
void updateActions(VcsBase::VcsBasePlugin::ActionState);
bool submitEditorAboutToClose();
void updateActions(VcsBase::VcsBasePlugin::ActionState) override;
bool submitEditorAboutToClose() override;
private:
Utils::ParameterAction *createParameterAction(Core::ActionContainer *ac,
......
......@@ -58,7 +58,7 @@ public:
GitSubmitFileModel(QObject *parent = 0) : SubmitFileModel(parent)
{ }
void updateSelections(SubmitFileModel *source)
void updateSelections(SubmitFileModel *source) override
{
QTC_ASSERT(source, return);
GitSubmitFileModel *gitSource = static_cast<GitSubmitFileModel *>(source);
......
......@@ -65,8 +65,8 @@ signals:
void show(const QString &workingDirectory, const QString &commit);
protected:
QByteArray fileContents() const;
void updateFileModel();
QByteArray fileContents() const override;
void updateFileModel() override;
private slots:
void slotDiffSelected(const QList<int> &rows);
......
......@@ -78,9 +78,9 @@ public:
void refreshLog(const QString &repository);
protected:
bool canSubmit() const;
QString cleanupDescription(const QString &) const;
QString commitName() const;
bool canSubmit() const override;
QString cleanupDescription(const QString &) const override;
QString commitName() const override;
signals:
void show(const QString &commit);
......
......@@ -48,13 +48,13 @@ public:
}
protected:
QString trackFile(const QString &repository)
QString trackFile(const QString &repository) override
{
const QString gitDir = m_client->findGitDirForRepository(repository);
return gitDir.isEmpty() ? QString() : (gitDir + QLatin1String("/HEAD"));
}
QString refreshTopic(const QString &repository)
QString refreshTopic(const QString &repository) override
{
return m_client->synchronousTopic(repository);
}
......
......@@ -45,24 +45,24 @@ class GitVersionControl : public Core::IVersionControl
public:
explicit GitVersionControl(GitClient *client);
QString displayName() const;
Core::Id id() const;
QString displayName() const override;
Core::Id id() const override;
bool managesDirectory(const QString &directory, QString *topLevel) const;
bool managesFile(const QString &workingDirectory, const QString &fileName) const;
bool managesDirectory(const QString &directory, QString *topLevel) const override;
bool managesFile(const QString &workingDirectory, const QString &fileName) const override;
bool isConfigured() const;
bool supportsOperation(Operation operation) const;
bool vcsOpen(const QString &fileName);
bool vcsAdd(const QString &fileName);
bool vcsDelete(const QString &filename);
bool vcsMove(const QString &from, const QString &to);
bool vcsCreateRepository(const QString &directory);
bool isConfigured() const override;
bool supportsOperation(Operation operation) const override;
bool vcsOpen(const QString &fileName) override;
bool vcsAdd(const QString &fileName) override;
bool vcsDelete(const QString &filename) override;
bool vcsMove(const QString &from, const QString &to) override;
bool vcsCreateRepository(const QString &directory) override;
bool vcsAnnotate(const QString &file, int line);
QString vcsTopic(const QString &directory);
bool vcsAnnotate(const QString &file, int line) override;
QString vcsTopic(const QString &directory) override;
QStringList additionalToolsPath() const;
QStringList additionalToolsPath() const override;
void emitFilesChanged(const QStringList &);
void emitRepositoryChanged(const QString &);
......
......@@ -78,7 +78,7 @@ private slots:
void emitActivated(const QModelIndex &index);
private:
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override;
bool populateLog(const QString &repository, const QString &commit, LogFlags flags);
const QStandardItem *currentItem(int column = 0) const;
......@@ -126,7 +126,7 @@ public:
virtual bool hasIcon(int row) const = 0;
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const;
const QModelIndex &index) const override;
private:
QIcon m_icon;
......
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