代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/rviz 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 10cb16ea4c6f4582aa9abe861b1c1734399687fe Mon Sep 17 00:00:00 2001
From: vineet131 <vineet131@users.noreply.github.com>
Date: Wed, 10 May 2023 19:46:46 +0900
Subject: [PATCH] Replace obsolete QPixmap::grabWindow() with
QScreen::grabWindow() (#1794)
Co-authored-by: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>
---
src/rviz/screenshot_dialog.cpp | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/rviz/screenshot_dialog.cpp b/src/rviz/screenshot_dialog.cpp
index 947142e0fc..7ef8ef1641 100644
--- a/src/rviz/screenshot_dialog.cpp
+++ b/src/rviz/screenshot_dialog.cpp
@@ -38,6 +38,8 @@
#include <QFileDialog>
#include <QCheckBox>
#include <QTimer>
+#include <QScreen>
+#include <QWindow>
#include "scaled_image_widget.h"
#include "screenshot_dialog.h"
@@ -111,14 +113,8 @@ void ScreenshotDialog::onTimeout()
void ScreenshotDialog::takeScreenshotNow()
{
- if (save_full_window_)
- {
- screenshot_ = QPixmap::grabWindow(main_window_->winId());
- }
- else
- {
- screenshot_ = QPixmap::grabWindow(render_window_->winId());
- }
+ const QWidget* w = save_full_window_ ? main_window_ : render_window_;
+ screenshot_ = w->windowHandle()->screen()->grabWindow(w->winId());
image_widget_->setImage(screenshot_);
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。