def fill_items(self):
        self.sobjects = self.sobjects_query_thread.result

        current_widget = self.get_current_widget()
        current_tree_widget = current_widget.resultsTreeWidget

        current_tree_widget.clear()

        current_widget.progress_bar.setVisible(True)
        total_sobjects = len(self.sobjects.keys()) - 1

        for p, sobject in enumerate(self.sobjects.itervalues()):
            item_info = {
                'relates_to': self.parent_ui.relates_to,
                'is_expanded': False,
            }

            gf.add_sobject_item(
                current_tree_widget,
                self.parent_ui,
                sobject,
                self.parent_ui.stype,
                item_info,
                ignore_dict=self.parent_ui.get_process_ignore_list()
            )

            if total_sobjects:
                current_widget.progress_bar.setValue(int(p * 100 / total_sobjects))

        if current_widget.info['state']:
            gf.tree_state_revert(current_tree_widget, current_widget.info['state'])

        current_widget.progress_bar.setVisible(False)
    def update_item_tree(self, item):
        current_widget = self.get_current_widget()
        current_tree_widget = current_widget.resultsTreeWidget
        current_widget.info['state'] = gf.tree_state(current_tree_widget, {})
        current_widget.progress_bar.setVisible(True)

        item.update_items()
        current_widget.update_versions_items(item)

        if current_widget.info['state']:
            gf.tree_state_revert(current_tree_widget, current_widget.info['state'])
        current_widget.progress_bar.setVisible(False)