summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp38
-rw-r--r--korganizer/calendarview.h4
-rw-r--r--korganizer/mainwindow.cpp4
3 files changed, 13 insertions, 33 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 04051a2..0c35bb3 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -699,9 +699,4 @@ void CalendarView::createPrinter()
}
-void CalendarView::confSync()
-{
- //DELETE
-}
-
//KOPrefs::instance()->mWriteBackFile
@@ -1202,4 +1197,5 @@ void CalendarView::setSyncName( QString s )
bool CalendarView::syncCalendar(QString filename, int mode)
{
+ //qDebug("syncCalendar %s ", filename.latin1());
mGlobalSyncMode = SYNC_MODE_NORMAL;
CalendarLocal* calendar = new CalendarLocal();
@@ -1228,8 +1224,5 @@ bool CalendarView::syncCalendar(QString filename, int mode)
return syncOK;
}
-void CalendarView::syncPhone()
-{
- //DELETE
-}
+
void CalendarView::syncExternal( int mode )
{
@@ -1314,10 +1307,4 @@ void CalendarView::syncExternal( int mode )
}
-void CalendarView::syncSharp()
-{
- //DELETE
-
-}
-
bool CalendarView::importBday()
@@ -1590,8 +1577,11 @@ bool CalendarView::openCalendar(QString filename, bool merge)
updateUnmanagedViews();
updateView();
- setLoadedFileVersion( QDateTime::currentDateTime().addSecs( -1 ));
if ( filename != MainWindow::defaultFileName() ) {
saveCalendar( MainWindow::defaultFileName() );
- watchSavedFile();
+ } else {
+ QFileInfo finf ( MainWindow::defaultFileName());
+ if ( finf.exists() ) {
+ setLoadedFileVersion( finf.lastModified () );
+ }
}
return true;
@@ -1690,6 +1680,6 @@ bool CalendarView::saveCalendar( QString filename )
mViewManager->currentView()->flushView();
- //mStorage->setFileName( filename );
-
+
+ QDateTime lfv = QDateTime::currentDateTime().addSecs( -2);
mStorage->setSaveFormat( new ICalFormat() );
mStorage->setFileName( filename );
@@ -1699,5 +1689,8 @@ bool CalendarView::saveCalendar( QString filename )
return false;
}
-
+ if ( filename == MainWindow::defaultFileName() ) {
+ setLoadedFileVersion( lfv );
+ watchSavedFile();
+ }
return true;
}
@@ -2183,9 +2176,4 @@ void CalendarView::edit_options()
//writeSettings();
}
-void CalendarView::edit_sync_options()
-{
- // DELETE
-
-}
void CalendarView::slotSelectPickerDate( QDate d)
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 751b8d9..660cce7 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -321,5 +321,4 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
/** edit viewing and configuration options. */
void edit_options();
- void edit_sync_options();
/**
Functions for printing, previewing a print, and setting up printing
@@ -437,6 +436,4 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
const QString &datebookFile,
const QString &tasklistFile );
- void syncSharp( );
- void syncPhone( );
void syncExternal( int mode );
void slotSelectPickerDate( QDate ) ;
@@ -467,5 +464,4 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
virtual bool syncExternal(KSyncManager* manager, QString resource);
- void confSync();
void setSyncManager(KSyncManager* manager);
void setLoadedFileVersion(QDateTime);
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index c7ce8cb..2d17986 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1385,9 +1385,7 @@ void MainWindow::save()
setCaption(i18n("KO/Pi:Saving Data to File ..." ));
qDebug("KO: Start saving data to file!");
- mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
mView->saveCalendar( defaultFileName() );
int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
- mView->watchSavedFile();
qDebug("KO: Needed %d ms for saving.",msNeeded );
QString savemes;
@@ -1822,8 +1820,6 @@ void MainWindow::getFile( bool success )
return;
}
- mView->watchSavedFile();
mView->openCalendar( defaultFileName() );
setCaption( i18n("Pi-Sync successful!") );
-
}