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

# Cppcheck report - digiKam-nl-search-more-criteria-rev-e2466e0973: ../../core/libs/database/engine/dbengineactiontype.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
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    /* ============================================================
     *
     * This file is a part of digiKam project
     * https://www.digikam.org
     *
     * Date        : 2010-04-20
     * Description : Database Engine container to wrap data types
     *
     * SPDX-FileCopyrightText: 2009-2010 by Holger Foerster <hamsi2k at freenet dot de>
     * SPDX-FileCopyrightText: 2010-2026 by Gilles Caulier <caulier dot gilles at gmail dot com>
     *
     * SPDX-License-Identifier: GPL-2.0-or-later
     *
     * ============================================================ */

    // Local includes

    #include "dbengineactiontype.h"

    namespace Digikam
    {

    class Q_DECL_HIDDEN DbEngineActionType::Private
    {

    public:

        Private() = default;

        bool     isValue    = false;
        QVariant actionValue;
    };

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

    DbEngineActionType::DbEngineActionType(const DbEngineActionType& actionType)
        : d(new Private)
    {
        d->isValue     = actionType.d->isValue;
        d->actionValue = actionType.d->actionValue;
    }

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

    DbEngineActionType DbEngineActionType::value(const QVariant& value)
    {
        DbEngineActionType actionType;
        actionType.setValue(true);
        actionType.setActionValue(value);

        return actionType;
    }

    DbEngineActionType DbEngineActionType::fieldEntry(const QVariant& actionValue)
    {
        DbEngineActionType actionType;
        actionType.setValue(false);
        actionType.setActionValue(actionValue);

        return actionType;
    }

    QVariant DbEngineActionType::getActionValue()
    {
        return d->actionValue;
    }

    void DbEngineActionType::setActionValue(const QVariant& actionValue)
    {
        d->actionValue = actionValue;
    }

    bool DbEngineActionType::isValue() const
    {
        return d->isValue;
    }

    void DbEngineActionType::setValue(bool isValue)<--- Shadow argument
    {
        d->isValue = isValue;
    }

    } // namespace Digikam