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

assertObjectType is triggered with a correct signal/slot connection on macOS

XMLWordPrintable

    • macOS
    • eea2929d8 (dev), c5f9f1b17 (6.6)

      The document viewer demo crashes, when the print-button is clicked.

      The print action's triggered signal is connected to AbstractViewer::print with
      connect(ui->actionPrint, &QAction::triggered, m_viewer, &AbstractViewer::print)
      m_viewer holds a pointer to AbstractViewer. The object is alive, its d'tor hasn't been reached.

      When the signal is fired, assertObjectType triggers and the application aborts.
      The print() codepath isn't reached.

      Changing the signal/slot connection to the old-style
      connect(ui->actionPrint, SIGNAL(triggered()), m_viewer, SLOT(print())) fixes the problem.

      Steps to reproduce:
      1. Compile the document viewer demo on macOS (WebEngine / PdfQuick needed)
      2. Open any PDF document
      3. Hit the print button

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

            semlanik Alexey Edelev
            axelspoerl Axel Spoerl
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes