mirror of
https://github.com/KDE/konsole.git
synced 2026-05-05 05:07:06 -04:00
Assign new value to _tempProfile in a way clearly indicating its type.
This avoids potential doubt about its type and memory leak.
This commit is contained in:
@@ -90,7 +90,7 @@ EditProfileDialog::EditProfileDialog(QWidget* parent)
|
||||
connect( _ui->tabWidget , SIGNAL(currentChanged(int)) , this ,
|
||||
SLOT(preparePage(int)) );
|
||||
|
||||
_tempProfile = new Profile;
|
||||
_tempProfile = Profile::Ptr(new Profile);
|
||||
_tempProfile->setHidden(true);
|
||||
}
|
||||
EditProfileDialog::~EditProfileDialog()
|
||||
@@ -113,7 +113,7 @@ void EditProfileDialog::save()
|
||||
_previewedProperties.remove(iter.key());
|
||||
}
|
||||
|
||||
_tempProfile = new Profile ;
|
||||
_tempProfile = Profile::Ptr(new Profile);
|
||||
_tempProfile->setHidden(true);
|
||||
enableButtonApply(false);
|
||||
}
|
||||
@@ -178,7 +178,7 @@ void EditProfileDialog::setProfile(Profile::Ptr profile)
|
||||
|
||||
if ( _tempProfile )
|
||||
{
|
||||
_tempProfile = new Profile;
|
||||
_tempProfile = Profile::Ptr(new Profile);
|
||||
}
|
||||
}
|
||||
const Profile::Ptr EditProfileDialog::lookupProfile() const
|
||||
|
||||
Reference in New Issue
Block a user