@@ -246,7 +246,7 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
246
246
247
247
connect ( mActionOptions , &QAction::triggered, this , [ = ]
248
248
{
249
- QgisApp::instance ()->showOptionsDialog ( this , QString ( " mOptionsPageComposer" ) );
249
+ QgisApp::instance ()->showOptionsDialog ( this , QStringLiteral ( " mOptionsPageComposer" ) );
250
250
} );
251
251
252
252
mView = new QgsLayoutView ();
@@ -322,7 +322,7 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
322
322
mActionsToolbar ->addWidget ( resizeToolButton );
323
323
324
324
QToolButton *atlasExportToolButton = new QToolButton ( mAtlasToolbar );
325
- atlasExportToolButton->setIcon ( QgsApplication::getThemeIcon ( " mActionExport.svg" ) );
325
+ atlasExportToolButton->setIcon ( QgsApplication::getThemeIcon ( QStringLiteral ( " mActionExport.svg" ) ) );
326
326
atlasExportToolButton->setPopupMode ( QToolButton::InstantPopup );
327
327
atlasExportToolButton->setAutoRaise ( true );
328
328
atlasExportToolButton->setToolButtonStyle ( Qt::ToolButtonIconOnly );
@@ -1462,7 +1462,7 @@ void QgsLayoutDesignerDialog::updateStatusZoom()
1462
1462
zoomLevel = mView ->transform ().m11 () * 100 / scale100;
1463
1463
}
1464
1464
whileBlocking ( mStatusZoomCombo )->lineEdit ()->setText ( tr ( " %1%" ).arg ( zoomLevel, 0 , ' f' , 1 ) );
1465
- whileBlocking ( mStatusZoomSlider )->setValue ( zoomLevel );
1465
+ whileBlocking ( mStatusZoomSlider )->setValue ( static_cast < int >( zoomLevel ) );
1466
1466
}
1467
1467
1468
1468
void QgsLayoutDesignerDialog::updateStatusCursorPos ( QPointF position )
@@ -1544,7 +1544,7 @@ void QgsLayoutDesignerDialog::dockVisibilityChanged( bool visible )
1544
1544
}
1545
1545
}
1546
1546
1547
- void QgsLayoutDesignerDialog::undoRedoOccurredForItems ( const QSet<QString> itemUuids )
1547
+ void QgsLayoutDesignerDialog::undoRedoOccurredForItems ( const QSet<QString> & itemUuids )
1548
1548
{
1549
1549
mBlockItemOptions = true ;
1550
1550
@@ -2327,7 +2327,7 @@ void QgsLayoutDesignerDialog::printAtlas()
2327
2327
progressDialog->setWindowTitle ( tr ( " Printing Atlas" ) );
2328
2328
connect ( feedback.get (), &QgsFeedback::progressChanged, this , [ & ]( double progress )
2329
2329
{
2330
- progressDialog->setValue ( progress );
2330
+ progressDialog->setValue ( static_cast < int >( progress ) );
2331
2331
progressDialog->setLabelText ( feedback->property ( " progress" ).toString () ) ;
2332
2332
2333
2333
#ifdef Q_OS_LINUX
@@ -2498,7 +2498,7 @@ void QgsLayoutDesignerDialog::exportAtlasToRaster()
2498
2498
progressDialog->setWindowTitle ( tr ( " Exporting Atlas" ) );
2499
2499
connect ( feedback.get (), &QgsFeedback::progressChanged, this , [ & ]( double progress )
2500
2500
{
2501
- progressDialog->setValue ( progress );
2501
+ progressDialog->setValue ( static_cast < int >( progress ) );
2502
2502
progressDialog->setLabelText ( feedback->property ( " progress" ).toString () ) ;
2503
2503
2504
2504
#ifdef Q_OS_LINUX
@@ -2649,7 +2649,7 @@ void QgsLayoutDesignerDialog::exportAtlasToSvg()
2649
2649
progressDialog->setWindowTitle ( tr ( " Exporting Atlas" ) );
2650
2650
connect ( feedback.get (), &QgsFeedback::progressChanged, this , [ & ]( double progress )
2651
2651
{
2652
- progressDialog->setValue ( progress );
2652
+ progressDialog->setValue ( static_cast < int >( progress ) );
2653
2653
progressDialog->setLabelText ( feedback->property ( " progress" ).toString () ) ;
2654
2654
2655
2655
#ifdef Q_OS_LINUX
@@ -2856,7 +2856,7 @@ void QgsLayoutDesignerDialog::exportAtlasToPdf()
2856
2856
progressDialog->setWindowTitle ( tr ( " Exporting Atlas" ) );
2857
2857
connect ( feedback.get (), &QgsFeedback::progressChanged, this , [ & ]( double progress )
2858
2858
{
2859
- progressDialog->setValue ( progress );
2859
+ progressDialog->setValue ( static_cast < int >( progress ) );
2860
2860
progressDialog->setLabelText ( feedback->property ( " progress" ).toString () ) ;
2861
2861
2862
2862
#ifdef Q_OS_LINUX
@@ -3499,12 +3499,12 @@ void QgsLayoutDesignerDialog::restoreWindowState()
3499
3499
3500
3500
if ( !restoreState ( settings.value ( QStringLiteral ( " LayoutDesigner/state" ), QByteArray::fromRawData ( reinterpret_cast < const char * >( defaultLayerDesignerUIstate ), sizeof defaultLayerDesignerUIstate ), QgsSettings::App ).toByteArray () ) )
3501
3501
{
3502
- QgsDebugMsg ( " restore of layout UI state failed" );
3502
+ QgsDebugMsg ( QStringLiteral ( " restore of layout UI state failed" ) );
3503
3503
}
3504
3504
// restore window geometry
3505
3505
if ( !restoreGeometry ( settings.value ( QStringLiteral ( " LayoutDesigner/geometry" ), QgsSettings::App ).toByteArray () ) )
3506
3506
{
3507
- QgsDebugMsg ( " restore of layout UI geometry failed" );
3507
+ QgsDebugMsg ( QStringLiteral ( " restore of layout UI geometry failed" ) );
3508
3508
// default to 80% of screen size, at 10% from top left corner
3509
3509
resize ( QDesktopWidget ().availableGeometry ( this ).size () * 0.8 );
3510
3510
QSize pos = QDesktopWidget ().availableGeometry ( this ).size () * 0.1 ;
@@ -3727,11 +3727,11 @@ bool QgsLayoutDesignerDialog::showFileSizeWarning()
3727
3727
// Image size
3728
3728
double oneInchInLayoutUnits = mLayout ->convertToLayoutUnits ( QgsLayoutMeasurement ( 1 , QgsUnitTypes::LayoutInches ) );
3729
3729
QSizeF maxPageSize = mLayout ->pageCollection ()->maximumPageSize ();
3730
- int width = ( int ) ( mLayout ->renderContext ().dpi () * maxPageSize.width () / oneInchInLayoutUnits );
3731
- int height = ( int ) ( mLayout ->renderContext ().dpi () * maxPageSize.height () / oneInchInLayoutUnits );
3730
+ int width = static_cast < int > ( mLayout ->renderContext ().dpi () * maxPageSize.width () / oneInchInLayoutUnits );
3731
+ int height = static_cast < int > ( mLayout ->renderContext ().dpi () * maxPageSize.height () / oneInchInLayoutUnits );
3732
3732
int memuse = width * height * 3 / 1000000 ; // pixmap + image
3733
- QgsDebugMsg ( QString ( " Image %1x%2" ).arg ( width ).arg ( height ) );
3734
- QgsDebugMsg ( QString ( " memuse = %1" ).arg ( memuse ) );
3733
+ QgsDebugMsg ( QStringLiteral ( " Image %1x%2" ).arg ( width ).arg ( height ) );
3734
+ QgsDebugMsg ( QStringLiteral ( " memuse = %1" ).arg ( memuse ) );
3735
3735
3736
3736
if ( memuse > 400 ) // about 4500x4500
3737
3737
{
@@ -4165,7 +4165,7 @@ void QgsLayoutDesignerDialog::updateWindowTitle()
4165
4165
setWindowTitle ( title );
4166
4166
}
4167
4167
4168
- void QgsLayoutDesignerDialog::selectItems ( const QList<QgsLayoutItem *> items )
4168
+ void QgsLayoutDesignerDialog::selectItems ( const QList<QgsLayoutItem *> & items )
4169
4169
{
4170
4170
for ( QGraphicsItem *item : items )
4171
4171
{
0 commit comments