Commit 8b1e24e3 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix compile with new qt5.14

BUG: 418837
parent 502f49c2
......@@ -60,7 +60,7 @@ ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX KPAT VERSION_HEADER
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x0x050e00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
endif()
......
......@@ -765,7 +765,11 @@ void KCardScene::recalculatePileLayouts()
void KCardScene::setHighlightedItems( const QList<QGraphicsItem*> &items )
{
QSet<QGraphicsItem*> s = QSet<QGraphicsItem*>::fromList( items );
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
const QSet<QGraphicsItem*> s = QSet<QGraphicsItem*>::fromList( items );
#else
const QSet<QGraphicsItem*> s = QSet<QGraphicsItem*>(items.cbegin(), items.cend());
#endif
foreach ( QGraphicsItem * i, d->highlightedItems.subtract( s ) )
setItemHighlight( i, false );
foreach ( QGraphicsItem * i, s )
......
......@@ -146,12 +146,17 @@ KCardTheme::KCardTheme( const QString & dirName )
}
}
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
const QSet<QString> supportedFeaturesSet = supportedFeatures.toSet();
#else
const QSet<QString> supportedFeaturesSet(supportedFeatures.cbegin(), supportedFeatures.cend());
#endif
d = new KCardThemePrivate( isValid,
dirName,
displayName,
desktopFilePath,
graphicsFilePath,
supportedFeatures.toSet(),
supportedFeaturesSet,
lastModified );
}
......
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