Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKissaki <kissaki@gmx.de>2015-10-11 19:07:06 +0300
committerKissaki <kissaki@gmx.de>2015-10-11 19:38:19 +0300
commit495dfdc099df57470b2985d8aad1014791cbb23f (patch)
treedb999236a91c1a26160432129531c36d7a2a6fdf /src/mumble/OverlayConfig.cpp
parent8bf9b0a1ed99d192946fed96cfbb206600f701dc (diff)
Replace obsolete Qt method with new method
* QPixmap::grabWindow has been obsoleted with Qt 5. Use the new QScreen::grabWindow instead, from primaryScreen.
Diffstat (limited to 'src/mumble/OverlayConfig.cpp')
-rw-r--r--src/mumble/OverlayConfig.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mumble/OverlayConfig.cpp b/src/mumble/OverlayConfig.cpp
index 0051368bc..e994b9650 100644
--- a/src/mumble/OverlayConfig.cpp
+++ b/src/mumble/OverlayConfig.cpp
@@ -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...";