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