From 8504d70e0805d333fed65263e892b74b0c8668df Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Fri, 21 Dec 2012 15:08:30 +0100 Subject: [PATCH] python gui sample: properly fix the double connect issue --- src/python/samples/recollgui/qrecoll.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/python/samples/recollgui/qrecoll.py b/src/python/samples/recollgui/qrecoll.py index 1a25ffb0..0586e431 100755 --- a/src/python/samples/recollgui/qrecoll.py +++ b/src/python/samples/recollgui/qrecoll.py @@ -14,7 +14,7 @@ import rclmain from getopt import getopt from PyQt4 import QtCore, QtGui - +from PyQt4.QtCore import pyqtSlot #################### # Highlighting methods. Just for showing the groups usage, we add the @@ -187,11 +187,9 @@ class RclGui_Main(QtGui.QMainWindow): else: self.ui.savePB.setEnabled(False) - # The 'checked' thing is to work around a bug in pyqt? - def on_previewPB_clicked(self, checked=True): - print "on_previewPB_clicked(self, %s):" % (repr(checked)) - if checked: - return + @pyqtSlot() + def on_previewPB_clicked(self): + print "on_previewPB_clicked(self)" newdoc = textextract(self.currentdoc) query = self.qmodel.query; groups = query.getgroups() @@ -209,11 +207,9 @@ class RclGui_Main(QtGui.QMainWindow): text += '' self.ui.resDetail.setText(text) - # The 'checked' thing is to work around a bug in pyqt? - def on_savePB_clicked(self, checked=True): - print "on_savePB_clicked(self, %s):" % (repr(checked)) - if checked: - return + @pyqtSlot() + def on_savePB_clicked(self): + print "on_savePB_clicked(self)" doc = self.currentdoc ipath = doc.ipath if not ipath: