UI: Replace SIGNAL and SLOT macros in projectors

This commit is contained in:
gxalpha
2023-07-21 13:16:04 +02:00
parent cddb9dae45
commit c4d2d98720
+6 -4
View File
@@ -61,7 +61,8 @@ OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_, int monitor,
QAction *action = new QAction(this);
action->setShortcut(Qt::Key_Escape);
addAction(action);
connect(action, SIGNAL(triggered()), this, SLOT(EscapeTriggered()));
connect(action, &QAction::triggered, this,
&OBSProjector::EscapeTriggered);
setAttribute(Qt::WA_DeleteOnClose, true);
@@ -266,11 +267,11 @@ void OBSProjector::mousePressEvent(QMouseEvent *event)
if (GetMonitor() > -1) {
popup.addAction(QTStr("Windowed"), this,
SLOT(OpenWindowedProjector()));
&OBSProjector::OpenWindowedProjector);
} else if (!this->isMaximized()) {
popup.addAction(QTStr("ResizeProjectorWindowToContent"),
this, SLOT(ResizeToContent()));
this, &OBSProjector::ResizeToContent);
}
QAction *alwaysOnTopButton = new QAction(
@@ -283,7 +284,8 @@ void OBSProjector::mousePressEvent(QMouseEvent *event)
popup.addAction(alwaysOnTopButton);
popup.addAction(QTStr("Close"), this, SLOT(EscapeTriggered()));
popup.addAction(QTStr("Close"), this,
&OBSProjector::EscapeTriggered);
popup.exec(QCursor::pos());
} else if (event->button() == Qt::LeftButton) {
// Only MultiView projectors handle left click