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 781997984d
commit 7a4d29e87a
2 changed files with 8 additions and 8 deletions

View File

@@ -36,6 +36,7 @@ QT_END_NAMESPACE
namespace Gui
{
class Document;
class MainWindow;
class ViewProvider;
class ViewProviderDocumentObject;
@@ -182,6 +183,8 @@ private:
ActiveObjectList ActiveObjects;
typedef boost::signals2::connection Connection;
Connection connectDelObject; //remove active object upon delete.
friend class MainWindow;
};
} // namespace Gui

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