KBookmarks

kbookmarksettings.cpp
1// -*- c-basic-offset:4; indent-tabs-mode:nil -*-
2/*
3 This file is part of the KDE libraries
4 SPDX-FileCopyrightText: 2000 David Faure <faure@kde.org>
5 SPDX-FileCopyrightText: 2003 Alexander Kellett <lypanov@kde.org>
6 SPDX-FileCopyrightText: 2008 Norbert Frese <nf2@scheinwelt.at>
7
8 SPDX-License-Identifier: LGPL-2.0-only
9*/
10
11#include "kbookmarksettings_p.h"
12
13#include <KConfig>
14#include <KConfigGroup>
15
16KBookmarkSettings *KBookmarkSettings::s_self = nullptr;
17
18void KBookmarkSettings::readSettings()
19{
20 KConfig config(QStringLiteral("kbookmarkrc"), KConfig::NoGlobals);
21 KConfigGroup cg(&config, QStringLiteral("Bookmarks"));
22
23 // add bookmark dialog usage - no reparse
24 s_self->m_advancedaddbookmark = cg.readEntry("AdvancedAddBookmarkDialog", false);
25
26 // this one alters the menu, therefore it needs a reparse
27 s_self->m_contextmenu = cg.readEntry("ContextMenuActions", true);
28}
29
30KBookmarkSettings *KBookmarkSettings::self()
31{
32 if (!s_self) {
33 s_self = new KBookmarkSettings;
34 readSettings();
35 }
36 return s_self;
37}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:55:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.