[cmake-developers] [CMake 0014981]: AUTOUIC not generating all needed ui_xxx.h files
Mantis Bug Tracker
mantis at public.kitware.com
Fri Jun 20 04:12:31 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=14981
======================================================================
Reported By: aseguralasa
Assigned To:
======================================================================
Project: CMake
Issue ID: 14981
Category: CMake
Reproducibility: have not tried
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-06-20 04:12 EDT
Last Modified: 2014-06-20 04:12 EDT
======================================================================
Summary: AUTOUIC not generating all needed ui_xxx.h files
Description:
The AUTOUIC feature in CMake 3 does not generate all headers included in sources
even if corresponding xxx.ui files exist.
1) In particular, if one file has more than one #include "ui_*.h", only the last
one is generated. This may be quite uncommon but happens several times in our
projects.
2) Also, even if there is only one #include "ui_*.h" per file, in some
situations only one of the corresponding headers is generated.
I set severity to Major because this makes this feature unusable in several of
our projects and we have to go back to using QT4/5_WRAP_UI...
Steps to Reproduce:
Case 1)
forms.h:
#include "ui_form1.h"
#include "ui_form2.h" -> only this one generated
Case 2)
a.h:
#include "ui_a.h"
b.h
#include "ui_b.h"
Only one of them is generated (e.g. ui_b.h). If I comment out the #include
ui_b.h line then the other, ui_a.h is generated.
Additional Information:
BTW, I looked at the code in cmQtAutoGenerators.cxx. Function ParseForUic (line
1779+) seems to be doing case 1. Even if the regex is tested several times in a
while loop, its matched result "basename" is always stored in the same map key,
erasing previous values:
includedUis[absPath] = basename;
basename changes in each iteration, but absPath remains the name of the header
analyzed. So there can be only one ui per header.
I do not understand why case 2 happens...
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-06-20 04:12 aseguralasa New Issue
======================================================================
More information about the cmake-developers
mailing list