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

Please UNdeprecate toList, toSet and others similar

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Technical Risk:
      Normal

      Description

      TL;DR toSet/toList are very convenient utils and they don't hinder new C++ standards integration.

       

      I'm already sick of refactoring code like this (example of real code)

       #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
              auto tmp  = ms.sources + uris();
              auto tmp2 = QSet<QString>(tmp.begin(), tmp.end());
              _uris     = QStringList(tmp2.begin(), tmp2.end());
      #else
              _uris = (ms.sources + uris()).toSet().toList();
      #endif

      toSet and toList were very neat. But now this code is hardly readable.

      C++ standard lacks many cool things Qt has. Why do you at all want to make Qt that bad as plain C++?

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              laknoll Lars Knoll
              Reporter:
              rion Rion
              Votes:
              16 Vote for this issue
              Watchers:
              23 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes