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

Please UNdeprecate toList, toSet and others similar

XMLWordPrintable

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

      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++?

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

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

              Created:
              Updated:

                There is 1 open Gerrit change