Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-20976

Invalid declaration of ProString as a Q_MOVABLE_TYPE?

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: Qt Creator 4.7.0
    • Fix Version/s: None
    • Labels:

      Description

      I am getting this compiler warning while compiling Qt Creator

       

      .../src/corelib/tools/qvector.h: In instantiation of ‘QVector<T>::iterator QVector<T>::erase(QVector<T>::iterator, QVector<T>::iterator) [with T = ProString; QVector<T>::iterator = ProString*]’:
      .../src/corelib/tools/qvector.h:448:3:   required from ‘void QVector<T>::remove(int) [with T = ProString]
      .../sailfish-qtcreator/src/shared/proparser/proitems.h:244:40:   required from here
      .../src/corelib/tools/qvector.h:757:20: warning: ‘void* memmove(void*, const void*, size_t)’ writing to an object of type ‘class ProString’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
                   memmove(abegin, aend, (d->size - itemsToErase - itemsUntouched) * sizeof(T));
                   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

       

      The ProString class is declared as a Q_MOVABLE_TYPE and this does not seem to be correct.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              buddenha Oswald Buddenhagen
              Reporter:
              martyone Martin Kampas
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes