Commit 249f5020 authored by Jan's avatar Jan
Browse files

Replaced obsolete grabWidget Call

parent 1f40e5b9
...@@ -505,9 +505,10 @@ void CoreWidget::applicationSnapshotDialog() { ...@@ -505,9 +505,10 @@ void CoreWidget::applicationSnapshotDialog() {
snapshotName_ = newName; snapshotName_ = newName;
//grabs only the widget (espacially in windows) dialog.hide();
//todo: deprecated in QT 5.0, use QScreen instead
QPixmap pic = QPixmap::grabWindow( winId() ); QScreen* screen = window()->screen();
QPixmap pic = screen->grabWindow( winId() );
QPainter painter (&pic); QPainter painter (&pic);
...@@ -534,8 +535,11 @@ void CoreWidget::applicationSnapshotDialog() { ...@@ -534,8 +535,11 @@ void CoreWidget::applicationSnapshotDialog() {
///Take a snapshot of the whole application ///Take a snapshot of the whole application
void CoreWidget::applicationSnapshot() { void CoreWidget::applicationSnapshot() {
QScreen* screen = window()->screen();
QPixmap pix = screen->grabWindow( winId() );
// Write image asynchronously // Write image asynchronously
QImage* pic = new QImage(QPixmap::grabWindow( winId() ).toImage()); QImage* pic = new QImage(pix.toImage());
writeImageAsynchronously(pic, suggestSnapshotFilename(snapshotName_)); writeImageAsynchronously(pic, suggestSnapshotFilename(snapshotName_));
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment