Use KSharedConfig::openStateConfig() instead of using a "data" file

This function will automatically create a "neochatstarerc" for us, and
KConfig will decide the best place for us to place our state. It won't
always be in AppDataLocation.
This commit is contained in:
Joshua Goins
2023-10-19 16:35:05 -04:00
committed by Tobias Fella
parent 26fd26f9fd
commit 83b7e7d121
5 changed files with 27 additions and 17 deletions

View File

@@ -3,8 +3,8 @@
#pragma once
#include <KConfig>
#include <KConfigGroup>
#include <KSharedConfig>
#include <QObject>
#include <QQmlEngine>
#include <Quotient/room.h>
@@ -371,7 +371,7 @@ private:
NeoChatRoom *m_currentRoom;
NeoChatRoom *m_lastCurrentRoom;
QString m_arg;
KConfig m_config;
KSharedConfig::Ptr m_config;
KConfigGroup m_lastRoomConfig;
QPointer<ChatDocumentHandler> m_chatDocumentHandler;