Closed
Bug 564402
Opened 14 years ago
Closed 14 years ago
slots #define in Qt, prevents Qt builds on trunk
Categories
(Core Graveyard :: Widget: Qt, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: MikeK, Assigned: dougt)
References
Details
Attachments
(1 file, 3 obsolete files)
3.64 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
Due to a #define of "slots" Qt builds are failing, as "slots" are used as a local variable name in nsINode.h
Reporter | ||
Comment 1•14 years ago
|
||
Reporter | ||
Updated•14 years ago
|
Attachment #444062 -
Flags: review?(dougt)
Comment 2•14 years ago
|
||
Patch looks like not a patch... ;) I think bug 564291 and this bug are duplicating each other
Reporter | ||
Comment 3•14 years ago
|
||
I must have clicked the wrong file in the previous attachment...
Attachment #444062 -
Attachment is obsolete: true
Attachment #444062 -
Flags: review?(dougt)
Reporter | ||
Updated•14 years ago
|
Attachment #444065 -
Attachment is obsolete: true
Reporter | ||
Comment 4•14 years ago
|
||
Comment on attachment 444065 [details] [diff] [review] The real patch Wrong file
Reporter | ||
Comment 5•14 years ago
|
||
My FF attach file function seems to be seriously broken, The file I click, in the "open file" dialog is not the one that gets selected... For anyone interested the patch can be found at: http://pastebin.mozilla.org/721855 (can anyone attach it for me, until I figure out what is wrong with my system) I'll reboot my computer when it finishes the builds its running, to see if that solves the issue....
Comment 7•14 years ago
|
||
Attachment #444068 -
Flags: review?(dougt)
Comment 8•14 years ago
|
||
> It's not the nsSlots that is the problem, its a macro definition of "slots"
hrrr.. I was searching for nsSlots in headers...
We had similar problem before... but that was fixed by renaming variable name from slots->slotss or something like that ;)
Reporter | ||
Comment 9•14 years ago
|
||
Yes, I also had kind of a dejavu when I saw this... an unfortunate design decision in the Qt headers...
Reporter | ||
Comment 10•14 years ago
|
||
(In reply to comment #8) > We had similar problem before... but that was fixed by renaming variable name > from slots->slotss or something like that ;) btw - I opted for an undefine of slots this time, as I don't think our "generic" code should "suffer" from an old fashioned #define in the Qt headers - we wouldn't even be able to solve this issue with namespaces as #defines are a pure text substitutions...
Reporter | ||
Comment 11•14 years ago
|
||
(In reply to comment #7) > Created an attachment (id=444068) [details] > Fix Thank you - seems like I needed a reboot of my PC for the attachment function to work as intended again.
Assignee | ||
Updated•14 years ago
|
Attachment #444068 -
Flags: review?(dougt) → review+
Reporter | ||
Updated•14 years ago
|
Keywords: checkin-needed
Updated•14 years ago
|
Assignee: nobody → romaxa
Updated•14 years ago
|
Assignee: romaxa → mkristoffersen
Assignee | ||
Comment 12•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/6c56e83f9599
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 13•14 years ago
|
||
hmm. on second thought, i am not sure I like this. we should just rename the variables in nsINode.h.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 14•14 years ago
|
||
Or start complain about ugly Qt headers... and ask them use namespace
Assignee | ||
Comment 15•14 years ago
|
||
Assignee: mkristoffersen → dougt
Attachment #444068 -
Attachment is obsolete: true
Attachment #444752 -
Flags: superreview?(jst)
Attachment #444752 -
Flags: review?(jst)
Reporter | ||
Comment 16•14 years ago
|
||
(In reply to comment #14) > Or start complain about ugly Qt headers... and ask them use namespace namespace doesn't help for #defines (at least not in the C++ sense), if they didn't use #define we would not have a problem... but I agree the headers are ugly
Reporter | ||
Comment 17•14 years ago
|
||
(In reply to comment #13) > hmm. on second thought, i am not sure I like this. we should just rename the > variables in nsINode.h. Why should our code "suffer" from purely designed headers?
Assignee | ||
Comment 18•14 years ago
|
||
we can complain all we want, but the Qt ugly is already out in the world. We have sucked it up elsewhere (http://mxr.mozilla.org/mozilla-central/source/netwerk/base/public/nsIURI.idl#73, and a bunch of other places) Lets move on.
Comment 19•14 years ago
|
||
Comment on attachment 444752 [details] [diff] [review] patch v.2 Bastards.
Attachment #444752 -
Flags: superreview?(jst)
Attachment #444752 -
Flags: superreview+
Attachment #444752 -
Flags: review?(jst)
Attachment #444752 -
Flags: review+
Reporter | ||
Comment 20•14 years ago
|
||
(In reply to comment #17) > (In reply to comment #13) > > hmm. on second thought, i am not sure I like this. we should just rename the > > variables in nsINode.h. > > Why should our code "suffer" from purely designed headers? Let me rephrase this question: Why should our non-Qt related code suffer from a mistake in a Qt header, when that mistake can be contained to our own Qt specific files?
Assignee | ||
Comment 21•14 years ago
|
||
With your patch, there were other files that stilled failed to compile for the same reason. Instead of fixing those in a similar manner, I felt it was just easier to rename the local variables used in the public dom interface.
Reporter | ||
Comment 22•14 years ago
|
||
(In reply to comment #21) > With your patch, there were other files that stilled failed to compile for the > same reason. Instead of fixing those in a similar manner, I felt it was just > easier to rename the local variables used in the public dom interface. Strange it compiled fine for me... - sometimes its better to take the easy solution than the right one - in this case I'm not sure - it is definitively not the first time we have problems with a #define form Qt, and it is probably not the last time either. Would it be an idea if I create a new header file that gets included in all of our files that includes Qt headers where we can deal with this kind of things? We already have an unwritten rule that states that the Qt files needs to be first in the file, I don't think it would be too bad to have a rule that it must be terminated by a specific file too. First of all when we get these errors it is not obvious what happens by looking at the compiler errors, which makes it more difficult for the poor person who happens to declare a local slots variable. Secondary it is against all common coding practice to use a #define that way - it will continue to haunt us forever if we don't try to contain it to our Qt files. And finally we don't have any Qt builds on the FireFox tinderbox, which means that most people don't discover when they break Qt in the first place - we might want to fix that issue in another way thou... That being said, this is not one of the battles that I'm going to invest much more time in, this is just a minor thing compared to other problems in our codebase.
Assignee | ||
Comment 23•14 years ago
|
||
if you would like to create a new mozilla/qt header file that we include that undefs slots, and then find all places where we #include Qt stuff, go for it. (separate bug, very low priority)
Assignee | ||
Comment 24•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/fb38d987711f
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•