UI: Cleanup Qt for Qt6

This changes cleans up some deprecated functions that were removed in
Qt6. Some are placed behind version ifdefs and others are replaced for
their non-deprecated Qt5 version.
This commit is contained in:
Kurt Kartaltepe
2021-03-04 21:30:03 -08:00
committed by Jim
parent 40f99da8a2
commit 513bcb8e35
11 changed files with 48 additions and 11 deletions

View File

@@ -6,12 +6,12 @@
#include "obs-app.hpp"
#include "qt-wrappers.hpp"
#include <QDesktopWidget>
#include <QPushButton>
#include <QScrollArea>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QScreen>
#include <string>
@@ -204,7 +204,8 @@ OBSBasicStats::OBSBasicStats(QWidget *parent, bool closeable)
QRect windowGeometry = normalGeometry();
if (!WindowPositionValid(windowGeometry)) {
QRect rect = App()->desktop()->geometry();
QRect rect =
QGuiApplication::primaryScreen()->geometry();
setGeometry(QStyle::alignedRect(Qt::LeftToRight,
Qt::AlignCenter, size(),
rect));