summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoMocUic.cxx
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2021-10-04 03:04:51 (GMT)
committerCraig Scott <craig.scott@crascit.com>2021-10-05 12:29:16 (GMT)
commit2a3116795528354b9e93238d057efa16b3635da8 (patch)
treeb664039635b2f9531f9a20080208436ac1a701e7 /Source/cmQtAutoMocUic.cxx
parenta31447417f65ac37c4a4966fc7314c40b3fca91b (diff)
downloadCMake-2a3116795528354b9e93238d057efa16b3635da8.zip
CMake-2a3116795528354b9e93238d057efa16b3635da8.tar.gz
CMake-2a3116795528354b9e93238d057efa16b3635da8.tar.bz2
AUTOUIC: Fix merging of --blah options not being detected for Qt6
When merging a new set of uic options with a base set of options, such as when a source file has a non-empty AUTOUIC_OPTIONS property, the test for whether to support options starting with two hyphens was only testing if the Qt major version was exactly 5 rather than at least 5. That had the effect of preventing such options from being merged correctly when using Qt6, so new and base options would both be present instead of the single merged option from the source file properties. Update the version check and rename function arguments to avoid misrepresenting what they mean. Note that uic accepts long option names with a single hyphen too. See Qt docs for QCommandLineParser::ParseAsLongOptions for confirmation.
Diffstat (limited to 'Source/cmQtAutoMocUic.cxx')
-rw-r--r--Source/cmQtAutoMocUic.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx
index 056056c..4ed728e 100644
--- a/Source/cmQtAutoMocUic.cxx
+++ b/Source/cmQtAutoMocUic.cxx
@@ -2083,7 +2083,7 @@ void cmQtAutoMocUicT::JobCompileUicT::Process()
auto optionIt = this->UicConst().UiFiles.find(sourceFile);
if (optionIt != this->UicConst().UiFiles.end()) {
UicMergeOptions(allOpts, optionIt->second.Options,
- (this->BaseConst().QtVersion.Major == 5));
+ (this->BaseConst().QtVersion.Major >= 5));
}
cm::append(cmd, allOpts);
}