@@ -1304,7 +1304,7 @@ void QgsLayoutDesignerDialog::saveAsTemplate()
1304
1304
context.setPathResolver ( QgsProject::instance ()->pathResolver () );
1305
1305
if ( !currentLayout ()->saveAsTemplate ( saveFileName, context ) )
1306
1306
{
1307
- QMessageBox::warning ( nullptr , tr ( " Save template" ), tr ( " Error creating template file." ) );
1307
+ QMessageBox::warning ( this , tr ( " Save template" ), tr ( " Error creating template file." ) );
1308
1308
}
1309
1309
}
1310
1310
@@ -1444,7 +1444,7 @@ void QgsLayoutDesignerDialog::exportToRaster()
1444
1444
1445
1445
if ( memuse > 400 ) // about 4500x4500
1446
1446
{
1447
- int answer = QMessageBox::warning ( nullptr , tr ( " Export layout" ),
1447
+ int answer = QMessageBox::warning ( this , tr ( " Export layout" ),
1448
1448
tr ( " To create an image of %1x%2 requires about %3 MB of memory. Proceed?" )
1449
1449
.arg ( width ).arg ( height ).arg ( memuse ),
1450
1450
QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok );
@@ -1548,7 +1548,7 @@ void QgsLayoutDesignerDialog::exportToRaster()
1548
1548
break ;
1549
1549
1550
1550
case QgsLayoutExporter::MemoryError:
1551
- QMessageBox::warning ( nullptr , tr ( " Memory Allocation Error" ),
1551
+ QMessageBox::warning ( this , tr ( " Memory Allocation Error" ),
1552
1552
tr ( " Trying to create image %1 (%2×%3 @ %4dpi ) "
1553
1553
" resulted in a memory overflow.\n\n "
1554
1554
" Please try a lower resolution or a smaller paper size." )
@@ -1657,7 +1657,7 @@ void QgsLayoutDesignerDialog::exportToPdf()
1657
1657
1658
1658
1659
1659
case QgsLayoutExporter::MemoryError:
1660
- QMessageBox::warning ( nullptr , tr ( " Memory Allocation Error" ),
1660
+ QMessageBox::warning ( this , tr ( " Memory Allocation Error" ),
1661
1661
tr ( " Exporting the PDF "
1662
1662
" resulted in a memory overflow.\n\n "
1663
1663
" Please try a lower resolution or a smaller paper size." ),
0 commit comments