-rw-r--r-- | korganizer/calendarview.cpp | 29 | ||||
-rw-r--r-- | libkcal/dndfactory_dummy.h | 5 | ||||
-rw-r--r-- | libkdepim/categoryeditdialog.h | 4 | ||||
-rw-r--r-- | libkdepim/categoryselectdialog.cpp | 1 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 9 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.h | 2 |
6 files changed, 32 insertions, 18 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 9571f16..8d024c1 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1,13 +1,13 @@ /* This file is part of KOrganizer. Requires the Qt and KDE widget libraries, available at no cost at http://www.troll.no and http://www.kde.org respectively - Copyright (c) 1997, 1998, 1999 + Copyright (c) savecale1997, 1998, 1999 Preston Brown (preton.brown@yale.edu) Fester Zigterman (F.J.F.ZigtermanRustenburg@student.utwente.nl) Ian Dawes (iadawes@globalserve.net) Laszlo Boloni (boloni@cs.purdue.edu) Copyright (c) 2000, 2001, 2002 @@ -776,12 +776,14 @@ void CalendarView::setCalReadOnly( int id, bool readO ) mCalendar->setReadOnly( id, readO ); } void CalendarView::setScrollBarStep(int val ) { #ifdef DESKTOP_VERSION mDateScrollBar->setLineStep ( val ); +#else + Q_UNUSED( val ); #endif } void CalendarView::scrollBarValue(int val ) { #ifdef DESKTOP_VERSION if ( QApplication::desktop()->width() < 800 ) return; @@ -802,12 +804,14 @@ void CalendarView::scrollBarValue(int val ) return; } int year = mNavigator->selectedDates().first().year(); QDate d ( year,1,1 ); mNavigator->selectDates( d.addDays( stepdays-1) , count ); flag_blockScrollBar = false; +#else + Q_UNUSED( val ); #endif } void CalendarView::updateView(const QDate &start, const QDate &end) { #ifdef DESKTOP_VERSION @@ -1599,12 +1603,13 @@ void CalendarView::checkExternalId( Incidence * inc ) QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; checkExternSyncEvent( lastSync, inc ); } bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) { + bool syncOK = true; int addedEvent = 0; int addedEventR = 0; int deletedEventR = 0; int deletedEventL = 0; int changedLocal = 0; @@ -1729,13 +1734,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); else idS = inR->IDStr(); int calID = inR->calID(); remote->deleteIncidence( inR ); inR = inL->clone(); - inR->setCalID( calID ); + inR->setCalID_block( calID ); inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) inR->setIDStr( idS ); remote->addIncidence( inR ); if ( mSyncManager->syncWithDesktop() ) inR->setPilotId( 2 ); @@ -1744,13 +1749,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int if ( !inL->isReadOnly() ) { idS = inL->IDStr(); int pid = inL->pilotId(); int calID = inL->calID(); local->deleteIncidence( inL ); inL = inR->clone(); - inL->setCalID( calID ); + inL->setCalID_block( calID ); if ( mSyncManager->syncWithDesktop() ) inL->setPilotId( pid ); inL->setIDStr( idS ); if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); @@ -1775,23 +1780,23 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int inR->setLastModified( modifiedCalendar ); inL = inR->clone(); inL->setIDStr( ":" ); inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); - inL->setCalID( 0 );// add to default cal + inL->setCalID_block( 0 );// add to default cal local->addIncidence( inL ); ++addedEvent; } } else { if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { inR->setLastModified( modifiedCalendar ); inL = inR->clone(); inL->setIDStr( ":" ); - inL->setCalID( 0 );// add to default cal + inL->setCalID_block( 0 );// add to default cal local->addIncidence( inL ); ++addedEvent; } else { checkExternSyncEvent(eventRSyncSharp, inR); remote->deleteIncidence( inR ); @@ -1843,13 +1848,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int ++addedEventR; //qDebug("remote added Incidence %s ", inL->summary().latin1()); inL->setLastModified( modifiedCalendar ); inR = inL->clone(); inR->setIDStr( ":" ); inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); - inR->setCalID( 0 );// add to default cal + inR->setCalID_block( 0 );// add to default cal remote->addIncidence( inR ); } } } else { if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { checkExternSyncEvent(eventLSyncSharp, inL); @@ -1858,13 +1863,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } else { if ( ! mSyncManager->mWriteBackExistingOnly ) { ++addedEventR; inL->setLastModified( modifiedCalendar ); inR = inL->clone(); inR->setIDStr( ":" ); - inR->setCalID( 0 );// add to default cal + inR->setCalID_block( 0 );// add to default cal remote->addIncidence( inR ); } } } } else { ++filteredOUT; @@ -2446,13 +2451,15 @@ void CalendarView::mergeFile( QString fn ) updateView(); } void CalendarView::mergeFileResource( QString fn ,QString resource ) { if ( resource == "ALL" ) { + mCalendar->setAllCalendarEnabled( true ); mergeFile( fn ); + restoreCalendarSettings(); return; } int exclusiveResource = KOPrefs::instance()->getFuzzyCalendarID( resource ); if ( !exclusiveResource ) { qDebug("KO: CalendarView::mergeFileResource: resource not found %s", resource.latin1() ); @@ -2594,14 +2601,18 @@ bool CalendarView::saveCalendars() return false; } return true; } bool CalendarView::saveCalendarResource(QString filename, QString resource) { - if ( resource == "ALL" ) - return saveCalendar( filename ); + if ( resource == "ALL" ) { + mCalendar->setAllCalendarEnabled( true ); + bool retval = saveCalendar( filename ); + restoreCalendarSettings(); + return retval; + } int exclusiveResource = KOPrefs::instance()->getFuzzyCalendarID( resource ); if ( !exclusiveResource ) { qDebug("KO: CalendarView::saveCalendarResource: resource not found %s", resource.latin1() ); return false; } mCalendar->setDefaultCalendar( exclusiveResource ); diff --git a/libkcal/dndfactory_dummy.h b/libkcal/dndfactory_dummy.h index 6b73f34..44cc114 100644 --- a/libkcal/dndfactory_dummy.h +++ b/libkcal/dndfactory_dummy.h @@ -51,12 +51,15 @@ class DndFactory { /** cut event to clipboard */ void cutEvent(Event *) {} /** cut, copy, and paste operations follow. */ bool copyEvent(Event *) { return false; } /** pastes the event and returns a pointer to the new event pasted. */ - Event *pasteEvent(const QDate &, const QTime *newTime = 0) { return 0; } + Event *pasteEvent(const QDate &, const QTime *newTime = 0) { + Q_UNUSED( newTime ); + return 0; + } }; } #endif diff --git a/libkdepim/categoryeditdialog.h b/libkdepim/categoryeditdialog.h index 3e8ab45..9bb3201 100644 --- a/libkdepim/categoryeditdialog.h +++ b/libkdepim/categoryeditdialog.h @@ -33,14 +33,14 @@ namespace KPIM { class CategorySelectItem :public QObject, public QCheckListItem { Q_OBJECT public: - CategorySelectItem(QListView * parent, const QString & text, Type tt) : - QCheckListItem (parent, text, tt ) , QObject( parent ) + CategorySelectItem(QListView * parent, const QString & text, Type tt) : QObject( parent ), + QCheckListItem (parent, text, tt ) {;} signals: void stateChanged( QListViewItem*); protected: diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp index a4e0024..2a9b43e 100644 --- a/libkdepim/categoryselectdialog.cpp +++ b/libkdepim/categoryselectdialog.cpp @@ -39,12 +39,13 @@ using namespace KPIM; CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent, const char* name, bool modal, WFlags fl ) : CategorySelectDialog_base( parent, name, true, fl ), mPrefs( prefs ) { + Q_UNUSED( modal ); mColorItem = 0; mColorEnabled = false; mCategories->header()->hide(); setCategories(); diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 0109c02..28c48fe 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -750,13 +750,12 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask) } int maxlen = 30; if ( QApplication::desktop()->width() > 320 ) maxlen += 25; mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) ); - int fileSize = 0; int result = system ( preCommand ); // 0 : okay // 256: no such file or dir // qDebug("KSM::Sync: Remote copy result(0 = okay): %d ",result ); if ( result != 0 ) { @@ -921,13 +920,13 @@ void KSyncManager::confSync() sp->show(); #endif sp->exec(); QStringList oldSyncProfileNames = mSyncProfileNames; mSyncProfileNames = sp->getSyncProfileNames(); mLocalMachineName = sp->getLocalMachineName (); - int ii; + uint ii; for ( ii = 0; ii < oldSyncProfileNames.count(); ++ii ) { if ( ! mSyncProfileNames.contains( oldSyncProfileNames[ii] ) ) mImplementation->removeSyncInfo( oldSyncProfileNames[ii] ); } QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); } @@ -1138,21 +1137,21 @@ void KSyncManager::syncPi() mPisyncFinished = true; return; } mCurrentResourceLocal = ""; mCurrentResourceRemote = ""; if ( mSpecificResources.count() ) { - int lastSyncRes = mSpecificResources.count()/2; + uint lastSyncRes = mSpecificResources.count()/2; int ccc = mSpecificResources.count()-1; while ( lastSyncRes > 0 && ccc > 0 && mSpecificResources[ ccc ].isEmpty() ) { --ccc; --lastSyncRes; //qDebug ( "KSM: sync pi %d",ccc ); } - int startLocal = 0; - int startRemote = mSpecificResources.count()/2; + uint startLocal = 0; + uint startRemote = mSpecificResources.count()/2; emit multiResourceSyncStart( true ); while ( startLocal < mSpecificResources.count()/2 ) { if ( startLocal+1 >= lastSyncRes ) emit multiResourceSyncStart( false ); mPisyncFinished = false; mCurrentResourceLocal = mSpecificResources[ startLocal ]; diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index 604adb8..04cdade 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h @@ -232,13 +232,13 @@ private slots: class KSyncInterface { public : virtual void removeSyncInfo( QString syncProfile) = 0; virtual bool sync(KSyncManager* manager, QString filename, int mode, QString resource) = 0; - virtual bool syncExternal(KSyncManager* manager, QString resource) + virtual bool syncExternal(KSyncManager* /*manager*/, QString /*resource*/) { // empty implementation, because some syncable applications do not // have an external(sharpdtm) syncmode, like pwmanager. return false; } |