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. Migrating Qt 4.8 to Qt 5.8, QtDeclarative
Forum Updated to NodeBB v4.3 + New Features

Migrating Qt 4.8 to Qt 5.8, QtDeclarative

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 475 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    I'm porting a Qt 4.8 project to Qt 5.8, I've been using:

    https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5

    I am not getting:

    C1083: Cannot open include file: 'QDeclarativeItem': No such file or directory
    C2678: binary '+': no operator found which takes a left-hand operand of type 'QUuid' (or there is no acceptable conversion)

    I don't believe the two are related, but any help is greatly appreciated.

    Kind Regards,
    Sy

    jsulmJ 1 Reply Last reply
    0
    • SPlattenS SPlatten

      @jsulm , thank you.

      The C2678 is in a file called activefaultitem.h on the line:

      inline QString id() const { return faultID() + m_location; }  // <- This is the highlighted error
      inline QUuid faultID() const { return m_faultID.toString(); }
      
      QUuid m_faultID;
      QString m_location;
      
      B Offline
      B Offline
      Bonnie
      wrote on last edited by Bonnie
      #6

      @SPlatten I think it should be

      inline QString id() const { return faultID().toString() + m_location; }
      inline QUuid faultID() const { return m_faultID; }
      
      1 Reply Last reply
      3
      • SPlattenS SPlatten

        I'm porting a Qt 4.8 project to Qt 5.8, I've been using:

        https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5

        I am not getting:

        C1083: Cannot open include file: 'QDeclarativeItem': No such file or directory
        C2678: binary '+': no operator found which takes a left-hand operand of type 'QUuid' (or there is no acceptable conversion)

        I don't believe the two are related, but any help is greatly appreciated.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @SPlatten As explained here: https://doc.qt.io/qt-5/qtquick-porting-qt5.html
        replace QDeclarativeItem with QQuickItem.

        Regarding second error: please post the code where it happens.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        2
        • SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by SPlatten
          #3

          @jsulm , thank you.

          The C2678 is in a file called activefaultitem.h on the line:

          inline QString id() const { return faultID() + m_location; }  // <- This is the highlighted error
          inline QUuid faultID() const { return m_faultID.toString(); }
          
          QUuid m_faultID;
          QString m_location;
          

          Kind Regards,
          Sy

          jsulmJ B 2 Replies Last reply
          0
          • SPlattenS SPlatten

            @jsulm , thank you.

            The C2678 is in a file called activefaultitem.h on the line:

            inline QString id() const { return faultID() + m_location; }  // <- This is the highlighted error
            inline QUuid faultID() const { return m_faultID.toString(); }
            
            QUuid m_faultID;
            QString m_location;
            
            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @SPlatten said in Migrating Qt 4.8 to Qt 5.8, QtDeclarative:

            faultID()

            I guess this returns a QUuid?
            Change it to

            inline QString id() const { return faultID() + QUuid(m_location); }
            

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            2
            • SPlattenS Offline
              SPlattenS Offline
              SPlatten
              wrote on last edited by SPlatten
              #5

              The same error is reported on the same line. Is it actually because the return type is a QString an the faultID() does not return a QString?

              Kind Regards,
              Sy

              1 Reply Last reply
              0
              • SPlattenS SPlatten

                @jsulm , thank you.

                The C2678 is in a file called activefaultitem.h on the line:

                inline QString id() const { return faultID() + m_location; }  // <- This is the highlighted error
                inline QUuid faultID() const { return m_faultID.toString(); }
                
                QUuid m_faultID;
                QString m_location;
                
                B Offline
                B Offline
                Bonnie
                wrote on last edited by Bonnie
                #6

                @SPlatten I think it should be

                inline QString id() const { return faultID().toString() + m_location; }
                inline QUuid faultID() const { return m_faultID; }
                
                1 Reply Last reply
                3

                • Login

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