diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-07-09 20:02:27 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-07-16 15:44:27 +0000 |
commit | 93362e26070c2beac16969b58be8349997921fc5 (patch) | |
tree | 7ba0b9602b2fe8b48bb35903b1a16651d6ea25a4 /qmake/generators/makefile.cpp | |
parent | caaceb30e6d998939f13eb6caccef6dbd49b9558 (diff) |
qmake: slightly optimize processPrlFile() calls
add a parameter that indicates whether the passed filename can be only
the basename of a prl file. if so, we can skip the other attempts at
interpreting the file name. that's not only faster, but also clearer.
Change-Id: I6f6da3f4485216021282a08acaefb53e60e7242a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r-- | qmake/generators/makefile.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index e7b7a7a10e..d422dfe4c2 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -876,19 +876,19 @@ MakefileGenerator::init() } bool -MakefileGenerator::processPrlFile(QString &file) +MakefileGenerator::processPrlFile(QString &file, bool baseOnly) { bool try_replace_file = false; QString f = fileFixify(file, FileFixifyBackwards); QString meta_file; - if (f.endsWith(Option::prl_ext)) { + if (!baseOnly && f.endsWith(Option::prl_ext)) { meta_file = QMakeMetaInfo::checkLib(f); try_replace_file = true; } else { meta_file = QMakeMetaInfo::checkLib(f + Option::prl_ext); if (!meta_file.isEmpty()) { try_replace_file = true; - } else { + } else if (!baseOnly) { int ext = f.lastIndexOf('.'); if (ext != -1) meta_file = QMakeMetaInfo::checkLib(f.left(ext) + Option::prl_ext); |