Fix a compile error

This commit is contained in:
ArsenArsen 2017-07-03 16:18:56 +02:00
parent 306245dbc4
commit 7e88a483da
1 changed files with 5 additions and 2 deletions

View File

@ -10,6 +10,7 @@
QPixmap screenshotutil::fullscreen(bool cursor) {
QPixmap image;
QPainter painter;
// Hack for https://bugreports.qt.io/browse/QTBUG-58110
static QStringList qVer = QString(qVersion()).split('.');
@ -22,16 +23,18 @@ QPixmap screenshotutil::fullscreen(bool cursor) {
}
image = QPixmap(width, height);
image.fill(Qt::transparent);
QPainter painter(&image);
width = 0;
painter.begin(&image);
for (QScreen *screen : QApplication::screens()) {
QPixmap currentScreen = window(0, screen);
painter.drawPixmap(screen->geometry().topLeft(), currentScreen);
width += screen->size().width();
}
} else
} else {
image = window(0);
painter.begin(&image);
}
#ifdef PLATFORM_CAPABILITY_CURSOR
if (cursor) {
auto cursorData = PlatformBackend::inst().getCursor();