File indexing completed on 2024-11-24 04:44:18

0001 /*
0002     SPDX-FileCopyrightText: 2014 Sandro Knauß <knauss@kolabsys.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "kolabsettings.h"
0008 
0009 KolabSettings::KolabSettings(WId winId)
0010     : Settings(winId)
0011 {
0012     changeDefaults();
0013     load();
0014 }
0015 
0016 void KolabSettings::changeDefaults()
0017 {
0018     setCurrentGroup(QStringLiteral("network"));
0019     KConfigSkeleton::ItemInt *itemImapPort = (KConfigSkeleton::ItemInt *)findItem(QStringLiteral("ImapPort"));
0020     itemImapPort->setDefaultValue(143);
0021     KConfigSkeleton::ItemString *itemSafety = (KConfigSkeleton::ItemString *)findItem(QStringLiteral("Safety"));
0022     itemSafety->setDefaultValue(QStringLiteral("STARTTLS"));
0023     KConfigSkeleton::ItemBool *itemSubscriptionEnabled = (KConfigSkeleton::ItemBool *)findItem(QStringLiteral("SubscriptionEnabled"));
0024     itemSubscriptionEnabled->setDefaultValue(true);
0025 
0026     setCurrentGroup(QStringLiteral("cache"));
0027     KConfigSkeleton::ItemBool *itemDisconnectedModeEnabled = (KConfigSkeleton::ItemBool *)findItem(QStringLiteral("DisconnectedModeEnabled"));
0028     itemDisconnectedModeEnabled->setDefaultValue(true);
0029 
0030     setCurrentGroup(QStringLiteral("siever"));
0031     KConfigSkeleton::ItemBool *itemSieveSupport = (KConfigSkeleton::ItemBool *)findItem(QStringLiteral("SieveSupport"));
0032     itemSieveSupport->setDefaultValue(true);
0033     KConfigSkeleton::ItemBool *itemSieveReuseConfig = (KConfigSkeleton::ItemBool *)findItem(QStringLiteral("SieveReuseConfig"));
0034     itemSieveReuseConfig->setDefaultValue(true);
0035 }
0036 
0037 #include "moc_kolabsettings.cpp"