mirror of https://github.com/PCSX2/pcsx2.git
Qt: Remove version check macros
Not needed anymore since we require Qt6 on all platforms.
This commit is contained in:
parent
565189d08c
commit
5c5c7d64a8
|
@ -49,12 +49,7 @@ DisplayWidget::~DisplayWidget() = default;
|
||||||
|
|
||||||
qreal DisplayWidget::devicePixelRatioFromScreen() const
|
qreal DisplayWidget::devicePixelRatioFromScreen() const
|
||||||
{
|
{
|
||||||
QScreen* screen_for_ratio;
|
const QScreen* screen_for_ratio = screen();
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
|
||||||
screen_for_ratio = windowHandle()->screen();
|
|
||||||
#else
|
|
||||||
screen_for_ratio = screen();
|
|
||||||
#endif
|
|
||||||
if (!screen_for_ratio)
|
if (!screen_for_ratio)
|
||||||
screen_for_ratio = QGuiApplication::primaryScreen();
|
screen_for_ratio = QGuiApplication::primaryScreen();
|
||||||
|
|
||||||
|
|
|
@ -184,13 +184,9 @@ static bool ParseCommandLineOptions(int argc, char* argv[], std::shared_ptr<VMBo
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
|
||||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
std::shared_ptr<VMBootParameters> autoboot;
|
std::shared_ptr<VMBootParameters> autoboot;
|
||||||
|
|
|
@ -20,11 +20,7 @@
|
||||||
#include <QtGui/QDesktopServices>
|
#include <QtGui/QDesktopServices>
|
||||||
#include <QtGui/QKeyEvent>
|
#include <QtGui/QKeyEvent>
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
#include <QtGui/QAction>
|
#include <QtGui/QAction>
|
||||||
#else
|
|
||||||
#include <QtWidgets/QAction>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <QtWidgets/QComboBox>
|
#include <QtWidgets/QComboBox>
|
||||||
#include <QtWidgets/QDialog>
|
#include <QtWidgets/QDialog>
|
||||||
|
|
|
@ -14,16 +14,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <QtCore/QtCore>
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#include <QtCore/QtCore>
|
||||||
#include <QtGui/QAction>
|
#include <QtGui/QAction>
|
||||||
#else
|
|
||||||
#include <QtWidgets/QAction>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <QtWidgets/QCheckBox>
|
#include <QtWidgets/QCheckBox>
|
||||||
#include <QtWidgets/QComboBox>
|
#include <QtWidgets/QComboBox>
|
||||||
#include <QtWidgets/QDoubleSpinBox>
|
#include <QtWidgets/QDoubleSpinBox>
|
||||||
|
@ -152,13 +148,8 @@ namespace SettingWidgetBinder
|
||||||
static QString getStringValue(const QComboBox* widget)
|
static QString getStringValue(const QComboBox* widget)
|
||||||
{
|
{
|
||||||
const QVariant currentData(widget->currentData());
|
const QVariant currentData(widget->currentData());
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
if (currentData.type() == QVariant::String)
|
|
||||||
return currentData.toString();
|
|
||||||
#else
|
|
||||||
if (currentData.metaType().id() == QMetaType::QString)
|
if (currentData.metaType().id() == QMetaType::QString)
|
||||||
return currentData.toString();
|
return currentData.toString();
|
||||||
#endif
|
|
||||||
|
|
||||||
return widget->currentText();
|
return widget->currentText();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue