summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Unidiff
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) :
261 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); 261 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
262 connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
263 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
262 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 264 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
@@ -1449,2 +1451,3 @@ void MainWindow::slotModifiedChanged( bool changed )
1449 return; 1451 return;
1452
1450 int msec; 1453 int msec;
@@ -1460,4 +1463,16 @@ void MainWindow::slotModifiedChanged( bool changed )
1460} 1463}
1464void MainWindow::saveStopTimer()
1465{
1466 mSaveTimer.stop();
1467 if (mSaveTimer.isActive() )
1468 qDebug("ti active ");
1469 else
1470 qDebug("KO: Save timer stopped");
1471}
1461void MainWindow::save() 1472void MainWindow::save()
1462{ 1473{
1474 if ( !mCalendarModifiedFlag ) {
1475 qDebug("KO: Calendar not modified. Nothing saved.");
1476 return;
1477 }
1463 if ( mSyncManager->blockSave() ) 1478 if ( mSyncManager->blockSave() )
@@ -1466,3 +1481,2 @@ void MainWindow::save()
1466 if ( mView->checkFileVersion( defaultFileName()) ) { 1481 if ( mView->checkFileVersion( defaultFileName()) ) {
1467
1468 QTime neededSaveTime = QDateTime::currentDateTime().time(); 1482 QTime neededSaveTime = QDateTime::currentDateTime().time();
@@ -1471,3 +1485,3 @@ void MainWindow::save()
1471 mView->saveCalendar( defaultFileName() ); 1485 mView->saveCalendar( defaultFileName() );
1472 1486 mCalendarModifiedFlag = false;
1473 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 1487 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
@@ -1479,3 +1493,2 @@ void MainWindow::save()
1479 setCaption(i18n("Saving cancelled!")); 1493 setCaption(i18n("Saving cancelled!"));
1480 mCalendarModifiedFlag = false;
1481 mSyncManager->setBlockSave( false ); 1494 mSyncManager->setBlockSave( false );