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

bool Q{String*,ByteArra}::compareEquals(..., Qt::CaseSensitivity)

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.9
    • None
    • All
    • 5

    Description

      As discussed in https://codereview.qt-project.org/c/qt/qtbase/+/515584/1/src/plugins/platforms/ios/qiosintegration.mm#303, when doing case insensitive compares it's akward to have to use compare() == 0, and there is a non-zero risk of forgetting the == 0 part, leading to the wrong logic.

      Just like startsWith(), it would be nice with a more straight forward API that would lead to user code along the lines of:

       

      if (foo.compareEquals(bar, Qt::CaseInsensitive))

       

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            vestbo Tor Arne Vestbø
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes