Gui: Use new-style syntax of connect()

When fixing clazy issues -Wclazy-fully-qualified-moc-types then old-style syntax of connect() may fail. Thus, replace it with the new-style syntax
This commit is contained in:
wmayer
2022-07-26 16:32:18 +02:00
parent c4e4b5cf02
commit 1faf86c3da
2 changed files with 8 additions and 8 deletions

View File

@@ -876,10 +876,8 @@ void MainWindow::addWindow(MDIView* view)
d->mdiArea->addSubWindow(child);
}
connect(view, SIGNAL(message(const QString&, int)),
this, SLOT(showMessage(const QString&, int)));
connect(this, SIGNAL(windowStateChanged(MDIView*)),
view, SLOT(windowStateChanged(MDIView*)));
connect(view, &MDIView::message, this, &MainWindow::showMessage);
connect(this, &MainWindow::windowStateChanged, view, &MDIView::windowStateChanged);
// listen to the incoming events of the view
view->installEventFilter(this);
@@ -900,10 +898,9 @@ void MainWindow::addWindow(MDIView* view)
void MainWindow::removeWindow(Gui::MDIView* view, bool close)
{
// free all connections
disconnect(view, SIGNAL(message(const QString&, int)),
this, SLOT(showMessage(const QString&, int )));
disconnect(this, SIGNAL(windowStateChanged(MDIView*)),
view, SLOT(windowStateChanged(MDIView*)));
disconnect(view, &MDIView::message, this, &MainWindow::showMessage);
disconnect(this, &MainWindow::windowStateChanged, view, &MDIView::windowStateChanged);
view->removeEventFilter(this);
// check if the focus widget is a child of the view