Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-40244

JS Array shift() and unshift() do not work for QQmlSequence types

    XMLWordPrintable

Details

    • ac032fc1524f8e00a26580a68ed1c4dc23077c14

    Description

      shift doesn't work for QQmlSequence types and unshift results in an assert:

      Program received signal SIGABRT, Aborted.
      0x410d7b88 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:67
      67	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
      (gdb) bt
      #0  0x410d7b88 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:67
      #1  0x410db910 in __GI_abort () at abort.c:91
      #2  0x40b9aca4 in qt_message_fatal (message=..., context=...) at global/qlogging.cpp:1283
      #3  QMessageLogger::fatal (this=<optimized out>,
          msg=0x40df0f40 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:588
      #4  0x40b96a1c in qt_assert (assertion=0x40588920 "!offset", file=<optimized out>,
          line=<optimized out>) at global/qglobal.cpp:2096
      #5  0x4042ff0e in QV4::ArrayData::realloc (o=0x4b69d810, newType=<optimized out>,
          offset=<optimized out>, alloc=<optimized out>, enforceAttributes=false)
          at jsruntime/qv4arraydata.cpp:104
      #6  0x4042fff8 in QV4::SimpleArrayData::getHeadRoom (o=<optimized out>)
          at jsruntime/qv4arraydata.cpp:192
      #7  0x40431204 in QV4::SimpleArrayData::push_front (o=0x4b69d810, values=<optimized out>,
          n=<optimized out>) at jsruntime/qv4arraydata.cpp:279
      #8  0x40434bfa in QV4::ArrayPrototype::method_unshift (ctx=0xbeffd368)
          at jsruntime/qv4arrayobject.cpp:554
      #9  0x40443cac in QV4::BuiltinFunction::call (that=0x44962a20, callData=<optimized out>)
          at jsruntime/qv4functionobject.cpp:583
      #10 0x40480f38 in call (d=0x44b00998, this=<optimized out>) at jsruntime/qv4object_p.h:270
      #11 QV4::Runtime::callProperty (context=0xbeffd498, name=..., callData=...)
          at jsruntime/qv4runtime.cpp:938
      

      Attachments

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

        Activity

          People

            martinj Martin Jones
            martinj Martin Jones
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes