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

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

XMLWordPrintable

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

      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().

       

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes