Skip to content

Commit

Permalink
Fix build with Qt 4
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Jun 18, 2017
1 parent b5d29e1 commit 2d778c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/scriptable/scriptableproxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,7 @@ QByteArray ScriptableProxy::screenshot(const QString &format, const QString &scr

#if QT_VERSION < 0x050000
auto pixmap = QPixmap::grabWindow(QApplication::desktop()->winId());
const auto geometry = QApplication::desktop()->geometry();
#else
QScreen *selectedScreen = nullptr;
if ( screenName.isEmpty() ) {
Expand All @@ -1233,11 +1234,13 @@ QByteArray ScriptableProxy::screenshot(const QString &format, const QString &scr
return QByteArray();

auto pixmap = selectedScreen->grabWindow(0);

const auto geometry = selectedScreen->geometry();
#endif

if (select) {
ScreenshotRectWidget rectWidget(pixmap);
rectWidget.setGeometry( selectedScreen->geometry() );
rectWidget.setGeometry(geometry);
rectWidget.show();

while ( !rectWidget.isHidden() )
Expand Down

0 comments on commit 2d778c5

Please sign in to comment.