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

# Cppcheck report - digiKam-nl-search-more-criteria-rev-e2466e0973: ../../core/libs/widgets/graphicsview/regionframeitem_properties.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
    /* ============================================================
     *
     * This file is a part of digiKam project
     * https://www.digikam.org
     *
     * Date        : 2010-09-09
     * Description : tag region frame
     *
     * SPDX-FileCopyrightText: 2007      by Aurelien Gateau <agateau at kde dot org>
     * SPDX-FileCopyrightText: 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
     *
     * SPDX-License-Identifier: GPL-2.0-or-later
     *
     * ============================================================ */

    #include "regionframeitem_p.h"

    namespace Digikam
    {

    void RegionFrameItem::setFlags(Flags flags)<--- Shadow argument
    {
        if (d->flags == flags)
        {
            return;
        }

        d->flags = flags;
        update();
        setAcceptHoverEvents(d->flags & GeometryEditable);
        d->resizeHandleVisibility->controller()->setShallBeShown(d->flags & ShowResizeHandles);

        // ensure cursor is reset

        CropHandle handle = d->handleAt(QCursor::pos());
        d->updateCursor(handle, false/* buttonDown*/);
    }

    void RegionFrameItem::changeFlags(Flags flags, bool addOrRemove)<--- Shadow argument
    {
        if (addOrRemove)
        {
            setFlags(d->flags | flags);
        }
        else
        {
            setFlags(d->flags & ~flags);
        }
    }

    RegionFrameItem::Flags RegionFrameItem::flags() const
    {
        return d->flags;
    }

    void RegionFrameItem::setFixedRatio(double ratio)
    {
        d->fixedRatio = ratio;
    }

    void RegionFrameItem::setRectInSceneCoordinatesAdjusted(const QRectF& rect)
    {
        setRectInSceneCoordinates(d->keepRectInsideImage(rect, false));
    }

    void RegionFrameItem::setViewportRect(const QRectF& rect)
    {
        d->viewportRect = rect;
        d->updateHudWidgetPosition();
    }

    } // namespace Digikam