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

# Cppcheck report - digiKam-nl-search-more-criteria-rev-e2466e0973: ../../core/dplugins/generic/webservices/mediawiki/backend/mediawiki_protection.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
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
    100
    101
    102
    103
    104
    105
    106
    107
    /* ============================================================
     *
     * This file is a part of digiKam project
     * https://www.digikam.org
     *
     * Date        : 2011-03-22
     * Description : a Mediawiki C++ interface
     *
     * SPDX-FileCopyrightText: 2011-2026 by Gilles Caulier <caulier dot gilles at gmail dot com>
     * SPDX-FileCopyrightText: 2011      by Vincent Garcia <xavier dot vincent dot garcia at gmail dot com>
     *
     * SPDX-License-Identifier: GPL-2.0-or-later
     *
     * ============================================================ */

    #include "mediawiki_protection.h"

    // C++ includes

    #include <algorithm>

    namespace MediaWiki
    {

    class Q_DECL_HIDDEN Protection::Private
    {
    public:

        QString type;
        QString level;
        QString expiry;
        QString source;
    };

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

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

    Protection::Protection(const Protection& other)
        : d(new Private(*(other.d)))
    {
    }

    Protection& Protection::operator=(const Protection& other)
    {
        *d = *other.d;

        return *this;
    }

    bool Protection::operator==(const Protection& other) const
    {
        return (
                (type()   == other.type())   &&
                (level()  == other.level())  &&
                (expiry() == other.expiry()) &&
                (source() == other.source())
               );
    }

    void Protection::setType(const QString& type)<--- Shadow argument
    {
        d->type = type;
    }

    QString Protection::type() const
    {
        return d->type;
    }

    void Protection::setLevel(const QString& level)<--- Shadow argument
    {
        d->level = level;
    }

    QString Protection::level() const
    {
        return d->level;
    }

    void Protection::setExpiry(const QString& expiry)<--- Shadow argument
    {
        d->expiry = expiry;
    }

    QString Protection::expiry() const
    {
        return d->expiry;
    }

    void Protection::setSource(const QString& source)<--- Shadow argument
    {
        d->source = source;
    }

    QString Protection::source() const
    {
        return d->source;
    }

    } // namespace MediaWiki