Commit fbb9fa24 authored by Volker Krause's avatar Volker Krause
Browse files

Adapt to QTextCodec being in Qt6::Core5Compat in Qt 6

The QTextStream::setCodec call with codecForLocale() is unnecessary, that
is the default anyway.
parent 94961393
Pipeline #244506 passed with stage
in 6 minutes and 28 seconds
......@@ -27,6 +27,9 @@ include(CMakePackageConfigHelpers)
include(FeatureSummary)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS DBus Network Widgets Svg)
if (QT_MAJOR_VERSION EQUAL "6")
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED Core5Compat)
endif()
find_package(Qt${QT_MAJOR_VERSION}Test ${QT_MIN_VERSION} CONFIG QUIET)
set_package_properties(Qt${QT_MAJOR_VERSION}Test PROPERTIES
......
......@@ -871,8 +871,6 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
if (mc.open(QIODevice::ReadOnly))
{
QTextStream is(&mc);
is.setCodec( QTextCodec::codecForLocale () );
while (!is.atEnd())
{
const QString line = is.readLine();
......
......@@ -147,6 +147,9 @@ target_link_libraries(textthumbnail
KF5::KIOWidgets
KF5::SyntaxHighlighting
)
if (QT_MAJOR_VERSION EQUAL "6")
target_link_libraries(textthumbnail Qt6::Core5Compat)
endif()
install(TARGETS textthumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf${QT_MAJOR_VERSION}/thumbcreator)
......
Supports Markdown
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