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

Please UNdeprecate toList, toSet and others similar

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • None

    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

          For Gerrit Dashboard: QTBUG-83697
          # Subject Branch Project Status CR V

          Activity

            People

              laknoll Lars Knoll
              rion Rion
              Votes:
              16 Vote for this issue
              Watchers:
              27 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes