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

No QString in new QComboBox::currentIndexChanged() signal.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.15.0 Beta1
    • None

    Description

      I noticed the new/updated QComboBox::currentIndexChanged(int, QString) signal in 5.15 and was wondering... why?  I see the comments in the current API review but didn't want to butt in there.

      This makes no sense to me. There's already the newish currentTextChanged() (thank you for that). The text is not the index. One can always get the text anyway from the int signal handler, even w/out a saved pointer to the QComboBox by casting sender(). The tacked-on QString seems like just a waste and would be mostly unused. I have hundreds if not thousands of connections to this signal and what... I'll eventually need to change each of those handler signatures to add the useless QString? Seems absurd, sorry.

      Deprecate the currentIndexChanged(QString) version by all means, but please, leave the one with the actual int index. Maybe add a new signal name with both parts if someone really thinks that will be useful somehow (currentItemChanged() or something). IMHO a currentModelIndexChanged(QModelIndex) would be useful also! 

      Thank you,
      -Max

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mpaperno Maxim Paperno
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes