summaryrefslogtreecommitdiffstats
path: root/qmake/generators/unix
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-07-23 17:53:20 +0900
committerOBATA Akio <obache@wizdas.com>2020-07-23 17:53:20 +0900
commit5c270c3e26e74609a1821ddd3bb17566ccc53396 (patch)
tree96bbcf5733d6c4e795a2ba1e7f634a32eacb3965 /qmake/generators/unix
parenta31f05cb8e90781228e9d6a60ef97cc1bca83345 (diff)
downloadtqt3-5c270c3e26e74609a1821ddd3bb17566ccc53396.tar.gz
tqt3-5c270c3e26e74609a1821ddd3bb17566ccc53396.zip
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 <obache@wizdas.com>
Diffstat (limited to 'qmake/generators/unix')
-rw-r--r--qmake/generators/unix/unixmake.cpp4
-rw-r--r--qmake/generators/unix/unixmake2.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 7779a7307..a9952afdb 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -763,7 +763,7 @@ UnixMakefileGenerator::defaultInstall(const TQString &t)
TQString src_lt = var("QMAKE_ORIG_TARGET");
int slsh = src_lt.findRev(Option::dir_sep);
if(slsh != -1)
- src_lt = src_lt.right(src_lt.length() - slsh);
+ src_lt = src_lt.right(src_lt.length() - slsh - 1);
int dot = src_lt.find('.');
if(dot != -1)
src_lt = src_lt.left(dot);
@@ -786,7 +786,7 @@ UnixMakefileGenerator::defaultInstall(const TQString &t)
TQString src_pc = var("QMAKE_ORIG_TARGET");
int slsh = src_pc.findRev(Option::dir_sep);
if(slsh != -1)
- src_pc = src_pc.right(src_pc.length() - slsh);
+ src_pc = src_pc.right(src_pc.length() - slsh - 1);
int dot = src_pc.find('.');
if(dot != -1)
src_pc = src_pc.left(dot);
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 8ea7e367b..56e3b8de8 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('.');