MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0014981 | CMake | CMake | public | 2014-06-20 04:12 | 2015-03-02 08:57 |
|
Reporter | aseguralasa | |
Assigned To | Stephen Kelly | |
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | CMake 3.0 | |
Target Version | CMake 3.0.2 | Fixed in Version | CMake 3.1 | |
|
Summary | 0014981: 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...
|
Tags | No tags attached. |
Relationships | |
Attached Files | qtuic.tar.gz (1,251) 2014-06-26 08:33 https://public.kitware.com/Bug/file/5176/qtuic.tar.gz |
|
Issue History |
Date Modified | Username | Field | Change |
2014-06-20 04:12 | aseguralasa | New Issue | |
2014-06-21 05:29 | Stephen Kelly | Assigned To | => Stephen Kelly |
2014-06-21 05:29 | Stephen Kelly | Status | new => assigned |
2014-06-26 08:33 | Stephen Kelly | File Added: qtuic.tar.gz | |
2014-06-26 08:34 | Stephen Kelly | Note Added: 0036259 | |
2014-06-26 08:43 | aseguralasa | Note Added: 0036260 | |
2014-06-26 08:45 | aseguralasa | Note Edited: 0036260 | bug_revision_view_page.php?bugnote_id=36260#r1506 |
2014-06-26 09:22 | Stephen Kelly | Note Added: 0036261 | |
2014-07-03 03:11 | sudakov_ivan | Note Added: 0036315 | |
2014-09-02 11:47 | aseguralasa | Note Added: 0036700 | |
2014-09-02 11:50 | Brad King | Fixed in Version | => CMake 3.0.2 |
2014-09-02 11:50 | Brad King | Target Version | => CMake 3.0.2 |
2014-09-02 11:51 | Brad King | Note Added: 0036701 | |
2014-09-11 09:20 | Brad King | Status | assigned => resolved |
2014-09-11 09:20 | Brad King | Resolution | open => fixed |
2014-09-15 19:19 | Stephen Kelly | Note Added: 0036806 | |
2014-09-15 19:19 | Stephen Kelly | Status | resolved => feedback |
2014-09-15 19:19 | Stephen Kelly | Resolution | fixed => reopened |
2014-09-16 03:44 | aseguralasa | Note Added: 0036812 | |
2014-09-16 03:44 | aseguralasa | Status | feedback => assigned |
2014-09-22 09:36 | Stephen Kelly | Status | assigned => resolved |
2014-09-22 09:36 | Stephen Kelly | Fixed in Version | CMake 3.0.2 => CMake 3.1 |
2014-09-22 09:36 | Stephen Kelly | Resolution | reopened => fixed |
2015-03-02 08:57 | Robert Maynard | Note Added: 0038129 | |
2015-03-02 08:57 | Robert Maynard | Status | resolved => closed |
Notes |
|
(0036259)
|
Stephen Kelly
|
2014-06-26 08:34
|
|
To test case 2, I created the testcase attached. Can you test it and report if it works for you? |
|
|
(0036260)
|
aseguralasa
|
2014-06-26 08:43
(edited on: 2014-06-26 08:45) |
|
Fails to build. Only "ui_widget2.h" was generated! (BTW, using VS2010 32bit)
Build Output:
Description: Automatic moc and uic for target main
Generating ui_widget2.h
Generating moc_widget1.cpp
Generating moc_widget2.cpp
Thanks for creating that test case!
|
|
|
(0036261)
|
Stephen Kelly
|
2014-06-26 09:22
|
|
It worked for me, but I was using master. I knew your issue sounded familiar, and I have a memory of fixing it.
That was done in commit 71a11252 (QtAutogen: Fix use of multiple ui files in a single target., 2014-03-25), but I suppose I missed the fact that it wasn't merged to the release branch and I didn't request that.
Case 1 is still reproducible in master though. |
|
|
(0036315)
|
sudakov_ivan
|
2014-07-03 03:11
|
|
So when will your changes be in release? |
|
|
(0036700)
|
aseguralasa
|
2014-09-02 11:47
|
|
Any news?
CMake 3.0.1 was released and there is no mention in the changelog. |
|
|
(0036701)
|
Brad King
|
2014-09-02 11:51
|
|
|
|
(0036806)
|
Stephen Kelly
|
2014-09-15 19:19
|
|
The 'case 1' bug is still present. Re-opening this one. |
|
|
(0036812)
|
aseguralasa
|
2014-09-16 03:44
|
|
In the "Additional Information" box I provided a short hint to the possible cause of that behavior by pointing to a specific part of the code. I can try to propose a fix. |
|
|
(0038129)
|
Robert Maynard
|
2015-03-02 08:57
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|