mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
refactor: Modernize Qt connections (#914)
This commit is contained in:
@@ -357,7 +357,7 @@ bool V4L2Grabber::open_device()
|
||||
// create the notifier for when a new frame is available
|
||||
_streamNotifier = new QSocketNotifier(_fileDescriptor, QSocketNotifier::Read);
|
||||
_streamNotifier->setEnabled(false);
|
||||
connect(_streamNotifier, SIGNAL(activated(int)), this, SLOT(read_frame()));
|
||||
connect(_streamNotifier, &QSocketNotifier::activated, this, &V4L2Grabber::read_frame);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -29,8 +29,8 @@ V4L2Wrapper::V4L2Wrapper(const QString &device,
|
||||
qRegisterMetaType<Image<ColorRgb>>("Image<ColorRgb>");
|
||||
|
||||
// Handle the image in the captured thread using a direct connection
|
||||
connect(&_grabber, SIGNAL(newFrame(Image<ColorRgb>)), this, SLOT(newFrame(Image<ColorRgb>)), Qt::DirectConnection);
|
||||
connect(&_grabber, SIGNAL(readError(const char*)), this, SLOT(readError(const char*)), Qt::DirectConnection);
|
||||
connect(&_grabber, &V4L2Grabber::newFrame, this, &V4L2Wrapper::newFrame, Qt::DirectConnection);
|
||||
connect(&_grabber, &V4L2Grabber::readError, this, &V4L2Wrapper::readError, Qt::DirectConnection);
|
||||
}
|
||||
|
||||
V4L2Wrapper::~V4L2Wrapper()
|
||||
|
Reference in New Issue
Block a user