-rw-r--r-- | core/pim/todo/tableview.cpp | 7 | ||||
-rw-r--r-- | core/pim/todo/todoview.cpp | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index 097af39..eaaf1bc 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp | |||
@@ -133,27 +133,30 @@ int TableView::current() { | |||
133 | return cur; | 133 | return cur; |
134 | } | 134 | } |
135 | QString TableView::currentRepresentation() { | 135 | QString TableView::currentRepresentation() { |
136 | return text( currentRow(), 2); | 136 | return text( currentRow(), 2); |
137 | } | 137 | } |
138 | /* show overdue */ | 138 | /* show overdue */ |
139 | void TableView::showOverDue( bool ) { | 139 | void TableView::showOverDue( bool ) { |
140 | clear(); | 140 | clear(); |
141 | updateView(); | 141 | updateView(); |
142 | } | 142 | } |
143 | 143 | ||
144 | void TableView::updateView( ) { | 144 | void TableView::updateView( ) { |
145 | setSortOrder( 0 ); | ||
146 | setAscending( true ); | ||
147 | sort(); | ||
145 | OTodoAccess::List::Iterator it, end; | 148 | OTodoAccess::List::Iterator it, end; |
146 | it = list().begin(); | 149 | it = sorted().begin(); |
147 | end = list().end(); | 150 | end = sorted().end(); |
148 | qWarning("setTodos"); | 151 | qWarning("setTodos"); |
149 | QTime time; | 152 | QTime time; |
150 | time.start(); | 153 | time.start(); |
151 | m_enablePaint = false; | 154 | m_enablePaint = false; |
152 | setUpdatesEnabled( false ); | 155 | setUpdatesEnabled( false ); |
153 | viewport()->setUpdatesEnabled( false ); | 156 | viewport()->setUpdatesEnabled( false ); |
154 | clear(); | 157 | clear(); |
155 | QString currentCat = todoWindow()->currentCategory(); | 158 | QString currentCat = todoWindow()->currentCategory(); |
156 | bool showCompleted = todoWindow()->showCompleted(); | 159 | bool showCompleted = todoWindow()->showCompleted(); |
157 | bool showOverDue = todoWindow()->showOverDue(); | 160 | bool showOverDue = todoWindow()->showOverDue(); |
158 | qWarning( "Current Category:" + todoWindow()->currentCategory() ); | 161 | qWarning( "Current Category:" + todoWindow()->currentCategory() ); |
159 | int id = todoWindow()->currentCatId(); | 162 | int id = todoWindow()->currentCatId(); |
diff --git a/core/pim/todo/todoview.cpp b/core/pim/todo/todoview.cpp index b77baed..06eaaa9 100644 --- a/core/pim/todo/todoview.cpp +++ b/core/pim/todo/todoview.cpp | |||
@@ -50,24 +50,25 @@ MainWindow* TodoView::todoWindow() { | |||
50 | } | 50 | } |
51 | 51 | ||
52 | OTodo TodoView::event(int uid ) { return m_main->event( uid ); } | 52 | OTodo TodoView::event(int uid ) { return m_main->event( uid ); } |
53 | OTodoAccess::List TodoView::list(){ | 53 | OTodoAccess::List TodoView::list(){ |
54 | todoWindow()->updateList(); | 54 | todoWindow()->updateList(); |
55 | return todoWindow()->list(); | 55 | return todoWindow()->list(); |
56 | } | 56 | } |
57 | OTodoAccess::List TodoView::sorted(){ | 57 | OTodoAccess::List TodoView::sorted(){ |
58 | return m_sort; | 58 | return m_sort; |
59 | } | 59 | } |
60 | void TodoView::sort() { | 60 | void TodoView::sort() { |
61 | m_sort = todoWindow()->sorted(m_asc,m_sortOrder ); | 61 | m_sort = todoWindow()->sorted(m_asc,m_sortOrder ); |
62 | qWarning("m_sort.count() = %d", m_sort.count() ); | ||
62 | } | 63 | } |
63 | void TodoView::sort(int sort) { | 64 | void TodoView::sort(int sort) { |
64 | m_sort = todoWindow()->sorted(m_asc, m_sortOrder, sort ); | 65 | m_sort = todoWindow()->sorted(m_asc, m_sortOrder, sort ); |
65 | } | 66 | } |
66 | void TodoView::setSortOrder( int order ) { | 67 | void TodoView::setSortOrder( int order ) { |
67 | m_sortOrder = order; | 68 | m_sortOrder = order; |
68 | } | 69 | } |
69 | void TodoView::setAscending( bool b ) { | 70 | void TodoView::setAscending( bool b ) { |
70 | m_asc = b; | 71 | m_asc = b; |
71 | } | 72 | } |
72 | void TodoView::update(int uid, const SmallTodo& to ) { | 73 | void TodoView::update(int uid, const SmallTodo& to ) { |
73 | //m_main->slotUpate1( uid, to ); | 74 | //m_main->slotUpate1( uid, to ); |