summaryrefslogtreecommitdiff
path: root/core/pim/todo/mainwindow.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index 2002e87..9424c23 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -296,7 +296,6 @@ QPopupMenu* MainWindow::contextMenu( int , bool recur ) {
296 return menu; 296 return menu;
297} 297}
298QPopupMenu* MainWindow::options() { 298QPopupMenu* MainWindow::options() {
299 owarn << "Options" << oendl;
300 return m_options; 299 return m_options;
301} 300}
302QPopupMenu* MainWindow::edit() { 301QPopupMenu* MainWindow::edit() {
@@ -315,14 +314,12 @@ OPimTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) {
315 if ( m_curCat == QWidget::tr("Unfiled") ) 314 if ( m_curCat == QWidget::tr("Unfiled") )
316 cat = -1; 315 cat = -1;
317 316
318 owarn << " Category " << cat << " " << m_curCat << oendl; 317 int filter = OPimTodoAccess::FilterCategory;
319
320 int filter = 1;
321 318
322 if (!m_completed ) 319 if (!m_completed )
323 filter |= 4; 320 filter |= OPimTodoAccess::DoNotShowCompleted;
324 if (m_overdue) 321 if (m_overdue)
325 filter |= 2; 322 filter |= OPimTodoAccess::OnlyOverDue;
326 323
327 return m_todoMgr.sorted( asc, sortOrder, filter, cat ); 324 return m_todoMgr.sorted( asc, sortOrder, filter, cat );
328} 325}
@@ -374,7 +371,6 @@ void MainWindow::closeEvent( QCloseEvent* e ) {
374 } 371 }
375 bool quit = false; 372 bool quit = false;
376 if ( m_todoMgr.saveAll() ){ 373 if ( m_todoMgr.saveAll() ){
377 owarn << "saved" << oendl;
378 quit = true; 374 quit = true;
379 }else { 375 }else {
380 if ( QMessageBox::critical( this, QWidget::tr("Out of space"), 376 if ( QMessageBox::critical( this, QWidget::tr("Out of space"),
@@ -537,7 +533,6 @@ void MainWindow::setCategory( int c) {
537 if ( c <= 0 ) return; 533 if ( c <= 0 ) return;
538 534
539 535
540 owarn << "Iterating over cats " << c << oendl;
541 for ( unsigned int i = 1; i < m_catMenu->count(); i++ ) 536 for ( unsigned int i = 1; i < m_catMenu->count(); i++ )
542 m_catMenu->setItemChecked(i, c == (int)i ); 537 m_catMenu->setItemChecked(i, c == (int)i );
543 538
@@ -683,7 +678,6 @@ void MainWindow::slotShow( int uid ) {
683 if ( uid == 0 ) return; 678 if ( uid == 0 ) return;
684 679
685 680
686 owarn << "slotShow" << oendl;
687 currentShow()->slotShow( event( uid ) ); 681 currentShow()->slotShow( event( uid ) );
688 m_stack->raiseWidget( currentShow()->widget() ); 682 m_stack->raiseWidget( currentShow()->widget() );
689} 683}
@@ -742,7 +736,6 @@ void MainWindow::setReadAhead( uint count ) {
742 m_todoMgr.todoDB()->setReadAhead( count ); 736 m_todoMgr.todoDB()->setReadAhead( count );
743} 737}
744void MainWindow::slotQuickEntered() { 738void MainWindow::slotQuickEntered() {
745 owarn << "entered" << oendl;
746 OPimTodo todo = quickEditor()->todo(); 739 OPimTodo todo = quickEditor()->todo();
747 if (todo.isEmpty() ) 740 if (todo.isEmpty() )
748 return; 741 return;
@@ -789,7 +782,6 @@ void MainWindow::slotComplete( const OPimTodo& todo ) {
789 QDate date; 782 QDate date;
790 if ( to2.recurrence().nextOcurrence( to2.dueDate().addDays(1), date ) ) { 783 if ( to2.recurrence().nextOcurrence( to2.dueDate().addDays(1), date ) ) {
791 int dayDiff = to.dueDate().daysTo( date ); 784 int dayDiff = to.dueDate().daysTo( date );
792 owarn << "day diff is " << dayDiff << oendl;
793 QDate inval; 785 QDate inval;
794 /* generate a new uid for the old record */ 786 /* generate a new uid for the old record */
795 to.setUid( 1 ); 787 to.setUid( 1 );
@@ -953,7 +945,6 @@ namespace {
953 void addAlarms( const OPimNotifyManager::Alarms& als, int uid ) { 945 void addAlarms( const OPimNotifyManager::Alarms& als, int uid ) {
954 OPimNotifyManager::Alarms::ConstIterator it; 946 OPimNotifyManager::Alarms::ConstIterator it;
955 for ( it = als.begin(); it != als.end(); ++it ) { 947 for ( it = als.begin(); it != als.end(); ++it ) {
956 owarn << "Adding alarm for " << (*it).dateTime().toString() << oendl;
957 AlarmServer::addAlarm( (*it).dateTime(), "QPE/Application/todolist", "alarm(QDateTime,int)", uid ); 948 AlarmServer::addAlarm( (*it).dateTime(), "QPE/Application/todolist", "alarm(QDateTime,int)", uid );
958 } 949 }
959 950
@@ -961,7 +952,6 @@ namespace {
961 void removeAlarms( const OPimNotifyManager::Alarms& als, int uid ) { 952 void removeAlarms( const OPimNotifyManager::Alarms& als, int uid ) {
962 OPimNotifyManager::Alarms::ConstIterator it; 953 OPimNotifyManager::Alarms::ConstIterator it;
963 for ( it = als.begin(); it != als.end(); ++it ) { 954 for ( it = als.begin(); it != als.end(); ++it ) {
964 owarn << "Removinf alarm for " << (*it).dateTime().toString() << oendl;
965 AlarmServer::deleteAlarm( (*it).dateTime(), "QPE/Application/todolist", "alarm(QDateTime,int)", uid ); 955 AlarmServer::deleteAlarm( (*it).dateTime(), "QPE/Application/todolist", "alarm(QDateTime,int)", uid );
966 } 956 }
967 } 957 }