Saves the data to the profile before closing.

def accept( self ):
        """
        Saves the data to the profile before closing.
        """
        if ( not self.uiNameTXT.text() ):
            QMessageBox.information(self,
                                   'Invalid Name',
                                   'You need to supply a name for your layout.')
            return
        
        prof = self.profile()
        if ( not prof ):
            prof = XViewProfile()
        
        prof.setName(nativestring(self.uiNameTXT.text()))
        prof.setVersion(self.uiVersionSPN.value())
        prof.setDescription(nativestring(self.uiDescriptionTXT.toPlainText()))
        prof.setIcon(self.uiIconBTN.filepath())
        
        super(XViewProfileDialog, self).accept()