Removes the given profile from the toolbar.
        
        :param      profile | <projexui.widgets.xviewwidget.XViewProfile>

def removeProfile(self, profile, silent=False):
        """
        Removes the given profile from the toolbar.
        
        :param      profile | <projexui.widgets.xviewwidget.XViewProfile>
        """
        if not profile:
            return
        
        if not silent:
            title = 'Remove {0}'.format(self.profileText())
            opts  = QMessageBox.Yes | QMessageBox.No
            quest = 'Are you sure you want to remove "%s" from the toolbar?'
            quest %= profile.name() if isinstance(profile, XViewProfile) else profile
            answer = QMessageBox.question(self.window(), title, quest, opts)
        else:
            answer = QMessageBox.Yes
        
        if answer == QMessageBox.Yes:
            reset = profile == self.currentProfile()
            if not reset:
                try:
                    reset = profile == self.currentProfile().name()
                except AttributeError:
                    reset = False
            
            if reset and self.viewWidget():
                self.viewWidget().reset(True)
            
            # remove the actions from this toolbar
            removed = []
            for act in self.actions():
                if not isinstance(act, XViewProfileAction):
                    continue
                if not profile in (act.profile(), act.text()):
                    continue
                
                removed.append(act.profile())
                self.removeAction(act)
                self._profileGroup.removeAction(act)
                act.deleteLater()
            
            if not self.signalsBlocked() and removed:
                for prof in removed:
                    self.profileRemoved.emit(prof)
                self.profilesChanged.emit()