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

@@ -6,7 +6,7 @@
using namespace Qt::Literals::StringLiterals;
RoomLastMessageProvider::RoomLastMessageProvider()
: m_config(KSharedConfig::openConfig(u"data"_s, KConfig::SimpleConfig, QStandardPaths::AppDataLocation))
: m_config(KSharedConfig::openStateConfig())
, m_configGroup(KConfigGroup(m_config, u"EventCache"_s))
{
}