Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
51bfde68
Commit
51bfde68
authored
Dec 22, 2015
by
Craig Watson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace deprecated QPixmap::grabWindow function
parent
7e2b4638
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
UBScreenMirror.cpp
src/gui/UBScreenMirror.cpp
+3
-2
UBPodcastController.cpp
src/podcast/UBPodcastController.cpp
+6
-1
No files found.
src/gui/UBScreenMirror.cpp
View file @
51bfde68
...
...
@@ -98,8 +98,9 @@ void UBScreenMirror::grabPixmap()
// WHY HERE?
// this is the case we are showing the desktop but the is no widget and we use the last widget rectagle to know
// what we have to grab. Not very good way of doing
WId
windowID
=
qApp
->
desktop
()
->
screen
(
mScreenIndex
)
->
winId
();
mLastPixmap
=
QPixmap
::
grabWindow
(
windowID
,
mRect
.
x
(),
mRect
.
y
(),
mRect
.
width
(),
mRect
.
height
());
QDesktopWidget
*
desktop
=
QApplication
::
desktop
();
QScreen
*
screen
=
QApplication
::
primaryScreen
();
mLastPixmap
=
screen
->
grabWindow
(
desktop
->
effectiveWinId
(),
mRect
.
x
(),
mRect
.
y
(),
mRect
.
width
(),
mRect
.
height
());
}
mLastPixmap
=
mLastPixmap
.
scaled
(
width
(),
height
(),
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
...
...
src/podcast/UBPodcastController.cpp
View file @
51bfde68
...
...
@@ -761,7 +761,12 @@ void UBPodcastController::timerEvent(QTimerEvent *event)
&&
event
->
timerId
()
==
mScreenGrabingTimerEventID
&&
mSourceWidget
==
qApp
->
desktop
())
{
QPixmap
desktop
=
QPixmap
::
grabWindow
(
qApp
->
desktop
()
->
screen
(
UBApplication
::
applicationController
->
displayManager
()
->
controleScreenIndex
())
->
winId
());
QDesktopWidget
*
dtop
=
QApplication
::
desktop
();
QRect
dtopRect
=
dtop
->
screenGeometry
();
QScreen
*
screen
=
QApplication
::
primaryScreen
();
QPixmap
desktop
=
screen
->
grabWindow
(
dtop
->
effectiveWinId
(),
dtopRect
.
x
(),
dtopRect
.
y
(),
dtopRect
.
width
(),
dtopRect
.
height
());
{
QPainter
p
(
&
mLatestCapture
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment