From 4ed0a29d338d99971be9eaa9b41db41e02452c15 Mon Sep 17 00:00:00 2001 From: OBATA Akio Date: Thu, 23 Jul 2020 17:53:20 +0900 Subject: Fix to detect file conponent from path properly in Makefile generator It should be either `path.right(path.length() - sep_pos - 1)` or `path.mid(sep_pos + 1)`. Signed-off-by: OBATA Akio (cherry picked from commit 5c270c3e26e74609a1821ddd3bb17566ccc53396) --- qmake/generators/unix/unixmake2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qmake/generators/unix/unixmake2.cpp') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 204c79036..867ae9d8e 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -1428,7 +1428,7 @@ UnixMakefileGenerator::libtoolFileName() TQString ret = var("TARGET"); int slsh = ret.findRev(Option::dir_sep); if(slsh != -1) - ret = ret.right(ret.length() - slsh); + ret = ret.right(ret.length() - slsh - 1); int dot = ret.find('.'); if(dot != -1) ret = ret.left(dot); @@ -1512,7 +1512,7 @@ UnixMakefileGenerator::pkgConfigFileName() TQString ret = var("TARGET"); int slsh = ret.findRev(Option::dir_sep); if(slsh != -1) - ret = ret.right(ret.length() - slsh); + ret = ret.right(ret.length() - slsh - 1); if(ret.startsWith("lib")) ret = ret.mid(3); int dot = ret.find('.'); -- cgit v1.2.3