--- a/src/analyze/CMakeLists.txt
+++ b/src/analyze/CMakeLists.txt
@@ -41,8 +41,8 @@ if(HEAPTRACK_BUILD_GUI)
     if(Qt${QT_VERSION_MAJOR}_FOUND AND ECM_FOUND)
         set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
             find_package(KF${QT_VERSION_MAJOR} ${REQUIRED_IN_APPIMAGE} COMPONENTS CoreAddons I18n ItemModels ThreadWeaver ConfigWidgets KIO IconThemes)
-            find_package(KChart ${REQUIRED_IN_APPIMAGE} "2.6.0")
-            set_package_properties(KChart PROPERTIES TYPE RECOMMENDED PURPOSE "Required for the heaptrack_gui executable. Get it from the kdiagram module.")
+            find_package(KChart6 ${REQUIRED_IN_APPIMAGE} "2.6.0")
+            set_package_properties(KChart6 PROPERTIES TYPE RECOMMENDED PURPOSE "Required for the heaptrack_gui executable. Get it from the kdiagram module.")
         if(KF${QT_VERSION_MAJOR}I18n_FOUND)
             ki18n_install(../../po)
         endif()
--- a/src/analyze/gui/CMakeLists.txt
+++ b/src/analyze/gui/CMakeLists.txt
@@ -83,7 +83,7 @@ set(LIBRARIES
     heaptrack_gui_private
 )
 
-if (KChart_FOUND)
+if (KChart6_FOUND)
     list(APPEND SRCFILES
         chartwidget.cpp
         chartmodel.cpp
@@ -92,7 +92,7 @@ if (KChart_FOUND)
         histogrammodel.cpp
     )
     list(APPEND LIBRARIES
-        KChart
+        KChart6
         Qt${QT_VERSION_MAJOR}::Svg
     )
 endif()
--- a/src/analyze/gui/gui_config.h.cmake
+++ b/src/analyze/gui/gui_config.h.cmake
@@ -7,7 +7,7 @@
 #ifndef HEAPTRACK_GUI_CONFIG_H
 #define HEAPTRACK_GUI_CONFIG_H
 
-#cmakedefine01 KChart_FOUND
+#cmakedefine01 KChart6_FOUND
 
 #cmakedefine01 APPIMAGE_BUILD
 
--- a/src/analyze/gui/mainwindow.cpp
+++ b/src/analyze/gui/mainwindow.cpp
@@ -42,7 +42,7 @@
 
 #include "gui_config.h"
 
-#if KChart_FOUND
+#if KChart6_FOUND
 #include "chartmodel.h"
 #include "chartproxy.h"
 #include "chartwidget.h"
@@ -209,7 +209,7 @@ void setupTopView(TreeModel* source, QTr
     setupTreeContextMenu(view, callback);
 }
 
-#if KChart_FOUND
+#if KChart6_FOUND
 ChartWidget* addChartTab(QTabWidget* tabWidget, const QString& title, ChartModel::Type type, const Parser* parser,
                          void (Parser::*dataReady)(const ChartData&), MainWindow* window)
 {
@@ -317,7 +317,7 @@ MainWindow::MainWindow(QWidget* parent)
 {
     m_ui->setupUi(this);
 
-    auto group = m_config->group(Config::Groups::MainWindow);
+    auto group = m_config->group(QString::fromUtf8(Config::Groups::MainWindow));
     auto state = group.readEntry(Config::Entries::State, QByteArray());
     restoreState(state, MAINWINDOW_VERSION);
 
@@ -471,7 +471,7 @@ MainWindow::MainWindow(QWidget* parent)
     });
     m_ui->messages->hide();
 
-#if KChart_FOUND
+#if KChart6_FOUND
     auto consumedTab = addChartTab(m_ui->tabWidget, i18n("Consumed"), ChartModel::Consumed, m_parser,
                                    &Parser::consumedChartDataAvailable, this);
     auto allocationsTab = addChartTab(m_ui->tabWidget, i18n("Allocations"), ChartModel::Allocations, m_parser,
@@ -671,7 +671,7 @@ MainWindow::MainWindow(QWidget* parent)
 MainWindow::~MainWindow()
 {
     auto state = saveState(MAINWINDOW_VERSION);
-    auto group = m_config->group(Config::Groups::MainWindow);
+    auto group = m_config->group(QString::fromUtf8(Config::Groups::MainWindow));
     group.writeEntry(Config::Entries::State, state);
 }
 
@@ -788,7 +788,7 @@ void MainWindow::setupCodeNavigationMenu
     auto group = new QActionGroup(this);
     group->setExclusive(true);
 
-    const auto settings = m_config->group(Config::Groups::CodeNavigation);
+    const auto settings = m_config->group(QString::fromUtf8(Config::Groups::CodeNavigation));
     const auto currentIdx = settings.readEntry(Config::Entries::IDE, firstAvailableIde());
 
     for (int i = 0; i < LAST_IDE; ++i) {
@@ -838,7 +838,7 @@ void MainWindow::setupCodeNavigationMenu
 
 void MainWindow::setCodeNavigationIDE(QAction* action)
 {
-    auto settings = m_config->group(Config::Groups::CodeNavigation);
+    auto settings = m_config->group(QString::fromUtf8(Config::Groups::CodeNavigation));
 
     if (action->data() == -1) {
         const auto customCmd =
@@ -859,7 +859,7 @@ void MainWindow::setCodeNavigationIDE(QA
 
 void MainWindow::navigateToCode(const QString& filePath, int lineNumber, int columnNumber)
 {
-    const auto settings = m_config->group(Config::Groups::CodeNavigation);
+    const auto settings = m_config->group(QString::fromUtf8(Config::Groups::CodeNavigation));
     const auto ideIdx = settings.readEntry(Config::Entries::IDE, firstAvailableIde());
 
     QString command;
