void QsciEditor::timerEvent( QTimerEvent *tEvent ) { if ( tEvent->timerId() == autoSaveTimer->timerId() ) { autoSaveTimer->stop(); if ( not isModified() ) { autoSaveTimer->start( 60000, this ); tEvent->accept(); } else { /* If we have no name for the file, return */ if ( mFilePath.isEmpty() ) return; saveFile(); emit autoSaved(); tEvent->accept(); } } };
void ScribusWin::slotSaved(QString newName) { setWindowTitle(QDir::toNativeSeparators(newName)); qApp->processEvents(); emit autoSaved(); //TODO: to update the main window title, do this from the doc? }