summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-07-09 20:20:01 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-07-16 15:44:31 +0000
commitdcb3a13fa037897322c3905903db9e4c98717501 (patch)
tree25b59c8c91f79392b38f0a2081b3aba76d9d606c /qmake
parent93362e26070c2beac16969b58be8349997921fc5 (diff)
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>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/makefile.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index d422dfe4c2..b27c7f4912 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -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())