Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Games
KSnakeDuel
Commits
1de9d8f7
Commit
1de9d8f7
authored
Apr 22, 2019
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it compile without deprecated method
parent
9525370c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
CMakeLists.txt
CMakeLists.txt
+6
-0
renderer.cpp
renderer.cpp
+3
-3
No files found.
CMakeLists.txt
View file @
1de9d8f7
...
...
@@ -36,6 +36,12 @@ if (${KF5Config_VERSION} STRGREATER "5.56.0")
add_definitions
(
-DQT_NO_FOREACH
)
MESSAGE
(
STATUS
"compile without foreach"
)
endif
()
# workaround for https://bugreports.qt.io/browse/QTBUG-74665 (bug in qt5.13 reevaluate it)
if
(
${
Qt5Widgets_VERSION
}
STREQUAL
"5.13.0"
)
MESSAGE
(
STATUS
"Qt version:
${
Qt5Widgets_VERSION
}
DISABLE compile without deprecated methods. bug QTBUG-74665"
)
else
()
add_definitions
(
-DQT_DISABLE_DEPRECATED_BEFORE=0x060000
)
endif
()
add_subdirectory
(
pics
)
add_subdirectory
(
themes
)
...
...
renderer.cpp
View file @
1de9d8f7
...
...
@@ -122,7 +122,7 @@ QPixmap Renderer::getPartOfSize(const QString &frameSvgName, const QSize &partSi
{
QString
framePixName
=
frameSvgName
+
sizeSuffix
.
arg
(
partSize
.
width
()).
arg
(
partSize
.
height
());
QPixmap
pix
;
if
(
!
QPixmapCache
::
find
(
framePixName
,
pix
))
if
(
!
QPixmapCache
::
find
(
framePixName
,
&
pix
))
{
pix
=
QPixmap
(
partSize
);
pix
.
fill
(
Qt
::
transparent
);
...
...
@@ -143,7 +143,7 @@ QPixmap Renderer::pixmapFromCache(RendererPrivate *p, const QString &svgName, co
QPixmap
pix
;
QString
pixName
=
svgName
+
sizeSuffix
.
arg
(
size
.
width
()).
arg
(
size
.
height
());
if
(
!
QPixmapCache
::
find
(
pixName
,
pix
))
if
(
!
QPixmapCache
::
find
(
pixName
,
&
pix
))
{
pix
=
QPixmap
(
size
);
pix
.
fill
(
Qt
::
transparent
);
...
...
@@ -160,7 +160,7 @@ QPixmap Renderer::background()
{
QPixmap
pix
;
QString
pixName
=
QLatin1String
(
"bgtile"
)
+
sizeSuffix
.
arg
(
p
->
m_sceneSize
.
width
()).
arg
(
p
->
m_sceneSize
.
height
());
if
(
!
QPixmapCache
::
find
(
pixName
,
pix
))
if
(
!
QPixmapCache
::
find
(
pixName
,
&
pix
))
{
pix
=
QPixmap
(
p
->
m_sceneSize
);
pix
.
fill
(
Qt
::
white
);
...
...
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