diff options
author | OBATA Akio <obache@wizdas.com> | 2020-07-23 17:53:20 +0900 |
---|---|---|
committer | OBATA Akio <obache@wizdas.com> | 2020-07-23 17:53:20 +0900 |
commit | 5c270c3e26e74609a1821ddd3bb17566ccc53396 (patch) | |
tree | 96bbcf5733d6c4e795a2ba1e7f634a32eacb3965 /qmake/generators/makefile.cpp | |
parent | a31f05cb8e90781228e9d6a60ef97cc1bca83345 (diff) | |
download | tqt3-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/makefile.cpp')
-rw-r--r-- | qmake/generators/makefile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 307288e0..38f881f6 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"] = TQStringList(imgfile); @@ -1433,7 +1433,7 @@ MakefileGenerator::write() TQString 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); |