def createPreviewTab(self, version):
        
        previewTab = QMashupViewTab(self.mshpController, version)
#        self.refreshButton = QtGui.QPushButton("Refresh", self)
#        self.refreshButton.setFlat(True)
#        self.refreshButton.setEnabled(False)
#        self.refreshButton.setSizePolicy(QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
#                                                           QtGui.QSizePolicy.Fixed))
        previewApp = self.manager.createMashupApp(self.controller,
                                                  self.mshpController.mshptrail,
                                                  version)
        previewApp.appWasClosed.connect(self.previewTabWasClosed)
        
        layout = QtGui.QVBoxLayout()
        layout.setMargin(0)
        layout.setSpacing(5)
        #layout.addWidget(self.refreshButton, QtCore.Qt.AlignLeft)
        layout.addWidget(previewApp)
        previewTab.setLayout(layout)
        idx = self.stack.addWidget(previewTab)
        previewTab.set_index(idx)
        tab_idx = self.tabBar.addTab(self.mshpController.getMashupName(version)%"Preview: %s")
        previewTab.set_tab_idx(tab_idx)
        self.tab_to_stack_idx[tab_idx] = idx
        closeButton = QMashupViewCloseButton(self.tabBar)
        closeSide = self.tabBar.style().styleHint(
                                   QtGui.QStyle.SH_TabBar_CloseButtonPosition,
                                   None, self.tabBar)
        closeButton.clicked.connect(self.closePreviewTab)
        self.tabBar.setTabButton(tab_idx, closeSide, closeButton)
        self.button_to_tab_idx[closeButton] = tab_idx
        self.tabBar.setCurrentIndex(tab_idx)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/mashups/mashup_view.py/QMashupView.createPreviewTab/swapped operands of `%`