summaryrefslogtreecommitdiff
path: root/core/pim/today/plugins/addressbook
authorzecke <zecke>2005-06-27 18:38:39 (UTC)
committer zecke <zecke>2005-06-27 18:38:39 (UTC)
commitb82756d94b91516a7c36903648382a224a36f0e2 (patch) (side-by-side diff)
tree006d574768ad60e94860f9f59a9e91ccf29c71f4 /core/pim/today/plugins/addressbook
parentc3d21fe2179b4841cc95b4ee9ecac6b053e9ee17 (diff)
downloadopie-b82756d94b91516a7c36903648382a224a36f0e2.zip
opie-b82756d94b91516a7c36903648382a224a36f0e2.tar.gz
opie-b82756d94b91516a7c36903648382a224a36f0e2.tar.bz2
Use the two new Sort Flags. I applied an older/wrong version of the patch before
Patch courtsey Marcin Juszkiewicz
Diffstat (limited to 'core/pim/today/plugins/addressbook') (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 d74df51..7346cae 100644
--- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
+++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
@@ -109,25 +109,25 @@ void AddressBookPluginWidget::getAddress() {
Opie::OPimContact querybirthdays;
querybirthdays.setBirthday( lookAheadDate );
m_list = m_contactdb->queryByExample( querybirthdays,
Opie::OPimContactAccess::DateDiff );
if ( m_list.count() > 0 ){
output = "<font color=" + m_headlineColor + ">"
+ QObject::tr( "Next birthdays in <b> %1 </b> days:" )
.arg( m_daysLookAhead )
+ "</font> <br>";
// Sort filtered results
- m_list = m_contactdb->sorted( m_list, true, Opie::OPimContactAccess::SortBirthday,
+ m_list = m_contactdb->sorted( m_list, true, Opie::OPimContactAccess::SortBirthdayWithoutYear,
Opie::OPimContactAccess::FilterOff, 0 );
for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) {
if ( ammount++ < m_maxLinesTask ){
// Now we want to calculate how many days
//until birthday. We have to set
// the correct year to calculate the day diff...
QDate destdate = (*m_it).birthday();
destdate.setYMD( QDate::currentDate().year(),
destdate.month(), destdate.day() );
if ( QDate::currentDate().daysTo(destdate) < 0 )
destdate.setYMD( QDate::currentDate().year()+1,
@@ -166,25 +166,25 @@ void AddressBookPluginWidget::getAddress() {
queryanniversaries.setAnniversary( lookAheadDate );
m_list = m_contactdb->queryByExample( queryanniversaries, Opie::OPimContactAccess::DateDiff );
ammount = 0;
if ( m_list.count() > 0 ){
output += "<font color=" + m_headlineColor + ">"
+ QObject::tr( "Next anniversaries in <b> %1 </b> days:" )
.arg( m_daysLookAhead )
+ "</font> <br>";
// Sort filtered results
- m_list = m_contactdb->sorted( m_list, true, Opie::OPimContactAccess::SortAnniversary,
+ m_list = m_contactdb->sorted( m_list, true, Opie::OPimContactAccess::SortAnniversaryWithoutYear,
Opie::OPimContactAccess::FilterOff, 0 );
for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) {
if ( ammount++ < m_maxLinesTask ){
// Now we want to calculate how many days until anniversary.
// We have to set the correct year to calculate the day diff...
QDate destdate = (*m_it).anniversary();
destdate.setYMD( QDate::currentDate().year(), destdate.month(),
destdate.day() );
if ( QDate::currentDate().daysTo(destdate) < 0 )
destdate.setYMD( QDate::currentDate().year()+1,
destdate.month(), destdate.day() );