Skip to content

Commit 745526d

Browse files
committed
rename params of virtual methods to match parent class, add missing private cond
1 parent fa92f41 commit 745526d

4 files changed

+18
-6
lines changed

src/gui/layout/qgslayoutmousehandles.cpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
#include <QWidget>
3434
#include <limits>
3535

36+
///@cond PRIVATE
37+
3638
QgsLayoutMouseHandles::QgsLayoutMouseHandles( QgsLayout *layout, QgsLayoutView *view )
3739
: QObject( nullptr )
3840
, QGraphicsRectItem( nullptr )
@@ -53,10 +55,10 @@ QgsLayoutMouseHandles::QgsLayoutMouseHandles( QgsLayout *layout, QgsLayoutView *
5355
layout->addItem( mVerticalSnapLine );
5456
}
5557

56-
void QgsLayoutMouseHandles::paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget )
58+
void QgsLayoutMouseHandles::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget )
5759
{
58-
Q_UNUSED( itemStyle );
59-
Q_UNUSED( pWidget );
60+
Q_UNUSED( option );
61+
Q_UNUSED( widget );
6062

6163
if ( !mLayout->renderContext().isPreviewRender() )
6264
{
@@ -1164,3 +1166,5 @@ void QgsLayoutMouseHandles::resizeMouseMove( QPointF currentPosition, bool lockR
11641166
//show current size of selection in status bar
11651167
mView->pushStatusMessage( tr( "width: %1 mm height: %2 mm" ).arg( rect().width() ).arg( rect().height() ) );
11661168
}
1169+
1170+
///@endcond PRIVATE

src/gui/layout/qgslayoutmousehandles.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class GUI_EXPORT QgsLayoutMouseHandles: public QObject, public QGraphicsRectItem
9898
*/
9999
QgsLayout *layout() { return mLayout; }
100100

101-
void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ) override;
101+
void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr ) override;
102102

103103
//! Finds out which mouse move action to choose depending on the scene cursor position
104104
QgsLayoutMouseHandles::MouseAction mouseActionForScenePos( QPointF sceneCoordPos );

src/gui/layout/qgslayoutreportsectionlabel.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include <QWidget>
2424
#include <QBrush>
2525

26+
///@cond PRIVATE
27+
2628
QgsLayoutReportSectionLabel::QgsLayoutReportSectionLabel( QgsLayout *layout, QgsLayoutView *view )
2729
: QGraphicsRectItem( nullptr )
2830
, mLayout( layout )
@@ -31,8 +33,11 @@ QgsLayoutReportSectionLabel::QgsLayoutReportSectionLabel( QgsLayout *layout, Qgs
3133
setCacheMode( QGraphicsItem::DeviceCoordinateCache );
3234
}
3335

34-
void QgsLayoutReportSectionLabel::paint( QPainter *painter, const QStyleOptionGraphicsItem *, QWidget * )
36+
void QgsLayoutReportSectionLabel::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget )
3537
{
38+
Q_UNUSED( option );
39+
Q_UNUSED( widget );
40+
3641
if ( !mLayout || !mLayout->renderContext().isPreviewRender() )
3742
{
3843
//don't draw label in outputs
@@ -92,3 +97,5 @@ void QgsLayoutReportSectionLabel::setLabel( const QString &label )
9297
mLabel = label;
9398
update();
9499
}
100+
101+
///@endcond PRIVATE

src/gui/layout/qgslayoutreportsectionlabel.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ class GUI_EXPORT QgsLayoutReportSectionLabel: public QGraphicsRectItem
4444
*/
4545
QgsLayoutReportSectionLabel( QgsLayout *layout, QgsLayoutView *view );
4646

47-
void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ) override;
47+
void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr ) override;
4848

49+
//! Sets the \a label.
4950
void setLabel( const QString &label );
5051

5152
private:

0 commit comments

Comments
 (0)