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. Why there is no QList<T>::append(T &&)

Why there is no QList<T>::append(T &&)

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 281 Views
  • 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.
  • M Offline
    M Offline
    Mr Pang
    wrote on last edited by
    #1

    Just take QStringList as example, if we implement QStringList::append(QString &&str), isn't it more efficient in some cases?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by Christian Ehrlicher
      #2

      Because QList is a container which should no be used anymore (even it's not that explicitly written) since it's neither a list nor a vector. QVector for example has this function.7

      /edit: and due to implicit sharing you won't gain much performance for it either.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      M 1 Reply Last reply
      3
      • Christian EhrlicherC Christian Ehrlicher

        Because QList is a container which should no be used anymore (even it's not that explicitly written) since it's neither a list nor a vector. QVector for example has this function.7

        /edit: and due to implicit sharing you won't gain much performance for it either.

        M Offline
        M Offline
        Mr Pang
        wrote on last edited by
        #3

        @Christian-Ehrlicher
        Oh, I haven't realized that QLIst is deprecated. What about QMap?

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Mr-Pang said in Why there is no QList<T>::append(T &&):

          What about QMap?

          Feel free to add a patch for it.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          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