Skip to content

Commit

Permalink
Replace obsolete Qt method with new method
Browse files Browse the repository at this point in the history
* QPixmap::grabWindow has been obsoleted with Qt 5.
Use the new QScreen::grabWindow instead, from primaryScreen.
  • Loading branch information
Kissaki committed Oct 11, 2015
1 parent 8bf9b0a commit 495dfdc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mumble/OverlayConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,12 @@ OverlayConfig::OverlayConfig(Settings &st) :

// grab a desktop screenshot as background
QRect dsg = QApplication::desktop()->screenGeometry();

#if QT_VERSION > 0x050000
qpScreen = QGuiApplication::primaryScreen()->grabWindow(QApplication::desktop()->winId());
#else
qpScreen = QPixmap::grabWindow(QApplication::desktop()->winId(), dsg.x(), dsg.y(), dsg.width(), dsg.height());
#endif
if (qpScreen.size().isEmpty()) {
qWarning() << __FUNCTION__ << "failed to grab desktop image, trying desktop widget...";

Expand Down

0 comments on commit 495dfdc

Please sign in to comment.