Commit 249f5020 authored by Jan's avatar Jan

Replaced obsolete grabWidget Call

parent 1f40e5b9
......@@ -505,9 +505,10 @@ void CoreWidget::applicationSnapshotDialog() {
snapshotName_ = newName;
//grabs only the widget (espacially in windows)
//todo: deprecated in QT 5.0, use QScreen instead
QPixmap pic = QPixmap::grabWindow( winId() );
dialog.hide();
QScreen* screen = window()->screen();
QPixmap pic = screen->grabWindow( winId() );
QPainter painter (&pic);
......@@ -534,8 +535,11 @@ void CoreWidget::applicationSnapshotDialog() {
///Take a snapshot of the whole application
void CoreWidget::applicationSnapshot() {
QScreen* screen = window()->screen();
QPixmap pix = screen->grabWindow( winId() );
// Write image asynchronously
QImage* pic = new QImage(QPixmap::grabWindow( winId() ).toImage());
QImage* pic = new QImage(pix.toImage());
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