Require Qt >= 5.12

Bump the minimum required Qt version up to 5.12, as per
https://github.com/keepassxreboot/keepassxc/issues/10859#issuecomment-2148477826.
Previously, the minimum version was 5.2.0 based on the CMakeLists.txt
check, though it's unclear if such old versions would actually work.

With this, we are able to remove a whole bunch of #ifdef'd code.
This commit is contained in:
Carlo Teubner authored and Jonathan White committed 2024-06-22 00:01:23 -04:00
1 parent e6db2ce3b9
commit 07f565aa49
20 files changed
+7 -156

No files matched your search

-7
View File
@@ -570,17 +570,10 @@ void EntryView::startDrag(Qt::DropActions supportedActions)
// Grab the screen pixel ratio where the window resides
// TODO: Use direct call to screen() when moving to Qt 6
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
auto screen = QGuiApplication::screenAt(window()->geometry().center());
if (!screen) {
screen = QGuiApplication::primaryScreen();
}
#else
auto screen = QGuiApplication::primaryScreen();
if (windowHandle()) {
screen = windowHandle()->screen();
}
#endif
auto pixelRatio = screen->devicePixelRatio();