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

Warning:Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.14.2
    • Build System
    • None
    • Running Qt Creator 4.12.3 Based on Qt 5.14.2 on iMAC
    • All

    Description

      I have a class derived from QPushButton, I am connecting the clicked signal to a slot in script:

              cnSignal = QObject::connect(this

                      ,&clsQtPushBtn::clicked

                      ,[pobjScriptEng, strCall, strScript]() {

                                    QString strScriptWithCall(strScript + strCall + "();");

                                    pobjScriptEng->evaluate(strScriptWithCall);

                      );

       

      When I click the button the first time everything is ok, however reliably on the second click I see:

           Warning:Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.

       

      In the Application Output.  The scripted slot contains nothing more than:

              function clicked() 

      {             console.info("-----clicked()-----");                       }

       

       

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            simonplatten Simon Platten
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes