Cppcheck - HTML report - digiKam-nl-search-more-criteria-rev-e2466e0973

# Cppcheck report - digiKam-nl-search-more-criteria-rev-e2466e0973: ../../core/dplugins/generic/tools/htmlgallery/parameters/abstractthemeparameter.cpp

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    /* ============================================================
     *
     * This file is a part of digiKam project
     * https://www.digikam.org
     *
     * Date        : 2006-04-04
     * Description : a tool to generate HTML image galleries
     *
     * SPDX-FileCopyrightText: 2006-2010 by Aurelien Gateau <aurelien dot gateau at free dot fr>
     * SPDX-FileCopyrightText: 2012-2026 by Gilles Caulier <caulier dot gilles at gmail dot com>
     *
     * SPDX-License-Identifier: GPL-2.0-or-later
     *
     * ============================================================ */

    #include "abstractthemeparameter.h"

    // KDE includes

    #include <kconfiggroup.h>

    static const char* NAME_KEY          = "Name";
    static const char* DEFAULT_VALUE_KEY = "Default";

    namespace DigikamGenericHtmlGalleryPlugin
    {

    class Q_DECL_HIDDEN AbstractThemeParameter::Private
    {
    public:

        Private() = default;

        QByteArray internalName;
        QString    name;
        QString    defaultValue;
    };

    AbstractThemeParameter::AbstractThemeParameter()
        : d(new Private)
    {
    }

    AbstractThemeParameter::~AbstractThemeParameter()
    {
        delete d;
    }

    void AbstractThemeParameter::init(const QByteArray& internalName, const KConfigGroup* group)<--- Shadow argument
    {
        d->internalName = internalName;
        d->name         = group->readEntry(NAME_KEY);
        d->defaultValue = group->readEntry(DEFAULT_VALUE_KEY);
    }

    QByteArray AbstractThemeParameter::internalName() const
    {
        return d->internalName;
    }

    QString AbstractThemeParameter::name() const
    {
        return d->name;
    }

    QString AbstractThemeParameter::defaultValue() const
    {
        return d->defaultValue;
    }

    } // namespace DigikamGenericHtmlGalleryPlugin