Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QDataStream problem from 4.8 to 5.1 on MacOS
Forum Updated to NodeBB v4.3 + New Features

QDataStream problem from 4.8 to 5.1 on MacOS

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 2.4k 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.
  • B Offline
    B Offline
    bjanuario
    wrote on last edited by
    #1

    Hello,

    I am getting error on this:
    @ QByteArray ba;
    QDataStream ds(&ba, QIODevice::WriteOnly);
    //This will write the hash into the byte array (through the data stream)
    ds << hash;@

    The error output is:
    licensefile.cpp:185: error: variable has incomplete type 'QDataStream'
    QDataStream ds(&ba);
    ^

    Any help please?

    1 Reply Last reply
    0
    • TheBadgerT Offline
      TheBadgerT Offline
      TheBadger
      wrote on last edited by
      #2

      did you perhaps forgot the #include <QDataStream>?


      Check out my SpellChecker Plugin for Qt Creator @ https://github.com/CJCombrink/SpellChecker-Plugin

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bjanuario
        wrote on last edited by
        #3

        Badger tkx, stupidity :) The funny thing is on 4.8 this was working :)
        Now gave me the follow error:

        Qt5.1.0/5.1.0/clang_64/include/QtCore/qhash.h:110: error: call to 'qHash' is ambiguous
        Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(t)))
        ^~~~~

        1 Reply Last reply
        0
        • TheBadgerT Offline
          TheBadgerT Offline
          TheBadger
          wrote on last edited by
          #4

          Sorry I have no idea about that, can you perhaps post the code that generates this error?


          Check out my SpellChecker Plugin for Qt Creator @ https://github.com/CJCombrink/SpellChecker-Plugin

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bjanuario
            wrote on last edited by
            #5

            This is from qhash.h , i think this sould be something I need to put on my .pro.
            I even not work with QHash.h ...

            @template<typename T> inline uint qHash(const T &t, uint seed)
            Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(t)))
            { return (qHash(t) ^ seed); }@

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

              Hi,

              Are you using a custom hash ?

              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
              • B Offline
                B Offline
                bjanuario
                wrote on last edited by
                #7

                no ...

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

                  Could you show the part of your code that triggers this ?

                  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