I have noticed nobody seems to be working on porting Kig towards KDE 6, so I am trying to achieve it myself, with little knowledge about how the framework works.
I am encountering a problem I donât know how to solve:
Hello, I finished a draft of the port of Kig to Qt6.
Everything seem to work; the only feature I deemed not worth porting is the âGeogebraâ file importer, because it relied on QXmlPatterns, which was removed on Qt6.
When you have time, please donât hesitate to look into my merge request, and to give me feedbacks.
I couldnât figure out whatâs the best way to make BUILD_WITH_QT6 defaults to ON, and I donât know how to update the CI pipelineâŚ
For the CI, you can look at other projects, for instance .gitlab-ci.yml ¡ master ¡ Education / GCompris ¡ GitLab For Linux and FreeBSD CI, add -qt6 (linux.yml becomes linux-qt6.yml) Also adjust the dependencies in .kde-ci.yml, change @stable to @stable-kf6.
I applied the simple suggestions without problems, itâs for the KLazyLocalizedString Iâm a bit more hesitant, because I donât understand it, and the previous code used a lot of C-String, which I need to refactor.
Could you explain me whatâs the use for KLazyLocalizedString? How is it different from a KLocalizedString or even QString?
gettext are not getting extracted by the string extractors, so it wonât be translated
The codebase is indeed a bit old school with way too many char * strings but I managed to push a commit to your branch to use KLazyLocalizedString and fix some of these issues
Trying a build on Haiku with kde-builder failed, missing Qt6Core targets or something?
# kde-builder running: 'cmake' '-B' '.' '-S' '/Opslag/KDE/kde/src/kig' '-G' 'Ninja' '-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON' '-DCMAKE_BUILD_TYPE=RelWithDebInfo' '-DECM_DIR=/Opslag/KDE/kde/usr/share/ECM/cmake' '-DBINARY_ICONS_RESOURCE=ON' '-DDocBookXSL_DIR=/system/data/xml/docbook/xsl-stylesheets-1.79.2' '-DDocBookXML4_DTD_DIR=/boot/system/data/xml/docbook/xml-dtd-4.5' '-DCMAKE_AUTOGEN_PARALLEL=1' '-DHAVE_X11=OFF' '-DWITH_X11=OFF' '-DWITHOUT_X11=ON' '-DCMAKE_CXX_FLAGS:STRING=-pipe' '-DCMAKE_INSTALL_PREFIX=/Opslag/KDE/kde/usr'
# from directory: /Opslag/KDE/kde/build/kig
# with environment: /Opslag/KDE/kde/build/kig/kde-builder.env
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Installing in /Opslag/KDE/kde/usr. Run /Opslag/KDE/kde/build/kig/prefix.sh to set the environment for kig.
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_DATE_TIME
-- Performing Test HAVE_DATE_TIME - Success
-- Could not set up the appstream test. appstreamcli is missing.
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
CMake Error at /boot/system/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:3651 (message):
qt_generate_foreign_qml_types() is only available in Qt 6.
Call Stack (most recent call first):
/boot/system/lib/cmake/Qt6Qml/Qt6QmlConfig.cmake:200 (include)
/boot/system/data/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
/Opslag/KDE/kde/usr/lib/cmake/KF6Config/KF6ConfigConfig.cmake:42 (find_dependency)
/boot/system/data/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
/Opslag/KDE/kde/usr/lib/cmake/KF6KIO/KF6KIOConfig.cmake:31 (find_dependency)
/boot/system/data/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
/Opslag/KDE/kde/usr/lib/cmake/KF6Parts/KF6PartsConfig.cmake:28 (find_dependency)
CMakeLists.txt:34 (find_package)
-- Configuring incomplete, errors occurred!
# exit code was: 1
Seems I needed to add -DBUILD_WITH_QT6=ON in kde-builder.yaml to make it build. This shouldnât be needed anymore?
EDIT: fix on the way and ready for merge, thanks to upstream for quick reply!