From dcb3a13fa037897322c3905903db9e4c98717501 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 9 Jul 2018 20:20:01 +0200 Subject: 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 --- qmake/generators/makefile.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qmake') 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()) -- cgit v1.2.3