forked from qt-creator/qt-creator
VCS: Fix handling of default executable
We set the executable by default to a single command which should be used as found in PATH. Although listed valid in settings some commands refuse to run when we validate the command before running without taking their full path into account. Use the full path of vcs binaries internally to avoid problems but still display single command if set. Change-Id: If8677b531c5534d27c19557ed36fa780a248558f Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -884,7 +884,7 @@ bool BazaarPluginPrivate::managesFile(const FilePath &workingDirectory, const QS
|
|||||||
|
|
||||||
bool BazaarPluginPrivate::isConfigured() const
|
bool BazaarPluginPrivate::isConfigured() const
|
||||||
{
|
{
|
||||||
const FilePath binary = settings().binaryPath();
|
const FilePath binary = settings().binaryPath.effectiveBinary();
|
||||||
return !binary.isEmpty() && binary.isExecutableFile();
|
return !binary.isEmpty() && binary.isExecutableFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -339,7 +339,7 @@ bool CvsPluginPrivate::isVcsFileOrDirectory(const Utils::FilePath &filePath) con
|
|||||||
|
|
||||||
bool CvsPluginPrivate::isConfigured() const
|
bool CvsPluginPrivate::isConfigured() const
|
||||||
{
|
{
|
||||||
const FilePath binary = settings().binaryPath();
|
const FilePath binary = settings().binaryPath.effectiveBinary();
|
||||||
if (binary.isEmpty())
|
if (binary.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
QFileInfo fi = binary.toFileInfo();
|
QFileInfo fi = binary.toFileInfo();
|
||||||
|
@@ -766,7 +766,7 @@ unsigned int FossilClient::binaryVersion() const
|
|||||||
static unsigned int cachedBinaryVersion = 0;
|
static unsigned int cachedBinaryVersion = 0;
|
||||||
static FilePath cachedBinaryPath;
|
static FilePath cachedBinaryPath;
|
||||||
|
|
||||||
const FilePath currentBinaryPath = settings().binaryPath();
|
const FilePath currentBinaryPath = settings().binaryPath.effectiveBinary();
|
||||||
|
|
||||||
if (currentBinaryPath.isEmpty())
|
if (currentBinaryPath.isEmpty())
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -669,7 +669,7 @@ bool MercurialPluginPrivate::managesFile(const FilePath &workingDirectory, const
|
|||||||
|
|
||||||
bool MercurialPluginPrivate::isConfigured() const
|
bool MercurialPluginPrivate::isConfigured() const
|
||||||
{
|
{
|
||||||
const FilePath binary = settings().binaryPath();
|
const FilePath binary = settings().binaryPath.effectiveBinary();
|
||||||
if (binary.isEmpty())
|
if (binary.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
QFileInfo fi = binary.toFileInfo();
|
QFileInfo fi = binary.toFileInfo();
|
||||||
|
@@ -1067,7 +1067,7 @@ bool SubversionPluginPrivate::isVcsFileOrDirectory(const FilePath &filePath) con
|
|||||||
|
|
||||||
bool SubversionPluginPrivate::isConfigured() const
|
bool SubversionPluginPrivate::isConfigured() const
|
||||||
{
|
{
|
||||||
const FilePath binary = settings().binaryPath();
|
const FilePath binary = settings().binaryPath.effectiveBinary();
|
||||||
if (binary.isEmpty())
|
if (binary.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
QFileInfo fi = binary.toFileInfo();
|
QFileInfo fi = binary.toFileInfo();
|
||||||
|
Reference in New Issue
Block a user