forked from qt-creator/qt-creator
IVersionControl: Change vcsAnnotate return type to void
All implementations return true unconditionally, and the return value is never read anyway. + Remove superfluous function with the same name in Perforce. Change-Id: I83f361ec7fd8be3177cb4be52e6276e295cd4279 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
55f3764d08
commit
e9df7825fa
@@ -160,7 +160,7 @@ public:
|
||||
bool vcsDelete(const QString &filename) final;
|
||||
bool vcsMove(const QString &from, const QString &to) final;
|
||||
bool vcsCreateRepository(const QString &directory) final;
|
||||
bool vcsAnnotate(const QString &file, int line) final;
|
||||
void vcsAnnotate(const QString &file, int line) final;
|
||||
|
||||
Core::ShellCommand *createInitialCheckoutCommand(const QString &url,
|
||||
const Utils::FilePath &baseDirectory,
|
||||
@@ -925,11 +925,10 @@ bool BazaarPluginPrivate::vcsCreateRepository(const QString &directory)
|
||||
return m_client.synchronousCreateRepository(directory);
|
||||
}
|
||||
|
||||
bool BazaarPluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
void BazaarPluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
{
|
||||
const QFileInfo fi(file);
|
||||
m_client.annotate(fi.absolutePath(), fi.fileName(), QString(), line);
|
||||
return true;
|
||||
}
|
||||
|
||||
Core::ShellCommand *BazaarPluginPrivate::createInitialCheckoutCommand(const QString &url,
|
||||
|
@@ -199,7 +199,7 @@ public:
|
||||
bool vcsMove(const QString &from, const QString &to) final;
|
||||
bool vcsCreateRepository(const QString &directory) final;
|
||||
|
||||
bool vcsAnnotate(const QString &file, int line) final;
|
||||
void vcsAnnotate(const QString &file, int line) final;
|
||||
|
||||
QString vcsOpenText() const final;
|
||||
QString vcsMakeWritableText() const final;
|
||||
@@ -2484,11 +2484,10 @@ bool ClearCasePluginPrivate::vcsMove(const QString &from, const QString &to)
|
||||
return vcsMove(ifrom.absolutePath(), ifrom.fileName(), ito.fileName());
|
||||
}
|
||||
|
||||
bool ClearCasePluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
void ClearCasePluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
{
|
||||
const QFileInfo fi(file);
|
||||
vcsAnnotateHelper(fi.absolutePath(), fi.fileName(), QString(), line);
|
||||
return true;
|
||||
}
|
||||
|
||||
QString ClearCasePluginPrivate::vcsOpenText() const
|
||||
|
@@ -199,7 +199,7 @@ public:
|
||||
/*!
|
||||
* Display annotation for a file and scroll to line
|
||||
*/
|
||||
virtual bool vcsAnnotate(const QString &file, int line) = 0;
|
||||
virtual void vcsAnnotate(const QString &file, int line) = 0;
|
||||
|
||||
/*!
|
||||
* Display text for Open operation
|
||||
@@ -296,7 +296,7 @@ public:
|
||||
bool vcsDelete(const QString &) override { return false; }
|
||||
bool vcsMove(const QString &, const QString &) override { return false; }
|
||||
bool vcsCreateRepository(const QString &) override { return false; }
|
||||
bool vcsAnnotate(const QString &, int) override { return false; }
|
||||
void vcsAnnotate(const QString &, int) override {}
|
||||
|
||||
private:
|
||||
Id m_id;
|
||||
|
@@ -250,7 +250,7 @@ public:
|
||||
bool vcsDelete(const QString &filename) final;
|
||||
bool vcsMove(const QString &, const QString &) final { return false; }
|
||||
bool vcsCreateRepository(const QString &directory) final;
|
||||
bool vcsAnnotate(const QString &file, int line) final;
|
||||
void vcsAnnotate(const QString &file, int line) final;
|
||||
|
||||
QString vcsOpenText() const final;
|
||||
|
||||
@@ -468,11 +468,10 @@ bool CvsPluginPrivate::vcsCreateRepository(const QString &)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CvsPluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
void CvsPluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
{
|
||||
const QFileInfo fi(file);
|
||||
vcsAnnotate(fi.absolutePath(), fi.fileName(), QString(), line);
|
||||
return true;
|
||||
}
|
||||
|
||||
QString CvsPluginPrivate::vcsOpenText() const
|
||||
|
@@ -249,7 +249,7 @@ public:
|
||||
bool vcsMove(const QString &from, const QString &to) final;
|
||||
bool vcsCreateRepository(const QString &directory) final;
|
||||
|
||||
bool vcsAnnotate(const QString &file, int line) final;
|
||||
void vcsAnnotate(const QString &file, int line) final;
|
||||
QString vcsTopic(const QString &directory) final;
|
||||
|
||||
Core::ShellCommand *createInitialCheckoutCommand(const QString &url,
|
||||
@@ -1937,11 +1937,10 @@ QStringList GitPluginPrivate::unmanagedFiles(const QString &workingDir,
|
||||
return m_gitClient.unmanagedFiles(workingDir, filePaths);
|
||||
}
|
||||
|
||||
bool GitPluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
void GitPluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
{
|
||||
const QFileInfo fi(file);
|
||||
m_gitClient.annotate(fi.absolutePath(), fi.fileName(), QString(), line);
|
||||
return true;
|
||||
}
|
||||
|
||||
void GitPlugin::emitFilesChanged(const QStringList &l)
|
||||
|
@@ -144,7 +144,7 @@ public:
|
||||
bool vcsDelete(const QString &filename) final;
|
||||
bool vcsMove(const QString &from, const QString &to) final;
|
||||
bool vcsCreateRepository(const QString &directory) final;
|
||||
bool vcsAnnotate(const QString &file, int line) final;
|
||||
void vcsAnnotate(const QString &file, int line) final;
|
||||
|
||||
Core::ShellCommand *createInitialCheckoutCommand(const QString &url,
|
||||
const Utils::FilePath &baseDirectory,
|
||||
@@ -826,11 +826,10 @@ bool MercurialPluginPrivate::vcsCreateRepository(const QString &directory)
|
||||
return m_client.synchronousCreateRepository(directory);
|
||||
}
|
||||
|
||||
bool MercurialPluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
void MercurialPluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
{
|
||||
const QFileInfo fi(file);
|
||||
m_client.annotate(fi.absolutePath(), fi.fileName(), QString(), line);
|
||||
return true;
|
||||
}
|
||||
|
||||
Core::ShellCommand *MercurialPluginPrivate::createInitialCheckoutCommand(const QString &url,
|
||||
|
@@ -223,7 +223,7 @@ public:
|
||||
bool vcsDelete(const QString &filename) final;
|
||||
bool vcsMove(const QString &from, const QString &to) final;
|
||||
bool vcsCreateRepository(const QString &directory) final;
|
||||
bool vcsAnnotate(const QString &file, int line) final;
|
||||
void vcsAnnotate(const QString &file, int line) final;
|
||||
QString vcsOpenText() const final;
|
||||
QString vcsMakeWritableText() const final;
|
||||
|
||||
@@ -238,9 +238,6 @@ public:
|
||||
IEditor *openPerforceSubmitEditor(const QString &fileName, const QStringList &depotFileNames);
|
||||
|
||||
void describe(const QString &source, const QString &n);
|
||||
void vcsAnnotate(const QString &workingDirectory, const QString &file,
|
||||
const QString &revision, int lineNumber);
|
||||
|
||||
void getTopLevel(const QString &workingDirectory = QString(), bool isSync = false);
|
||||
|
||||
void updateActions(ActionState) override;
|
||||
@@ -846,12 +843,6 @@ void PerforcePluginPrivate::annotateFile()
|
||||
}
|
||||
}
|
||||
|
||||
void PerforcePluginPrivate::vcsAnnotate(const QString &workingDirectory, const QString &file,
|
||||
const QString &revision, int lineNumber)
|
||||
{
|
||||
annotate(workingDirectory, file, revision, lineNumber);
|
||||
}
|
||||
|
||||
void PerforcePluginPrivate::annotate(const QString &workingDir,
|
||||
const QString &fileName,
|
||||
const QString &changeList /* = QString() */,
|
||||
@@ -1204,11 +1195,10 @@ bool PerforcePluginPrivate::vcsCreateRepository(const QString &)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PerforcePluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
void PerforcePluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
{
|
||||
const QFileInfo fi(file);
|
||||
vcsAnnotate(fi.absolutePath(), fi.fileName(), QString(), line);
|
||||
return true;
|
||||
annotate(fi.absolutePath(), fi.fileName(), QString(), line);
|
||||
}
|
||||
|
||||
QString PerforcePluginPrivate::vcsOpenText() const
|
||||
|
@@ -221,7 +221,7 @@ public:
|
||||
bool vcsMove(const QString &from, const QString &to) final;
|
||||
bool vcsCreateRepository(const QString &directory) final;
|
||||
|
||||
bool vcsAnnotate(const QString &file, int line) final;
|
||||
void vcsAnnotate(const QString &file, int line) final;
|
||||
|
||||
Core::ShellCommand *createInitialCheckoutCommand(const QString &url,
|
||||
const Utils::FilePath &baseDirectory,
|
||||
@@ -1276,11 +1276,10 @@ bool SubversionPluginPrivate::vcsCreateRepository(const QString &)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SubversionPluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
void SubversionPluginPrivate::vcsAnnotate(const QString &file, int line)
|
||||
{
|
||||
const QFileInfo fi(file);
|
||||
vcsAnnotateHelper(fi.absolutePath(), fi.fileName(), QString(), line);
|
||||
return true;
|
||||
}
|
||||
|
||||
Core::ShellCommand *SubversionPluginPrivate::createInitialCheckoutCommand(const QString &url,
|
||||
|
Reference in New Issue
Block a user