author | zecke <zecke> | 2005-06-27 17:58:53 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-06-27 17:58:53 (UTC) |
commit | 058e3b6b0bc8f29314ee794bf7e993ebf3bfe072 (patch) (side-by-side diff) | |
tree | 1b60828635ad0f0a526fe6298401f48cd6edc831 | |
parent | 0c99f2087c4d5a1cab6c2bd1083d6db3f2a4cae8 (diff) | |
download | opie-058e3b6b0bc8f29314ee794bf7e993ebf3bfe072.zip opie-058e3b6b0bc8f29314ee794bf7e993ebf3bfe072.tar.gz opie-058e3b6b0bc8f29314ee794bf7e993ebf3bfe072.tar.bz2 |
Fix the compiler warning with converting NULL to integer.
I hope this has no negative side effects
-rw-r--r-- | core/pim/today/plugins/addressbook/addresspluginwidget.cpp | 4 |
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 @@ -74,152 +74,152 @@ void AddressBookPluginWidget::readConfig() { /** * Get the addresss */ void AddressBookPluginWidget::getAddress() { if ( ! layoutTodo ){ layoutTodo = new QVBoxLayout( this ); } if ( ! addressLabel ) { addressLabel = new Opie::Ui::OClickableLabel( this ); connect( addressLabel, SIGNAL( clicked() ), this, SLOT( startAddressBook() ) ); layoutTodo->addWidget( addressLabel ); } QString output; // Check whether the database provide the search option.. if ( !m_contactdb->hasQuerySettings( Opie::OPimContactAccess::DateDiff ) ){ // Libopie seems to be old.. output = QObject::tr( "Database does not provide this search query ! Please upgrade libOpie !<br>" ); addressLabel->setText( output ); return; } // Define the query for birthdays and start search.. QDate lookAheadDate = QDate::currentDate().addDays( m_daysLookAhead ); int ammount = 0; if ( m_showBirthdays ){ owarn << "Searching from now (" << QDate::currentDate().toString() << ") until " << lookAheadDate.toString() << " ! " << oendl; if ( m_contactdb->hasQuerySettings( Opie::OPimContactAccess::DateDiff ) ){ 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, - Opie::OPimContactAccess::FilterOff, NULL ); + 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, destdate.month(), destdate.day() ); if ( QDate::currentDate().daysTo(destdate) < m_urgentDays ) output += "<font color=" + m_urgentColor + "><b>-" + (*m_it).fullName() + " (" + QString::number(QDate::currentDate() .daysTo(destdate)) + " Days) </b></font><br>"; else output += "<font color=" + m_entryColor + "><b>-" + (*m_it).fullName() + " (" + QString::number(QDate::currentDate() .daysTo(destdate)) + " Days) </b></font><br>"; } } } else { output = "<font color=" + m_headlineColor + ">" + QObject::tr( "No birthdays in <b> %1 </b> days!" ) .arg( m_daysLookAhead ) + "</font> <br>"; } } } if ( m_showAnniversaries ){ // Define the query for anniversaries and start search.. Opie::OPimContact queryanniversaries; 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, - Opie::OPimContactAccess::FilterOff, NULL ); + 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() ); if ( QDate::currentDate().daysTo(destdate) < m_urgentDays ) output += "<font color=" + m_urgentColor + "><b>-" + (*m_it).fullName() + " (" + QString::number(QDate::currentDate() .daysTo( destdate ) ) + " Days) </b></font><br>"; else output += "<font color=" + m_entryColor + "><b>-" + (*m_it).fullName() + " (" + QString::number(QDate::currentDate() .daysTo( destdate ) ) + " Days) </b></font><br>"; } } } else { output += "<font color=" + m_headlineColor + ">" + QObject::tr( "No anniversaries in <b> %1 </b> days!" ) .arg( m_daysLookAhead ) + "</font> <br>"; } } addressLabel->setText( output ); } /** * start the todolist */ void AddressBookPluginWidget::startAddressBook() { QCopEnvelope e( "QPE/System", "execute(QString)" ); e << QString( "addressbook" ); } |