[Solved] QSharedPointer::matrixData() and QSharedPointer::data() on OSX and iOS
-
Again where did you get these ? Are you really sure you are not having some other libraries mixing in ?
Looking at the stable branch there's no matrixData anywhere in the sources and the code for QSharedPointer doesn't contain any OS specific stuff.
-
Thank you for your quick replies.
I simply downloaded the Mac QT5.2 SDK bundle for OSX and iOS from the website. I did not compile Qt from source. There are no other Qt versions installed on my system and I verified that the qsharedpointer_impl.h file is pointing to the Qt5.2 library. I'm pretty sure the installation on my computer is done by the book.
The qsharedpointer_impl.h file I'm talking about appears on QtCreator when I cmd+click on a QSharedPointer class.
-
Really strange, can you post the the content of that qsharedpointer_impl.h ? You can use e.g. "pastebin":http://pastebin.com for that
-
It is strange and it feels strange too...
I pasted qsharedpointer_impl.h on http://pastebin.com/5AA96SPV
-
I've check the 5.2.1 iOS installer and qsharedpointer_impl.h looks good
-
Sure everything works fine. It's just that on line 304 you can see the matrixData() function which is public and undocumented and I can not find the data() function anywhere on OSX. Besides not being conform with the docs (and a little bit less cross-platform), there's no problem at all.
I came over this by defining a helper function that returns either matrixData() or data() depending on the platform.
BTW I have Qt5.2.0, not 5.2.1, maybe there's a difference?
-
Indeed, but it's really something strange. I've looked at the file's history and at no time there's a matrixData in it.
It might have been modify externally (e.g. a wild search/replace)
Can you reinstall your 5.2.0 to see if it's still the case ?
-
ooooh, perhaps you're right. Maybe a refactor, I have plenty of functions named data operating on shared pointers. Maybe I refactored one of them while using a . instead of a -> thus refactoring the shared pointer's function.
Shouldn't QtCreator warn before modifying external files?
Anyway, I'll reinstall and keep you informed. Thanks for the insight.
Cheers
-
I don't know if all version have it but in recent ones, you should get a message at the top of the text editor that warns you about that. However if you are doing this using a global search/replace that modifies several unfocused documents you won't see it for these.
-
That was the problem. The modification date of qsharedpointer_impl.h does not lie.
I simply refactored it back to its original name and removed my helper function. Everything back to normal now.
Thank you for your time. My app would have compiled only on my computer otherwise.
-
You're welcome !
Now that you have Qt back to normal and working, please update the thread title prepending [solved] so other forum users may know a solution has been found :)