From 11e8703ed1c11f2fd0548aec388258ec1e071e53 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Tue, 28 Jan 2014 02:02:47 +0000 Subject: [PATCH] Change dialog box call and clean unused code --- source/ConfigureResolutionDialog.cpp | 5 ++--- source/ImageInterface.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/source/ConfigureResolutionDialog.cpp b/source/ConfigureResolutionDialog.cpp index 66a2abb..5443526 100755 --- a/source/ConfigureResolutionDialog.cpp +++ b/source/ConfigureResolutionDialog.cpp @@ -34,9 +34,6 @@ ConfigureResolutionDialog::ConfigureResolutionDialog( QWidget *parent ) : setStandardResolutionSizes(); - if( objectName().isEmpty() ) - setObjectName( QStringLiteral( "ConfigureResolution" ) ); - // Config dialog setObjectName( QStringLiteral( "ConfigureResolution" ) ); @@ -162,6 +159,8 @@ ConfigureResolutionDialog::ConfigureResolutionDialog( QWidget *parent ) : connect( dialogButtonOkCancel, SIGNAL( accepted() ), this, SLOT( accept() ) ); connect( dialogButtonOkCancel, SIGNAL( rejected() ), this, SLOT( reject() ) ); + QMetaObject::connectSlotsByName(this); + } void ConfigureResolutionDialog::StandardResolutionSelection() diff --git a/source/ImageInterface.cpp b/source/ImageInterface.cpp index 825355d..6c5750a 100644 --- a/source/ImageInterface.cpp +++ b/source/ImageInterface.cpp @@ -72,7 +72,7 @@ bool ImageInterface::loadFile( const QString &fileName ) { QApplication::setOverrideCursor( Qt::WaitCursor ); - ConfigureResolutionDialog resolutionDialog; + ConfigureResolutionDialog resolutionDialog(this); if( resolutionDialog.exec() == QDialog::Rejected ) {