summaryrefslogtreecommitdiff
path: root/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
Unidiff
Diffstat (limited to 'core/pim/today/plugins/addressbook/addresspluginwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginwidget.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
index 498de28..dad09db 100644
--- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
+++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
@@ -64,6 +64,10 @@ void AddressBookPluginWidget::refresh( const OContactAccess* )
64 getAddress(); 64 getAddress();
65} 65}
66 66
67void AddressBookPluginWidget::reinitialize() {
68 readConfig();
69 getAddress();
70}
67 71
68void AddressBookPluginWidget::readConfig() { 72void AddressBookPluginWidget::readConfig() {
69 Config cfg( "todayaddressplugin" ); 73 Config cfg( "todayaddressplugin" );
@@ -98,10 +102,7 @@ void AddressBookPluginWidget::getAddress() {
98 QString output; 102 QString output;
99 103
100 // Check whether the database provide the search option.. 104 // Check whether the database provide the search option..
101 // The following if-statement was replaced due to a bug in some 105 if ( !m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){
102 // implementations of libopie. The replacement should work everywhere..(eilers)
103 // if ( !m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){
104 if ( !( m_contactdb->querySettings() & OContactAccess::DateDiff ) ){
105 // Libopie seems to be old.. 106 // Libopie seems to be old..
106 output = QObject::tr( "Database does not provide this search query ! Please upgrade libOpie !<br>" ); 107 output = QObject::tr( "Database does not provide this search query ! Please upgrade libOpie !<br>" );
107 addressLabel->setText( output ); 108 addressLabel->setText( output );
@@ -115,10 +116,10 @@ void AddressBookPluginWidget::getAddress() {
115 qWarning("Searching from now (%s) until %s ! ", 116 qWarning("Searching from now (%s) until %s ! ",
116 QDate::currentDate().toString().latin1(), 117 QDate::currentDate().toString().latin1(),
117 lookAheadDate.toString().latin1() ); 118 lookAheadDate.toString().latin1() );
119
118 OContact querybirthdays; 120 OContact querybirthdays;
119 querybirthdays.setBirthday( lookAheadDate ); 121 querybirthdays.setBirthday( lookAheadDate );
120 122
121
122 m_list = m_contactdb->queryByExample( querybirthdays, 123 m_list = m_contactdb->queryByExample( querybirthdays,
123 OContactAccess::DateDiff ); 124 OContactAccess::DateDiff );
124 if ( m_list.count() > 0 ){ 125 if ( m_list.count() > 0 ){