Correct compile errorswith Qt6.7

This commit is contained in:
Lord-Grey
2023-09-09 22:10:22 +02:00
parent 013587d1fd
commit a2f6271832
17 changed files with 57 additions and 49 deletions

View File

@@ -1,4 +1,7 @@
#include <grabber/AudioGrabberWindows.h>
#include <climits>
#include <QImage>
#include <QJsonObject>
#include <QJsonArray>
@@ -61,7 +64,7 @@ bool AudioGrabberWindows::configureCaptureInterface()
// wFormatTag, nChannels, nSamplesPerSec, mAvgBytesPerSec,
// nBlockAlign, wBitsPerSample, cbSize
notificationSize = max(1024, audioFormat.nAvgBytesPerSec / 8);
notificationSize = std::max(static_cast<DWORD>(1024), static_cast<DWORD>(audioFormat.nAvgBytesPerSec / 8));
notificationSize -= notificationSize % audioFormat.nBlockAlign;
bufferCaptureSize = notificationSize * AUDIO_NOTIFICATION_COUNT;

View File

@@ -103,7 +103,7 @@ bool QtGrabber::setupDisplay()
Info(_log, "Available Displays:");
int index = 0;
for (auto* screen : qAsConst(screens))
for (auto* screen : std::as_const(screens))
{
const QRect geo = screen->geometry();
Info(_log, "Display %d: Name: %s Resolution: [%dx%d], Geometry: (L,T,R,B) %d,%d,%d,%d Depth:%dbit", index, QSTRING_CSTR(screen->name()), geo.width(), geo.height(), geo.x(), geo.y(), geo.x() + geo.width(), geo.y() + geo.height(), screen->depth());