author | zautrix <zautrix> | 2005-02-03 00:01:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-03 00:01:07 (UTC) |
commit | ca3c58c09b1b7d2733eeacc9e8ca568134926e93 (patch) (side-by-side diff) | |
tree | dbee3bfe638d1ae44288ae6c209e014e40206c0d /korganizer/mainwindow.cpp | |
parent | 279354f19275e5e654636acb87c465edf652eeae (diff) | |
download | kdepimpi-ca3c58c09b1b7d2733eeacc9e8ca568134926e93.zip kdepimpi-ca3c58c09b1b7d2733eeacc9e8ca568134926e93.tar.gz kdepimpi-ca3c58c09b1b7d2733eeacc9e8ca568134926e93.tar.bz2 |
tz fixes
-rw-r--r-- | korganizer/mainwindow.cpp | 19 |
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 ); |