summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
index 75bf474..d74df51 100644
--- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
+++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
@@ -110,25 +110,25 @@ void AddressBookPluginWidget::getAddress() {
110 querybirthdays.setBirthday( lookAheadDate ); 110 querybirthdays.setBirthday( lookAheadDate );
111 111
112 m_list = m_contactdb->queryByExample( querybirthdays, 112 m_list = m_contactdb->queryByExample( querybirthdays,
113 Opie::OPimContactAccess::DateDiff ); 113 Opie::OPimContactAccess::DateDiff );
114 if ( m_list.count() > 0 ){ 114 if ( m_list.count() > 0 ){
115 output = "<font color=" + m_headlineColor + ">" 115 output = "<font color=" + m_headlineColor + ">"
116 + QObject::tr( "Next birthdays in <b> %1 </b> days:" ) 116 + QObject::tr( "Next birthdays in <b> %1 </b> days:" )
117 .arg( m_daysLookAhead ) 117 .arg( m_daysLookAhead )
118 + "</font> <br>"; 118 + "</font> <br>";
119 119
120 // Sort filtered results 120 // Sort filtered results
121 m_list = m_contactdb->sorted( m_list, true, Opie::OPimContactAccess::SortBirthday, 121 m_list = m_contactdb->sorted( m_list, true, Opie::OPimContactAccess::SortBirthday,
122 Opie::OPimContactAccess::FilterOff, NULL ); 122 Opie::OPimContactAccess::FilterOff, 0 );
123 123
124 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) { 124 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) {
125 if ( ammount++ < m_maxLinesTask ){ 125 if ( ammount++ < m_maxLinesTask ){
126 // Now we want to calculate how many days 126 // Now we want to calculate how many days
127 //until birthday. We have to set 127 //until birthday. We have to set
128 // the correct year to calculate the day diff... 128 // the correct year to calculate the day diff...
129 QDate destdate = (*m_it).birthday(); 129 QDate destdate = (*m_it).birthday();
130 destdate.setYMD( QDate::currentDate().year(), 130 destdate.setYMD( QDate::currentDate().year(),
131 destdate.month(), destdate.day() ); 131 destdate.month(), destdate.day() );
132 if ( QDate::currentDate().daysTo(destdate) < 0 ) 132 if ( QDate::currentDate().daysTo(destdate) < 0 )
133 destdate.setYMD( QDate::currentDate().year()+1, 133 destdate.setYMD( QDate::currentDate().year()+1,
134 destdate.month(), destdate.day() ); 134 destdate.month(), destdate.day() );
@@ -167,25 +167,25 @@ void AddressBookPluginWidget::getAddress() {
167 167
168 m_list = m_contactdb->queryByExample( queryanniversaries, Opie::OPimContactAccess::DateDiff ); 168 m_list = m_contactdb->queryByExample( queryanniversaries, Opie::OPimContactAccess::DateDiff );
169 169
170 ammount = 0; 170 ammount = 0;
171 if ( m_list.count() > 0 ){ 171 if ( m_list.count() > 0 ){
172 output += "<font color=" + m_headlineColor + ">" 172 output += "<font color=" + m_headlineColor + ">"
173 + QObject::tr( "Next anniversaries in <b> %1 </b> days:" ) 173 + QObject::tr( "Next anniversaries in <b> %1 </b> days:" )
174 .arg( m_daysLookAhead ) 174 .arg( m_daysLookAhead )
175 + "</font> <br>"; 175 + "</font> <br>";
176 176
177 // Sort filtered results 177 // Sort filtered results
178 m_list = m_contactdb->sorted( m_list, true, Opie::OPimContactAccess::SortAnniversary, 178 m_list = m_contactdb->sorted( m_list, true, Opie::OPimContactAccess::SortAnniversary,
179 Opie::OPimContactAccess::FilterOff, NULL ); 179 Opie::OPimContactAccess::FilterOff, 0 );
180 180
181 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) { 181 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) {
182 if ( ammount++ < m_maxLinesTask ){ 182 if ( ammount++ < m_maxLinesTask ){
183 // Now we want to calculate how many days until anniversary. 183 // Now we want to calculate how many days until anniversary.
184 // We have to set the correct year to calculate the day diff... 184 // We have to set the correct year to calculate the day diff...
185 QDate destdate = (*m_it).anniversary(); 185 QDate destdate = (*m_it).anniversary();
186 destdate.setYMD( QDate::currentDate().year(), destdate.month(), 186 destdate.setYMD( QDate::currentDate().year(), destdate.month(),
187 destdate.day() ); 187 destdate.day() );
188 if ( QDate::currentDate().daysTo(destdate) < 0 ) 188 if ( QDate::currentDate().daysTo(destdate) < 0 )
189 destdate.setYMD( QDate::currentDate().year()+1, 189 destdate.setYMD( QDate::currentDate().year()+1,
190 destdate.month(), destdate.day() ); 190 destdate.month(), destdate.day() );
191 191