Commit 1de9d8f7 authored by Laurent Montel's avatar Laurent Montel 😁

Make it compile without deprecated method

parent 9525370c
......@@ -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)
......
......@@ -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);
......
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