summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-07-23 17:53:20 +0900
committerSlávek Banko <slavek.banko@axis.cz>2021-02-02 01:40:56 +0100
commit30a7754971fee794819df164dd1601b2af49587a (patch)
tree1e9e7430acfe5d913da21f52c99a46402956c3a9
parentbade711c82e43dc7553603bc08907fe9762da88c (diff)
downloadqt3-30a7754971fee794819df164dd1601b2af49587a.tar.gz
qt3-30a7754971fee794819df164dd1601b2af49587a.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>
-rw-r--r--qmake/generators/makefile.cpp4
-rw-r--r--qmake/generators/unix/unixmake.cpp4
-rw-r--r--qmake/generators/unix/unixmake2.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index e9b652a..7f25444 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1183,7 +1183,7 @@ MakefileGenerator::init()
Option::fixPathToTargetOS(imgfile);
if(!project->isEmpty("UI_DIR") || !project->isEmpty("UI_SOURCES_DIR")) {
if(imgfile.find(Option::dir_sep) != -1)
- imgfile = imgfile.right(imgfile.findRev(Option::dir_sep) + 1);
+ imgfile = imgfile.mid(imgfile.findRev(Option::dir_sep) + 1);
imgfile.prepend( (project->isEmpty("UI_DIR") ? project->first("UI_SOURCES_DIR") :
project->first("UI_DIR")) );
v["QMAKE_IMAGE_COLLECTION"] = QStringList(imgfile);
@@ -1433,7 +1433,7 @@ MakefileGenerator::write()
QString prl = var("TARGET");
int slsh = prl.findRev(Option::dir_sep);
if(slsh != -1)
- prl = prl.right(prl.length() - slsh);
+ prl = prl.right(prl.length() - slsh - 1);
int dot = prl.find('.');
if(dot != -1)
prl = prl.left(dot);
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 865c84a..34cefaa 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -763,7 +763,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
QString 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 QString &t)
QString 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 3d07ea5..496f080 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -1428,7 +1428,7 @@ UnixMakefileGenerator::libtoolFileName()
QString 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()
QString 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('.');