Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved] QSharedPointer::matrixData() and QSharedPointer::data() on OSX and iOS
Forum Updated to NodeBB v4.3 + New Features

[Solved] QSharedPointer::matrixData() and QSharedPointer::data() on OSX and iOS

Scheduled Pinned Locked Moved Mobile and Embedded
14 Posts 2 Posters 3.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #4

    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.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • K Offline
      K Offline
      k.gaitanis
      wrote on last edited by
      #5

      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.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #6

        Really strange, can you post the the content of that qsharedpointer_impl.h ? You can use e.g. "pastebin":http://pastebin.com for that

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • K Offline
          K Offline
          k.gaitanis
          wrote on last edited by
          #7

          It is strange and it feels strange too...

          I pasted qsharedpointer_impl.h on http://pastebin.com/5AA96SPV

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #8

            I've check the 5.2.1 iOS installer and qsharedpointer_impl.h looks good

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • K Offline
              K Offline
              k.gaitanis
              wrote on last edited by
              #9

              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?

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #10

                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 ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  k.gaitanis
                  wrote on last edited by
                  #11

                  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

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #12

                    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.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      k.gaitanis
                      wrote on last edited by
                      #13

                      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.

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #14

                        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 :)

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved