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

# Cppcheck report - digiKam-nl-search-more-criteria-rev-e2466e0973: ../../core/utilities/geolocation/engine/geodata/data/GeoDataLink.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
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    /* ============================================================
     *
     * This file is a part of digiKam project
     * https://www.digikam.org
     *
     * Date        : 2023-05-15
     * Description : geolocation engine based on Marble.
     *               (c) 2007-2022 Marble Team
     *               https://invent.kde.org/education/marble/-/raw/master/data/credits_authors.html
     *
     * SPDX-FileCopyrightText: 2023-2026 by Gilles Caulier <caulier dot gilles at gmail dot com>
     *
     * SPDX-License-Identifier: LGPL-2.1-or-later
     *
     * ============================================================ */

    #include "GeoDataLink.h"

    // Local includes

    #include "GeoDataTypes.h"

    namespace Marble
    {

    class Q_DECL_HIDDEN GeoDataLinkPrivate
    {
    public:

        QString                         m_href;
        GeoDataLink::RefreshMode        m_refreshMode;
        qreal                           m_refreshInterval;
        GeoDataLink::ViewRefreshMode    m_viewRefreshMode;
        qreal                           m_viewRefreshTime;
        qreal                           m_viewBoundScale;
        QString                         m_viewFormat;
        QString                         m_httpQuery;

        GeoDataLinkPrivate();
    };

    GeoDataLinkPrivate::GeoDataLinkPrivate() :
        m_href(),
        m_refreshMode(GeoDataLink::OnChange),
        m_refreshInterval(4.0),
        m_viewRefreshMode(GeoDataLink::Never),
        m_viewRefreshTime(4.0),
        m_viewBoundScale(1.0),
        m_viewFormat(QLatin1String("BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]")),
        m_httpQuery()
    {
        // nothing to do
    }

    GeoDataLink::GeoDataLink() : d(new GeoDataLinkPrivate)
    {
        // nothing to do
    }

    GeoDataLink::GeoDataLink(const Marble::GeoDataLink& other) :
        GeoDataObject(other), d(new GeoDataLinkPrivate(*other.d))
    {
        // nothing to do
    }

    GeoDataLink& GeoDataLink::operator=(const GeoDataLink& other)
    {
        GeoDataObject::operator=(other);
        *d = *other.d;
        return *this;
    }

    bool GeoDataLink::operator==(const GeoDataLink& other) const
    {
        return equals(other) &&
               d->m_href == other.d->m_href &&
               d->m_refreshMode == other.d->m_refreshMode &&
               d->m_refreshInterval == other.d->m_refreshInterval &&
               d->m_viewRefreshMode == other.d->m_viewRefreshMode &&
               d->m_viewRefreshTime == other.d->m_viewRefreshTime &&
               d->m_viewBoundScale == other.d->m_viewBoundScale &&
               d->m_viewFormat == other.d->m_viewFormat &&
               d->m_httpQuery == other.d->m_httpQuery;
    }

    bool GeoDataLink::operator!=(const GeoDataLink& other) const
    {
        return !this->operator==(other);
    }

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

    const char* GeoDataLink::nodeType() const
    {
        return GeoDataTypes::GeoDataLinkType;
    }

    QString GeoDataLink::href() const
    {
        return d->m_href;
    }

    void GeoDataLink::setHref(const QString& href)<--- Shadow argument
    {
        d->m_href = href;
    }

    GeoDataLink::RefreshMode GeoDataLink::refreshMode() const
    {
        return d->m_refreshMode;
    }

    void GeoDataLink::setRefreshMode(RefreshMode refreshMode)<--- Shadow argument
    {
        d->m_refreshMode = refreshMode;
    }

    qreal GeoDataLink::refreshInterval() const
    {
        return d->m_refreshInterval;
    }

    void GeoDataLink::setRefreshInterval(qreal refreshInterval)<--- Shadow argument
    {
        d->m_refreshInterval = refreshInterval;
    }

    GeoDataLink::ViewRefreshMode GeoDataLink::viewRefreshMode() const
    {
        return d->m_viewRefreshMode;
    }

    void GeoDataLink::setViewRefreshMode(ViewRefreshMode viewRefreshMode)<--- Shadow argument
    {
        d->m_viewRefreshMode = viewRefreshMode;
    }

    qreal GeoDataLink::viewRefreshTime() const
    {
        return d->m_viewRefreshTime;
    }

    void GeoDataLink::setViewRefreshTime(qreal viewRefreshTime)<--- Shadow argument
    {
        d->m_viewRefreshTime = viewRefreshTime;
    }

    qreal GeoDataLink::viewBoundScale() const
    {
        return d->m_viewBoundScale;
    }

    void GeoDataLink::setViewBoundScale(qreal viewBoundScale)<--- Shadow argument
    {
        d->m_viewBoundScale = viewBoundScale;
    }

    QString GeoDataLink::viewFormat() const
    {
        return d->m_viewFormat;
    }

    void GeoDataLink::setViewFormat(const QString& viewFormat)<--- Shadow argument
    {
        d->m_viewFormat = viewFormat;
    }

    QString GeoDataLink::httpQuery() const
    {
        return d->m_httpQuery;
    }
    void GeoDataLink::setHttpQuery(const QString& httpQuery)<--- Shadow argument
    {
        d->m_httpQuery = httpQuery;
    }

    } // namespace Marble