Fix a compile error
This commit is contained in:
parent
306245dbc4
commit
7e88a483da
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
QPixmap screenshotutil::fullscreen(bool cursor) {
|
QPixmap screenshotutil::fullscreen(bool cursor) {
|
||||||
QPixmap image;
|
QPixmap image;
|
||||||
|
QPainter painter;
|
||||||
|
|
||||||
// Hack for https://bugreports.qt.io/browse/QTBUG-58110
|
// Hack for https://bugreports.qt.io/browse/QTBUG-58110
|
||||||
static QStringList qVer = QString(qVersion()).split('.');
|
static QStringList qVer = QString(qVersion()).split('.');
|
||||||
@ -22,16 +23,18 @@ QPixmap screenshotutil::fullscreen(bool cursor) {
|
|||||||
}
|
}
|
||||||
image = QPixmap(width, height);
|
image = QPixmap(width, height);
|
||||||
image.fill(Qt::transparent);
|
image.fill(Qt::transparent);
|
||||||
QPainter painter(&image);
|
|
||||||
width = 0;
|
width = 0;
|
||||||
|
painter.begin(&image);
|
||||||
|
|
||||||
for (QScreen *screen : QApplication::screens()) {
|
for (QScreen *screen : QApplication::screens()) {
|
||||||
QPixmap currentScreen = window(0, screen);
|
QPixmap currentScreen = window(0, screen);
|
||||||
painter.drawPixmap(screen->geometry().topLeft(), currentScreen);
|
painter.drawPixmap(screen->geometry().topLeft(), currentScreen);
|
||||||
width += screen->size().width();
|
width += screen->size().width();
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
image = window(0);
|
image = window(0);
|
||||||
|
painter.begin(&image);
|
||||||
|
}
|
||||||
#ifdef PLATFORM_CAPABILITY_CURSOR
|
#ifdef PLATFORM_CAPABILITY_CURSOR
|
||||||
if (cursor) {
|
if (cursor) {
|
||||||
auto cursorData = PlatformBackend::inst().getCursor();
|
auto cursorData = PlatformBackend::inst().getCursor();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user