summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 3feb4ab..a2c20a8 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -261,2 +261,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
+ connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
+ connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
@@ -1449,2 +1451,3 @@ void MainWindow::slotModifiedChanged( bool changed )
return;
+
int msec;
@@ -1460,4 +1463,16 @@ void MainWindow::slotModifiedChanged( bool changed )
}
+void MainWindow::saveStopTimer()
+{
+ mSaveTimer.stop();
+ if (mSaveTimer.isActive() )
+ qDebug("ti active ");
+ else
+ qDebug("KO: Save timer stopped");
+}
void MainWindow::save()
{
+ if ( !mCalendarModifiedFlag ) {
+ qDebug("KO: Calendar not modified. Nothing saved.");
+ return;
+ }
if ( mSyncManager->blockSave() )
@@ -1466,3 +1481,2 @@ void MainWindow::save()
if ( mView->checkFileVersion( defaultFileName()) ) {
-
QTime neededSaveTime = QDateTime::currentDateTime().time();
@@ -1471,3 +1485,3 @@ void MainWindow::save()
mView->saveCalendar( defaultFileName() );
-
+ mCalendarModifiedFlag = false;
int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
@@ -1479,3 +1493,2 @@ void MainWindow::save()
setCaption(i18n("Saving cancelled!"));
- mCalendarModifiedFlag = false;
mSyncManager->setBlockSave( false );