Git: Fixed launch gitk failed

Task-number: QTCREATORBUG-6262
Change-Id: I2095e4244b145e57e901fa9d6ca6adbcb10aa0c0
Merge-request: 402
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-on: http://codereview.qt-project.org/6510
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
This commit is contained in:
Yuchen Deng
2011-10-08 22:58:13 +08:00
committed by Tobias Hunger
parent 79f7703a0b
commit 854c0f2ed8

View File

@@ -1483,11 +1483,11 @@ QStringList GitClient::synchronousRepositoryBranches(const QString &repositoryUR
void GitClient::launchGitK(const QString &workingDirectory)
{
const QString gitBinDirectory = gitBinaryPath();
QDir foundBinDir(gitBinDirectory);
const QFileInfo binaryInfo(gitBinaryPath());
QDir foundBinDir(binaryInfo.dir());
const bool foundBinDirIsCmdDir = foundBinDir.dirName() == "cmd";
QProcessEnvironment env = processEnvironment();
if (tryLauchingGitK(env, workingDirectory, gitBinDirectory, foundBinDirIsCmdDir))
if (tryLauchingGitK(env, workingDirectory, foundBinDir.path(), foundBinDirIsCmdDir))
return;
if (!foundBinDirIsCmdDir)
return;