From 96d6acac19b68ce903a6b82c65a5fccd9a7288a5 Mon Sep 17 00:00:00 2001 From: Mark Watkins <jedimark@users.sourceforge.net> Date: Thu, 10 Apr 2014 04:46:33 +1000 Subject: [PATCH] Qt4 compile fix --- sleepyhead/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sleepyhead/mainwindow.cpp b/sleepyhead/mainwindow.cpp index 7f78cc73..e6ac99f1 100644 --- a/sleepyhead/mainwindow.cpp +++ b/sleepyhead/mainwindow.cpp @@ -740,9 +740,11 @@ void MainWindow::DelayedScreenshot() int h=height(); // Scale for high resolution displays (like Retina) +#if(QT_VERSION>=QT_VERSION_CHECK(5,0,0)) qreal pr=devicePixelRatio(); w/=pr; h/=pr; +#endif QPixmap pixmap=QPixmap::grabWindow(this->winId(),x(),y(),w,h);