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

Different behavior between overloads of QObject::connect can cause crash

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.12.1
    • Core: Object Model
    • None
    • Linux/X11

    Description

      If I close my window using an action with connection

      connect(ui->actionQuit, &QAction::triggered, qApp, &QApplication::quit);

      it will trigger a slot connected like this

      connect(ui->dockWidget, &QDockWidget::visibilityChanged, this, &MainWindow::dockToggled); 
      

      but not like this

      connect(ui->dockWidget, SIGNAL(visibilityChanged(bool)), this, SLOT(dockToggled()));

      despite the fact they should do the same thing. This causes a crash if dockToggled() uses QMainWindow::saveState().

       

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            tguen tguen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes