comparison demos/browser/autosaver.d @ 85:5c8c9c5d9ee1

more porting
author mandel
date Mon, 25 May 2009 14:10:44 +0000
parents 37caa90ce503
children 87bb4e622f9e
comparison
equal deleted inserted replaced
84:2edf95ad41e5 85:5c8c9c5d9ee1
44 import qt.core.QObject; 44 import qt.core.QObject;
45 import qt.core.QBasicTimer; 45 import qt.core.QBasicTimer;
46 import qt.core.QTime; 46 import qt.core.QTime;
47 import qt.core.QDir; 47 import qt.core.QDir;
48 import qt.core.QCoreApplication; 48 import qt.core.QCoreApplication;
49 import qt.core.QMetaObject; 49 //import qt.core.QMetaObject;
50 50
51 import QtDebug; 51 //import QtDebug;
52 52
53 53
54 const uint AUTOSAVE_IN = 1000 * 3; // seconds 54 const uint AUTOSAVE_IN = 1000 * 3; // seconds
55 const uint MAXWAIT = 1000 * 15; // seconds 55 const uint MAXWAIT = 1000 * 15; // seconds
56 56
81 { 81 {
82 if (!m_timer.isActive()) 82 if (!m_timer.isActive())
83 return; 83 return;
84 m_timer.stop(); 84 m_timer.stop();
85 m_firstChange = QTime(); 85 m_firstChange = QTime();
86 if (!QMetaObject.invokeMethod(parent(), "save", Qt.DirectConnection)) { 86
87 qWarning() << "AutoSaver: error invoking slot save() on parent"; 87 //TODO!
88 } 88 //if (!QMetaObject.invokeMethod(parent(), "save", Qt.DirectConnection)) {
89 // qWarning() << "AutoSaver: error invoking slot save() on parent";
90 //}
89 } 91 }
90 92
91 public: 93 public:
92 94
93 void changeOccurred() 95 void changeOccurred()