Clean StartupProcess.cpp (#19642)

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
This commit is contained in:
mosfet80
2025-02-24 17:21:26 +01:00
committed by GitHub
parent 0aed23ca81
commit ab8f178e0e

View File

@@ -54,10 +54,7 @@ StartupProcess::StartupProcess() = default;
void StartupProcess::setupApplication()
{
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
#endif
// Automatic scaling for legacy apps (disable once all parts of GUI are aware of HiDpi)
ParameterGrp::handle hDPI =
@@ -76,7 +73,7 @@ void StartupProcess::setupApplication()
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
#if QT_VERSION >= QT_VERSION_CHECK(5,14,0) && defined(Q_OS_WIN)
#if defined(Q_OS_WIN)
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#endif
}
@@ -93,8 +90,6 @@ void StartupProcess::setupApplication()
if (useSoftwareOpenGL) {
QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
}
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
// By default (on platforms that support it, see docs for
// Qt::AA_CompressHighFrequencyEvents) QT applies compression
// for high frequency events (mouse move, touch, window resizes)
@@ -106,7 +101,6 @@ void StartupProcess::setupApplication()
// leading to unacceptable slowdowns using a tablet pen. Enable
// compression for tablet events here to solve that.
QCoreApplication::setAttribute(Qt::AA_CompressTabletEvents);
#endif
}
void StartupProcess::execute()