forked from qt-creator/qt-creator
Make sure we do not get "//" in the QMake path
Task-number: QTCREATORBUG-2990
This commit is contained in:
@@ -48,8 +48,11 @@ QString BuildableHelperLibrary::findSystemQt(const Utils::Environment &env)
|
|||||||
{
|
{
|
||||||
QStringList paths = env.path();
|
QStringList paths = env.path();
|
||||||
foreach (const QString &path, paths) {
|
foreach (const QString &path, paths) {
|
||||||
|
QString prefix = path;
|
||||||
|
if (!prefix.endsWith(QLatin1Char('/')))
|
||||||
|
prefix.append(QLatin1Char('/'));
|
||||||
foreach (const QString &possibleCommand, possibleQMakeCommands()) {
|
foreach (const QString &possibleCommand, possibleQMakeCommands()) {
|
||||||
const QFileInfo qmake(path + QLatin1Char('/') + possibleCommand);
|
const QFileInfo qmake(prefix + possibleCommand);
|
||||||
if (qmake.exists()) {
|
if (qmake.exists()) {
|
||||||
if (!qtVersionForQMake(qmake.absoluteFilePath()).isNull()) {
|
if (!qtVersionForQMake(qmake.absoluteFilePath()).isNull()) {
|
||||||
return qmake.absoluteFilePath();
|
return qmake.absoluteFilePath();
|
||||||
|
|||||||
Reference in New Issue
Block a user