qmake: fix processPrlFile() being mislead by dots in pathnames

if the file name contained no dot, but the path did, we'd chop up the
path in a final (doomed) attempt at locating a .prl file.

Change-Id: Iad72428d8523f2ea7e543faa58225fba4ffa358b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Oswald Buddenhagen 2018-07-09 20:20:01 +02:00
parent 93362e2607
commit dcb3a13fa0

View File

@ -889,9 +889,10 @@ MakefileGenerator::processPrlFile(QString &file, bool baseOnly)
if (!meta_file.isEmpty()) {
try_replace_file = true;
} else if (!baseOnly) {
int ext = f.lastIndexOf('.');
int off = qMax(f.lastIndexOf('/'), f.lastIndexOf('\\')) + 1;
int ext = f.midRef(off).lastIndexOf('.');
if (ext != -1)
meta_file = QMakeMetaInfo::checkLib(f.left(ext) + Option::prl_ext);
meta_file = QMakeMetaInfo::checkLib(f.leftRef(off + ext) + Option::prl_ext);
}
}
if (meta_file.isEmpty())