Widgets: No longer use deprecated QPixmap::grabWindow(),grabWidget().
[profile/ivi/qtbase.git] / src / widgets / kernel / qwhatsthis.cpp
index 9d3493d..5df69be 100644 (file)
@@ -47,6 +47,7 @@
 #include "qdesktopwidget.h"
 #include "qevent.h"
 #include "qpixmap.h"
+#include "qscreen.h"
 #include "qpainter.h"
 #include "qtimer.h"
 #include "qhash.h"
@@ -232,8 +233,8 @@ QWhatsThat::~QWhatsThat()
 
 void QWhatsThat::showEvent(QShowEvent *)
 {
-    background = QPixmap::grabWindow(QApplication::desktop()->internalWinId(),
-                                     x(), y(), width(), height());
+    background = QGuiApplication::primaryScreen()->grabWindow(QApplication::desktop()->internalWinId(),
+                                                              x(), y(), width(), height());
 }
 
 void QWhatsThat::mousePressEvent(QMouseEvent* e)