eric6/Utilities/AutoSaver.py

changeset 8218
7c09585bd960
parent 7923
91e843545d9a
equal deleted inserted replaced
8217:385f60c94548 8218:7c09585bd960
23 23
24 @param parent reference to the parent object (QObject) 24 @param parent reference to the parent object (QObject)
25 @param save slot to be called to perform the save operation 25 @param save slot to be called to perform the save operation
26 @exception RuntimeError raised, if no parent is given 26 @exception RuntimeError raised, if no parent is given
27 """ 27 """
28 super(AutoSaver, self).__init__(parent) 28 super().__init__(parent)
29 29
30 if parent is None: 30 if parent is None:
31 raise RuntimeError("AutoSaver: parent must not be None.") 31 raise RuntimeError("AutoSaver: parent must not be None.")
32 32
33 self.__save = save 33 self.__save = save
54 @param evt reference to the timer event (QTimerEvent) 54 @param evt reference to the timer event (QTimerEvent)
55 """ 55 """
56 if evt.timerId() == self.__timer.timerId(): 56 if evt.timerId() == self.__timer.timerId():
57 self.saveIfNeccessary() 57 self.saveIfNeccessary()
58 else: 58 else:
59 super(AutoSaver, self).timerEvent(evt) 59 super().timerEvent(evt)
60 60
61 def saveIfNeccessary(self): 61 def saveIfNeccessary(self):
62 """ 62 """
63 Public method to activate the save operation. 63 Public method to activate the save operation.
64 """ 64 """

eric ide

mercurial