@@ -371,9 +371,9 @@ void QgsComposerLegendWidget::on_mTitleFontButton_clicked()
371
371
bool ok;
372
372
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
373
373
// Native Mac dialog works only for Qt Carbon
374
- QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::Title ).font (), 0 , QString (), QFontDialog::DontUseNativeDialog );
374
+ QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::Title ).font (), this , QString (), QFontDialog::DontUseNativeDialog );
375
375
#else
376
- QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::Title ).font () );
376
+ QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::Title ).font (), this );
377
377
#endif
378
378
if ( ok )
379
379
{
@@ -393,9 +393,9 @@ void QgsComposerLegendWidget::on_mGroupFontButton_clicked()
393
393
bool ok;
394
394
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
395
395
// Native Mac dialog works only for Qt Carbon
396
- QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::Group ).font (), 0 , QString (), QFontDialog::DontUseNativeDialog );
396
+ QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::Group ).font (), this , QString (), QFontDialog::DontUseNativeDialog );
397
397
#else
398
- QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::Group ).font () );
398
+ QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::Group ).font (), this );
399
399
#endif
400
400
if ( ok )
401
401
{
@@ -415,9 +415,9 @@ void QgsComposerLegendWidget::on_mLayerFontButton_clicked()
415
415
bool ok;
416
416
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
417
417
// Native Mac dialog works only for Qt Carbon
418
- QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::Subgroup ).font (), 0 , QString (), QFontDialog::DontUseNativeDialog );
418
+ QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::Subgroup ).font (), this , QString (), QFontDialog::DontUseNativeDialog );
419
419
#else
420
- QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::Subgroup ).font () );
420
+ QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::Subgroup ).font (), this );
421
421
#endif
422
422
if ( ok )
423
423
{
@@ -437,9 +437,9 @@ void QgsComposerLegendWidget::on_mItemFontButton_clicked()
437
437
bool ok;
438
438
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
439
439
// Native Mac dialog works only for Qt Carbon
440
- QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::SymbolLabel ).font (), 0 , QString (), QFontDialog::DontUseNativeDialog );
440
+ QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::SymbolLabel ).font (), this , QString (), QFontDialog::DontUseNativeDialog );
441
441
#else
442
- QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::SymbolLabel ).font () );
442
+ QFont newFont = QFontDialog::getFont ( &ok, mLegend ->style ( QgsComposerLegendStyle::SymbolLabel ).font (), this );
443
443
#endif
444
444
if ( ok )
445
445
{
@@ -652,7 +652,7 @@ void QgsComposerLegendWidget::on_mAddToolButton_clicked()
652
652
{
653
653
QList<QgsMapLayer*> layers = canvas->layers ();
654
654
655
- QgsComposerLegendLayersDialog addDialog ( layers );
655
+ QgsComposerLegendLayersDialog addDialog ( layers, this );
656
656
if ( addDialog.exec () == QDialog::Accepted )
657
657
{
658
658
QgsMapLayer* layer = addDialog.selectedLayer ();
0 commit comments