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

QScriptable has non virtual destructor.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P3: Somewhat important
    • None
    • 5.15.2
    • Qt Script
    • None

    Description

      The virtual keyword is missing from QScriptable destructor.

      This may cause some memory leaks when sublcassing from QScriptable  and compiler warnings.

      Extracted from qt-everywhere-src-5.15.2\qtscript\src\script\api\qscriptable.h line 59 to 63:

      class Q_SCRIPT_EXPORT QScriptable
      {
      public:
       QScriptable();
       ~QScriptable();
      

       

      This should be

      class Q_SCRIPT_EXPORT QScriptable
      {
      public:
       QScriptable();
       virtual ~QScriptable();
      

       

       

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            davidmt2 David Darnaud
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes